pub struct Channel(/* private fields */);Expand description
A single FM channel.
This is a hardware voice. It can only be playing one note at a time.
Implementations§
Source§impl Channel
impl Channel
Sourcepub fn set_key_raw(&self, operator_mask: u8)
pub fn set_key_raw(&self, operator_mask: u8)
Set whether the key is down for a channel.
This version allows setting key down individually per-operator, however
generally set_key alone is sufficient.
Sourcepub fn set_frequency(&self, frequency: impl Into<u16>, octave: u8)
pub fn set_frequency(&self, frequency: impl Into<u16>, octave: u8)
Set the frequency for a bank.
The frequency is specified in chip-specific units. Use the Note enum for
pre-calculated values.
Octave can be used to increase the octave (the maximum value is 7).
Sourcepub fn set_algorithm(&self, algorithm: u8, feedback: u8)
pub fn set_algorithm(&self, algorithm: u8, feedback: u8)
Set the algorithm and feedback for a bank.
Sourcepub fn set_panning(&self, panning: Panning, ams: u8, fms: u8)
pub fn set_panning(&self, panning: Panning, ams: u8, fms: u8)
Set the panning, frequency modulation and amplituate modulation for a bank.
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnsafeUnpin for Channel
impl UnwindSafe for Channel
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