Struct UINoteEvent
A note played on the editor (on-screen keyboard, pads), delivered to the processor.
public readonly record struct UINoteEvent : IEquatable<UINoteEvent>
- Implements
- Inherited Members
Constructors
UINoteEvent(UINoteKind, int, float, int)
A note played on the editor (on-screen keyboard, pads), delivered to the processor.
public UINoteEvent(UINoteKind Kind, int Pitch, float Velocity, int Channel = 0)
Parameters
KindUINoteKindWhat happens.
PitchintMIDI note number (0..127); unused for AllNotesOff.
VelocityfloatVelocity in [0, 1] (note-on), release velocity (note-off).
ChannelintMIDI channel, 0-based.
Properties
AllOff
The "all notes off" event.
public static UINoteEvent AllOff { get; }
Property Value
Channel
MIDI channel, 0-based.
public int Channel { get; init; }
Property Value
Kind
What happens.
public UINoteKind Kind { get; init; }
Property Value
Pitch
MIDI note number (0..127); unused for AllNotesOff.
public int Pitch { get; init; }
Property Value
Velocity
Velocity in [0, 1] (note-on), release velocity (note-off).
public float Velocity { get; init; }
Property Value
Methods
Off(int, int)
A note-off event.
public static UINoteEvent Off(int pitch, int channel = 0)
Parameters
Returns
- UINoteEvent
The event.
On(int, float, int)
A note-on event.
public static UINoteEvent On(int pitch, float velocity, int channel = 0)
Parameters
Returns
- UINoteEvent
The event.