Example #1
0
def crab_canon():
    theme2 = NoteSeq("file://canon-crab")
    rev_theme = theme2.transposition(-12).retrograde()

    midi = Midi(2, tempo=120)
    midi.seq_notes(theme2)
    midi.seq_notes(rev_theme, track=1)
    midi.write("midi/canon-crab.mid")
def crab_canon(filename):
    theme = NoteSeq("file://%s.notes" % filename)
    rev_theme = theme.transposition(-12).retrograde()

    midi = Midi(2, tempo=120)
    midi.seq_notes(theme)
    midi.seq_notes(rev_theme, track=1)
    midi.write("%s.mid" % filename)
Example #3
0
 def test_transposition_with_rest(self):
     seq1 = NoteSeq("C8 D R E")
     self.assertEqual(seq1.transposition(3), NoteSeq("Eb8 F R G"))
Example #4
0
 def test_transposition(self):
     seq = NoteSeq("C E G")
     self.assertEqual(seq.transposition(3), NoteSeq("Eb G Bb"))
     self.assertEqual(seq.transposition(5), NoteSeq("F A C''"))
Example #5
0
 def test_transposition_with_rest(self):
     seq1 = NoteSeq("C8 D R E")
     self.assertEqual(seq1.transposition(3), NoteSeq("Eb8 F R G"))
Example #6
0
 def test_transposition(self):
     seq = NoteSeq("C E G")
     self.assertEqual(seq.transposition(3), NoteSeq("Eb G Bb"))
     self.assertEqual(seq.transposition(5), NoteSeq("F A C''"))