ComposeWithMe

Import from GarageBand

Best-effort import of audio out of a .band project

Overview

Lets a song owner pull audio directly out of a GarageBand .band project instead of exporting/bouncing each track by hand first. GarageBand's project format isn't publicly documented, so this is deliberately best-effort: it reliably finds the recorded audio, and only guesses at track names/tempo.

How it works

  • A .band project is a macOS package (a directory disguised as a file). The user right-clicks it in Finder → "Show Package Contents" → selects the audio files inside Media/ (reliable — always AIFF/CAF/WAV/etc.) and, optionally, the projectData file for name/tempo suggestions.
  • isGarageBandAudioFile() filters the selection down to recognized audio extensions; deriveTrackNameFromFilename() turns each filename into a starting track name (underscores → spaces, extension stripped).
  • projectData is Apple's private, version-drifting archive format (XML-plist-wrapped base64 on older GarageBand, raw binary plist on newer) — there's no public schema. scrapeProjectData() doesn't parse it; it pulls printable ASCII strings and tempo-adjacent numbers out of the raw bytes as unverified suggestions, filtered against a stoplist of NSKeyedArchiver/Foundation noise that shows up in every archive regardless of content. Nothing from this scrape is trusted automatically — the user renames tracks by hand (with suggestions available in a dropdown) and sees the guessed BPM next to the song's actual BPM before importing.
  • Each selected audio file is uploaded one at a time through the same uploadTrackFile() path as manual upload — see Add Your Track.

Key files

FileRole
src/components/ImportGarageBandModal.tsxFile selection, name-suggestion UI, per-track import progress
src/lib/garageband.tsisGarageBandAudioFile, deriveTrackNameFromFilename, scrapeProjectData (best-effort string/BPM scraping)

Limitations / notes

  • Track name and BPM suggestions are unverified guesses scraped from private binary data — always confirm them against the actual GarageBand project.
  • Only pulls audio out; doesn't reconstruct mixer settings, effects, or track order from the project.
  • No macOS file-system access from the browser — the user must manually reveal and select files from inside the package via the OS file picker.