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

some midis wont be read #28

Open Heroyouu opened 2 years ago

Heroyouu commented 2 years ago

They appear in the pyMIDI.exe, but it gives off an error image I dunno python so I'm not exactly sure what it means, These are two songs that dont work for me dont work.zip

Stereo101 commented 2 years ago

This looks like an oversight in the "save_record" function when non-ascii characters are contained in the midi file (in a text or comment section). To properly fix this, I'd need to change the log file to be utf-16 formatted, or the errors="ignore" flag could be set in the string decode in "save_record".

I don't have a working setup to build this project, but a few workarounds are possible. You can either comment out all calls to "save_record" or just change the definition of "save_record" to start with "return". Alternatively you can use the dev branch which doesn't emit this log file, but the UI is different. Unfortunately all of these cases require a working python3 install with the "keyboard" library installed since you wouldn't be using the prebuilt exe.

Heroyouu commented 2 years ago

Alright, I can just use the dev branch for now until its fixed.