It is not often appreciated outside of the programing community, but playing music from printed sheet music prepares you for the idea of performing distinct steps in a specific order. You learn about repetition (looping) within a longer sequence because of repeating the same musical phrase several times for different verses in a song. You learn about "case" statements when you have different words for verses or different musical verse endings for a repeat sequence depending on which verse you are playing. There is the "jump and return" concept when you play something that involves the "Coda" and "Dal segno al coda" constructs. Also happens when you have tradition verse, chorus, and a "trio" passage that then returns to the verse and chorus. AND there is the idea of parallel operations (multi-threading) if you have what is called contrapuntal harmony (a.k.a. "counterpoint") where two different but related passages are played at once, one on each hand. Programming can get more complex than most music, but music concepts helped me a lot.
I won't say that my ability to play music "the right way" made me a better programmer. But it did prepare me for a lot of advanced programming concepts. Then again, considering that originally I was trained as a chemist, there was a bit of a gap there. But it filled in nicely and I became a computer-literate chemist, which made me a multi-threat person.