truce-core
Core traits and types for the truce audio plugin framework.
Overview
This crate defines the fundamental abstractions that all truce crates build on.
Plugin authors should depend on the truce crate instead, which re-exports
everything from here. This crate is intended for internal use and for authors of
format wrappers or GUI backends.
Key types and traits
Plugin-- the wrapper-facing format-export trait. Plugin authors don't implement this directly - thetruce::plugin!macro emits the impl.Plugin::Sampleis the audio buffer's element type (f32/f64).PluginExport-- wraps aPluginfor format-specific exportAudioBuffer<'a, S>-- deinterleaved sample buffer, generic over the plugin's sample type (defaults tof32)Editor/PluginContext<P>-- editor lifecycle and the bridge handle the GUI uses to talk to the hostProcessContext/ProcessStatus-- audio callback context and return statusEvent/TransportInfo-- MIDI events and DAW transport stateBusConfig/BusLayout-- I/O channel configurationPluginInfo/PluginCategory-- plugin metadata (name, ID, vendor, category)PluginContextReadF32/PluginContextReadF64-- extension traits that routestate.get_param(...)to the prelude's chosen precision (mirror ofFloatParamReadF{32,64}for the audio thread)
Utilities
db_to_linear/linear_to_db-- gain conversion helpers (re-exported fromtruce-params::sample::Float)midi_note_to_freq-- MIDI note number to frequency in Hz
Part of truce.