示例#1
0
    def button_cb(self, path, args):
        # Anti-rebond
        diff = time() * 1000 - self.timestamp
        if diff < self.timeout:
            return
        self.timestamp = time() * 1000

        if _engine.current_subscene() == 9 and args[0] < 12:
         _engine.switch_scene(args[0])
         _engine.switch_subscene(1)
         # if args[0] == 1: # Rustine car acte 0 sur screen 14 !!!
         #     _engine.output_event(_event.ProgramEvent('PBseq24', _util.NoDataOffset(1), 127))
         # else:
        #  _engine.output_event(_event.ProgramEvent('PBseq24', _util.NoDataOffset(1), seq24PageMap[args[0]]))
#         _engine.output_event(_event.CtrlEvent('PBTapeutape', _util.NoDataOffset(0), 0, args[0]-1))
	else:
            if args[0] == 12:
             _engine.switch_subscene(9)
   	    if args[0] < 12:
	     _engine.output_event(_event.ProgramEvent('PBCtrlOut', _util.NoDataOffset(1), args[0]))
            if _engine.current_subscene() == 8 and args[0] > 17:
             _engine.switch_subscene(args[0]-17)

	    else:
                if args[0] == 24:
                 _engine.switch_subscene(8)
   	        if args[0] < 24 and args[0] > 12:
                    _engine.output_event(_event.ProgramEvent('PBCtrlOut', _util.NoDataOffset(1), args[0]))
示例#2
0
 def button_cb(self, path, args):
     if args[0] == 12:
         _engine.switch_subscene(2)
     if args[0] == 11:
         _liblo.send(9999, '/video/freeze/toggle')
     if _engine.current_subscene() == 2:
         _engine.switch_scene(args[0])
         _engine.switch_subscene(1)
     if _engine.current_subscene() == 1:
         if args[0] < 8:  # Desactivation des boutons 7, 8, 9, 10
             clip_number = args[0] + (_engine.current_scene() - 1) * 7
             _liblo.send(9999, '/clip/select', clip_number)
             _liblo.send(9999, '/clip/goto', 1)
示例#3
0
    def button_cb(self, path, args):
	if args[0] == 12:
	    _engine.switch_subscene(2)
	if args[0] == 11:
            _liblo.send(9999, '/video/freeze/toggle')
	if _engine.current_subscene() == 2:
	    _engine.switch_scene(args[0])
	    _engine.switch_subscene(1)
	if _engine.current_subscene() == 1:
    	    if args[0] < 8: # Desactivation des boutons 7, 8, 9, 10
	        clip_number = args[0] + (_engine.current_scene()-1)*7
                _liblo.send(9999, '/clip/select', clip_number)
                _liblo.send(9999, '/clip/goto', 1)
示例#4
0
 def prev_scene_cb(self, path, args):
     s = sorted(_engine.scenes().keys())
     n = s.index(_engine.current_scene()) - 1
     if n >= 0:
         _engine.switch_scene(s[n])
示例#5
0
 def switch_scene_cb(self, path, args):
     _engine.switch_scene(*args)
示例#6
0
 def next_scene_cb(self, path, args):
     s = sorted(_engine.scenes().keys())
     n = s.index(_engine.current_scene()) + 1
     if n < len(s):
         _engine.switch_scene(s[n])
示例#7
0
 def prev_scene_cb(self, path, args):
     s = sorted(_engine.scenes().keys())
     n = s.index(_engine.current_scene()) - 1
     if n >= 0:
         _engine.switch_scene(s[n])
示例#8
0
 def switch_scene_cb(self, path, args):
     _engine.switch_scene(*args)
示例#9
0
 def next_scene_cb(self, path, args):
     s = sorted(_engine.scenes().keys())
     n = s.index(_engine.current_scene()) + 1
     if n < len(s):
         _engine.switch_scene(s[n])