A MIDI Library for .NET

Note.ParseNote Method

Parses a Note from s, starting at position pos.

public static Note ParseNote(
   string s,
   ref int pos
);

Parameters

s
The string to parse from.
pos
The position to start at. On success, advances pos to after the end of the note.

Return Value

The note.

Remarks

This function must find a valid letter at s[pos], and then optionally a sequence of '#' (sharps) or 'b' (flats). It finds as many of the accidental as it can and then stops at the first character that can't be part of the accidental.

Exceptions

Exception Type Condition
ArgumentException A note cannot be parsed.

See Also

Note Class | Midi Namespace