Trait hexodsp::matrix::MatrixObserver
source · [−]pub trait MatrixObserver {
fn update_prop(&self, key: &str);
fn update_monitor(&self, cell: &Cell);
fn update_param(&self, param_id: &ParamId);
fn update_matrix(&self);
fn update_all(&self);
fn midi_event(&self, midi_ev: HxMidiEvent);
}
Expand description
This trait can be passed into Matrix as trait object to get feedback when things change.
Required Methods
sourcefn update_prop(&self, key: &str)
fn update_prop(&self, key: &str)
Called when a property is changing eg. via Matrix::set_prop or some other yet unknown method. Not called, when MatrixObserver::update_all tells you that everything has changed.
sourcefn update_monitor(&self, cell: &Cell)
fn update_monitor(&self, cell: &Cell)
Called when a new cell is monitored via Matrix::monitor_cell. Not called, when MatrixObserver::update_all tells you that everything has changed.
sourcefn update_param(&self, param_id: &ParamId)
fn update_param(&self, param_id: &ParamId)
Called when a parameter or it’s modulation amount is changing. Not called, when MatrixObserver::update_all tells you that everything has changed.
sourcefn update_matrix(&self)
fn update_matrix(&self)
Called when the matrix graph was changed, usually called when Matrix::sync is called. Usually also called when MatrixObserver::update_all was called.
sourcefn update_all(&self)
fn update_all(&self)
Called when the complete matrix has been changing. The called then needs up update all it’s internal state it knows about Matrix.
sourcefn midi_event(&self, midi_ev: HxMidiEvent)
fn midi_event(&self, midi_ev: HxMidiEvent)
Called when a MIDI event was received.