Skip to main content

CM32L

Struct CM32L 

Source
pub struct CM32L { /* private fields */ }
Expand description

CM-32L synthesizer state.

Implementations§

Source§

impl CM32L

Source

pub fn new(rom: Rom) -> CM32L

Creates a new synthesizer instance.

Use the bundled ROM or load ROMs at runtime:

  • CM32L::new(Rom::bundled()) - uses bundled ROM
  • CM32L::new(Rom::new(ctrl, pcm)?) - for dynamically loaded ROMs

Trait Implementations§

Source§

impl Debug for CM32L

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Synth for CM32L

Source§

fn current_time(&self) -> u32

Returns the number of frames rendered so far.
Source§

fn play_msg_at(&mut self, msg: u32, time: u32) -> bool

Enqueues one MIDI message at a specific frame. Read more
Source§

fn play_sysex_at(&mut self, sysex: &[u8], time: u32) -> bool

Enqueues one MIDI System Exclusive message at a specific frame. Read more
Source§

fn render(&mut self, out: &mut [Frame])

Renders audio samples into a slice of frames. Read more
Source§

fn apply_command(&mut self, command: ControlCommand) -> Result<(), ControlError>

Applies a typed runtime control command.
Source§

fn play_msg(&mut self, msg: u32) -> bool

Enqueues one MIDI message starting from the current frame. Read more
Source§

fn play_sysex(&mut self, sysex: &[u8]) -> bool

Enqueues one MIDI System Exclusive message at the current frame. Read more

Auto Trait Implementations§

§

impl Freeze for CM32L

§

impl RefUnwindSafe for CM32L

§

impl Send for CM32L

§

impl Sync for CM32L

§

impl Unpin for CM32L

§

impl UnsafeUnpin for CM32L

§

impl UnwindSafe for CM32L

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.