Just imagining how awful this would turn out if applied to the world of software makes my skin crawl.
A few musicians become big stars and can make a lot of money for themselves and for musicians who work with/for them. It falls off rapidly from there.
It would probably actually be worse for coders than it is for musicians, because the big money making projects in coding usually involve a lot more people and a lot more up front investment. A few people who led the project or wrote the truly innovative parts would get most of the royalties. The people who do the more routine parts (which is most of almost all projects) that any decent programmer could have done will get only a small amount.
For anyone curious what it is like for a musician, here's an interesting video from a well-known YouTube guitarist who is managing to make a living as a guitarist, going over a variety of ways that a guitarist might make money [1]. He looks at local gigs, touring with a mid level act, touring with a top level act, busking, cruise ships, studio work, teaching private lessons, university instructor, endorsement deals, and content creator.
If anything, musicians need to follow WGA and SAG-AFTRA and DGA’s lead and get proper streaming royalty schedules, anti-AI-training clauses, etc. into their standard contract structures.
That's ignoring masters and remixes, but I think my point still stands