Arrangement
Transport and mixer
EQ and filters
Modulation
Utility
Instruments
Audio UI
Sweeps notches through the sound with a slow oscillator. In Phaser mode it is a chain of four all-pass filters around a centre frequency. In Flanger mode it is a very short delay. It is a device: a state, a panel, an engine and tools, each its own file.
Installation
pnpm dlx shadcn@latest add @audio-ui/phaser
It installs the device's state, its engine and its panel to components/audio-ui/devices/phaser/. The demo above, which wires them to a loop, is @audio-ui/block-phaser.
Controls
Controls · 10
Panel
The panel draws what the oscillator does over two seconds. phaserSweep(state) is what it draws, and phaserSettings(state) gives the numbers that go on the nodes.
import { PhaserPanel } from "@/components/audio-ui/devices/phaser/panel";
import { phaserDevice } from "@/components/audio-ui/devices/phaser/device";
const [state, setState] = useState(() => phaserDevice.defaults());
<PhaserPanel onValueChange={setState} value={state} />;Engine
Create it, connect it and update it as for any device: see The engine.
Both paths are always built and the mode crossfades them, so switching does not click. One oscillator moves the filters, in cents, and the delay, in seconds. The flanger's sweep is kept inside its delay so the time never goes negative.