Struct rea_rs::midi::MidiNoteEvent
source · [−]pub struct MidiNoteEvent {
pub start_in_ppq: u32,
pub end_in_ppq: u32,
pub is_selected: bool,
pub is_muted: bool,
pub channel: u8,
pub note: u8,
pub on_velocity: u8,
pub off_velocity: u8,
}
Expand description
Special Event type, holds Midi Notes, representing 2 raw Events
Fields
start_in_ppq: u32
end_in_ppq: u32
is_selected: bool
is_muted: bool
channel: u8
note: u8
on_velocity: u8
off_velocity: u8
Implementations
sourceimpl MidiNoteEvent
impl MidiNoteEvent
pub fn new(
start_in_ppq: u32,
end_in_ppq: u32,
is_selected: bool,
is_muted: bool,
channel: u8,
note: u8,
on_velocity: u8,
off_velocity: u8
) -> Self
pub fn from_raw_parts(
note_on: MidiEvent<NoteOnMessage>,
note_off: MidiEvent<NoteOffMessage>
) -> Self
pub fn to_raw_parts(
&self
) -> (MidiEvent<NoteOnMessage>, MidiEvent<NoteOffMessage>)
Trait Implementations
sourceimpl Clone for MidiNoteEvent
impl Clone for MidiNoteEvent
sourcefn clone(&self) -> MidiNoteEvent
fn clone(&self) -> MidiNoteEvent
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for MidiNoteEvent
impl Debug for MidiNoteEvent
sourceimpl Default for MidiNoteEvent
impl Default for MidiNoteEvent
sourcefn default() -> MidiNoteEvent
fn default() -> MidiNoteEvent
Returns the “default value” for a type. Read more
sourceimpl PartialEq<MidiNoteEvent> for MidiNoteEvent
impl PartialEq<MidiNoteEvent> for MidiNoteEvent
sourcefn eq(&self, other: &MidiNoteEvent) -> bool
fn eq(&self, other: &MidiNoteEvent) -> bool
sourceimpl PartialOrd<MidiNoteEvent> for MidiNoteEvent
impl PartialOrd<MidiNoteEvent> for MidiNoteEvent
sourcefn partial_cmp(&self, other: &MidiNoteEvent) -> Option<Ordering>
fn partial_cmp(&self, other: &MidiNoteEvent) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl StructuralPartialEq for MidiNoteEvent
Auto Trait Implementations
impl RefUnwindSafe for MidiNoteEvent
impl Send for MidiNoteEvent
impl Sync for MidiNoteEvent
impl Unpin for MidiNoteEvent
impl UnwindSafe for MidiNoteEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more