Musical programming

I've been thinking recently about some ideas for a musical programming language. I don't mean a programming language for writing music, there are lots of those, but more like a programming language written in music. We seem to be surprisingly conservative at times when coming up with new kinds of programming, given the relatively low bar for universal computation. Mostly we end up revisiting the same old Algol or Lisp-derived designs.
So I think something that could be called musical programming would start with structures found in music, and the aesthetics of music, and figure out a way to use those to do computation. We mostly hear intervals between notes rather than their absolute frequencies, so it would make sense for the syntax in the language to be specified by intervals. It's also common to have a hierarchy that builds through melody or chord progressions that eventually resolves via cadence, which would be a good way to represent nested structure (like parentheses in other languages).
In music, there is a lot of room for interpretation; even when a classical musician adheres to the intent of the original composer, they will still add their own emotion and intonation. Similarly, then, musical programming would have a lot of ways to express the same thing, allowing for a large range of artistic expression while still being recognisable as the original piece. Maybe this would even go so far as ignoring the key and the rhythm entirely, as long as the relative intervals and key changes stay the same.
Most importantly, musical programming would need to be designed to accept music as input and produce it as output. Much as you use language to speak about language, or write programs to interpret programs, a musical programming language should be able to reason about itself. It should be possible to write a musical program to transform other music, or even other musical programs. And, of course, you could create and execute musical programs entirely using musical instruments.
Taken together, this should give a skilled musical programmer the ability to live-compose music that composes other music, which I think would be a substantial triumph of the idea.