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 OnTrackPlaylistKnobPress(self): track_name = playlist.getTrackName( arturia_playlist.current_playlist_track()) channel_name = channels.getChannelName(channels.selectedChannel()) track_mode = track_name == channel_name and track_name.startswith('* ') if track_mode: self.OnChannelKnobPress() else: self._toggle_window_visibility(midi.widPlaylist)
def OnTrackMute(self, event): debug.log('OnTrackMute', 'Dispatched', event=event) playlist_mode = self._navigation.GetMode() == 'Playlist Track' if self._button_mode == arturia_macros.SAVE_BUTTON or playlist_mode: current_track = arturia_playlist.current_playlist_track() playlist.muteTrack(current_track) status = playlist.isTrackMuted(current_track) self._display_playlist_track_op_hint("Mute Playlist: %d" % status) self._button_hold_action_committed = True else: channels.muteChannel(channels.selectedChannel())
def _display_playlist_track_op_hint(self, title): track = arturia_playlist.current_playlist_track() name = arturia_playlist.get_playlist_track_name(track) self._display_hint(title, '%d: %s' % (track, name))
def OnUpdatePlaylistTrack(self, delta): track = max( 1, min(playlist.trackCount(), arturia_playlist.current_playlist_track() + delta)) arturia_playlist.set_playlist_track(track)
def get_playlist_track(): current_track = arturia_playlist.current_playlist_track() name = arturia_playlist.get_playlist_track_name(current_track) return '%d: [%s]' % (current_track, name)
def playlist_track_prev(unused_param_value): """Prev playlist track""" prev_track = max(1, arturia_playlist.current_playlist_track() - 1) arturia_playlist.set_playlist_track(prev_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)
def mute_current_playlist_track(unused_param_value): """Mute playlist track""" playlist.muteTrack(arturia_playlist.current_playlist_track())