Skip to content

Commit

Permalink
Added stop button scroll function for Mixer mode (Old Launchpad class)
Browse files Browse the repository at this point in the history
  • Loading branch information
poltow committed Oct 19, 2016
1 parent 94526c5 commit db2b115
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion SpecialSessionComponent.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from _Framework.SessionComponent import SessionComponent
from ClipSlotMK2 import ClipSlotMK2
from _Framework.SceneComponent import SceneComponent

import Live
class SpecialSessionComponent(SessionComponent):

""" Special session subclass that handles ConfigurableButtons """
Expand All @@ -26,6 +26,22 @@ def link_with_track_offset(self, track_offset):
self.set_offsets(track_offset, 0)
self._link()

def _update_stop_clips_led(self, index):
if ((self.is_enabled()) and (self._stop_track_clip_buttons != None) and (index < len(self._stop_track_clip_buttons))):
button = self._stop_track_clip_buttons[index]
tracks_to_use = self.tracks_to_use()
track_index = index + self.track_offset()
if 0 <= track_index < len(tracks_to_use):
track = tracks_to_use[track_index]
if track.fired_slot_index == -2:
button.send_value(self._stop_clip_triggered_value)
elif track.playing_slot_index >= 0:
button.send_value(self._stop_clip_value)
else:
button.turn_off()
else:
button.send_value(4)

def set_osd(self, osd):
self._osd = osd

Expand Down

0 comments on commit db2b115

Please sign in to comment.