Пример #1
0
        public void EMajorChordConsistOfCorrectNotes()
        {
            var eMajorChord = MajorChord.For(Note.E).ToList();

            Assert.Equal(eMajorChord[0], Note.E);
            Assert.Equal(eMajorChord[1], Note.GSharp);
            Assert.Equal(eMajorChord[2], Note.B);
        }
Пример #2
0
        static void Main(string[] args)
        {
            var strNote = String.Empty;

            while (strNote.ToLower() != "exit")
            {
                Console.Write("Enter a note: ");
                strNote = Console.ReadLine();
                var note = Note.For(strNote.ToUpper());
                if (note == Note.Rest)
                {
                    Console.WriteLine("Invalid Note.");
                    continue;
                }

                var intervals = Interval.For(note);
                Console.WriteLine("\n=== INTERVALS ===");
                PrintIntervals(intervals);

                Console.WriteLine("\n=== NOTES IN MAJOR SCALE ===");
                var notesOfMajorScale = MajorScale.For(note);
                Console.WriteLine(String.Join <Note>(" - ", notesOfMajorScale));

                Console.WriteLine("\n=== NOTES IN MAJOR CHORD ===");
                var notesOfMajorChord = MajorChord.For(note);
                Console.WriteLine(String.Join <Note>(" - ", notesOfMajorChord));

                Console.WriteLine("\n=== MAJOR CHORD NOTES ON GUITAR ===");
                PrintChordNotesOnInstrument(StringedInstrument.Guitar, notesOfMajorChord);

                Console.WriteLine("\n=== NOTES IN MINOR SCALE ===");
                var notesOfMinorScale = MinorScale.For(note);
                Console.WriteLine(String.Join <Note>(" - ", notesOfMinorScale));

                Console.WriteLine("\n=== NOTES IN MINOR CHORD ===");
                var notesOfMinorChord = MinorChord.For(note);
                Console.WriteLine(String.Join <Note>(" - ", notesOfMinorChord));

                Console.WriteLine("\n=== MINOR CHORD NOTES ON GUITAR ===");
                PrintChordNotesOnInstrument(StringedInstrument.Guitar, notesOfMinorChord);

                Console.WriteLine("=======================\n");
            }
        }