Skip to main content

MidiController

Struct MidiController 

Source
pub struct MidiController<T: MidiOut> { /* private fields */ }
Expand description

Provides a reusable MIDI interface and core logic across different platforms.

This struct is intended for internal use only and should not be accessed directly by users. Instead, users should:

  • Use your implementation of Conductor to send MIDI messages.
  • Use the Context to access system settings.

Implementations§

Source§

impl<T: MidiOut> MidiController<T>

Source

pub fn new(midi_out: T) -> Self

This function is not intended to be called directly by the user.

It exists to facilitate code reuse across different environments and platforms.

Source

pub fn finish(&mut self)

Cleans up the sequencer before it is terminated. Ensures all notes are turned off and sends a MIDI stop message.

Intended for internal use only; not meant to be called directly by the user.

Used internally to enable platform-independent cleanup.

Auto Trait Implementations§

§

impl<T> Freeze for MidiController<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for MidiController<T>
where T: RefUnwindSafe,

§

impl<T> Send for MidiController<T>
where T: Send,

§

impl<T> Sync for MidiController<T>
where T: Sync,

§

impl<T> Unpin for MidiController<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for MidiController<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for MidiController<T>
where T: UnwindSafe,

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.