In theory you should be able to convert sheet music from a PDF to MIDI with something like this (I did a quick Google search)
https://www.musitek.com/smartscore-midi.html
Once you have a MIDI[1] file, you can do a lot of interesting things with your music, such as generating or modifying notes with random values for pitch, velocity etc.
[1] https://en.wikipedia.org/wiki/MIDI