Generate virtual piano sheet music from a MIDI file also known as .mid files to play yourself or have your computer play it for you. Known to work well with Virtual Piano and Roblox pianos.
This piano player portion of this program makes use of the python keyboard library which generates key presses programmatically. Antivirus software may (correctly) detect this as malicious activity! The executables were generated via pyinstaller --onefile
, which bundles a python program and its dependencies into a portable executable that requires no setup. Everyone is welcome to audit the scripts and generate the executable for themselves.
- MIDI to Virtual Piano Sheet Conversion: Convert MIDI files into sheet music for virtual pianos.
- Automated and Manual Playback: Play the music automatically or control playback manually.
- Human-Like Playback with Legit Mode: Simulate human playing style with timing variations.
- Playback Speed Control: Adjust the speed of the song playback as needed.
- Easy Setup: Simple to install and run.
Make sure that python is installed and in PATH
- Go to the releases page and download the latest release for your operating system (Windows, Linux, etc.) or clone the repository using
git clone https://github.com/Stereo101/python-MidiToVirtualPianoMacro
. - Extract
pyMIDI
andplaySong
and add some MIDI files to the midi directory. - Install
pynput
by runningpip install pynput
in your terminal (Command Prompt for Windows. Terminal for MacOS and Linux.) - Run
pyMIDI
. It will show you a list of songs from the midi directory. Pick any song and it will generate a few files.song.txt
is what the program will read to play the song.midiRecord.txt
is for debugging purposes. It is a log of what the converter did while processing the MIDI file.SheetConversion.txt
is a human-readable version ofsong.txt
that shows the notes in a more readable format.
- It will wait for you to press the Delete key. Go to the program you want to play the song in and press the Delete key. The program will play the song for you.
It is not recommended to run playsong
unless you know what you are doing.
https://www.youtube.com/watch?v=U1a6-y5X8BQ
https://www.youtube.com/watch?v=QsLP5m1MB3k
These videos link to potentially unsafe 3rd party downloads
https://www.youtube.com/watch?v=wNDSCnH23eQ
https://www.youtube.com/watch?v=6kt07i82QlE