[][src]Trait brinicle_voices::Voice

pub trait Voice {
    type Configuration: ?Sized;
    fn note_on(
        &mut self,
        _: &Self::Configuration,
        note_number: u8,
        velocity: u8
    );
fn note_off(&mut self, _: &Self::Configuration, velocity: u8);
fn is_running(&self) -> bool; }

An interface for one "Voice" in a synth.

Associated Types

Loading content...

Required methods

fn note_on(&mut self, _: &Self::Configuration, note_number: u8, velocity: u8)

fn note_off(&mut self, _: &Self::Configuration, velocity: u8)

fn is_running(&self) -> bool

Returning false here indicates that the voice is ready for a new note without audible glitch - i.e. release is done. It's legal to return false before receiving a note_off, but if that happens a note_off will not be sent.

Loading content...

Implementors

Loading content...