def test_transposition_startswith_rest(self): seq1 = NoteSeq("E G R C#") seq2 = NoteSeq([Note(2, 5), Note(5, 5), Rest(), Note(11, 4)]) self.assertEqual(seq1.transposition_startswith(Note(2, 5)), seq2)
def test_transposition_startswith_integer(self): seq1 = NoteSeq("C D E") seq2 = NoteSeq("D E F#") self.assertEqual(seq1.transposition_startswith(2), seq2)
def test_transposition_startswith_string(self): seq1 = NoteSeq("C D E") seq2 = NoteSeq("D E F#") self.assertEqual(seq1.transposition_startswith("D"), seq2)
def test_transposition_startswith(self): seq1 = NoteSeq("E G C#") seq2 = NoteSeq([Note(2, 5), Note(5, 5), Note(11, 4)]) seq3 = NoteSeq([Note(2, 4), Note(5, 4), Note(11, 3)]) self.assertEqual(seq1.transposition_startswith(Note(2, 5)), seq2) self.assertEqual(seq1.transposition_startswith(Note(2, 4)), seq3)