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.
#Plugins
| Plugin | Type | GUI | Screenshot |
|---|---|---|---|
| gain | Effect | Built-in | ![]() |
| eq | Effect | Built-in | ![]() |
| synth | Instrument | Built-in | ![]() |
| transpose | MIDI | Built-in | ![]() |
| arpeggio | MIDI | Built-in | ![]() |
| tremolo | Effect | egui | ![]() |
| state | Effect | egui | ![]() |
| fundsp-reverb-simple | Effect | Built-in | ![]() |
| fundsp-reverb-worker | Effect | Built-in | ![]() |
| gain-egui | Effect | egui | ![]() |
| gain-iced | Effect | Iced | ![]() |
| gain-slint | Effect | Slint | ![]() |
| block-gain | Effect | Built-in | ![]() |
| block-drywet | Effect | Built-in | ![]() |
| block-gate | Effect | Built-in | ![]() |
| block-saturate | Effect | Built-in | ![]() |
| block-widen | Effect | Built-in | ![]() |
| block-surround-meter | Effect | Built-in | ![]() |
The four gain variants (gain, gain-egui, gain-iced,
gain-slint) implement the same plugin with different GUI
frameworks. Compare them to see how each framework handles the
same layout.
The six block-* examples each isolate one truce_simd::ops::*
or truce_simd::math::* shape (mix_block, mac_block,
abs_max_block + zero_block, tanh_block,
db_to_linear_block, linear_to_db_block). See the SIMD
section of the processing guide
for the design.
The two fundsp-reverb-* crates share a topology and signal
flow but rebuild the graph differently; the fundsp integration
guide walks through both.
#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.
| Plugin | What it shows |
|---|---|
| truce-analyzer | Real-time spectrum analyzer with diff overlay; non-trivial GUI built on truce. |
#Building
cargo build --workspace # build all
cargo test --workspace # run all tests
cargo truce build # build every format into target/bundles/
cargo truce install -p truce-example-gain # install one plugin
cargo truce run -p truce-example-synth # run a plugin standalone
cargo truce validate -p truce-example-gain # auval + pluginval + clap-validator
#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

















