Table of Contents

Struct NoteEvent

Namespace
Celeritas.Core
Assembly
Celeritas.dll

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

pitch int

MIDI pitch number (middle C = 60).

offset Rational

Start time, in whole-note units, from the start of the buffer.

duration Rational

Sounding length, in whole-note units.

velocity float

Normalized loudness in the range 0..1 (default 0.8).

Fields

Duration

Sounding length, in whole-note units.

public readonly Rational Duration

Field Value

Rational

Offset

Start time, in whole-note units, from the start of the buffer.

public readonly Rational Offset

Field Value

Rational

Pitch

MIDI pitch number (middle C = 60).

public readonly int Pitch

Field Value

int

Velocity

Normalized loudness in the range 0..1.

public readonly float Velocity

Field Value

float