TITLE: MS-2 Duet — Mini Analog-Style Synthesizer PROMPT: Build a self-contained HTML instrument: a compact two-octave analog-modelling synthesizer whose every sound is produced by the Web Audio API and which stays completely silent until the user touches it. The page background is a dark charcoal radial gradient (#2a2523 → #141312). A small intro line names the instrument ("MS-2 Duet — two-octave mono/poly synthesizer") with a monospace note that all sound is synthesized in-browser. The instrument is a hardware panel: two walnut end-cheeks built from layered gradients (#3a2216, #6b3f28, #8a5535) with a diagonal repeating-gradient wood grain, framing a brushed-aluminium face made from a vertical light-to-dark gradient (#d9dadb → #b9bbbe → #9ea1a5) overlaid with two repeating 1px/2px vertical line gradients for the brushing. Small radial-gradient screw heads with a slotted line sit at the corners. Labels are "screen-printed": dark grey (#2b2d31) uppercase sans-serif at 9–10px with 0.18–0.26em tracking, and each module is a rounded rectangle with a thin translucent outline whose title sits on the border like a silkscreened tab. Modules in a 12-column grid (collapsing to 6 and then 1 column on narrow screens): Oscillator with four rubber wave buttons showing inline SVG icons for sine, triangle, sawtooth, square, plus Detune (±100 cents) and Glide knobs; Envelope with Attack, Decay, Sustain, Release knobs and a phosphor-green graph screen that redraws the ADSR curve with a gradient fill; Low-pass Filter with Cutoff (60 Hz–16 kHz, cubic taper) and Resonance (0–24 dB) knobs and a frequency-response screen that computes the RBJ biquad magnitude in dB across a log axis from 20 Hz to 20 kHz; LFO with Rate and Depth knobs and two switch groups for target (Pitch / Filter) and shape (Sin / Tri / Sqr); a wide Scope screen; Arpeggiator with an Arp on/off rubber button with amber LED, Up / Down / Rnd pattern switch, Tempo (40–240 bpm) and Gate knobs and a row of eight amber step LEDs; and Master with a Volume knob and a green Signal LED that lights when notes play. Knobs are 40px dark caps (radial gradient #4a4d53 → #1f2125) with a repeating-conic-gradient knurl, a white pointer line, and a soft shadow ring; they rotate from −135° to +135°, are dragged vertically (160px for full travel), respond to the mouse wheel and arrow keys (shift for coarse steps), expose role="slider" with aria values, and display their formatted value (ms, s, Hz, kHz, ¢, %, dB, bpm) in monospace underneath. Rubber buttons are dark grey gradients with a 3px bottom shadow that compress 2px when pressed or when aria-pressed is true. The keyboard is a dark tray holding 25 keys from C3 to C5: white keys as flexed cream gradients with an inset bottom lip and a note name, black keys absolutely positioned at 62% of a white width and 60% height with a deep bottom shadow. Each key shows its computer-key legend (Z S X D C V G B H N J M for the lower octave, Q 2 W 3 E R 5 T 6 Y 7 U I for the upper). Pressed keys turn warm amber (#ffe0a3 → #ffc766 for white, #ff9a3b → #c76a12 for black) with a glow and sink 2px. Octave −/+ rubber buttons and a readout shift the range by up to two octaves. Audio graph: on first pointer or key interaction an AudioContext is created (power LED turns red, status reads "power on"); each voice is an OscillatorNode with detune and optional exponential glide → GainNode running an exponential ADSR (attack to 1, decay to sustain, release on note-off with cancelScheduledValues) → shared BiquadFilter lowpass → master gain → AnalyserNode (fftSize 2048) → destination. An always-running LFO oscillator feeds two gain nodes: one connected to every voice's detune (up to 120 cents), one connected to filter.frequency (up to 4 kHz); switching target zeroes the other. The arpeggiator collects held notes, sorts them, and steps with setInterval at eighth-note intervals, releasing each note after gate × interval, driving the eight step LEDs and keeping held keys lit. Mouse/touch play uses pointer capture and elementFromPoint so glissandos across keys work, with a pointer map for multitouch; computer keys track a Set to avoid repeats. The oscilloscope reads float time-domain data, triggers on a rising zero-crossing for a stable trace, draws a glowing #7dffb0 line with shadowBlur over a grid on a #06110b screen with CSS scanlines, and shows a faint jittering flat line labelled "NO SIGNAL" or "IDLE" when quiet. All canvases are resized with devicePixelRatio; the scope frame rate is throttled under prefers-reduced-motion and transitions are removed. Layout has no horizontal overflow at 375px. DESCRIPTION: A warm walnut-and-brushed-aluminium desktop synthesizer with screen-printed labels, knurled draggable knobs, rubber buttons and glowing LEDs, offering a two-octave playable keyboard, four oscillator shapes with detune and glide, an ADSR with a live envelope graph, a resonant low-pass with a computed response curve, an LFO for pitch or filter, a step arpeggiator with tempo and gate, and a phosphor-green oscilloscope — all synthesized in the browser and silent until played. TECHNIQUES: - Web Audio synthesis: per-voice oscillators with exponential ADSR gain envelopes, shared resonant BiquadFilter, master gain and AnalyserNode - LFO routed via two gain nodes to oscillator detune (cents) or filter frequency (Hz) - Arpeggiator scheduler with sorted held-note set, up/down/random patterns, gate length and step LEDs - Custom knob widget: vertical drag with pointer capture, wheel, keyboard, role="slider", power-curve tapers and formatted readouts - RBJ low-pass biquad magnitude response computed analytically and drawn on a log-frequency canvas - ADSR curve graph with gradient fill; oscilloscope with zero-crossing trigger and glow stroke - Brushed-aluminium and walnut textures from layered repeating linear gradients; knurled knob caps via repeating-conic-gradient - Rubber-key buttons with box-shadow depth and pressed state; CSS LEDs with glow - Pointer-based multitouch keyboard with glissando via elementFromPoint; computer-key mapping across two octaves - Device-pixel-ratio-aware canvases and prefers-reduced-motion throttling INTERACTION: The instrument powers up on the first click or keypress, lighting the red LED. Players click, tap or slide across the keys — or type on the two rows of computer keys — to sound notes, watching keys glow amber and the scope draw the live waveform. Dragging knobs vertically shapes the timbre in real time: the envelope screen redraws as attack and release change, the filter curve sharpens as resonance rises, and the LFO can be aimed at pitch for vibrato or at the filter for wah. Switching the arpeggiator on and holding a chord makes the MS-2 step through the notes at the chosen tempo and pattern, with the step LEDs chasing along; the octave buttons or −/+ keys shift the range.