[][src]Trait fpsdk::voice::ReceiveVoiceHandler

pub trait ReceiveVoiceHandler: Send + Sync {
    fn trigger(&mut self, params: Params, tag: Tag) -> &mut dyn Voice;
fn release(&mut self, tag: Tag);
fn kill(&mut self, tag: Tag); fn on_event(&mut self, _tag: Tag, _event: Event) -> Box<dyn AsRawPtr> { ... }
fn out_handler(&mut self) -> Option<&mut dyn SendVoiceHandler> { ... } }

Implement this trait for your type if you make a generator plugin.

All methods can be called either from GUI or mixer thread.

Required methods

fn trigger(&mut self, params: Params, tag: Tag) -> &mut dyn Voice

The host calls this to let it create a voice.

The tag parameter is an identifier the host uses to identify the voice.

fn release(&mut self, tag: Tag)

This gets called by the host when the voice enters the envelope release state (note off).

fn kill(&mut self, tag: Tag)

Called when the voice has to be discarded.

Loading content...

Provided methods

fn on_event(&mut self, _tag: Tag, _event: Event) -> Box<dyn AsRawPtr>

Process a voice event.

fn out_handler(&mut self) -> Option<&mut dyn SendVoiceHandler>

Getter for SendVoiceHandler.

Loading content...

Implementors

Loading content...