Skip to content

kalamishere/audio-to-ableton

Repository files navigation

Audio → Ableton

Drop a track or video, get a MIDI file and a ready-to-open Ableton Live project (.als). Runs entirely in your browser — your audio never leaves the machine.

Powered by Spotify's Basic Pitch model, loaded locally via TensorFlow.js.

Run it

npm install
npm run dev

Then open the local URL Vite prints. Drop any WAV, MP3, M4A, MP4, or MOV file (up to ~60s works best).

What you get

  • .mid — the transcribed note events, drag into any DAW.
  • .als — an Ableton Live 12 project with the notes pre-loaded into a MIDI track. Double-click to open.

Architecture

Pure client-side. No backend, no upload, no signup.

src/
  main.ts       — DOM wiring, stage transitions
  decode.ts     — file → mono AudioBuffer (handles audio + video)
  transcribe.ts — Spotify Basic Pitch wrapper
  midi.ts       — note events → .mid (Tone.js)
  als.ts        — note events → .als (templated Live 12 project, gzipped)
  pitchmap.ts   — result-page SVG visualiser
  analysis.ts   — BPM + key estimation from notes
  styles.css

The .als is built by substituting note data into a captured Live 12.2 project XML (public/als-template.xml + public/als-clip-template.xml, generated by scripts/build-als-template.mjs) and gzipping via the browser's CompressionStream. Schema target: Live 12.0+.

The Basic Pitch model (~900KB) is bundled in public/model/. scripts/sync-model.mjs keeps it in sync with node_modules/@spotify/basic-pitch/model/ and runs automatically on predev / prebuild.

Build

npm run build       # → dist/
npm run preview     # serve dist/ locally

The output in dist/ is fully static — drop it on any CDN, Replit Static, GitHub Pages, etc.

See also

  • COPY.md — landing-page copy
  • TODO.md — known limits and roadmap

About

Drop a track or video — get a MIDI file and an Ableton Live project. Transcribes in your browser via Spotify's Basic Pitch; audio never leaves your machine.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors