#[non_exhaustive]pub struct NoteExpression {
pub id: Option<u32>,
pub channel: u8,
pub key: u8,
pub kind: ExpressionKind,
pub value: f64,
}Expand description
A change of one expression of the notes it addresses, which applies from its offset until the next change of the same expression. With an ID it addresses that note; without one, every note on its port, channel and key.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: Option<u32>At most MAX_NOTE_ID.
channel: u80..=15.
key: u80..=127.
kind: ExpressionKindExpression dimension and its allowed value range.
value: f64In the range of kind, see ExpressionKind::range.
Implementations§
Source§impl NoteExpression
impl NoteExpression
Sourcepub fn new(
channel: u8,
key: u8,
kind: ExpressionKind,
value: f64,
) -> NoteExpression
pub fn new( channel: u8, key: u8, kind: ExpressionKind, value: f64, ) -> NoteExpression
Constructs an expression addressing notes by channel and key, without an ID.
Sourcepub fn with_id(self, id: u32) -> NoteExpression
pub fn with_id(self, id: u32) -> NoteExpression
The same expression for the note with this ID.
Trait Implementations§
Source§impl Clone for NoteExpression
impl Clone for NoteExpression
impl Copy for NoteExpression
Source§impl Debug for NoteExpression
impl Debug for NoteExpression
Source§impl PartialEq for NoteExpression
impl PartialEq for NoteExpression
impl StructuralPartialEq for NoteExpression
Auto Trait Implementations§
impl Forget for NoteExpression
impl Freeze for NoteExpression
impl Move for NoteExpression
impl RefUnwindSafe for NoteExpression
impl Send for NoteExpression
impl Sync for NoteExpression
impl Unpin for NoteExpression
impl UnsafeUnpin for NoteExpression
impl UnwindSafe for NoteExpression
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