Struct NoteEvent
A single note event stored in a NoteBuffer.
Time convention: Offset and Duration are fractions of a
WHOLE note — a quarter note is Rational.Quarter (1/4), one 4/4 measure is 1.
This is the unit produced by MusicNotation.Parse and consumed by all analyzers
and by MidiIo.
public readonly struct NoteEvent
- Inherited Members
Constructors
NoteEvent(int, Rational, Rational, float)
A single note event stored in a NoteBuffer.
Time convention: Offset and Duration are fractions of a
WHOLE note — a quarter note is Rational.Quarter (1/4), one 4/4 measure is 1.
This is the unit produced by MusicNotation.Parse and consumed by all analyzers
and by MidiIo.
public NoteEvent(int pitch, Rational offset, Rational duration, float velocity = 0.8)
Parameters
pitchintMIDI pitch number (middle C = 60).
offsetRationalStart time, in whole-note units, from the start of the buffer.
durationRationalSounding length, in whole-note units.
velocityfloatNormalized loudness in the range 0..1 (default 0.8).
Fields
Duration
Sounding length, in whole-note units.
public readonly Rational Duration
Field Value
Offset
Start time, in whole-note units, from the start of the buffer.
public readonly Rational Offset
Field Value
Pitch
MIDI pitch number (middle C = 60).
public readonly int Pitch
Field Value
Velocity
Normalized loudness in the range 0..1.
public readonly float Velocity