Riff

A music studio where Claude writes a multitrack loop from a described vibe, builds a band around chords you play on your laptop keyboard, and co-writes lyrics around your lines.

Role
Solo
Stack
TypeScript, Electron, React, Tone.js, Anthropic SDK, Vite, Vitest
Riff with its Late Night Tape demo loop open at 84 BPM in A minor, with drum, bass, Rhodes and melody tracks and the Claude composer panel
The demo loop, ready to remix

Problem

Getting from an idea for a beat to something playable takes a DAW and a lot of clicking. Riff turns a described vibe or a few played chords into an editable multitrack loop, without the AI overwriting the parts you made yourself.

What I built

The composer sends the current song and recent chat to Claude with a JSON schema for the reply, so edits build on what exists. normalizeSong() clamps and cleans every response before it reaches the editor.

The home row plays chords in the song’s key, single notes or drums. Recorded parts are locked, and the app puts them back exactly after every model reply.

In the Lyrics tab, Claude finishes verses or writes choruses in your rhyme scheme. With “Keep my lines exactly” on, the app checks your lines came back word for word and warns about missing ones. It can also write a vocal melody, one note per syllable.

A Tone.js engine with synthesized instruments, swing, mute/solo and live edits; a piano roll; undo/redo; and Standard MIDI File export.

Runs as an Electron app (API key encrypted with safeStorage) or as a static site on Vercel, where the key stays in the browser and requests go straight to Anthropic.

Results

  • Live in the browser with your own Anthropic API key.
  • 16 unit tests cover song normalization, MIDI output, music theory, locked tracks and lyric matching.
Riff studio in the browser: composer panel, transport with BPM, key, bars and swing, and Arrange and Lyrics tabs
The web build, before a loop is composed

Questions about Riff? Email me