Exemple #1
0
 def test_ac08_copy_pattern(self):
     libseq.selectPattern(999)
     libseq.addNote(0, 60, 123, 2)
     libseq.copyPattern(999, 998)
     libseq.selectPattern(998)
     self.assertEqual(libseq.getNoteDuration(0, 60), 2)
     self.assertEqual(libseq.getNoteVelocity(0, 60), 123)
 def add_event(self, step, index):
     note = self.keymap[index]["note"]
     libseq.addNote(step, note, self.velocity, self.duration)
     self.draw_row(index)
     self.select_cell(step, index)
Exemple #3
0
 def test_ac10_is_pattern_modified(self):
     libseq.selectPattern(999)
     libseq.addNote(0, 60, 100, 4)
     self.assertTrue(libseq.isPatternModified())
     self.assertFalse(libseq.isPatternModified())
Exemple #4
0
 def test_ac07_transpose(self):
     libseq.selectPattern(999)
     libseq.addNote(0, 60, 123, 2)
     libseq.transpose(5)
     self.assertEqual(libseq.getNoteDuration(0, 65), 2)
     self.assertEqual(libseq.getNoteVelocity(0, 65), 123)
Exemple #5
0
 def test_ac06_set_note_duration(self):
     libseq.selectPattern(999)
     libseq.addNote(0, 60, 123, 2)
     self.assertEqual(libseq.getNoteDuration(0, 60), 2)
Exemple #6
0
 def test_ac05_set_note_velocity(self):
     libseq.selectPattern(999)
     self.assertTrue(libseq.addNote(0, 60, 100, 4))
     libseq.setNoteVelocity(0, 60, 123)
     self.assertEqual(libseq.getNoteVelocity(0, 60), 123)
Exemple #7
0
 def test_ac04_add_note_too_long(self):
     libseq.selectPattern(999)
     self.assertTrue(libseq.addNote(0, 60, 100, 4))
     self.assertFalse(libseq.addNote(0, 60, 100, 200))
     self.assertEqual(libseq.getNoteVelocity(0, 60), 100)
     self.assertEqual(libseq.getNoteDuration(0, 60), 4)