Class MidiTokenizer.MidiNote
- Namespace
- AiDotNet.Tokenization.Specialized
- Assembly
- AiDotNet.dll
Represents a MIDI note event with timing, pitch, and velocity information.
public class MidiTokenizer.MidiNote
- Inheritance
-
MidiTokenizer.MidiNote
- Inherited Members
Remarks
For Beginners: A MIDI note is like a single key press on a piano: - StartTick: When in the song the note starts (like a timestamp) - Duration: How long the key is held down - Pitch: Which key is pressed (60 = middle C, higher = higher notes) - Velocity: How hard the key is pressed (louder = higher velocity)
Example: A middle C played for one beat at medium volume might be: StartTick=0, Duration=480, Pitch=60, Velocity=64
Properties
Duration
Gets or sets the duration of the note in MIDI ticks.
public int Duration { get; set; }
Property Value
- int
The length of the note in MIDI ticks. 480 ticks = 1 quarter note at default resolution.
Pitch
Gets or sets the pitch (0-127) representing the musical note.
public int Pitch { get; set; }
Property Value
- int
MIDI pitch value where 60 = middle C, 69 = A4 (440Hz). Range is 0-127.
StartTick
Gets or sets the start tick of the note in MIDI ticks.
public int StartTick { get; set; }
Property Value
- int
The absolute position in MIDI ticks where the note begins. Default ticks per beat is 480.
Velocity
Gets or sets the velocity (0-127) representing the note intensity.
public int Velocity { get; set; }
Property Value
- int
How forcefully the note is played. 0 = silent, 64 = medium, 127 = maximum. Range is 0-127.