Exemplo n.º 1
0
        public void BuildMinorScaleTest()
        {
            var scale = new MinorScale(Step.A, false);
            var steps = scale.BuildScale(1, 8);

            MusicalAssertions.StepsMatch(steps, Step.A, Step.B, Step.C, Step.D, Step.E, Step.F, Step.G, Step.A).Assert();

            scale = new MinorScale(Step.E, false);
            steps = scale.BuildScale(1, 8);
            MusicalAssertions.StepsMatch(steps, Step.E, Step.FSharp, Step.G, Step.A, Step.B, Step.C, Step.D, Step.E).Assert();
        }
Exemplo n.º 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");
            }
        }