Пример #1
0
 public void RandomIntervals()
 {
     Assert.AreEqual("C#", Harmonizer.Transpose("A", 4));
     Assert.AreEqual("B", Harmonizer.Transpose("A", -10));
     Assert.AreEqual("F", Harmonizer.Transpose("A#", 7));
     Assert.AreEqual("A", Harmonizer.Transpose("A#", -1));
     Assert.AreEqual("G#", Harmonizer.Transpose("B", 9));
     Assert.AreEqual("F", Harmonizer.Transpose("B", -6));
     Assert.AreEqual("G#", Harmonizer.Transpose("C", 8));
     Assert.AreEqual("A", Harmonizer.Transpose("C", -3));
     Assert.AreEqual("F#", Harmonizer.Transpose("C#", 5));
     Assert.AreEqual("D", Harmonizer.Transpose("C#", -11));
     Assert.AreEqual("E", Harmonizer.Transpose("D", 2));
     Assert.AreEqual("G", Harmonizer.Transpose("D", -7));
     Assert.AreEqual("D", Harmonizer.Transpose("D#", 11));
     Assert.AreEqual("B", Harmonizer.Transpose("D#", -4));
     Assert.AreEqual("G", Harmonizer.Transpose("E", 3));
     Assert.AreEqual("G", Harmonizer.Transpose("E", -9));
     Assert.AreEqual("D#", Harmonizer.Transpose("F", 10));
     Assert.AreEqual("D#", Harmonizer.Transpose("F", -2));
     Assert.AreEqual("G", Harmonizer.Transpose("F#", 1));
     Assert.AreEqual("C#", Harmonizer.Transpose("F#", -5));
     Assert.AreEqual("C#", Harmonizer.Transpose("G", 6));
     Assert.AreEqual("B", Harmonizer.Transpose("G", -8));
     Assert.AreEqual("D#", Harmonizer.Transpose("G#", 7));
     Assert.AreEqual("E", Harmonizer.Transpose("G#", -4));
 }
Пример #2
0
        static void Main(string[] args)
        {
            string note = Console.ReadLine();

            Console.WriteLine(Harmonizer.Transpose(note, 1));
            Console.ReadLine();
        }
Пример #3
0
 public void PositiveIntervalsOfASharp()
 {
     Assert.AreEqual("B", Harmonizer.Transpose("A#", 1));
     Assert.AreEqual("C", Harmonizer.Transpose("A#", 2));
     Assert.AreEqual("C#", Harmonizer.Transpose("A#", 3));
     Assert.AreEqual("D", Harmonizer.Transpose("A#", 4));
     Assert.AreEqual("D#", Harmonizer.Transpose("A#", 5));
     Assert.AreEqual("E", Harmonizer.Transpose("A#", 6));
     Assert.AreEqual("F", Harmonizer.Transpose("A#", 7));
     Assert.AreEqual("F#", Harmonizer.Transpose("A#", 8));
     Assert.AreEqual("G", Harmonizer.Transpose("A#", 9));
     Assert.AreEqual("G#", Harmonizer.Transpose("A#", 10));
     Assert.AreEqual("A", Harmonizer.Transpose("A#", 11));
 }
Пример #4
0
 public void NegativeIntervalsOfA()
 {
     Assert.AreEqual("G#", Harmonizer.Transpose("A", -1));
     Assert.AreEqual("G", Harmonizer.Transpose("A", -2));
     Assert.AreEqual("F#", Harmonizer.Transpose("A", -3));
     Assert.AreEqual("F", Harmonizer.Transpose("A", -4));
     Assert.AreEqual("E", Harmonizer.Transpose("A", -5));
     Assert.AreEqual("D#", Harmonizer.Transpose("A", -6));
     Assert.AreEqual("D", Harmonizer.Transpose("A", -7));
     Assert.AreEqual("C#", Harmonizer.Transpose("A", -8));
     Assert.AreEqual("C", Harmonizer.Transpose("A", -9));
     Assert.AreEqual("B", Harmonizer.Transpose("A", -10));
     Assert.AreEqual("A#", Harmonizer.Transpose("A", -11));
 }
Пример #5
0
 public void SubOctaveTests()
 {
     Assert.AreEqual("A", Harmonizer.Transpose("A", -12));
     Assert.AreEqual("A#", Harmonizer.Transpose("A#", -12));
     Assert.AreEqual("B", Harmonizer.Transpose("B", -12));
     Assert.AreEqual("C", Harmonizer.Transpose("C", -12));
     Assert.AreEqual("C#", Harmonizer.Transpose("C#", -12));
     Assert.AreEqual("D", Harmonizer.Transpose("D", -12));
     Assert.AreEqual("D#", Harmonizer.Transpose("D#", -12));
     Assert.AreEqual("E", Harmonizer.Transpose("E", -12));
     Assert.AreEqual("F", Harmonizer.Transpose("F", -12));
     Assert.AreEqual("F#", Harmonizer.Transpose("F#", -12));
     Assert.AreEqual("G", Harmonizer.Transpose("G", -12));
     Assert.AreEqual("G#", Harmonizer.Transpose("G#", -12));
 }
Пример #6
0
 public void UnisonTests()
 {
     Assert.AreEqual("A", Harmonizer.Transpose("A", 0));
     Assert.AreEqual("A#", Harmonizer.Transpose("A#", 0));
     Assert.AreEqual("B", Harmonizer.Transpose("B", 0));
     Assert.AreEqual("C", Harmonizer.Transpose("C", 0));
     Assert.AreEqual("C#", Harmonizer.Transpose("C#", 0));
     Assert.AreEqual("D", Harmonizer.Transpose("D", 0));
     Assert.AreEqual("D#", Harmonizer.Transpose("D#", 0));
     Assert.AreEqual("E", Harmonizer.Transpose("E", 0));
     Assert.AreEqual("F", Harmonizer.Transpose("F", 0));
     Assert.AreEqual("F#", Harmonizer.Transpose("F#", 0));
     Assert.AreEqual("G", Harmonizer.Transpose("G", 0));
     Assert.AreEqual("G#", Harmonizer.Transpose("G#", 0));
 }
Пример #7
0
 public void SubOctaveTests()
 {
     Assert.AreEqual("A#", Harmonizer.Transpose("A#", -12));
     Assert.AreEqual("D", Harmonizer.Transpose("D", -12));
     Assert.AreEqual("F", Harmonizer.Transpose("F", -12));
 }
Пример #8
0
 public void OctaveTests()
 {
     Assert.AreEqual("C#", Harmonizer.Transpose("C#", 12));
     Assert.AreEqual("E", Harmonizer.Transpose("E", 12));
     Assert.AreEqual("G#", Harmonizer.Transpose("G#", 12));
 }
Пример #9
0
 public void UnisonTests()
 {
     Assert.AreEqual("A", Harmonizer.Transpose("A", 0));
     Assert.AreEqual("C", Harmonizer.Transpose("C", 0));
     Assert.AreEqual("F#", Harmonizer.Transpose("F#", 0));
 }