You need the project built and input.raw ready:

git clone https://github.com/dogxhood/audionoise.git && cd audionoise
make        # builds convert + lookup tables
make input.raw  # decodes BassForLinus.mp3 → s32le 48kHz mono

The playback command is always the same — only the effect name changes:

./convert <effect> input.raw | ffplay -v fatal -nodisp -autoexit \
    -f s32le -ar 48000 -ch_layout mono -i pipe:0

Phaser

PSR · audio/phaser.h · 4-stage allpass DF1 biquad

Sweeps four allpass filter stages with a triangle LFO. The notches in the frequency response move together, creating the classic whooshing sound. Feedback adds resonance at the sweep peaks.

preset: slow sweep (default)
# LFO=500ms · Feedback=0.4 · Center=1200Hz · Q=0.7
./convert phaser input.raw | ffplay -f s32le -ar 48000 -ch_layout mono -i pipe:0
LFO period
500 ms
Feedback
0.40
Center freq
1200 Hz
Q
0.70
Try: Fast LFO (low ms value, ~50ms) + high feedback (0.7) for a metallic, almost flanger-like effect. The four allpass stages interact at high feedback in ways that are hard to predict.
preset: fast with resonance
# Set pot 0 (LFO) to 50ms via control pipe
./convert phaser input.raw > output.raw &
echo -n "p005 " > /tmp/ctl # pot 0 = 0 → 25ms period
echo -n "p171 " > /tmp/ctl # pot 1 = 71% → feedback ≈ 0.71

Flanger

FLN · audio/flanger.h · based on DaisySP/Soundpipe

Short delay line with LFO modulation creates a comb filter that sweeps through the frequency spectrum — the classic jet-plane sound. The 1024-sample buffer (≈21 ms) limits max delay to 4 ms. Output is (dry + wet) / 2 — no mix pot.

preset: classic flanger
# Freq=0.5Hz · Delay=2ms · Depth=0.8 · Feedback=0.5
./convert flanger input.raw | ffplay -f s32le -ar 48000 -ch_layout mono -i pipe:0
LFO freq
0.5 Hz
Delay
2.0 ms
Depth
0.80
Feedback
0.50
Depth vs delay: Depth controls how far the LFO swings the delay time. High depth + low base delay = wide sweep; low depth + high base delay = subtle thickening. Feedback above ~0.8 risks runaway — limit_value() catches it but it clips hard.

Echo

ECHO · audio/echo.h · 65536-sample ring buffer ≈ 1.37s

Simple echo with smoothed delay target to avoid clicking when the delay pot moves. Feedback controls trail length — with high feedback the echo decays slowly; below ~0.95 it will always converge to silence eventually.

slapback (short, no feedback)
# Delay≈80ms · Depth=0.6 · Feedback=0.05
./convert echo input.raw | ffplay \ -f s32le -ar 48000 -ch_layout mono -i pipe:0
long trail
# Delay≈500ms · Depth=0.5 · Feedback=0.6
./convert echo input.raw | ffplay \ -f s32le -ar 48000 -ch_layout mono -i pipe:0
Smoothed delay: The delay target is tracked with linear(0.001, delay, target_delay) — blending 0.1% toward the target per sample. At 48 kHz, a 100-sample delay change takes about 46 ms to fully reach. This prevents zipper noise when you move the pot.

Boost

BO · audio/boost.h · HPF + LPF biquads + wavefolder

High gain stage with tone shaping and a wavefolding clipper instead of hard saturation. The wavefolder bounces the signal off the output level ceiling and floor — gives a different harmonic character than simple clipping.

clean boost
# Boost=6dB · Level=0dB · no HPF/LPF · Mix=1.0
./convert boost input.raw | ffplay -f s32le -ar 48000 -ch_layout mono -i pipe:0
heavy overdrive via wavefolder
# Boost=35dB · Level=−25dB → heavy folding distortion
# Basscut=80Hz (tightens low end) · Highcut=6kHz (removes harsh highs)
./convert boost input.raw | ffplay -f s32le -ar 48000 -ch_layout mono -i pipe:0
Boost
35 dB
Level ceiling
−25 dB
Basscut
80 Hz
Highcut
6 kHz
Wavefolder vs clipper: At the same gain setting, a wavefolder produces more even-order harmonics than a hard clipper — it folds the waveform back toward zero rather than flattening it. The fold() loop runs until the signal is within bounds; with extreme settings it iterates multiple times per sample.

Compressor

CMPR · audio/compressor.h · envelope follower

Tracks signal level with an attack/release envelope follower. The compression ratio is applied above the threshold using (level/env)^(1−1/ratio), and the gain change is smoothed at 1% per sample to avoid pumping artifacts.

default settings (gentle compression)
# Level=−20dB · Attack=15ms · Release=150ms · Ratio=4.8 · Boost=6dB
./convert compressor input.raw | ffplay -f s32le -ar 48000 -ch_layout mono -i pipe:0
Threshold
−20 dB
Attack
15 ms
Release
150 ms
Ratio
4.8 : 1
Makeup gain
6 dB
Smoothing factor 0.01f: The gain multiplier blends 1% per sample toward the target — at 48 kHz that means ~95% of the gain change happens in about 6 ms. Fast enough to track dynamics, slow enough to not click on individual sample transients.

convert processes one effect at a time, but you can chain them via pipe. The signal stays in s32le format between stages.

# Compressor → Boost → Phaser
./convert compressor input.raw \
    | ./convert boost /dev/stdin \
    | ./convert phaser /dev/stdin \
    | ffplay -f s32le -ar 48000 -ch_layout mono -i pipe:0

# Or write intermediate files if you want to visualise each stage
./convert compressor input.raw > stage1.raw
./convert boost stage1.raw > stage2.raw
./convert phaser stage2.raw > stage3.raw
./visualize.py input.raw stage1.raw stage2.raw stage3.raw

Chaining is not how the hardware works — on the RP2354 effects run in a single per-sample loop in priority order — but it is useful for simulation and debugging.