Chord
Chord instrument: play one note, hear a triad (or 7th), and the chord's notes are also emitted to the host as MIDI so they can drive a second instrument.
Source: examples/truce-example-chord/.
#What it demonstrates
- Instrument that emits MIDI (
midi_output = trueintruce.tomlso every format declares its MIDI output port/bus) EnumParam<ChordType>with#[derive(ParamEnum)]and#[name = "..."]variant labels- Emitting
NoteOn/NoteOffevents viaProcessContext::output_eventsat the incoming event'ssample_offset - Last-note priority with matched
NoteOffemission for every sounding voice, preventing stuck notes downstream - Output-only bus layout
(
BusLayout::new().with_output("Main", ChannelConfig::Stereo)) - Built-in
GridLayouteditor withdropdownandknobwidgets
#Parameters
| Name | Range | Unit | Description |
|---|---|---|---|
| Chord | Major, Minor, Maj7, Min7, Sus4 | -- | Chord quality as intervals from the played root |
| Gain | 0 to 1 | % | Output level, smoothed (smooth = "exp(5)") |