Table of Contents

Class Notes

Namespace
Sigil.Sound
Assembly
Sigil.Sound.Notes.dll

Creating note sequences. Sequences are plain System.Collections.Generic.IEnumerable`1 values, so LINQ (Where, Select, ...) already works on them; timing, playback and MIDI file reading come later.

public static class Notes

Inheritance

Inherited Members

Methods

NameOf(int)

The scientific pitch name of a MIDI pitch, using sharps.

public static string NameOf(int pitch)

Parameters

pitch int

Returns

string

Parse(string)

Parses whitespace-separated note names in scientific pitch notation, such as "C4 Eb4 G4". Accepts # and b accidentals; octave -1 through 9. The names are read as Sigil.Sound.Mini.Notes(System.String) reads them: a name without an octave is in octave 3 and :0.6 sets the velocity ("C4:0.6"). Unlike mini-notation, the notes are a plain list: no rests, groups or repeats.

public static IReadOnlyList<Note> Parse(string text)

Parameters

text string

Returns

IReadOnlyList<Note>

Exceptions

FormatException

A word is not a note name.

ParsePitch(string)

Parses one note name, such as "A4" or "F#3", to a MIDI pitch.

public static int ParsePitch(string name)

Parameters

name string

Returns

int

Transpose(IEnumerable<Note>, int)

Transposes every note in a sequence.

public static IEnumerable<Note> Transpose(this IEnumerable<Note> notes, int semitones)

Parameters

notes IEnumerable<Note>
semitones int

Returns

IEnumerable<Note>