예제 #1
0
        public static IEnumerable <string> GetNotes(IChordData chordData, string root, NoteSequence results)
        {
            var rootNote = chordData.NoteNames.First(name => name.FindRoot(root.CorrectCase()));

            var rootNoteIndex = chordData.NoteNames.IndexOf(rootNote);
            var notes         = new List <string>();

            foreach (var noteNumber in results.Notes)
            {
                notes.Add(chordData.NoteNames[(rootNoteIndex + noteNumber) % chordData.NoteNames.Count]);
            }

            // notes[0] = root.CorrectCase();
            return(notes);
        }
예제 #2
0
 public ChordDataController(IChordData chordData, ILogger <ChordDataController> logger)
 {
     this.chordData = chordData;
     this.logger    = logger;
     logger.LogInformation("ChordData constructor");
 }