Struct Note
- Namespace
- Sigil.Sound
- Assembly
- Sigil.Sound.Notes.dll
An immutable note: a MIDI pitch, a velocity in [0, 1] and a length in beats.
public readonly record struct Note : IEquatable<Note>Implements
Inherited Members
Constructors
Note(int, float, double)
An immutable note: a MIDI pitch, a velocity in [0, 1] and a length in beats.
public Note(int Pitch, float Velocity = 0.8, double Beats = 1)Parameters
Properties
Beats
public double Beats { get; init; }Property Value
Frequency
Frequency in Hz in 12-tone equal temperament with A4 (MIDI 69) at 440 Hz.
public double Frequency { get; }Property Value
Name
Scientific pitch notation, for example C#4.
public string Name { get; }Property Value
Pitch
public int Pitch { get; init; }Property Value
Velocity
public float Velocity { get; init; }Property Value
Methods
ToString()
The note as text, such as C#4 (v=0.8, 1 beats).
public override string ToString()Returns
Transpose(int)
A copy of this note moved by semitones.
public Note Transpose(int semitones)Parameters
semitonesint