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.
102 stars 84 forks source link

Keypress length #19

Closed venti-latte closed 3 years ago

venti-latte commented 3 years ago

So I was looking through a MIDI file using an editor and noticed that some notes are held rather than pressed. Can you make it so that it holds the key according to length of the note.

Stereo101 commented 3 years ago

The update I made to the program last month that implemented this. As an example in song.txt you may have notes like this:

4.0 epI
5.997916666666667 ~e
5.997916666666667 ~p
6.0 wo
6.997916666666667 ~w
6.997916666666667 ~o
7.0 eQ
7.997916666666667 ~e
7.997916666666667 ~I

You can see from the first chord (epI), ep are released (~ preceding a note means release) while I is held much longer.

Do you have an example where the above isn't working?

venti-latte commented 3 years ago

Oh, sorry. I didn't check the new update. I downloaded the program again and it got the correct tempo for each key. Thanks :D