Ejemplo n.º 1
0
        public static string GetTextForTuning(int tuning, bool includeOctave)
        {
            var octave = tuning / 12;
            var note = tuning % 12;
            var notes = new[] { "C", "Db", "D", "Eb", "E", "F", "Gb", "G", "Ab", "A", "Bb", "B" };
            var result = notes[note];
            if (includeOctave)
            {
                result += octave;
            }

            return result;
        }
Ejemplo n.º 2
0
 static ScoreBeatGlyph()
 {
     // ReSharper disable ForCanBeConvertedToForeach
     NormalKeys = new FastDictionary<int, bool>();
     var normalKeyNotes = new[] { 32, 34, 35, 36, 38, 39, 40, 41, 43, 45, 47, 48, 50, 55, 56, 58, 60, 61 };
     for (int i = 0; i < normalKeyNotes.Length; i++)
     {
         NormalKeys[normalKeyNotes[i]] = true;
     }
     XKeys = new FastDictionary<int, bool>();
     var xKeyNotes = new[] { 31, 33, 37, 42, 44, 54, 62, 63, 64, 65, 66 };
     for (int i = 0; i < xKeyNotes.Length; i++)
     {
         XKeys[xKeyNotes[i]] = true;
     }
     // ReSharper restore ForCanBeConvertedToForeach
 }