Beispiel #1
0
 def clear(self):
     self._type = 0
     self._note = 0
     self._velocity = 0
     self._delay = 0
     libcvht.row_set(self._rowptr, 0, 0, 0, 0)
     libcvht.track_set_dirty(self._trkptr, 1)
     self.update_strrep()
Beispiel #2
0
 def copy(self, row):
     self._type = row._type
     self._note = row._note
     self._velocity = row._velocity
     self._delay = row._delay
     libcvht.row_set(
         self._rowptr, self._type, self._note, self._velocity, self._delay
     )
     libcvht.track_set_dirty(self._trkptr, 1)
     self.update_strrep()
Beispiel #3
0
    def note(self, value):
        if isinstance(value, int):
            self._note = value
            libcvht.row_set_note(self._rowptr, self._note)
            libcvht.track_set_dirty(self._trkptr, 1)
            self.update_strrep()
            return

        if isinstance(value, str):
            self._note = libcvht.parse_note(value)
            libcvht.row_set_note(self._rowptr, self._note)
            libcvht.track_set_dirty(self._trkptr, 1)
            self.type = 1
            if self.velocity == 0:
                self.velocity = 100

        self.update_strrep()
Beispiel #4
0
 def dirty(self, value):
     libcvht.track_set_dirty(self._trk_handle, value)
Beispiel #5
0
 def type(self, value):
     self._type = value
     libcvht.row_set_type(self._rowptr, self._type)
     libcvht.track_set_dirty(self._trkptr, 1)
Beispiel #6
0
 def delay(self, value):
     self._delay = int(value)
     libcvht.row_set_delay(self._rowptr, self._delay)
     libcvht.track_set_dirty(self._trkptr, 1)
Beispiel #7
0
 def velocity(self, value):
     self._velocity = int(value)
     libcvht.row_set_velocity(self._rowptr, self._velocity)
     libcvht.track_set_dirty(self._trkptr, 1)