---
name: midi-rip
description: Extract MIDI from any audio file using Spotify's basic-pitch model. Polyphonic transcription — works on full mixes, melodies, chord stabs, vocal loops. Outputs .mid (drop into Ableton/FL/Logic), MusicXML, and a CSV of (note, start, end, velocity, pitch_bend). Use when the user asks to "rip the MIDI", "transcribe to MIDI", "get the chords from this", "convert audio to MIDI", "what notes are in this loop", or wants to pull a melody/chord progression out of a sample for a beat.
---


# midi-rip

Audio → MIDI via Spotify's [basic-pitch](https://github.com/spotify/basic-pitch) (polyphonic, transformer-based, way better than monophonic pitch trackers).

## Basic

```bash
python3 ~/.claude/skills/midi-rip/scripts/rip.py --input loop.wav
# → loop_midi/  (loop.mid, loop.csv, loop.musicxml)
```

## YouTube / SoundCloud URL

```bash
python3 ~/.claude/skills/midi-rip/scripts/rip.py --input "https://youtu.be/XXX"
# auto-downloads via yt-dlp, then transcribes
```

## Tighter / looser detection

```bash
python3 ~/.claude/skills/midi-rip/scripts/rip.py --input clip.mp3 \
  --onset 0.3 --frame 0.3 --min-note 80
# --onset (default 0.5)   — onset threshold; lower = more notes detected
# --frame (default 0.3)   — frame threshold; lower = longer / more sustained notes
# --min-note (default 60) — minimum note length in ms
```

## Drop the MIDI into your DAW

The output `.mid` works in Ableton, FL Studio, Logic, Bitwig, Reaper. The CSV has the same data as a plain table for analysis.

## Pairs well with

- `stems` → split first, then rip MIDI from the isolated melody/bass for cleaner results
- `cook-app` / `samplette` → drop the ripped MIDI as a sample-flip starting point
- `engine-fux` → similar idea, different source

## First-run install

Auto-installs `basic-pitch` + `yt-dlp`. First run downloads the model (~50MB). ffmpeg expected on PATH.

## Notes

- For best results on full mixes: run `stems` first, rip MIDI from individual stems
- Drum tracks won't transcribe well — basic-pitch is built for pitched content
- Vocal loops actually work surprisingly well
