Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.55 KB

README.en.md

File metadata and controls

31 lines (24 loc) · 1.55 KB

zh en

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.

Requirements

  • Install all python packages listed in requirements.txt
  • Install ffmpeg
  • Install ImageMagick

Quick Start

  • Change vocal_filemidi_file in main.py to the path of the vocal/MIDI file
  • python3 main.py

or

Recommended Workflow

  • 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 image pitch.png, change parameters if needed
  • Call Handler.render and have a cup of ☕
  • Adjust the notes in your project according to pitch.mp4