Trait sampler::Mode [] [src]

pub trait Mode {
    fn note_on<A>(&self, note_hz: Hz, note_velocity: Velocity, map: &Map<A>, voices: &mut [Option<PlayingSample<A>>]) where A: Audio;
    fn note_off<A>(&self, note_hz: Hz, map: &Map<A>, voices: &mut [Option<PlayingSample<A>>]) where A: Audio;
}

The "mode" with which the Sampler will handle notes.

Required Methods

fn note_on<A>(&self, note_hz: Hz, note_velocity: Velocity, map: &Map<A>, voices: &mut [Option<PlayingSample<A>>]) where A: Audio

Handle a note_on event.

Is called immediately following instrument::Mode::note_on.

fn note_off<A>(&self, note_hz: Hz, map: &Map<A>, voices: &mut [Option<PlayingSample<A>>]) where A: Audio

Handle a note_off event.

Implementors