pub struct PitchBend {
pub channel: u8,
pub value: u16,
}Expand description
A MIDI 1.0 Pitch Bend message. value is the raw 14-bit unsigned value
(0..=16383); 8192 is center.
Fields§
§channel: u8MIDI channel, 0..=15.
value: u1614-bit bend value, 0..=16383. 8192 = center.
Implementations§
Source§impl PitchBend
impl PitchBend
Sourcepub fn new(channel: u8, value: u16) -> Result<Self, AudioError>
pub fn new(channel: u8, value: u16) -> Result<Self, AudioError>
Construct from a raw 14-bit value (0..=16383).
Sourcepub fn from_signed(channel: u8, signed: i16) -> Result<Self, AudioError>
pub fn from_signed(channel: u8, signed: i16) -> Result<Self, AudioError>
Construct from a signed offset around center (-8192..=8191).
Sourcepub fn parse(bytes: &[u8]) -> Result<Self, AudioError>
pub fn parse(bytes: &[u8]) -> Result<Self, AudioError>
Parse from a slice whose first byte is a Pitch Bend status.
Trait Implementations§
impl Copy for PitchBend
impl Eq for PitchBend
impl StructuralPartialEq for PitchBend
Auto Trait Implementations§
impl Freeze for PitchBend
impl RefUnwindSafe for PitchBend
impl Send for PitchBend
impl Sync for PitchBend
impl Unpin for PitchBend
impl UnsafeUnpin for PitchBend
impl UnwindSafe for PitchBend
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