Skip to content

About

Turn a git repository's history into music: every commit a note, every release a swell. Renders mp4 and wav.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

git-symphony

Turn any git repository's history into a minute of music. Every commit is a note, every top contributor is an instrument, every release is a cymbal swell.

demo.mp4

Above: git/git, 2005 to today, in 60 seconds. Junio C Hamano is the piano, Jeff King the celesta, 2,403 other contributors share a nylon guitar. Watch with sound (mp4).

Quickstart

In the browser: balx.github.io/git-symphony plays any public GitHub repository, no install. It needs a GitHub token (GitHub's API does not serve commit history anonymously) and picks notes from commit subjects instead of changed files, so it can sound slightly different from the command line.

On the command line:

npx git-symphony path/to/repo            # -> repo-symphony.mid + repo-symphony.wav
npx git-symphony path/to/repo --video    # also repo-symphony.mp4 (needs ffmpeg)

From source:

git clone https://github.com/balx/git-symphony && cd git-symphony
npm install
node src/cli.js ~/code/my-project --video

Needs Node 20+. The first run downloads the GeneralUser GS soundfont (31 MB, checksum-verified) to ~/.cache/git-symphony. No other system dependencies for audio; --video uses ffmpeg.

Options:
  -l, --length <sec>  length of the piece in seconds (default 60)
  -o, --out <path>    output path without extension (default ./<repo>-symphony)
      --video         also render an .mp4 visualization

Why it sounds the way it does

  • Time: the whole history is squeezed onto an 8th-note grid at 90 BPM (half calendar time, half commit order, so quiet years shrink but don't vanish).
  • Who: the top 6 contributors each get an instrument (piano, celesta, pizzicato, harp, marimba, vibraphone); everyone else shares a guitar.
  • What: each commit's busiest directory picks its note (a recurring phrase shape moves it through the bar), always from the major pentatonic and snapped to the current chord on the beat, so nothing clashes; bigger commits play louder and longer, the biggest become chords.
  • When: strings and bass play a 4-chord progression underneath; busier stretches add bass movement and drums; major releases get a cymbal swell and tubular bells. The key and progression come from the repo's first commit hash, so every repo has its own sound, and the same repo always sounds the same.

Output

  • .mid: one track per instrument, named after its contributor. Open it in GarageBand, Logic, Ableton or MuseScore and remix it.
  • .wav: 48 kHz stereo, rendered with sampled instruments, mastered to -14 LUFS (streaming loudness) with a -1.5 dBFS peak limiter.
  • .mp4: 1280x720 piano roll, notes colored per contributor, the date and commit messages synced to the music.

Web player

web/ is a static page: it reads history from the GitHub GraphQL API, renders audio with the same code in a Web Worker, and draws the same frames on a canvas as the CLI video. Run it locally with npm run web (http://localhost:8080); npm run build:web writes the deployable site to site/, which the Web player workflow publishes to GitHub Pages on every push to main.

Credits

License

MIT

About

Turn a git repository's history into music: every commit a note, every release a swell. Renders mp4 and wav.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages