Arrangement
Transport and mixer
EQ and filters
Modulation
Utility
Instruments
Audio UI
Thickens the sound with a short delay that a slow oscillator sweeps up and down. It is a device: a state, a panel, an engine and tools, each its own file.
Installation
pnpm dlx shadcn@latest add @audio-ui/chorus
It installs the device's state, its engine and its panel to components/audio-ui/devices/chorus/. The demo above, which wires them to a loop, is @audio-ui/block-chorus.
Controls
Controls · 7
Panel
The panel draws the delay time over two seconds as the oscillator moves it. chorusSweep(state) is what it draws. With Sync on, it draws the oscillator at the rate it really has.
import { ChorusPanel } from "@/components/audio-ui/devices/chorus/panel";
import { chorusDevice } from "@/components/audio-ui/devices/chorus/device";
const [state, setState] = useState(() => chorusDevice.defaults());
<ChorusPanel onValueChange={setState} value={state} />;Engine
Create it, connect it and update it as for any device: see The engine.
The output of the oscillator, scaled by the depth, is added to the delay time. The sweep is kept inside the delay, so the time never goes negative.