[][src]Trait fpsdk::voice::SendVoiceHandler

pub trait SendVoiceHandler: Send + Sync {
    fn kill(&mut self, tag: Tag);

    fn trigger(
        &mut self,
        _params: Params,
        _index: usize,
        _tag: Tag
    ) -> Option<&mut dyn Voice> { ... }
fn release(&mut self, _tag: Tag) { ... }
fn on_event(&mut self, _tag: Tag, _event: Event) -> Option<ValuePtr> { ... } }

Additional methods used by ReceiveVoiceHandler in VFX plugins for the output voices.

Required methods

fn kill(&mut self, tag: Tag)

Called when the voice has to be discarded.

Loading content...

Provided methods

fn trigger(
    &mut self,
    _params: Params,
    _index: usize,
    _tag: Tag
) -> Option<&mut dyn Voice>

The host calls this to let it create a voice.

  • tag is an identifier the host uses to identify the voice.
  • index is voice output index in patcher.

fn release(&mut self, _tag: Tag)

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

fn on_event(&mut self, _tag: Tag, _event: Event) -> Option<ValuePtr>

Process a voice event.

See Event for result variants.

Loading content...

Implementors

impl SendVoiceHandler for OutVoicer[src]

fn trigger(
    &mut self,
    params: Params,
    index: usize,
    tag: Tag
) -> Option<&mut dyn Voice>
[src]

It returns None if the output has no destination.

impl SendVoiceHandler for Voicer[src]

fn release(&mut self, tag: Tag)[src]

Tell the host the specified voice should be silent (Note Off).

fn kill(&mut self, tag: Tag)[src]

Tell the host that the specified voice can be killed (freed from memory).

This method forces FL Studio to ask the plugin to destroy its voice.

fn on_event(&mut self, tag: Tag, event: Event) -> Option<ValuePtr>[src]

Tell the host that some event has happened concerning the specified voice.

Loading content...