Class NoteEventUtilities
Inheritance
NoteEventUtilities
Assembly: Melanchall.DryWetMidi.dll
Syntax
public static class NoteEventUtilities
Methods
GetNoteName(NoteEvent)
Gets name of the note presented by the specified
NoteEvent.
Declaration
public static NoteName GetNoteName(this NoteEvent noteEvent)
Parameters
Type |
Name |
Description |
NoteEvent |
noteEvent |
Note event to get note name of. |
Returns
Type |
Description |
NoteName |
Note name of the noteEvent . |
Exceptions
GetNoteOctave(NoteEvent)
Gets octave of the note presented by the specified
NoteOnEvent.
Declaration
public static int GetNoteOctave(this NoteEvent noteEvent)
Parameters
Type |
Name |
Description |
NoteEvent |
noteEvent |
Note event to get note octave of. |
Returns
Type |
Description |
int |
Note octave of the noteEvent . |
Exceptions
IsNoteOnCorrespondToNoteOff(NoteOnEvent, NoteOffEvent)
Declaration
public static bool IsNoteOnCorrespondToNoteOff(NoteOnEvent noteOnEvent, NoteOffEvent noteOffEvent)
Parameters
Returns
Type |
Description |
bool |
true if noteOnEvent corresponds to noteOffEvent . |
Exceptions
Type |
Condition |
ArgumentNullException |
One of the following errors occurred:
-
noteOnEvent is null . -
noteOffEvent is null .
|
SetNoteNumber(NoteEvent, NoteName, int)
Sets the note number of the
NoteEvent with the specified note name and octave.
Declaration
public static void SetNoteNumber(this NoteEvent noteEvent, NoteName noteName, int octave)
Parameters
Type |
Name |
Description |
NoteEvent |
noteEvent |
Note event to set the note number of. |
NoteName |
noteName |
Name of the note. |
int |
octave |
Number of the octave. |
Exceptions