예제 #1
0
 def clone_track(self, trk, dest=None):
     if dest == None:
         dest = self
     ntrk = libcvht.sequence_clone_track(dest._seq_handle, trk._trk_handle)
     # libcvht.track_set_playing(ntrk, 0)
     for cb in self.cb_new_track:
         cb(dest.index, libcvht.track_get_index(ntrk))
     return VHTTrack(ntrk)
예제 #2
0
    def add_track(self,
                  port=0,
                  channel=1,
                  length=-1,
                  songlength=-1,
                  ctrlpr=-1):
        if length == -1:
            length = self.length

        trk = libcvht.track_new(port, channel, length, songlength, ctrlpr)
        libcvht.sequence_add_track(self._seq_handle, trk)
        for cb in self.cb_new_track:
            cb(self.index, libcvht.track_get_index(trk))
        return self[self.__len__() - 1]
예제 #3
0
 def index(self):
     return libcvht.track_get_index(self._trk_handle)