Skip to main content

truce_core/
lib.rs

1pub mod buffer;
2pub mod bus;
3pub mod custom_state;
4pub mod denormal;
5pub mod editor;
6pub mod events;
7pub mod export;
8pub mod info;
9pub mod midi;
10pub mod plugin;
11pub mod process;
12pub mod screenshot;
13pub mod state;
14pub mod transport;
15pub mod ump;
16pub mod util;
17pub mod wrapper;
18
19pub use buffer::{AudioBuffer, RawBufferScratch};
20pub use bus::{BusConfig, BusKind, BusLayout, ChannelConfig};
21pub use editor::{Editor, PluginContext};
22pub use events::{Event, EventBody, EventList, PushError, SYSEX_POOL_PREALLOC, TransportInfo};
23pub use export::PluginExport;
24pub use info::{PluginCategory, PluginInfo};
25pub use plugin::Plugin;
26pub use process::{ProcessContext, ProcessStatus};
27pub use transport::TransportSlot;
28
29// `Float` / `Sample` live in `truce-params` (truce-core depends on
30// truce-params, not the other way around). Re-exported here so
31// `truce_core::Float` / `truce_core::sample::Sample` are valid paths
32// for callers that don't want to depend on truce-params directly.
33pub use truce_params::sample;
34pub use truce_params::sample::{Float, Sample};
35pub use util::{db_to_linear, linear_to_db, meter_display, midi_note_to_freq};
36
37// `cast`, `shell_sidecar`, and `slugify` are hosted in `truce-utils`
38// (a dependency-free crate) so build-time consumers like `cargo-truce`
39// can use them without inheriting `truce-core`'s `truce-params` + `png`
40// publish chain. Re-exported here under `truce_core::cast::*` etc.
41// for callers that already depend on truce-core.
42pub use truce_utils::{cast, shell_sidecar, slugify};