Ejemplo n.º 1
0
        private static UNote NoteRead(dynamic data, string which, ref long absoluteTime, out string number)
        {
            // May be #PREV, #0000 .... #NNNN, #NEXT
            if (int.TryParse(which, out int tempInt))
            {
                number = Number2NoteNumber(tempInt);
            }
            else
            {
                number = $"[#{which}]";
            }

            UNote note = new UNote();
            int   i    = 0;

            Console.WriteLine($"Setting values for note {number}");
            foreach (string parameter in data[number].Keys)
            {
                Console.WriteLine($"\tTrying set parameter  {parameter}");
                var value = data[number][parameter];
                note.Set(parameter, value);
                i++;
            }
            note.UNumber      = number;
            note.AbsoluteTime = absoluteTime;
            absoluteTime     += (long)note.Length;

            return(note);
        }
Ejemplo n.º 2
0
 public static void SetDefaultNoteSettings()
 {
     // We will apply this to "r" note which we won't consider Rest
     uDefaultNote.Intensity  = 100;
     uDefaultNote.Modulation = 0;
     uDefaultNote.Set("Envelope", "0,21,35,0,100,100,0,%,0");
     uDefaultNote.PBS = "-40";
     uDefaultNote.PBW = "80";
 }