mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Also add an Editor::param_modulation_changed()
This commit is contained in:
@@ -107,6 +107,8 @@ where
|
||||
// that boolean is set.
|
||||
}
|
||||
|
||||
fn param_modulation_changed(&self, _id: &str, _modulation_offset: f32) {}
|
||||
|
||||
fn param_values_changed(&self) {
|
||||
// Same
|
||||
}
|
||||
|
||||
@@ -109,6 +109,10 @@ impl<E: IcedEditor> Editor for IcedEditorWrapper<E> {
|
||||
let _ = self.parameter_updates_sender.try_send(ParameterUpdate);
|
||||
}
|
||||
|
||||
fn param_modulation_changed(&self, _id: &str, _modulation_offset: f32) {
|
||||
let _ = self.parameter_updates_sender.try_send(ParameterUpdate);
|
||||
}
|
||||
|
||||
fn param_values_changed(&self) {
|
||||
let _ = self.parameter_updates_sender.try_send(ParameterUpdate);
|
||||
}
|
||||
|
||||
@@ -131,6 +131,11 @@ impl Editor for ViziaEditor {
|
||||
.store(true, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
fn param_modulation_changed(&self, _id: &str, _modulation_offset: f32) {
|
||||
self.emit_parameters_changed_event
|
||||
.store(true, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
fn param_values_changed(&self) {
|
||||
self.emit_parameters_changed_event
|
||||
.store(true, Ordering::Relaxed);
|
||||
|
||||
@@ -58,9 +58,14 @@ pub trait Editor: Send {
|
||||
/// new value for a parameter or when a parameter change sent to the host gets processed.
|
||||
fn param_value_changed(&self, id: &str, normalized_value: f32);
|
||||
|
||||
/// Called whenever one or more parameter values changed while the editor is open. This may be
|
||||
/// called in place of [`param_value_changed()`][Self::param_value_changed()] when multiple
|
||||
/// parameter values hcange at the same time. For example, when a preset is loaded.
|
||||
/// Called whenever a specific parameter's monophonic modulation value has changed while the
|
||||
/// editor is open.
|
||||
fn param_modulation_changed(&self, id: &str, modulation_offset: f32);
|
||||
|
||||
/// Called whenever one or more parameter values or modulations have changed while the editor is
|
||||
/// open. This may be called in place of [`param_value_changed()`][Self::param_value_changed()]
|
||||
/// when multiple parameter values hcange at the same time. For example, when a preset is
|
||||
/// loaded.
|
||||
fn param_values_changed(&self);
|
||||
|
||||
// TODO: Reconsider adding a tick function here for the Linux `IRunLoop`. To keep this platform
|
||||
|
||||
Reference in New Issue
Block a user