Show spec
Build a chord synthesizer in three sections: chord selector (top),
keyboard visual (middle), controls and playback (bottom).
Chord selector:
Root note picker: C through B, 12 chromatic buttons in a row.
Scale dropdown: Major, Natural Minor, Harmonic Minor, Dorian,
Phrygian, Mixolydian, Pentatonic Major, Pentatonic Minor, Blues.
Diatonic chord grid: all chords built on each scale degree, labeled
with Roman numerals (I, ii, iii, IV, V, vi, vii) and chord names
(e.g. Cmaj, Dm, G7). Clicking a chord plays it. Octave selector 3 to 6.
Voicing selector (global, applies to every chord):
Close: all notes stacked within one octave in thirds.
Open: notes spread across two octaves — root, fifth up one octave,
third up two octaves.
Drop-2: take close voicing, lower the second-highest note one octave.
Voicing changes the exact MIDI note numbers triggered.
Keyboard visual: two-octave piano starting at the root note.
When a chord plays, highlight all active notes in the accent color.
In Arpeggio mode, highlight each individual note as it fires.
Non-diatonic keys for the current scale are visually dimmed (not hidden).
Two playback modes (radio toggle):
Chord mode: all notes trigger simultaneously on click. Sustained
until a new chord is clicked or Stop is pressed.
Arpeggio mode: notes fire one at a time in a repeating loop.
Controls: Rate (1/4, 1/8, or 1/16 note at current BPM),
Direction (Up, Down, Up-Down, Random), Gate (20% to 100% — ratio
of note-on time to step duration). BPM input 60 to 200.
Each arpeggio step re-triggers the amplitude envelope:
attack 10ms, release equals gate multiplied by step duration minus 10ms.
Stop ends the loop cleanly without cutting mid-note.
Synthesis per note:
OscillatorNode with waveform selector: sine, triangle, sawtooth, square.
Each note through a GainNode amplitude envelope: attack 10ms, release
400ms. All note gains mix to a shared master bus.
Master chain:
1. DynamicsCompressorNode: threshold -20dB, ratio 6:1, attack 5ms,
release 100ms. Hardcoded — not exposed as user controls.
2. WaveShaperNode: tanh soft-clip with pre-gain stage. Tube Warmth
knob 0 to 100 controls pre-gain 0.5x to 3x. Show numeric value.
3. ConvolverNode reverb: synthetic impulse response (exponential white
noise decay, 1.5s length). Reverb Mix knob 0 to 100 controls
wet/dry ratio via two parallel GainNodes.
AI chord progression generator:
Text input: describe mood or genre.
Length selector: 4 chords or 8 chords.
Generate returns a sequence of diatonic chord names from the
current root and scale. Display as a row of numbered step buttons.
Play Sequence: plays each chord in order, one chord per bar at
current BPM. Highlight the active step. Works in both Chord and
Arpeggio modes. Stop halts cleanly.
MIDI file import:
Drag-drop zone for .mid files. Parse note events, group notes
within a 50ms window into a chord, identify chord names. Display
the detected sequence in the same step-row UI. Play button runs it.
Saved progressions:
Name input plus Save stores the current sequence to localStorage.
Load dropdown lists all saved progressions. Delete button per entry.