Every sound in NEON DJ travels through a graph of Web Audio API nodes before reaching your speakers. Understanding this graph helps you predict how controls interact with each other — why turning the FILTER knob affects both the dry signal and the echo tail, or why the flanger effect colours the entire mix rather than a single deck. This document traces the complete path from audio source to output.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/kepabilbao67-bot/musicplayer2/llms.txt
Use this file to discover all available pages before exploring further.
Per-Deck Signal Chain
EachDeck instance builds its own Web Audio subgraph inside buildGraph(). The primary (dry) path is:
AudioBufferSourceNode. A new instance is created each time play() is called (this is the standard Web Audio pattern — source nodes are single-use and disposable). It connects directly into eqLow, the first stage of the three-band EQ.
EQ Nodes
The three EQ bands areBiquadFilterNode instances chained in series:
| Band | Filter Type | Centre / Shelf Frequency | Knob Range |
|---|---|---|---|
| HIGH | highshelf | 3800 Hz | −26 dB to +12 dB |
| MID | peaking | 1000 Hz (Q = 0.9) | −26 dB to +12 dB |
| LOW | lowshelf | 200 Hz | −26 dB to +12 dB |
gain AudioParam of its filter node. Double-clicking a knob resets it to 0 dB.
Filter Node
The FILTER knob drives a singleBiquadFilterNode that switches type depending on knob direction:
Parallel Effect Sends
AfterchannelGain, two parallel send buses branch off. Both feed back into crossGain so they are subject to the crossfader:
Echo / Delay Send
(60 / bpm) * 0.75 seconds — a dotted-eighth note at the track’s BPM. The ECO knob sets delaySend.gain between 0 and 0.85.
Reverb Send
ConvolverNode uses a synthesised impulse response: 1.8 seconds of exponentially decaying white noise (decay exponent 2.5), generated once and cached in _reverbIR. The REVERB knob sets reverbSend.gain between 0 and 0.9.
Master Chain
BothcrossGain outputs merge into the shared master chain built by masterNode():
DynamicsCompressorNode acts as a brickwall limiter:
| Parameter | Value |
|---|---|
| threshold | −3 dB |
| knee | 0 dB |
| ratio | 20:1 |
| attack | 3 ms |
| release | 250 ms |
Master FX: Flanger
The flanger is inserted as a parallel send frommasterGain, not from individual decks:
masterFlangerWet is normally at 0 and is ramped to 0.85 for 3.3 seconds by flangerThrow().
Master FX: Echo Throw
A second send frommasterGain provides the master echo effect:
masterEchoWet is ramped from 0 → 0.6 → 0 over 2.6 seconds by echoThrow().
Complete ASCII Signal Diagram
The
AudioContext is created lazily inside the AC() helper function — it is only instantiated on the first call, which always happens inside a user-gesture handler (button click, key press, vinyl drag). This is required by the browser autoplay policy: an AudioContext created before a user gesture starts in the suspended state and will not produce audio until ctx.resume() is called. NEON DJ also calls AC().resume() explicitly at the start of every interactive handler to guarantee the context is running.