using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace RushMidiLibrary { public class MidiNote { private static string[] _noteNames = new string[] { "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" }; private static string[] _octaveNames = new string[] { "Sub Contra", "Contra", "Great", "Small", "1 Line", "2 Line", "3 Line", "4 Line", "5 Line", "6 Line" }; public int NoteId { get; init; } public MidiNote(int noteId) { NoteId = noteId; } public string Name { get { return _noteNames[NoteId % 12]; } } public int OctaveIndex { get { return NoteId / 12 - 1; } } public string OctaveName { get { return _octaveNames[OctaveIndex]; } } } }