This whole situation is as Chagos describes it: a perfect storm of corrupt, self-serving politicos who have no interest in addressing Spain's real economic and social issues. This stuff is so much more engaging than actual politics.
The Spanish government is making a huge mistake in the level of violence it is using to suppress the referendum; that's playing directly into the hands of the Catalan separatists who can now draw ever more convincing parallels with the behaviour of the dictatorship. The referendum may indeed contravene the Spanish constitution, but the overwhelming majority of Catalans who want to vote, many of whom are against independence, cannot be ignored. They want an existential, constitutional question answered and the constitution currently does not provide that answer. It should be the role of the central government to amend the constitution to facilitate the ability of the Catalan people to express their will. There's little doubt in my mind that they would vote to remain a part of Spain, and remain within the EU and its single market.
For their part the Catalan separatists are using every tactic of emotional blackmail to further their unilateral policy. They depend very heavily on a victim mentality that the Spanish government for some reason seems only too happy to play up to.
The sensible, and therefore utterly improbable, course of action would be for the Spanish parliament to agree a constitutional amendment that allows for the expression of secessionist opinion from autonomous communities within the kingdom. A nationwide referendum on the issue could thereby be held which could settle the question for good. In the unlikely event of the Catalan vote result being different from the national vote, a process of negotiation mediated by a supra-national body (EU, UN, Council of Europe) could take place.