pub trait PluginParameters: Sync {
Show 15 methods fn change_preset(&self, preset: i32) { ... } fn get_preset_num(&self) -> i32 { ... } fn set_preset_name(&self, name: String) { ... } fn get_preset_name(&self, preset: i32) -> String { ... } fn get_parameter_label(&self, index: i32) -> String { ... } fn get_parameter_text(&self, index: i32) -> String { ... } fn get_parameter_name(&self, index: i32) -> String { ... } fn get_parameter(&self, index: i32) -> f32 { ... } fn set_parameter(&self, index: i32, value: f32) { ... } fn can_be_automated(&self, index: i32) -> bool { ... } fn string_to_parameter(&self, index: i32, text: String) -> bool { ... } fn get_preset_data(&self) -> Vec<u8> { ... } fn get_bank_data(&self) -> Vec<u8> { ... } fn load_preset_data(&self, data: &[u8]) { ... } fn load_bank_data(&self, data: &[u8]) { ... }
}
Expand description

Parameter object shared between the UI and processing threads. Since access is shared, all methods take self by immutable reference. All mutation must thus be performed using thread-safe interior mutability.

Provided Methods§

Set the current preset to the index specified by preset.

This method can be called on the processing thread for automation.

Get the current preset index.

Set the current preset name.

Get the name of the preset at the index specified by preset.

Get parameter label for parameter at index (e.g. “db”, “sec”, “ms”, “%”).

Get the parameter value for parameter at index (e.g. “1.0”, “150”, “Plate”, “Off”).

Get the name of parameter at index.

Get the value of parameter at index. Should be value between 0.0 and 1.0.

Set the value of parameter at index. value is between 0.0 and 1.0.

This method can be called on the processing thread for automation.

Return whether parameter at index can be automated.

Use String as input for parameter value. Used by host to provide an editable field to adjust a parameter value. E.g. “100” may be interpreted as 100hz for parameter. Returns if the input string was used.

If preset_chunks is set to true in plugin info, this should return the raw chunk data for the current preset.

If preset_chunks is set to true in plugin info, this should return the raw chunk data for the current plugin bank.

If preset_chunks is set to true in plugin info, this should load a preset from the given chunk data.

If preset_chunks is set to true in plugin info, this should load a preset bank from the given chunk data.

Implementors§