Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ src/ui/ React components, CSS Modules, tokens.css, vendored fonts

- **One session document** is the source of truth. UI dispatches `Command`s; `applyCommand` is pure and tested. The store keeps undo history (knob drags coalesce into one step), notifies the engine (`engine.apply`), and rewrites the share link.
- **Exploring:** `src/session/library.ts` holds the ready-made patterns (the app opens on the first) and the chords. Holding the first key with no synth steps fills in a default rhythm.
- **Engine:** `Clock` schedules 100 ms ahead, ticked from a Worker so background tabs keep time. The sound is aimed at dirty French electro (Justice, Daft Punk, a little disco). `mixer.ts` builds the whole signal chain once, shared by the live engine and offline renders. Drums are synthesized per hit in `drums.ts` (808 kick with a 909-style snap, driven 909 snare, clean disco open hat; no samples), each with a DECAY tail multiplier, and run through a `ChannelStrip` (volume → mix bus, with a send to the stereo ping-pong delay in `delay.ts`). The `Synth` is a seven-voice detuned stereo unison plus a sub, through a plucked low-pass, light drive, and a 7 kHz high cut; it starts voices at scheduled times and releases the previous arp note at the next note's start. The synth, delay, and reverb run through the `Pump`, which ducks on every kick like a sidechain; drums bypass it. Everything meets in the mix bus (gentle glue compressor with headroom) before a safety limiter. The playhead (`step`, fired `note`) is published when each step actually sounds.
- **Engine:** `Clock` schedules 100 ms ahead, ticked from a Worker so background tabs keep time. The sound is aimed at dirty French electro (Justice, Daft Punk, a little disco). `mixer.ts` builds the whole signal chain once. Drums are synthesized per hit in `drums.ts` (808 kick with a 909-style snap, driven 909 snare, clean disco open hat; no samples), each with a DECAY tail multiplier, and run through a `ChannelStrip` (volume → mix bus, with a send to the stereo ping-pong delay in `delay.ts`). The `Synth` is a seven-voice detuned stereo unison plus a sub, through a plucked low-pass, light drive, and a 7 kHz high cut; it starts voices at scheduled times and releases the previous arp note at the next note's start. The synth, delay, and reverb run through the `Pump`, which ducks on every kick like a sidechain; drums bypass it. Everything meets in the mix bus (gentle glue compressor with headroom) before a safety limiter. The playhead (`step`, fired `note`) is published when each step actually sounds.
- **Share link (v2):** `?s=2~<bpm>~<drum>~…~syn.<…>`, keyed by drum id. See `src/session/url.ts`. Malformed parts fall back to defaults.

## Adding a drum
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ A drum machine + synth in your browser, styled after the Roland TR-909. Program

## Features

- **Drums:** 16-step sequencer for hi-hat, snare, and kick, synthesized 909-style in the browser (no samples), each with volume, reverb, and tone knobs
- **Synth:** arpeggiator over a two-octave keyboard, with a detuned two-oscillator voice, a sub, and a plucked filter. Keys choose which notes play; the synth's step row chooses when. Direction (up, down, up-down), speed (1/4, 1/8, 1/16), and four waveforms
- **Playback:** on steps carry a soft tint of their instrument's color and light up fully when they fire; a beat band marks the four beats; the synth's key flashes with its step
- **Drums:** 16-step sequencer for an 808 kick, a 909 snare, and a disco open hat, synthesized in the browser (no samples), each with volume, delay, and decay knobs
- **Synth:** arpeggiator over a two-octave keyboard, with a seven-voice detuned stereo unison, a sub, and a plucked filter. Keys choose which notes play; the synth's step row chooses when. Direction (up, down, up-down), speed (1/4, 1/8, 1/16), four waveforms, octave, and chord keys
- **Exploring:** six house patterns to start from, and undo (⌘Z / Ctrl+Z) for every change
- **Playback:** on steps carry a soft tint of their instrument's color and light up fully when they fire; a beat band marks the four beats; the note playing lights its key's LED
- **Controls:** knobs click to 11 notches and the fader to 9. Drag, click a notch, scroll, or use the arrow keys
- **Computer keyboard:** A–C and W–\ toggle notes, like a piano layout
- **Share links:** the URL holds the whole loop, drums and synth included
Expand All @@ -25,7 +26,7 @@ Then open http://localhost:3000.
```
src/
instruments.ts registry: drums (id, label, voice, color) and keyboard notes
engine/ audio engine, no React: clock, channel strips, reverb, drum voices, synth, arpeggiator
engine/ audio engine, no React: clock, mixer, channel strips, delay, pump, reverb, drum voices, synth, arpeggiator
session/ session types, commands, store, and share-link format
ui/ React components, design tokens, and fonts
```
Expand Down
2 changes: 2 additions & 0 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Loop Machine Style Guide Implementation Roadmap

> **Superseded.** This plan predates the LM-919 rewrite (TypeScript, CSS Modules, no Tailwind). See `README.md` and `.claude/CLAUDE.md` for the current stack and design.

## Overview

This roadmap outlines the implementation strategy for transforming the Loop Machine into a fully polished, accessible, and responsive application based on **The 1984 Digital Control System** documented in `./design/DESIGN_SYSTEM.md`.
Expand Down
2 changes: 2 additions & 0 deletions docs/TECH_STACK.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Tech Stack Evaluation

> **Superseded.** This plan predates the LM-919 rewrite (TypeScript, CSS Modules, no Tailwind). See `README.md` and `.claude/CLAUDE.md` for the current stack and design.

## Current Stack
| Layer | Choice | Status |
|-------|--------|--------|
Expand Down
2 changes: 2 additions & 0 deletions docs/design/DESIGN_SYSTEM.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# The 1984 Digital Control System

> **Superseded.** This plan predates the LM-919 rewrite (TypeScript, CSS Modules, no Tailwind). See `README.md` and `.claude/CLAUDE.md` for the current stack and design.

A unified design language for retro-inspired musical interfaces—drum machines, synth modules, sequencers, and hybrid workstations. It blends the visual DNA of Roland TR-707, Oberheim OB-series, and early digital lab equipment into a clean, modern, production-ready UI system.

![1984 Digital Control System](./1984-digital-control-system.png)
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default tseslint.config(
},
},
{
// The engine stays framework-free so the web app, Mixtape, and tests can share it.
// The engine stays framework-free so the web app and tests can share it.
files: ['src/engine/**/*.ts'],
rules: {
'no-restricted-imports': ['error', { patterns: [{ group: ['react', 'react-dom', 'react/*'], message: 'The engine must not depend on React.' }] }],
Expand Down
3 changes: 0 additions & 3 deletions public/808 Samples/bass (1).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (10).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (11).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (12).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (13).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (14).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (15).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (16).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (17).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (18).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (19).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (2).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (20).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (21).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (22).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (23).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (3).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (4).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (5).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (6).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (7).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (8).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass (9).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/bass.wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap (1).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap (10).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap (11).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap (12).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap (13).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap (14).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap (15).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap (2).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap (3).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap (4).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap (5).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap (6).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap (7).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap (8).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap (9).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/clap.wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/cymbal (1).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/cymbal (2).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/cymbal (3).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/cymbal (4).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/cymbal.wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (1).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (10).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (11).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (12).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (13).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (14).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (15).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (16).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (17).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (18).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (19).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (2).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (20).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (21).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (22).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (23).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (24).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (25).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (26).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (27).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (28).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (29).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (3).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (30).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (31).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (32).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (33).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (34).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (35).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (36).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (37).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (38).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (39).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (4).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (5).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (6).wav

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (7).WAV

This file was deleted.

3 changes: 0 additions & 3 deletions public/808 Samples/hi hat (8).WAV

This file was deleted.

Loading
Loading