Пример #1
0
 def on_exit(self):
     try:
         f = open(self.memo_file, 'w')
         f.write("%d %d\n" % (_engine.current_scene(),
                              _engine.current_subscene()))
     except IOError as ex:
         print("couldn't store current scene:\n%s" % str(ex))
Пример #2
0
 def next_subscene_cb(self, path, args):
     s = _engine.scenes()[_engine.current_scene()]
     n = _util.actual(_engine.current_subscene()) + 1
     if len(s[1]) and len(args) and args[0]:
         n %= len(s[1])
     if n < len(s[1]):
         _engine.switch_subscene(_util.offset(n))
Пример #3
0
 def next_subscene_cb(self, path, args):
     s = _engine.scenes()[_engine.current_scene()]
     n = _util.actual(_engine.current_subscene()) + 1
     if len(s[1]) and len(args) and args[0]:
         n %= len(s[1])
     if n < len(s[1]):
         _engine.switch_subscene(_util.offset(n))
Пример #4
0
 def on_exit(self):
     try:
         f = open(self.memo_file, 'w')
         f.write("%d %d\n" %
                 (_engine.current_scene(), _engine.current_subscene()))
     except IOError as ex:
         print("couldn't store current scene:\n%s" % str(ex))
Пример #5
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)
Пример #6
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)
Пример #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 query_cb(self, path, args):
     self.send_config()
     for p in self.notify_ports:
         _liblo.send(p, '/mididings/current_scene', _engine.current_scene(),
                     _engine.current_subscene())
Пример #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])
Пример #10
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])
Пример #11
0
 def query_cb(self, path, args):
     self.send_config()
     for p in self.notify_ports:
         _liblo.send(p, '/mididings/current_scene',
                     _engine.current_scene(), _engine.current_subscene())
Пример #12
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])