def _select_playlist_track_named(name): base = name.split(' [')[0] for i in range(1, playlist.trackCount()): track_name = get_playlist_track_name(i) if track_name == base: set_playlist_track(i) return
def _change_playlist_track(self, delta): # Adjust track number. next = arturia_playlist.current_playlist_track() + delta if 0 < next <= playlist.trackCount(): arturia_playlist.set_playlist_track(next) self._display_playlist_track_hint() self._button_hold_action_committed = True
def _deselect_all_playlist_track(): for i in range(1, playlist.trackCount()): track_name = playlist.getTrackName(i) if track_name.startswith('* '): playlist.setTrackName(i, track_name[2:])
def OnUpdatePlaylistTrack(self, delta): track = max( 1, min(playlist.trackCount(), arturia_playlist.current_playlist_track() + delta)) arturia_playlist.set_playlist_track(track)
def playlist_track_next(unused_param_value): """Next playlist track""" next_track = min(playlist.trackCount(), arturia_playlist.current_playlist_track() + 1) arturia_playlist.set_playlist_track(next_track)