midi_pitch
is a library for displaying the pitch (from a vocal sound) and the midi (from a midi file) as a video with four lines 😘
from midi_pitch import Handler
handler = Handler(midi_file=midi_file, vocal_file=vocal_file, output_path=output_path)
handler.compare()
handler.render()
which will output three files in the output_path
: pitch.pdf
, pitch.png
, and pitch.mp4
. See BV1z8411T7vH as a demo output. For the full documentation of Handler
, please read handler.py.
- Install all python packages listed in
requirements.txt
- Install
ffmpeg
- Install
ImageMagick
- Change
vocal_file
、midi_file
inmain.py
to the path of the vocal/MIDI file python3 main.py
or
- Open midi_pitch on Google Colab to use it without installing anything.
- Generate high-quality vocal sound. If you come up with a piece of mixed music, I recommend using Spleeter or Demucs to separate the vocal sound
- Call
Handler.compare
and check the comparison imagepitch.png
, change parameters if needed - Call
Handler.render
and have a cup of ☕ - Adjust the notes in your project according to
pitch.mp4