Stereo101 / python-MidiToVirtualPianoMacro

Takes a midi file and converts it into a macro which will play the midi using virtualpiano.net. Uses pyHook and ctypes for macro execution.
96 stars 82 forks source link

Is there any way to hold the notes down? #16

Closed Axarea closed 3 years ago

Axarea commented 3 years ago

I found a new virtual piano platform, and it has a way to manually sustain notes. Is there any way I can mess around with the code to make it detect when to press a certain note, and when to let go?

Stereo101 commented 3 years ago

Yes it is possible, and it would require changes to the code. The source files are in the Source folder directly if you know a bit of python3 or would like to learn.

Is the sustain is done on a per note basis by holding the note down, or is it done through something like a piano sustain peddle where all notes played are sustained as long as the peddle is down? The Midi specification has both a notion of "Pedal" track events and key press / key release. The midi file you are using would of course need to have one of these modes of sustain encoded in the first place.

Axarea commented 3 years ago

It would be for each individual note, the easiest way to explain it would be the visual in synthesia, do those note sustains transfer over?

Axarea commented 3 years ago

I should also mention that I don't know python to the slightest, I've only learned a little bit of lua, and I'm not exactly sure what to even be looking for in this situation...

Stereo101 commented 3 years ago

Information about held notes is now pulled from the midi file.