Struct fluid_xenth::XenthControl [−][src]
pub struct XenthControl<K> { /* fields omitted */ }Expand description
Controls the connected Xenth instance from any thread.
Implementations
Starts a note with the given pitch on the given xen_channel.
key is used as identifier for currently sounding notes.
Stops the note of the given key on the given xen_channel.
Sends a key-pressure message to the note with the given key on the given xen_channel.
pub fn send_command(
&self,
command: impl FnOnce(&Synth) -> Status + Send + 'static
) -> SendCommandResult
pub fn send_command(
&self,
command: impl FnOnce(&Synth) -> Status + Send + 'static
) -> SendCommandResult
Sends an arbitrary modification command to the internal fluidlite::Synth instance.
The command will be executed when Xenth::write or Xenth::flush_commands is called.
Be aware that using this method in the wrong way can put load on the audio thread, e.g. when a sound font is loaded.
Refrain from modifying the tuning of the internal fluidlite::Synth instance as fluid-xenth will manage the tuning for you.
In order to send channel-based commands use XenthControl::send_channel_command.
pub fn send_channel_command(
&self,
xen_channel: u8,
command: impl FnMut(&Synth, u32) -> Status + Send + 'static
) -> SendCommandResult
pub fn send_channel_command(
&self,
xen_channel: u8,
command: impl FnMut(&Synth, u32) -> Status + Send + 'static
) -> SendCommandResult
Sends a channel-based command to the internal fluidlite::Synth instance.
fluid-xenth will map the provided xen_channel to the internal real channels of the fluidlite::Synth instance.