Table of Contents

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

Pitch int
Velocity float
Beats double

Properties

Beats

public double Beats { get; init; }

Property Value

double

Frequency

Frequency in Hz in 12-tone equal temperament with A4 (MIDI 69) at 440 Hz.

public double Frequency { get; }

Property Value

double

Name

Scientific pitch notation, for example C#4.

public string Name { get; }

Property Value

string

Pitch

public int Pitch { get; init; }

Property Value

int

Velocity

public float Velocity { get; init; }

Property Value

float

Methods

ToString()

The note as text, such as C#4 (v=0.8, 1 beats).

public override string ToString()

Returns

string

Transpose(int)

A copy of this note moved by semitones.

public Note Transpose(int semitones)

Parameters

semitones int

Returns

Note