yuma-m / pychord

Python library to handle musical chords.
https://pypi.python.org/pypi/pychord
MIT License
248 stars 46 forks source link

Chords with time to generate a midi file #50

Closed SutirthaChakraborty closed 3 years ago

SutirthaChakraborty commented 3 years ago

Hi,

I have a code that extracts the chords from the audio. It returns the following

  1. Start time of the chord
  2. Signature
  3. Name of the chord (Image attached) image

I want to recreate a MIDI file based on that information. How can I do that?

Thanks, Suti

yuma-m commented 3 years ago

Hi, there are some libraries to create a MIDI file. You can integrate PyChord with those libraries by using Chord.components_with_pitch method. https://github.com/vishnubob/python-midi https://github.com/craffel/pretty-midi

yuma-m commented 3 years ago

Please confirm the example: https://github.com/yuma-m/pychord/blob/master/examples/pychord-midi.py