diff --git a/plugins/examples/gain/src/lib.rs b/plugins/examples/gain/src/lib.rs index af986107..636d8a1c 100644 --- a/plugins/examples/gain/src/lib.rs +++ b/plugins/examples/gain/src/lib.rs @@ -96,6 +96,8 @@ impl Plugin for Gain { 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/plugins/examples/sine/src/lib.rs b/plugins/examples/sine/src/lib.rs index 9afa0b24..039084fd 100644 --- a/plugins/examples/sine/src/lib.rs +++ b/plugins/examples/sine/src/lib.rs @@ -98,6 +98,8 @@ impl Plugin for Sine { const DEFAULT_NUM_INPUTS: u32 = 0; const DEFAULT_NUM_OUTPUTS: u32 = 2; + const ACCEPTS_MIDI: bool = true; + fn params(&self) -> Pin<&dyn Params> { self.params.as_ref() } diff --git a/src/plugin.rs b/src/plugin.rs index c05242c8..d139f7eb 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -54,6 +54,10 @@ pub trait Plugin: Default + Send + Sync { /// instead of setting up the busses properly. const DEFAULT_NUM_OUTPUTS: u32; + /// 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; + /// 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 /// plugin receives an update.