def _on_matrix_value(self, value, x, y, is_momentary): if self.is_enabled(): if self._sequencer_clip == None and value or not is_momentary: clip = create_clip_in_selected_slot(self._clip_creator, self.song(), CLIP_LENGTH_LIST[self._quantization_index]) self.set_detail_clip(clip) if not self._is_triplet_quantization() or x < STEP_SEQ_WIDTH * self._triplet_factor: if value or not is_momentary: self._on_press_step((x, y)) else: self._on_release_step((x, y))
def _on_matrix_value(self, value, x, y, is_momentary): if self.is_enabled(): if self._sequencer_clip == None and value or not is_momentary: clip = create_clip_in_selected_slot(self._clip_creator, self.song()) self.set_detail_clip(clip) if self._note_index != None: width = self._width * self._triplet_factor if self._is_triplet_quantization() else self._width if x < width and y < self._height: if value or not is_momentary: self._on_press_step((x, y)) else: self._on_release_step((x, y)) self._update_editor_matrix()