profiles | ||
.gitignore | ||
COPYING | ||
keyboard_editor.py | ||
makeMIDI.py | ||
README.md |
vis2midi
Turn any 'top-down' or 'visualized' piano tutorial into a MIDI file.
Why MIDI?
- You can later create your own sheet and edit it with software like MuseScore
Requirements
opencv-python
, json
, os
and midiutil
via
pip install opencv-python json os midiutil
How it works
This project uses machine vision (opencv2
) on the easiest level: watching a few pixels change color and saving the time stamp.
This data gets later written into a MIDI file.
There are currently two modes available:
Switch between the modes by changing
with_color
- 'Background-mode' uses the default color of the keys to detect a changes. This mode requires you to add the color for the white and black keys in the tutorial.
- 'Highlight-mode' uses the highlight color of the keys to detect changes. This mode requires you to add all colors used in the tutorial.
There might come other modes that combine both methods or use a better way to calculate color differences.
This script is not 100% accurate due to compression and other distortions (glowing effects etc.) You can set your own tolerance for the colors to achieve the best results for your case.
License
GNU General Public License v3.0 or later
See COPYING to see the full text.
Made with ❤ by gilex