public void NoMininumOfNotes() { var noteList = new List <IMusicalNote>(); noteList.Add(new MusicalNoteMock(NoteValue.G, 3, "G3")); var chord = new GuitarChord(noteList); Assert.AreEqual("G", chord.ToString()); }
public void Trivial_Cb5() { var noteList = new List <IMusicalNote>(); noteList.Add(new MusicalNoteMock(NoteValue.C, 4, "C4")); noteList.Add(new MusicalNoteMock(NoteValue.E, 4, "E4")); noteList.Add(new MusicalNoteMock(NoteValue.Gb, 4, "Gb4")); var chord = new GuitarChord(noteList); Assert.AreEqual(NoteValue.C, chord.TonicNote); Assert.AreEqual(Interval.DiminishedFifth, chord.FifthInterval); Assert.AreEqual(Interval.MajorThird, chord.ThirdInterval); Assert.IsNull(chord.SeventhInterval); Assert.IsNull(chord.FourthInterval); Assert.IsNull(chord.SixthInterval); Assert.IsNull(chord.NinthInterval); Assert.AreEqual("C(b5)", chord.ToString()); }
public void Guitar_B479() { var noteList = new List <IMusicalNote>(); noteList.Add(new MusicalNoteMock(NoteValue.B, 3, "B3")); noteList.Add(new MusicalNoteMock(NoteValue.E, 4, "E4")); noteList.Add(new MusicalNoteMock(NoteValue.A, 4, "A4")); noteList.Add(new MusicalNoteMock(NoteValue.Db, 5, "Db5")); noteList.Add(new MusicalNoteMock(NoteValue.Gb, 5, "Gb5")); var chord = new GuitarChord(noteList); Assert.AreEqual(NoteValue.B, chord.TonicNote); Assert.AreEqual(Interval.PerfectFifth, chord.FifthInterval); Assert.IsNull(chord.ThirdInterval); Assert.AreEqual(Interval.PerfectFourth, chord.FourthInterval); Assert.AreEqual(Interval.MinorSeventh, chord.SeventhInterval); Assert.AreEqual(Interval.MajorSecond, chord.NinthInterval); Assert.AreEqual("B4/7/9", chord.ToString()); }
public void Guitar_Dm7() { var noteList = new List <IMusicalNote>(); noteList.Add(new MusicalNoteMock(NoteValue.D, 4, "D4")); noteList.Add(new MusicalNoteMock(NoteValue.A, 4, "A4")); noteList.Add(new MusicalNoteMock(NoteValue.C, 5, "C5")); noteList.Add(new MusicalNoteMock(NoteValue.F, 5, "F5")); var chord = new GuitarChord(noteList); Assert.AreEqual(NoteValue.D, chord.TonicNote); Assert.AreEqual(Interval.PerfectFifth, chord.FifthInterval); Assert.AreEqual(Interval.MinorThird, chord.ThirdInterval); Assert.AreEqual(Interval.MinorSeventh, chord.SeventhInterval); Assert.IsNull(chord.FourthInterval); Assert.IsNull(chord.SixthInterval); Assert.IsNull(chord.NinthInterval); Assert.AreEqual("Dm7", chord.ToString()); }
public void Guitar_Em7() { var noteList = new List <IMusicalNote>(); noteList.Add(new MusicalNoteMock(NoteValue.E, 3, "E4")); noteList.Add(new MusicalNoteMock(NoteValue.B, 3, "B3")); noteList.Add(new MusicalNoteMock(NoteValue.E, 4, "E4")); noteList.Add(new MusicalNoteMock(NoteValue.G, 4, "G4")); noteList.Add(new MusicalNoteMock(NoteValue.D, 5, "D5")); noteList.Add(new MusicalNoteMock(NoteValue.E, 5, "E5")); var chord = new GuitarChord(noteList); Assert.AreEqual(NoteValue.E, chord.TonicNote); Assert.AreEqual(Interval.PerfectFifth, chord.FifthInterval); Assert.AreEqual(Interval.MinorThird, chord.ThirdInterval); Assert.AreEqual(Interval.MinorSeventh, chord.SeventhInterval); Assert.IsNull(chord.FourthInterval); Assert.IsNull(chord.SixthInterval); Assert.IsNull(chord.NinthInterval); Assert.AreEqual("Em7", chord.ToString()); }