I once had a piano teacher who remarked: "why do musicians make so little money? For the same reason they do so many drugs. Professional musicians are paid in dopamine."
There is nothing like a crowd cheering for you.
But you're right, you can make a living being a wedding DJ, or if you can get gigs at upscale hotels/restaurants playing cello or piano, you can make a pretty decent living as a musician. But it takes a lot more work than learning to hook up a bunch of web forms to a database, and usually, it pays a lot less money. Then there's always teaching; and I believe if you have the ability to kindly teach music to children, you have attained enlightenment.
If you are striking out on your own, the grind is like founding a startup. If you build yet another photo-sharing app (or you're a guitar player who sings about love), you have to be uncommonly talented and lucky to break through. Similarly, startups come in many genres; maybe high tech startups are like jazz - often founded by PhDs, and very often failures because no one can wrap their head around it - even though it is brilliant.
If you can make it work - either startups or music, you get paid in dopamine and money. If you make it out the other side of that gauntlet, I believe you have also achieved enlightenment.
If you want to "make a living", it can be done in music. However, you will generally be more stable and comfortable in the world of tech.