예제 #1
0
        public void SetScale(ScaleBase scale)
        {
            StringNotes = new List <ScaleNote[]>();

            foreach (var note in StringTuning)
            {
                var notes = new ScaleNote[NumberOfFrets];
                notes[0] = scale.ChromaticNotes.First(x => x.Note.Index == note.Index);

                StringNotes.Add(notes);
            }

            foreach (var s in StringNotes)
            {
                var scaleNote     = s[0];
                var openNoteIndex = scaleNote.Note.Index;

                for (int i = 1; i < NumberOfFrets; i++)
                {
                    var noteIndex = (openNoteIndex + i) % 12;
                    scaleNote = scale.ChromaticNotes.First(x => x.Note.Index == noteIndex);

                    s[i] = scaleNote;
                }
            }
        }
예제 #2
0
 internal ScaleNote(ScaleBase scale, Note note, int degree, bool isPresent, IntervalTableItem intervalTable)
 {
     Scale       = scale;
     Note        = note;
     ScaleDegree = degree;
     IsPresent   = isPresent;
     Interval    = intervalTable;
     Description = $"{Note} / {Interval}";
 }