Skip to main content

Convert audio to multichannel MIDI.

Project description

audio-to-midi

audio-to-midi takes in a sound file and converts it to a multichannel MIDI file. It accomplishes this by performing FFT's on all channels of the audio data at user specified time steps. It then separates the resulting frequency analysis into equivalence classes which correspond to the twelve tone scale; the volume of each class being the average volume of its constituent frequencies. It then formats this data for MIDI and writes it out to a user specified file. It has the ability to convert whichever audio file formats are supported by the soundfile module. libsndfile must be installed before running audio-to-midi

Installation

> python3 ./setup.py install

Usage

> audio-to-midi --help
usage: audio-to-midi [-h] [--output OUTPUT] [--time-quantum TIME_QUANTUM]
                     [--activation-level ACTIVATION_LEVEL] [--condense]
                     [--single-note]
                     infile

positional arguments:
  infile                The sound file to process.

optional arguments:
  -h, --help            show this help message and exit
  --output OUTPUT, -o OUTPUT
                        The MIDI file to output. Default: <infile>.mid
  --time-quantum TIME_QUANTUM, -t TIME_QUANTUM
                        The time span over which to compute the individual
                        FFTs in milliseconds.
  --activation-level ACTIVATION_LEVEL, -a ACTIVATION_LEVEL
                        The amplitude threshold for notes to be added to the
                        MIDI file. Must be between 0 and 1.
  --condense, -c        Combine contiguous notes at their average amplitude.
  --single-note, -s     Only add the loudest note to the MIDI file for a given
                        time span.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

audio_to_midi-2019.1.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distributions

audio_to_midi-2019.1-py3.5.egg (14.6 kB view hashes)

Uploaded Source

audio_to_midi-2019.1-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page