Examples

Example plugins covering effects, instruments, MIDI processors, and GUI framework integrations. Each one lives under examples/ in the truce repo and is small enough to read top-to-bottom in one sitting.

#Effects, instruments, MIDI

Plugin Type GUI Screenshot
gain Effect Built-in gain plugin
eq Effect Built-in eq plugin
synth Instrument Built-in synth plugin
transpose MIDI Built-in transpose plugin
arpeggio MIDI Built-in arpeggio plugin
tremolo Effect egui tremolo plugin
state Effect egui state plugin
envelope Effect Built-in envelope plugin
cc-filter Effect Built-in cc-filter plugin
chord Instrument Built-in chord plugin
stereo-utility Effect Built-in stereo-utility plugin
dasp-bitcrusher Effect Built-in dasp-bitcrusher plugin
sysex-echo MIDI Built-in sysex-echo plugin
multiport Instrument Built-in multiport plugin
midi-inspector Effect Iced midi-inspector plugin
mpe-spreader MIDI Built-in mpe-spreader plugin
mpe-synth Instrument Built-in mpe-synth plugin
fundsp-reverb-simple Effect Built-in fundsp-reverb-simple plugin
fundsp-reverb-worker Effect Built-in fundsp-reverb-worker plugin

The two fundsp-reverb-* crates share a topology and signal flow but rebuild the graph differently; the fundsp integration guide walks through both.

#GUI framework comparison

The same plugin written across five GUI backends. Compare them to see how each framework handles the same layout.

#Gain (small editor, four widgets)

Plugin GUI Screenshot
gain Built-in gain (built-in)
gain-egui egui gain-egui
gain-iced Iced gain-iced
gain-slint Slint gain-slint
gain-vizia Vizia gain-vizia

A sixth variant, gain-egui-aspect, is the egui gain with a 2:3 aspect-ratio lock on host resize.

#GUI Zoo (every widget kind, mixed spans + positions)

A passthrough plugin that exercises every built-in widget kind (knob, slider, toggle, dropdown, meter, XY pad) across mixed grid spans and positions. Layout / widget regressions surface here before they reach the real example plugins; it's also the natural reference when picking a GUI framework.

Plugin GUI Screenshot
gui-zoo Built-in gui-zoo (built-in)
gui-zoo-egui egui gui-zoo-egui
gui-zoo-iced Iced gui-zoo-iced
gui-zoo-slint Slint gui-zoo-slint
gui-zoo-vizia Vizia gui-zoo-vizia

The slint + vizia variants live under crates/truce-{slint,vizia}/examples/ (their own Cargo sub-workspaces — see the vizia integration guide for why) rather than the top-level examples/ directory.

#Block DSP

Plugin Demonstrates Screenshot
block-gain truce_simd::math::db_to_linear_block block-gain plugin
block-drywet truce_simd::ops::mix_block block-drywet plugin
block-gate truce_simd::ops::abs_max_block + zero_block block-gate plugin
block-saturate truce_simd::math::tanh_block block-saturate plugin
block-widen truce_simd::ops::mac_block block-widen plugin
block-surround-meter truce_simd::math::linear_to_db_block block-surround-meter plugin

Each block-* example isolates one truce_simd::ops::* or truce_simd::math::* shape. See the SIMD section of the processing guide for the design.

#Out-of-tree

Larger examples live in their own repos — useful when you want to see what truce looks like at the scale of a real plugin rather than a 100-line teaching example.

#Reiss & McPherson effects

15 effects ported from Reiss & McPherson's Audio Effects: Theory, Implementation and Application (originally Juan Gil's JUCE implementations). Sources in reiss-mcpherson-effects.

Plugin Effect Screenshot
reiss-delay Circular-buffer delay Reiss Delay
reiss-vibrato LFO-modulated delay (pitch wobble) Reiss Vibrato
reiss-flanger Modulated short delay + dry sum Reiss Flanger
reiss-chorus Multi-voice ensemble chorus Reiss Chorus
reiss-pingpong Cross-channel ping-pong delay Reiss Ping-Pong
reiss-parametric-eq Single-band parametric EQ (7 shapes) Reiss Parametric EQ
reiss-wahwah Manual / LFO / envelope wah Reiss Wah-Wah
reiss-phaser Cascaded all-pass phaser Reiss Phaser
reiss-tremolo LFO amplitude modulation Reiss Tremolo
reiss-ringmod Ring modulation Reiss Ring Mod
reiss-compressor Compressor / expander / gate Reiss Compressor
reiss-distortion 5-shape waveshaper + tone shelf Reiss Distortion
reiss-panning Panorama+precedence / ITD+ILD pan Reiss Panning
reiss-robotization Phase-vocoder robot / whisper Reiss Robotization
reiss-pitchshift Phase-vocoder pitch shifter Reiss Pitch Shift

#Utility plugins

Plugin What it shows
truce-analyzer Real-time spectrum analyzer with diff overlay; non-trivial GUI built on truce.

#Project structure

Each example follows the same layout:

examples/<name>/
├── Cargo.toml
└── src/
    └── lib.rs

GUI framework examples may have additional files:

examples/gain-slint/
├── build.rs              # slint-build compilation
└── ui/
    └── main.slint        # declarative UI markup