Turn an online video or audio link into guitar sheet music or tablature.
audiotab is a command-line tool that takes a URL, listens to the audio, and
produces a PDF: either a classic music score or a guitar tab.
The tool runs a four-stage pipeline:
- Download the audio from the URL (via
yt-dlp). - Transcribe the audio into MIDI (via Spotify's Basic Pitch model).
- Clean the raw MIDI, and optionally reduce it to a single melodic line.
- Render the result as a PDF score or tablature (via LilyPond).
Only the final PDF is kept. Intermediate files are written to a temporary directory that is removed automatically when the program exits.
First, install FFmpeg and LilyPond with your system's package manager. Then, clone this repository, navigate to the project root directory, and install audiotab locally in editable mode:
pip install -e .
Once installed, the audiotab command becomes available anywhere in your terminal:
audiotab "<url>"
| Option | Values | Default | Description |
|---|---|---|---|
--mode |
tabs, notation |
tabs |
Output style: guitar tablature or classic score. |
--difficulty |
simple, full |
full |
simple reduces the music to a single melodic line; full keeps chords. |
--start |
seconds | - | Start time, to transcribe only a segment. |
--end |
seconds | - | End time, to transcribe only a segment. |
--output |
path | ./output |
Directory where the final PDF is saved. |
# Single melodic line, as a guitar tab
audiotab "<url>" --difficulty simple
# Classic music score instead of a tab
audiotab "<url>" --mode notation
# Only the first 35 seconds
audiotab "<url>" --start 0 --end 35
Automatic music transcription is noisy: the raw MIDI often contains overlapping notes, detected harmonics, and sustained notes split into fragments.
The simple mode reduces this to a single playable line by sampling the music
over time, folding octaves into one register, smoothing out isolated stray
notes, and merging repeated notes. The full mode only applies light filtering
and keeps chords.
The quality of the output depends heavily on the input audio. It works best on clean, single-instrument recordings; on dense mixes or distorted audio the result is approximate. The output is a starting point, not a note-for-note exact transcription.
- yt-dlp - audio download
- Basic Pitch - audio-to-MIDI transcription
- music21 - MIDI parsing and manipulation
- LilyPond - PDF rendering