Skip to content

About

Mono-to-stereo widening Audio Unit for macOS (JUCE)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

29 Commits

Folders and files

Repository files navigation

stereophield

A didactic mono-to-stereo widening Audio Unit and Standalone app for macOS on Apple Silicon: a tool for learning how stereo width works, and a widener for everyday mixing. Every algorithm adds to the side signal, and the mid is only delayed, never filtered, so the output sums back in mono to the untouched input. This holds exactly at the default settings and always in Easy mode; it is given up only by the Mid blend control (used by five factory presets that recreate the authentic, non-mono-safe sound of classic effects, marked "not mono-safe" in the interface) and by the Constant loudness compensation, which keeps the mono spectrum but not its level.

For everyday use, it opens in Easy mode: one Width knob and three to shape it, with curves fitted so that the result stays mono-compatible, phase-stable and loudness-neutral on any material. Full controls opens the complete instrument underneath, sounding exactly the same.

For learning, every control explains itself in an info panel (what it does, what its current value means, how it works, something to try, the background in depth), eleven lessons walk through the ideas from how we hear width to widening in a mix, teaching sources let you hear each effect without material of your own, and live views show every signal path. The interface is in English and Czech.

It uses classical signal processing and psychoacoustic models only, with no machine learning: filters, delays, short-time Fourier analysis, partial tracking, an image-source room model and a spherical-head listener model. The Easy mode curves and the velvet-noise sequences were tuned offline by numerical optimisation against measurements; at run time everything is deterministic DSP.

stereophield, Easy mode

Install

The Audio Unit, for macOS 12 or later on Apple Silicon. In Terminal:

curl -fsSL https://raw.githubusercontent.com/highda/stereophield/main/scripts/install-au.sh | bash

The script downloads the latest release from Releases, checks its SHA-256 checksum and code signature, and installs it to ~/Library/Audio/Plug-Ins/Components. Files fetched this way carry no quarantine flag, so neither macOS nor your host asks about the plugin. Restart the host or rescan plug-ins afterwards. To install a specific version, add it: ... | bash -s -- 3.1.0.

To install by hand instead, download stereophield-<version>-AU.zip, unzip it into ~/Library/Audio/Plug-Ins/Components, and remove the quarantine flag that the browser adds (the plugin is signed ad hoc, not with an Apple Developer ID):

xattr -dr com.apple.quarantine ~/Library/Audio/Plug-Ins/Components/stereophield.component

The Standalone app is built from source (see below).

Easy mode

Control What it does
Width Perceived width, from mono to as wide as stays natural; even steps of the knob give even steps of width
Character How the width is made: clean (phase) at 0 %, diffuse (decorrelation, virtual microphones) at 50 %, lively (double tracking, micro-pitch) at 100 %
Space Early reflections of a virtual room, and a more widely spaced virtual microphone pair
Focus Keeps the centre: bass mono, transient ducking, a narrower low band
Adapt to material The mapping follows what it hears: percussive, tonal or mixed
Low latency The Light engine and its own curves, with no latency

Each macro drives several internal parameters along curves fitted by measurement: a test corpus is rendered through the plugin, and the curves make perceived width (a virtual listener at loudspeakers) rise evenly with Width while every setting stays mono-exact, keeps the correlation positive, adds at most 1.5 LU of loudness and keeps the bass centred. Under the hood shows the internal values live. Automating a macro writes no automation for the internal parameters. Returning from the complete interface to Easy mode asks first, since it replaces hand-made settings; one undo step brings them back.

The complete interface

stereophield, complete interface

Eight generators each synthesise a stereo difference signal; a ninth reshapes an existing stereo image. They run in parallel and sum into one side bus.

Generator Technique
Spread All-pass side signal: a delay (Lauridsen) or an all-pass cascade (Orban, shaped spread)
Delay Haas delay: a mono-safe half-depth comb, or the authentic dry/delayed pair with mid blend
Mod Dimension-style anti-phase chorus, or a micro-pitch doubler
Velvet Velvet-noise decorrelator with offline-optimised sequences
Pan map Spectral panning by frequency, by partial, or by source (Full engine)
Coherence designer Sets how similar left and right are at each frequency, drawn by hand or taken from a virtual microphone pair (AB, XY, Blumlein, ORTF) (Full engine)
Double-tracker Two synthetic takes with humanised timing, pitch, level and tone drift
Room cues Early reflections of a virtual room heard by a virtual ORTF pair, without a reverb tail
Image expander For stereo input: moves each panned source outward and stops it at the speaker (Full engine)

Light engine: no latency. Full engine: spectral analysis (tonal, noise and transient parts, partial tracking, source grouping, spectral-flux transient detection) with one FFT frame of latency (2048 samples at 48 kHz). With latency mode Always Full, switching engines is seamless. The side bus has bass mono, three width bands, transient ducking and a correlation guard with an adjustable ceiling. Modules that cannot affect the output are not computed, without changing the sound. 29 factory presets; user presets are files in ~/Library/Audio/Presets/highda/stereophield.

Learning

  • Info panel (the i button): hover anything to see what it does, a live explanation of the current value, how it works, something to try, an in-depth section and references.
  • Learn: eleven lessons: how we hear width, mid and side, mono compatibility, a map of widening techniques, Haas and comb filters, decorrelation, microphone pairs, spectral panning, widening in a mix, Easy mode and smart disable. Apply sets up a demonstration as one undoable step.
  • Teaching sources (the ... menu): noise, two sources, a melody, a tone with a click and a drum loop.
  • Views: a live signal-flow diagram, scope lanes for every signal path, per-band correlation and mono-sum deviation, the coherence target and the achieved coherence, the pan map, a goniometer and a perceived-width meter for loudspeakers or headphones.
  • Undo and redo, A/B compare, zoom from 75 to 150 %, keyboard access and screen-reader names in both languages.

Build from source

Requirements: macOS 12 or later on Apple Silicon, the Xcode Command Line Tools (xcode-select --install) and Homebrew.

git clone https://github.com/highda/stereophield.git
cd stereophield
./scripts/build.sh            # installs cmake and ninja with Homebrew, builds, installs the AU
./scripts/build.sh --test     # the same, then runs every test

The build installs the Audio Unit to ~/Library/Audio/Plug-Ins/Components/stereophield.component; the Standalone app is build/stereophield_artefacts/Release/Standalone/stereophield.app. JUCE 9.0.3 and Catch2 3.16.0 are fetched by CMake on the first configure. Other options: --validate (runs auval -v aufx Stph Hgda), --clean, --plugin (only the AU and the app).

Releases are built by GitHub Actions (.github/workflows/release.yml) when a v* tag is pushed: scripts/package-macos.sh builds the Audio Unit zip and its checksum, and the workflow attaches them to a GitHub release.

Documentation

Document Contents
docs/ARCHITECTURE.md How it works: signal flow, engines, analysis, generators, side bus, Easy mode, state, interface
docs/PARAMETERS.md Every parameter with its ID, range, default and host group
docs/TESTING.md Tests, tools, fixtures, known limits and the checks that need a person
docs/MEASUREMENTS.md Every test criterion with its measured value
docs/PRESET_METRICS.md Correlation, perceived width, mono deviation and loudness of each factory preset
Item Value
Type, subtype, manufacturer aufx, Stph, Hgda
Channels mono or stereo in, stereo out
Latency at 48 kHz Light 0; Full 2048 samples (42.7 ms); Easy mode as Full, or 0 with Low latency
CPU at 48 kHz (M3) Easy mode at defaults about 3 % of one core in real time; every generator and view about 3.6 %
Sessions Sessions from every earlier version load and render bit-identically

Česky

stereophield je didaktický plugin Audio Unit a samostatná aplikace pro macOS na Apple Silicon, která z mono signálu dělá stereo: nástroj k učení, jak stereo šíře funguje, i rozšiřovač pro běžnou práci v mixu. Všechny algoritmy přidávají jen do boční složky (side) a střed (mid) se pouze zpožďuje, nikdy nefiltruje, takže se výstup v mono sečte přesně na nedotčený vstup. Platí to ve výchozím nastavení a vždy ve snadném režimu; přestává to platit jen s příměsí středu (Mid blend, kterou používá pět továrních presetů napodobujících původní, ne mono-kompatibilní zvuk klasických efektů; rozhraní je označí „není mono-kompatibilní“) a s kompenzací Stálá hlasitost, která zachová spektrum mono součtu, ale ne jeho úroveň. Rozhraní je v češtině a angličtině (přepínač EN | CZ v záhlaví). Plugin používá jen klasické zpracování signálu a psychoakustické modely, žádné strojové učení; křivky snadného režimu a sekvence velvet noise byly vyladěny předem numerickou optimalizací podle měření.

Instalace. V Terminálu spusťte curl -fsSL https://raw.githubusercontent.com/highda/stereophield/main/scripts/install-au.sh | bash. Skript stáhne poslední vydání, ověří kontrolní součet a podpis a nainstaluje plugin do ~/Library/Audio/Plug-Ins/Components; soubory stažené takto nemají příznak karantény, takže se macOS ani hostitel na nic neptá. Při ruční instalaci ze zipu odstraňte příznak karantény příkazem xattr uvedeným výše (plugin je podepsaný ad hoc, ne certifikátem Apple Developer ID). Samostatnou aplikaci si sestavíte ze zdrojů.

Snadný režim. Plugin se otevře se čtyřmi makry: Šíře a k jejímu dotvarování Charakter (čistá, rozptýlená nebo živá šíře), Prostor (časné odrazy a širší virtuální mikrofonní pár) a Fokus (basy, údery a spodní pásmo zůstávají uprostřed); dále Přizpůsobit materiálu a Nízká latence. Každé makro posouvá několik vnitřních parametrů po křivkách nalezených měřením: vnímaná šíře roste s knoflíkem rovnoměrně a každé nastavení zůstává mono-kompatibilní, s kladnou korelací, nanejvýš o 1,5 LU hlasitější a s basy uprostřed. Panel Pod kapotou ukazuje vnitřní hodnoty živě. Tlačítko Všechny prvky otevře úplné rozhraní se stejnými hodnotami a stejným zvukem; návrat do snadného režimu se nejprve zeptá.

Úplné rozhraní. Osm generátorů syntetizuje rozdílový stereo signál: rozprostření (Lauridsen, Orbanova kaskáda), Haasovo zpoždění, chorus a mikrotransponování, velvet noise (sametový šum), panoramatická mapa, návrhář koherence (zvolíte, jak podobné mají být kanály na každém kmitočtu, nebo převezmete křivku virtuálního mikrofonního páru AB, XY, Blumlein či ORTF), zdvojení stopy (dva syntetické záznamy s lidským kolísáním) a prostorové odrazy (časné odrazy virtuální místnosti bez dozvuku). Devátý, rozšíření stereobáze, posouvá zdroje stereo nahrávky ven až k reproduktorům.

Učení. Informační panel (tlačítko i) ukazuje při najetí myší, co prvek dělá, živé vysvětlení současné hodnoty, jak to funguje, co vyzkoušet, výklad do hloubky a zdroje. Nabídka Učení obsahuje jedenáct lekcí: jak slyšíme šíři, střed a strana, mono kompatibilita, mapa technik rozšiřování, Haas a hřebenové filtry, dekorelace, mikrofonní páry, spektrální panoráma, rozšiřování v mixu, snadný režim a chytré vypínání. V nabídce ... jsou výukové zdroje, zvětšení rozhraní a ukládání vlastních presetů.

Sestavení ze zdrojů. Potřebujete Xcode Command Line Tools a Homebrew; pak stačí ./scripts/build.sh (s --test spustí i všechny testy). Projekty ze všech dřívějších verzí se načtou a zní bitově stejně.

About

Mono-to-stereo widening Audio Unit for macOS (JUCE)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages