Beispiel #1
0
        public void CMajorScaleConsistsOfCorrectNotes()
        {
            var cMajorScale = MajorScale.For(Note.C).ToList();

            Assert.Equal(cMajorScale[0], Note.C);
            Assert.Equal(cMajorScale[1], Note.D);
            Assert.Equal(cMajorScale[2], Note.E);
            Assert.Equal(cMajorScale[3], Note.F);
            Assert.Equal(cMajorScale[4], Note.G);
            Assert.Equal(cMajorScale[5], Note.A);
            Assert.Equal(cMajorScale[6], Note.B);
        }
Beispiel #2
0
        public void EMajorScaleConsistsOfCorrectNotes()
        {
            var eMajorScale = MajorScale.For(Note.E).ToList();

            Assert.Equal(eMajorScale[0], Note.E);
            Assert.Equal(eMajorScale[1], Note.FSharp);
            Assert.Equal(eMajorScale[2], Note.GSharp);
            Assert.Equal(eMajorScale[3], Note.A);
            Assert.Equal(eMajorScale[4], Note.B);
            Assert.Equal(eMajorScale[5], Note.CSharp);
            Assert.Equal(eMajorScale[6], Note.DSharp);
        }
Beispiel #3
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");
            }
        }
Beispiel #4
0
        public void MajorScaleConsistsOf7Notes()
        {
            var aMajorScale = MajorScale.For(Note.A);

            Assert.Equal(7, aMajorScale.Count());
        }