public void ChordFactoryTest_getChordRecomendationsByDegree() { Note key = NoteFactory.getNoteByName("C"); Note degree = NoteFactory.getNoteByName("G"); Mode mode = ModeFactory.getModeByName("Ionian"); List <Chord> recomendations = ChordFactory.getChordRecomendationsByTonic(key, degree, mode); Assert.IsTrue(recomendations.Count() > 1); }
public void ChordFactoryTest_getChordRecomendationsByLast() { Note key = NoteFactory.getNoteByName("C"); Mode mode = ModeFactory.getModeByName("Ionian"); Chord chord = ChordFactory.getChordByName("C"); List <Chord> recomendations = ChordFactory.getChordRecomendationsByLast(key, chord, mode); Assert.AreEqual("G", recomendations.ElementAt(0).getName()); }
public void Mode_containsIntervalTest() { Mode mode = ModeFactory.getModeByName("Ionian"); Assert.IsTrue(mode.containsInterval("R")); Assert.IsTrue(mode.containsInterval("M2")); Assert.IsTrue(mode.containsInterval("M3")); Assert.IsTrue(mode.containsInterval("P4")); Assert.IsTrue(mode.containsInterval("P5")); Assert.IsTrue(mode.containsInterval("M6")); Assert.IsTrue(mode.containsInterval("M7")); Assert.IsFalse(mode.containsInterval("m7")); }
public void Mode_containsNoteTest() { Mode mode = ModeFactory.getModeByName("Ionian"); Note key = NoteFactory.getNoteByName("C"); Assert.IsTrue(mode.containsNote(NoteFactory.getNoteByName("C"), key)); Assert.IsTrue(mode.containsNote(NoteFactory.getNoteByName("D"), key)); Assert.IsTrue(mode.containsNote(NoteFactory.getNoteByName("E"), key)); Assert.IsTrue(mode.containsNote(NoteFactory.getNoteByName("F"), key)); Assert.IsTrue(mode.containsNote(NoteFactory.getNoteByName("G"), key)); Assert.IsTrue(mode.containsNote(NoteFactory.getNoteByName("A"), key)); Assert.IsTrue(mode.containsNote(NoteFactory.getNoteByName("B"), key)); Assert.IsFalse(mode.containsNote(NoteFactory.getNoteByName("F#"), key)); }
public void ChordFactoryTest_getChordRecomendationsTriads() { Note key = NoteFactory.getNoteByName("C"); Mode mode = ModeFactory.getModeByName("Ionian"); List <Chord> recomendations = ChordFactory.getChordRecomendationsTriads(key, mode); Assert.AreEqual("C", recomendations.ElementAt(0).getName()); Assert.AreEqual("Dm", recomendations.ElementAt(1).getName()); Assert.AreEqual("Em", recomendations.ElementAt(2).getName()); Assert.AreEqual("F", recomendations.ElementAt(3).getName()); Assert.AreEqual("G", recomendations.ElementAt(4).getName()); Assert.AreEqual("Am", recomendations.ElementAt(5).getName()); Assert.AreEqual("Bdim", recomendations.ElementAt(6).getName()); key = NoteFactory.getNoteByName("F"); mode = ModeFactory.getModeByName("Lydian"); recomendations = ChordFactory.getChordRecomendationsTriads(key, mode); Assert.AreEqual("F", recomendations.ElementAt(0).getName()); Assert.AreEqual("G", recomendations.ElementAt(1).getName()); Assert.AreEqual("Am", recomendations.ElementAt(2).getName()); Assert.AreEqual("Bdim", recomendations.ElementAt(3).getName()); Assert.AreEqual("C", recomendations.ElementAt(4).getName()); Assert.AreEqual("Dm", recomendations.ElementAt(5).getName()); Assert.AreEqual("Em", recomendations.ElementAt(6).getName()); key = NoteFactory.getNoteByName("G"); mode = ModeFactory.getModeByName("Mixolydian"); recomendations = ChordFactory.getChordRecomendationsTriads(key, mode); Assert.AreEqual("G", recomendations.ElementAt(0).getName()); Assert.AreEqual("Am", recomendations.ElementAt(1).getName()); Assert.AreEqual("Bdim", recomendations.ElementAt(2).getName()); Assert.AreEqual("C", recomendations.ElementAt(3).getName()); Assert.AreEqual("Dm", recomendations.ElementAt(4).getName()); Assert.AreEqual("Em", recomendations.ElementAt(5).getName()); Assert.AreEqual("F", recomendations.ElementAt(6).getName()); key = NoteFactory.getNoteByName("D"); mode = ModeFactory.getModeByName("Dorian"); recomendations = ChordFactory.getChordRecomendationsTriads(key, mode); Assert.AreEqual("Dm", recomendations.ElementAt(0).getName()); Assert.AreEqual("Em", recomendations.ElementAt(1).getName()); Assert.AreEqual("F", recomendations.ElementAt(2).getName()); Assert.AreEqual("G", recomendations.ElementAt(3).getName()); Assert.AreEqual("Am", recomendations.ElementAt(4).getName()); Assert.AreEqual("Bdim", recomendations.ElementAt(5).getName()); Assert.AreEqual("C", recomendations.ElementAt(6).getName()); key = NoteFactory.getNoteByName("A"); mode = ModeFactory.getModeByName("Aeolian"); recomendations = ChordFactory.getChordRecomendationsTriads(key, mode); Assert.AreEqual("Am", recomendations.ElementAt(0).getName()); Assert.AreEqual("Bdim", recomendations.ElementAt(1).getName()); Assert.AreEqual("C", recomendations.ElementAt(2).getName()); Assert.AreEqual("Dm", recomendations.ElementAt(3).getName()); Assert.AreEqual("Em", recomendations.ElementAt(4).getName()); Assert.AreEqual("F", recomendations.ElementAt(5).getName()); Assert.AreEqual("G", recomendations.ElementAt(6).getName()); key = NoteFactory.getNoteByName("E"); mode = ModeFactory.getModeByName("Phrygian"); recomendations = ChordFactory.getChordRecomendationsTriads(key, mode); Assert.AreEqual("Em", recomendations.ElementAt(0).getName()); Assert.AreEqual("F", recomendations.ElementAt(1).getName()); Assert.AreEqual("G", recomendations.ElementAt(2).getName()); Assert.AreEqual("Am", recomendations.ElementAt(3).getName()); Assert.AreEqual("Bdim", recomendations.ElementAt(4).getName()); Assert.AreEqual("C", recomendations.ElementAt(5).getName()); Assert.AreEqual("Dm", recomendations.ElementAt(6).getName()); key = NoteFactory.getNoteByName("B"); mode = ModeFactory.getModeByName("Locrian"); recomendations = ChordFactory.getChordRecomendationsTriads(key, mode); Assert.AreEqual("Bdim", recomendations.ElementAt(0).getName()); Assert.AreEqual("C", recomendations.ElementAt(1).getName()); Assert.AreEqual("Dm", recomendations.ElementAt(2).getName()); Assert.AreEqual("Em", recomendations.ElementAt(3).getName()); Assert.AreEqual("F", recomendations.ElementAt(4).getName()); Assert.AreEqual("G", recomendations.ElementAt(5).getName()); Assert.AreEqual("Am", recomendations.ElementAt(6).getName()); }
public void changeMode(string mode) { _mode = ModeFactory.getModeByName(mode); }
public Progression(string key, string mode) { _key = NoteFactory.getNoteByName(key); _mode = new Mode(); _mode = ModeFactory.getModeByName(mode); }
public Progression() { _key = new Note(4, "C"); _mode = new Mode(); _mode = ModeFactory.getModeByName("Ionian"); }