1
0
Fork 0

Add a constant for sample accurate automation

This commit is contained in:
Robbert van der Helm 2022-03-10 18:57:17 +01:00
parent 02622e6e4f
commit 36d54edae7
7 changed files with 13 additions and 2 deletions

View file

@ -298,6 +298,8 @@ impl Plugin for Crisp {
const DEFAULT_NUM_INPUTS: u32 = NUM_CHANNELS; const DEFAULT_NUM_INPUTS: u32 = NUM_CHANNELS;
const DEFAULT_NUM_OUTPUTS: u32 = NUM_CHANNELS; const DEFAULT_NUM_OUTPUTS: u32 = NUM_CHANNELS;
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
fn params(&self) -> Pin<&dyn Params> { fn params(&self) -> Pin<&dyn Params> {
self.params.as_ref() self.params.as_ref()
} }

View file

@ -72,6 +72,7 @@ impl Plugin for Gain {
const DEFAULT_NUM_OUTPUTS: u32 = 2; const DEFAULT_NUM_OUTPUTS: u32 = 2;
const ACCEPTS_MIDI: bool = false; const ACCEPTS_MIDI: bool = false;
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
fn params(&self) -> Pin<&dyn Params> { fn params(&self) -> Pin<&dyn Params> {
self.params.as_ref() self.params.as_ref()

View file

@ -105,6 +105,7 @@ impl Plugin for Gain {
const DEFAULT_NUM_OUTPUTS: u32 = 2; const DEFAULT_NUM_OUTPUTS: u32 = 2;
const ACCEPTS_MIDI: bool = false; const ACCEPTS_MIDI: bool = false;
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
fn params(&self) -> Pin<&dyn Params> { fn params(&self) -> Pin<&dyn Params> {
self.params.as_ref() self.params.as_ref()

View file

@ -104,6 +104,7 @@ impl Plugin for Sine {
const DEFAULT_NUM_OUTPUTS: u32 = 2; const DEFAULT_NUM_OUTPUTS: u32 = 2;
const ACCEPTS_MIDI: bool = true; const ACCEPTS_MIDI: bool = true;
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
fn params(&self) -> Pin<&dyn Params> { fn params(&self) -> Pin<&dyn Params> {
self.params.as_ref() self.params.as_ref()

View file

@ -102,6 +102,7 @@ impl Plugin for Stft {
const DEFAULT_NUM_OUTPUTS: u32 = 2; const DEFAULT_NUM_OUTPUTS: u32 = 2;
const ACCEPTS_MIDI: bool = false; const ACCEPTS_MIDI: bool = false;
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
fn params(&self) -> Pin<&dyn Params> { fn params(&self) -> Pin<&dyn Params> {
self.params.as_ref() self.params.as_ref()

View file

@ -153,8 +153,6 @@ impl Plugin for PubertySimulator {
const DEFAULT_NUM_INPUTS: u32 = 2; const DEFAULT_NUM_INPUTS: u32 = 2;
const DEFAULT_NUM_OUTPUTS: u32 = 2; const DEFAULT_NUM_OUTPUTS: u32 = 2;
const ACCEPTS_MIDI: bool = false;
fn params(&self) -> Pin<&dyn Params> { fn params(&self) -> Pin<&dyn Params> {
self.params.as_ref() self.params.as_ref()
} }

View file

@ -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 /// Whether the plugin accepts note events. If this is set to `false`, then the plugin won't
/// receive any note events. /// receive any note events.
const ACCEPTS_MIDI: bool = false; 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 /// 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 /// `process()`. These parameters are identified by strings that should never change when the