Esempio n. 1
0
 def test_ac02_set_steps_per_beat(self):
     libseq.selectPattern(999)
     libseq.setBeatsInPattern(5)
     self.assertFalse(libseq.setStepsPerBeat(7))  # Not a permitted value
     self.check_pattern(4, 4, 5)
     self.assertTrue(libseq.setStepsPerBeat(8))
     self.check_pattern(4, 8, 5)
Esempio n. 2
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 load_pattern(self, index):
     libseq.clearSequence(self.bank, self.sequence)
     libseq.setChannel(self.bank, self.sequence, 0, self.channel)
     self.pattern = index
     libseq.selectPattern(index)
     libseq.addPattern(self.bank, self.sequence, 0, 0, index)
     if self.selected_cell[0] >= libseq.getSteps():
         self.selected_cell[0] = libseq.getSteps() - 1
     self.keymap_offset = libseq.getRefNote()
     self.load_keymap()
     self.redraw_pending = 2
     self.select_cell(0, int(self.keymap_offset + self.zoom / 2))
     self.play_canvas.coords("playCursor", 1, 0, 1 + self.step_width,
                             PLAYHEAD_HEIGHT)
Esempio n. 4
0
 def test_ac00_select_pattern(self):
     libseq.selectPattern(999)
     self.assertEqual(libseq.getPatternIndex(), 999)
     self.check_pattern(4, 4, 4)
Esempio n. 5
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())
Esempio n. 6
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)
Esempio n. 7
0
 def test_ac06_set_note_duration(self):
     libseq.selectPattern(999)
     libseq.addNote(0, 60, 123, 2)
     self.assertEqual(libseq.getNoteDuration(0, 60), 2)
Esempio n. 8
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)
Esempio n. 9
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)
Esempio n. 10
0
 def test_ac01_set_beats(self):
     libseq.selectPattern(999)
     libseq.setBeatsInPattern(5)
     self.check_pattern(4, 4, 5)