Go to file
gilex-dev dc8fb5d0f2 Release 1.0 2023-01-04 23:44:08 +01:00
profiles Release 1.0 2023-01-04 23:44:08 +01:00
.gitignore Release 1.0 2023-01-04 23:44:08 +01:00
COPYING Release 1.0 2023-01-04 23:44:08 +01:00
README.md Release 1.0 2023-01-04 23:44:08 +01:00
keyboard_editor.py Release 1.0 2023-01-04 23:44:08 +01:00
makeMIDI.py Release 1.0 2023-01-04 23:44:08 +01:00

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

  1. '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.
  2. '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