-
-
Notifications
You must be signed in to change notification settings - Fork 5
Audio Engine
The Orchard Audio Engine is a Web Audio processing chain sitting between playback and your output device. It lives in Settings → Audio Engine.
Audio from the media element enters an input node and splits into a dry path and a wet path. The wet path carries preamp, the ten-band equalizer, and stereo balance; the dry path bypasses the equalizer entirely. Crossfading between the two happens with a 12 ms time constant, so toggling the equalizer does not click.
source → input ─┬─ dry ────────────────────────────┐
└─ preamp → 10× peaking filters ───┴─ balance → track gain → output
Per-track gain sits at the end, after balance, so remembered gain applies regardless of equalizer state.
Bands are fixed at 31, 62, 125, 250, 500 Hz, 1k, 2k, 4k, 8k, and 16k Hz, implemented as peaking biquad filters.
| Control | Range | Default |
|---|---|---|
| Band gain | −12 to +12 dB | 0 |
| Preamp | −12 to +6 dB | 0 dB |
| Q | 0.4 to 2.4 | 1.1 |
| Balance | −1 (left) to +1 (right) | 0 |
Preamp exists so you can pull overall level down after boosting bands, avoiding clipping.
| Preset | Character |
|---|---|
| Flat | No change |
| Bass boost | Lifts 31 to 250 Hz, slight dip through the mids |
| Electronic | Boosted lows and highs, scooped mids |
| Rock | Boosted lows and upper mids |
| Vocal | Cut lows, lifted 500 Hz to 4 kHz |
| Acoustic | Gentle lift at the extremes and through presence |
| Bright | Progressive lift from 1 kHz up |
Automatic EQ replaces the manual curve with one derived from what Orchard measured about the track. It is off by default.
Automatic EQ and the manual equalizer are mutually exclusive: enabling automatic EQ forces the manual equalizer off. When automatic EQ is active, filter Q is pinned to the default 1.1 and gain changes move with a much slower 350 ms time constant, so the curve drifts between tracks instead of stepping.
Learned profiles are keyed by track and store nine measured features, the ten resulting band gains, tempo, a sample count, and a timestamp. Profiles accumulate as you listen, and they are shared with Best Mix.
Orchard remembers a gain offset per track, so a mastering-loud single and a quiet album cut stop jumping in level relative to each other. Gain is applied at the end of the chain and persists across sessions.
Separately, volume normalization can be toggled in playback settings for dynamic leveling.
Choose which output device Orchard plays to, independent of your system default. The
default value is default, meaning follow the system.
The player can show a live spectrum analysis of what is currently playing, driven by the same engine.
Audio engine configuration can be written to a file and read back. The format is validated strictly:
{
"app": "orchard",
"type": "audio-engine-profile",
"version": 1,
"config": { "...": "..." }
}A file that does not match is rejected with a clear error rather than partially applied.
Validation uses Zod in jitless mode. Zod's optional JIT probes Function() before
compiling object validators, and Orchard's renderer runs under a strict Content Security
Policy that forbids that.
Engine configuration and per-track gains live in renderer local storage under the key
orchard:audio-engine. Learned automatic-EQ profiles are stored alongside. If local
storage is unavailable, the engine falls back to defaults rather than failing.
Feature extraction that feeds automatic EQ and Smart Crossfade runs through an N-API addon rather than in JavaScript. See Native Audio Analyzer.
| Path | Role |
|---|---|
src/audio/engine/audioEngine.js |
Node graph, presets, config normalization |
src/audio/engine/automaticEq.js |
Automatic curve derivation |
src/audio/engine/audioAnalyzer.js |
Feature extraction and spectrum |
src/audio/engine/audioProfileStore.js |
Learned profile persistence |
src/audio/engine/audioEngineSchemas.js |
Profile validation |
src/components/settings/AudioEngineSection.vue |
Settings UI |
Orchard is licensed AGPL-3.0-or-later from 4.0.0 onward. Copyright © 2025–2026 SFG545. Orchard is not affiliated with or endorsed by YouTube or Google.
Using Orchard
Features
- Playback and Queues
- Explicit and Age-Restricted Tracks
- Best Mix
- Smart Crossfade
- Audio Engine
- Song Cache
- Library and Discovery
- Replay
- Listening Parties
- Orchard Connect
- Integrations
- Appearance
- Artist Packs
Mobile
Development
- Architecture
- Building from Source
- Native Audio Analyzer
- Cloudflare Workers
- Releases and Updates
- Contributing
Policy