Struct rmididings::proc::Velocity[][src]

pub struct Velocity(pub i16);
Expand description

Modify the note velocity by an amount.

The argument is: offset.

Examples

let modifier = Velocity(10);

let mut evs = EventStream::from(NoteOnEvent(0,0,60,40));
modifier.run(&mut evs);
assert_eq!(evs, NoteOnEvent(0,0,60,50));
let modifier = Velocity(-10);

let mut evs = EventStream::from(NoteOnEvent(0,0,60,40));
modifier.run(&mut evs);
assert_eq!(evs, NoteOnEvent(0,0,60,30));

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.