pub struct PluginInfo {Show 32 fields
pub name: &'static str,
pub vendor: &'static str,
pub url: &'static str,
pub version: &'static str,
pub category: PluginCategory,
pub accepts_midi_in: bool,
pub emits_midi: bool,
pub midi_input_dialect: MidiDialect,
pub midi_output_dialect: MidiDialect,
pub midi_input_ports: u8,
pub midi_output_ports: u8,
pub bundle_id: &'static str,
pub vst3_id: &'static str,
pub clap_id: &'static str,
pub fourcc: [u8; 4],
pub au_type: [u8; 4],
pub au_manufacturer: [u8; 4],
pub aax_id: Option<&'static str>,
pub aax_category: Option<&'static str>,
pub vst3_subcategory: Option<&'static str>,
pub preset_user_dir: Option<&'static str>,
pub vst3_name: Option<&'static str>,
pub clap_name: Option<&'static str>,
pub vst2_name: Option<&'static str>,
pub au_name: Option<&'static str>,
pub au3_name: Option<&'static str>,
pub aax_name: Option<&'static str>,
pub lv2_name: Option<&'static str>,
pub automation: AutomationConfig,
pub legacy_au_keys: &'static [&'static str],
pub legacy_lv2_uris: &'static [&'static str],
pub legacy_aax_chunk_ids: &'static [&'static str],
/* private fields */
}Expand description
Static metadata about a plugin.
Fields§
§name: &'static str§vendor: &'static str§url: &'static str§version: &'static str§category: PluginCategory§accepts_midi_in: boolWhether the host should route MIDI / note events into this
plugin. Defaults to true for instruments and note effects;
truce.toml’s midi_input overrides the derived value (e.g.
an audio effect that reacts to CC). Every format wrapper gates
its MIDI input port / bus / capability on this one flag.
emits_midi: boolWhether this plugin emits MIDI / note events to the host.
Defaults to true for note effects only; truce.toml’s
midi_output overrides the derived value (e.g. an instrument
or effect that also emits MIDI). Every format wrapper gates its
MIDI output port / bus / capability on this one flag, so the
host actually reads what process() pushes to output_events.
midi_input_dialect: MidiDialectDialect the (single) MIDI input port speaks. Defaults to
MidiDialect::Midi1; a plugin opts into MIDI 2.0 with the
midi2 key in truce.toml. Honored by the UMP-transport formats
(CLAP, AU v3); VST3 maps the per-note subset to note expression;
the rest deliver MIDI 1.0 regardless.
midi_output_dialect: MidiDialectDialect the (single) MIDI output port speaks. See
Self::midi_input_dialect.
midi_input_ports: u8Number of MIDI input ports the plugin exposes. 0 when it
accepts no MIDI, 1 for the ordinary single-port case, >1 for
a multi-port plugin (e.g. a merger). Derived from the MIDI-input
capability by default; midi_input_ports in truce.toml raises
it. Formats without a multi-port MIDI transport clamp to 1 and
route everything to crate::Event::port 0. Always >= 1 when
Self::accepts_midi_in is set, and 0 otherwise.
midi_output_ports: u8Number of MIDI output ports the plugin exposes. See
Self::midi_input_ports; mirrors Self::emits_midi.
bundle_id: &'static strShort identifier (bundle_id in truce.toml). Used to derive
the LV2 plugin URI ({vendor.url}/lv2/{bundle_id}); also a
stable, vendor-agnostic key for “this plugin” that doesn’t
drift with display-name changes the way clap_id does.
vst3_id: &'static str§clap_id: &'static str§fourcc: [u8; 4]§au_type: [u8; 4]§au_manufacturer: [u8; 4]§aax_id: Option<&'static str>§aax_category: Option<&'static str>AAX plugin category string (e.g. “EQ”, “Dynamics”, “Reverb”).
Maps to AAX_ePlugInCategory constants.
vst3_subcategory: Option<&'static str>VST3 “Plugin Type Categories” secondary token. The wrapper
emits this after the primary token (Fx|<sub>,
Instrument|<sub>) so hosts like Cubase route to the right
submenu. Values from the VST3 SDK list: Delay, Distortion,
Dynamics, EQ, Filter, Mastering, Modulation,
Pitch Shift, Restoration, Reverb, Analyzer, Tools,
Surround. Optional; when None only the primary token is
emitted and Cubase will fall back to “Other”.
preset_user_dir: Option<&'static str>Per-format display-name overrides, populated by
truce::plugin_info!() from the matching truce.toml keys.
Format wrappers fall back to name when the override is None.
Baked at compile time so back-to-back plugin builds with
different overrides don’t invalidate the format wrapper’s
build fingerprint.
au3_name is exposed for parity with the other formats and
for user introspection, but truce-au’s resolved_plugin_name
reads au_name for both v2 and v3 builds - the v3 host’s
displayed label comes from the appex Info.plist’s AUNAME
(which cargo truce install --au3 populates from au3_name),
not from g_descriptor->name.
[plugin.presets] user_dir from truce.toml: replaces the
truce/<vendor>/<plugin> subpath of the user-scope preset
root. truce_utils::presets::user_preset_root documents
where the path resolves on each OS. Effectively permanent
once a plugin ships - changing it orphans previously saved
user presets and packs.
vst3_name: Option<&'static str>§clap_name: Option<&'static str>§vst2_name: Option<&'static str>§au_name: Option<&'static str>§au3_name: Option<&'static str>§aax_name: Option<&'static str>§lv2_name: Option<&'static str>§automation: AutomationConfigSample-accurate automation chunking tunables. Read by the
chunked_process::process_chunked helper that every format
wrapper routes process() through. Populated by
truce::plugin_info!() from truce.toml’s [automation]
table; defaults to AutomationConfig::DEFAULT when the
table is absent.
legacy_au_keys: &'static [&'static str]AU ClassInfo dictionary keys a pre-truce build stored its
state under. Probed by truce-au when truce’s own data key is
absent; a hit feeds the plugin’s migrate_state hook. From
truce.toml’s [plugin.legacy_state] au_keys; empty when
undeclared (no probing).
legacy_lv2_uris: &'static [&'static str]LV2 state property URIs a pre-truce build stored its state
under. See Self::legacy_au_keys.
legacy_aax_chunk_ids: &'static [&'static str]AAX chunk fourccs a pre-truce build stored its state under.
See Self::legacy_au_keys.
Trait Implementations§
Source§impl Clone for PluginInfo
impl Clone for PluginInfo
Source§fn clone(&self) -> PluginInfo
fn clone(&self) -> PluginInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more