Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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())
Exemplo n.º 4
0
 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))
Exemplo n.º 5
0
 def OnUpdatePlaylistTrack(self, delta):
     track = max(
         1,
         min(playlist.trackCount(),
             arturia_playlist.current_playlist_track() + delta))
     arturia_playlist.set_playlist_track(track)
Exemplo n.º 6
0
 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)
Exemplo n.º 7
0
 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)
Exemplo n.º 8
0
 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)
Exemplo n.º 9
0
 def mute_current_playlist_track(unused_param_value):
     """Mute playlist track"""
     playlist.muteTrack(arturia_playlist.current_playlist_track())