get_note_from_midi_code


Description:

public static string get_note_from_midi_code (ushort midi) throws MusicalNoteError

Get the note's string from its MIDI code

This functions performs the inverse procedure of getting a MIDI code from a scientific notation note string:

  1. Subtract 18 from the MIDI code

    2. Get the integer part of the division by 12 as the octave

    3. Get the modulus division as the note index

    4. Construct note indexing the NOTE_NAMES list and adding the octave

Parameters:

midi

The note valid MIDI code

Returns:

The note as a string or ""