diff --git a/plugins/crisp/src/lib.rs b/plugins/crisp/src/lib.rs index 6c5bb5e2..d7db7bd8 100644 --- a/plugins/crisp/src/lib.rs +++ b/plugins/crisp/src/lib.rs @@ -298,6 +298,8 @@ impl Plugin for Crisp { const DEFAULT_NUM_INPUTS: u32 = NUM_CHANNELS; const DEFAULT_NUM_OUTPUTS: u32 = NUM_CHANNELS; + const SAMPLE_ACCURATE_AUTOMATION: bool = true; + fn params(&self) -> Pin<&dyn Params> { self.params.as_ref() } diff --git a/plugins/examples/gain-gui/src/lib.rs b/plugins/examples/gain-gui/src/lib.rs index d830c0aa..2cd97f06 100644 --- a/plugins/examples/gain-gui/src/lib.rs +++ b/plugins/examples/gain-gui/src/lib.rs @@ -72,6 +72,7 @@ impl Plugin for Gain { const DEFAULT_NUM_OUTPUTS: u32 = 2; const ACCEPTS_MIDI: bool = false; + const SAMPLE_ACCURATE_AUTOMATION: bool = true; fn params(&self) -> Pin<&dyn Params> { self.params.as_ref() diff --git a/plugins/examples/gain/src/lib.rs b/plugins/examples/gain/src/lib.rs index 949e0930..536c66ac 100644 --- a/plugins/examples/gain/src/lib.rs +++ b/plugins/examples/gain/src/lib.rs @@ -105,6 +105,7 @@ impl Plugin for Gain { const DEFAULT_NUM_OUTPUTS: u32 = 2; const ACCEPTS_MIDI: bool = false; + const SAMPLE_ACCURATE_AUTOMATION: bool = true; fn params(&self) -> Pin<&dyn Params> { self.params.as_ref() diff --git a/plugins/examples/sine/src/lib.rs b/plugins/examples/sine/src/lib.rs index e7de6580..aab39eba 100644 --- a/plugins/examples/sine/src/lib.rs +++ b/plugins/examples/sine/src/lib.rs @@ -104,6 +104,7 @@ impl Plugin for Sine { const DEFAULT_NUM_OUTPUTS: u32 = 2; const ACCEPTS_MIDI: bool = true; + const SAMPLE_ACCURATE_AUTOMATION: bool = true; fn params(&self) -> Pin<&dyn Params> { self.params.as_ref() diff --git a/plugins/examples/stft/src/lib.rs b/plugins/examples/stft/src/lib.rs index ad40a8b5..f3d9e677 100644 --- a/plugins/examples/stft/src/lib.rs +++ b/plugins/examples/stft/src/lib.rs @@ -102,6 +102,7 @@ impl Plugin for Stft { const DEFAULT_NUM_OUTPUTS: u32 = 2; const ACCEPTS_MIDI: bool = false; + const SAMPLE_ACCURATE_AUTOMATION: bool = true; fn params(&self) -> Pin<&dyn Params> { self.params.as_ref() diff --git a/plugins/puberty_simulator/src/lib.rs b/plugins/puberty_simulator/src/lib.rs index 8e1bb09e..518a2421 100644 --- a/plugins/puberty_simulator/src/lib.rs +++ b/plugins/puberty_simulator/src/lib.rs @@ -153,8 +153,6 @@ impl Plugin for PubertySimulator { const DEFAULT_NUM_INPUTS: u32 = 2; const DEFAULT_NUM_OUTPUTS: u32 = 2; - const ACCEPTS_MIDI: bool = false; - fn params(&self) -> Pin<&dyn Params> { self.params.as_ref() } diff --git a/src/plugin.rs b/src/plugin.rs index 7c093739..6b347316 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -48,6 +48,13 @@ pub trait Plugin: Default + Send + Sync + 'static { /// Whether the plugin accepts note events. If this is set to `false`, then the plugin won't /// receive any note events. const ACCEPTS_MIDI: bool = false; + /// If enabled, the audio processing cycle may be split up into multiple smaller chunks if + /// parameter values change occur in the middle of the buffer. Depending on the host these + /// blocks may be as small as a single sample. Bitwig Studio sends at most one parameter change + /// every 64 samples. + /// + /// TODO: Implement this for VST3, this currently is only implemetned for CLAP. + const SAMPLE_ACCURATE_AUTOMATION: bool = false; /// The plugin's parameters. The host will update the parameter values before calling /// `process()`. These parameters are identified by strings that should never change when the