@@ -329,9 +329,6 @@ def handle_encoder_turn(self, value):
329
329
self .song .view .selected_scene = self .song .scenes [scene_index ]
330
330
331
331
332
-
333
-
334
-
335
332
class BrowserScroller (DynamicEncoder ):
336
333
HORIZONTAL = 0
337
334
VERTICAL = 1
@@ -374,6 +371,17 @@ def handle_encoder_turn(self, value):
374
371
# zoom out yuckily
375
372
os .system ("osascript -e 'tell application \" System Events\" to tell process \" Live\" to key code 27'" )
376
373
374
+ class PositionScroller (DynamicEncoder ):
375
+ def __init__ (self , application , song ):
376
+ super (PositionScroller , self ).__init__ (None , None )
377
+ self ._application = application
378
+ self ._song = song
379
+
380
+ def handle_encoder_turn (self , value ):
381
+ if value < 64 :
382
+ self ._song .view .detail_clip .position = self ._song .view .detail_clip .position + 32
383
+ else :
384
+ self ._song .view .detail_clip .position = self ._song .view .detail_clip .position - 32
377
385
378
386
class GlobalStopButton (ButtonElement ):
379
387
def __init__ (self , button_cc , song ):
@@ -684,7 +692,8 @@ def init_session(self):
684
692
[
685
693
SceneSelector (self .song ()),
686
694
DynamicEncoder (None , self .song ().master_track .mixer_device .volume ),
687
- BrowserScroller (self .browser_repr , BrowserScroller .VERTICAL )
695
+ BrowserScroller (self .browser_repr , BrowserScroller .VERTICAL ),
696
+ PositionScroller (self .application (), self .song ())
688
697
],
689
698
self .shift_button , ENCODER_LR , PUSH_ENCODER_LR )
690
699
0 commit comments