audio-to-midi

star 0

Extracts melody from audio files and converts them to MIDI using Librosa.

ethanranxu By ethanranxu schedule Updated 2/4/2026

name: audio-to-midi description: Extracts melody from audio files and converts them to MIDI using Librosa.

Audio to MIDI Converter

This skill converts audio files (like MP3, WAV) into MIDI files. It uses librosa for pitch detection to extract the main melody.

Prerequisites

You need to install the required Python libraries:

pip install -r requirements.txt

Note: You may need ffmpeg installed on your system for loading MP3 files if soundfile doesn't support them natively on your OS.

Usage

Run the conversion script with the path to your audio file:

python convert.py "path/to/your/song.mp3"

Options

  • --output, -o: Specify an output directory.
  • --bpm: Set the simple BPM for the MIDI file (default 120). This doesn't re-time the audio, but defines the grid in the MIDI file.
python convert.py "song.mp3" --bpm 100

Output

The script will generate a .mid file. You can import this into any DAW (Digital Audio Workstation) to view and edit the notes.

Install via CLI
npx skills add https://github.com/ethanranxu/Skills --skill audio-to-midi
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator