JitXenthControl

Struct JitXenthControl 

Source
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>

Source

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.

Source

pub fn note_off(&mut self, xen_channel: u8, key: K) -> SendCommandResult

Stops the note of the given key on the given xen_channel.

Source

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.

Source

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>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.