I have a midi file that I'd like to algorithmically add notes to relative to other notes that already exist in the midi file using python, or if it's easier using a different language I'm open to that as well.  So basically, I have a midi file with a bunch of notes, and let's say I'd like to add 5 or 6 new notes surrounding each of the existing notes with timing differences that are randomly generated (for example time differences with a random amount of milliseconds difference between -10 and 10).So with each note already existing in the midi file I'd add 5 or 6 new ones surrounding it to a new midi file, offset by a randomly determined amount of milliseconds. Also, if possible, I'd like to randomly vary the velocities of each new note in the same manner relative to the note in the original midi file.The only part I'm not sure how to do is read and write into a midi file based on its note onset contents?
How to algorithmically add notes to an existing midi file relative to positions of existing notes in python
design;algorithms;python