pub struct JitXenthControl<K> { /* private fields */ }Expand description
Controls the connected Xenth instance from any thread using the just-in-time tuning model.
Implementations§
Source§impl<K: Copy + Eq + Hash> JitXenthControl<K>
impl<K: Copy + Eq + Hash> JitXenthControl<K>
Sourcepub fn note_on(
&mut self,
xen_channel: u8,
key: K,
pitch: Pitch,
velocity: u8,
) -> SendCommandResult
pub fn note_on( &mut self, xen_channel: u8, key: K, pitch: Pitch, velocity: u8, ) -> SendCommandResult
Starts a note with the given pitch on the given xen_channel.
key is used as identifier for currently sounding notes.
Sourcepub fn note_off(&mut self, xen_channel: u8, key: K) -> SendCommandResult
pub fn note_off(&mut self, xen_channel: u8, key: K) -> SendCommandResult
Stops the note of the given key on the given xen_channel.
Sourcepub fn key_pressure(
&mut self,
xen_channel: u8,
key: K,
pressure: u8,
) -> SendCommandResult
pub fn key_pressure( &mut self, xen_channel: u8, key: K, pressure: u8, ) -> SendCommandResult
Sends a key-pressure message to the note with the given key on the given xen_channel.
Sourcepub fn send_command(
&mut self,
xen_channel: u8,
command: impl FnMut(&mut Synth, u8) -> Result<(), OxiError> + Send + 'static,
) -> SendCommandResult
pub fn send_command( &mut self, xen_channel: u8, command: impl FnMut(&mut Synth, u8) -> Result<(), OxiError> + Send + 'static, ) -> SendCommandResult
Sends a channel-based command to the internal oxisynth::Synth instance.
fluid-xenth will map the provided xen_channel to the internal real channels of the oxisynth::Synth instance.
Be aware that calling the “wrong” function (e.g. add_font) can put load on the audio thread!
Auto Trait Implementations§
impl<K> Freeze for JitXenthControl<K>
impl<K> RefUnwindSafe for JitXenthControl<K>where
K: RefUnwindSafe,
impl<K> Send for JitXenthControl<K>where
K: Send,
impl<K> Sync for JitXenthControl<K>where
K: Sync,
impl<K> Unpin for JitXenthControl<K>where
K: Unpin,
impl<K> UnwindSafe for JitXenthControl<K>where
K: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more