Пример #1
0
 def __init__(self, script, number):
     NotifyingControlElement.__init__(self)
     self._host = script
     self._is_monolink = False
     self._active_host = []
     self._number = number
     self._channel = 0
     self._connected = False
     self._enabled = True
     self.device = None
     self._device_parent = None
     self._swing = 0
     self._mute = 0
     self._autoselect_enabled = 0
     self._offset = [0, 0]
     self._color_maps = []
     self._report_offset = False
     self._local_ring_control = 1
     self._raw = False
     self._controls = [{}, {}]
     self._create_grid()
     self._create_keys()
     self._create_wheels()
     self._absolute_mode = 1
     #self._device_component = MonoDeviceComponent(self, self._host, self._host)
     self._banner_state = 0
Пример #2
0
	def __init__(self, script, number):
		NotifyingControlElement.__init__(self)
		self._host = script
		self._active_host = []
		self._number  = number
		self._channel = 0
		self._connected = False
		self._enabled = True
		self.device = None
		self._device_parent = None
		self._swing = 0
		self._autoselect_enabled = 0
		self._offset = [0, 0]
		self._color_maps = []
		self._report_offset = False
		self._local_ring_control = 1
		self._raw = False
		self._controls = [{},{}]
		self._create_grid()
		self._create_keys()
		self._create_wheels()
		self._mod_dial = None
		self._mod_vol = 127
		self._mod_color = 0
		self._absolute_mode = 1
		self._monomodular = 0
		self._device_component = MonoDeviceComponent(self, script._host, script)
	def disconnect(self):
		#self._host._unregister_timer_callback(self._ping)
		#self._host.log_message('switchboard disconnect')
		for client in self._client:
			client = None
		self._client = []
		#self._send('ping', 'disconnect')
		NotifyingControlElement.disconnect(self)
Пример #4
0
	def __init__(self, host, clients):
		NotifyingControlElement.__init__(self)
		self._host = host
		self._devices = []
		self.client_0 = clients[0]
		self.client_1 = clients[1]
		self.client_2 = clients[2]
		self.client_3 = clients[3]
		self._client = clients
Пример #5
0
 def __init__(self, host, clients):
     NotifyingControlElement.__init__(self)
     self._host = host
     self._devices = []
     self.client_0 = clients[0]
     self.client_1 = clients[1]
     self.client_2 = clients[2]
     self.client_3 = clients[3]
     self._client = clients
	def __init__(self, host, clients):
		#ButtonMatrixElement.__init__(self)
		NotifyingControlElement.__init__(self)
		self._host = host
		self.client_0 = clients[0]
		self.client_1 = clients[1]
		self.client_2 = clients[2]
		self.client_3 = clients[3]
		self._client = clients
		self._last_ping = 0
		self._sandbox = []
		self._edit = False
Пример #7
0
 def __init__(self, host, clients):
     NotifyingControlElement.__init__(self)
     self._host = host
     self._devices = []
     self.client_0 = clients[0]
     self.client_1 = clients[1]
     self.client_2 = clients[2]
     self.client_3 = clients[3]
     self.client_4 = clients[4]
     self.client_5 = clients[5]
     self.client_6 = clients[6]
     self.client_7 = clients[7]
     self.client_8 = clients[8]
     self.client_9 = clients[9]
     self.client_10 = clients[10]
     self.client_11 = clients[11]
     self.client_12 = clients[12]
     self.client_13 = clients[13]
     self.client_14 = clients[14]
     self.client_15 = clients[15]
     self._client = clients
Пример #8
0
 def __init__(self, host, clients):
     NotifyingControlElement.__init__(self)
     self._host = host
     self._devices = []
     self.client_0 = clients[0]
     self.client_1 = clients[1]
     self.client_2 = clients[2]
     self.client_3 = clients[3]
     self.client_4 = clients[4]
     self.client_5 = clients[5]
     self.client_6 = clients[6]
     self.client_7 = clients[7]
     self.client_8 = clients[8]
     self.client_9 = clients[9]
     self.client_10 = clients[10]
     self.client_11 = clients[11]
     self.client_12 = clients[12]
     self.client_13 = clients[13]
     self.client_14 = clients[14]
     self.client_15 = clients[15]
     self._client = clients
Пример #9
0
	def __init__(self, script, number):
		#ButtonMatrixElement.__init__(self)
		NotifyingControlElement.__init__(self)
		self._host = script
		
		#monolink specific 
		self._prefix = '/MonoLink'
		self.basicAPI = False
		self.conf = None
		self._inPrt = int(PRESETS[0][2][0])
		self._outPrt = int(PRESETS[0][2][1])
		self._inst = 0
		
		try:	
			self.conf = Zeroconf(self)
		except:
			self._host.log_message('Could not create Bonjour Registerer...something must be blocking this port or address') 
		
		self._is_monolink = True
		self._format = 0
		self.oscServer = None
		self._setup_oscServer()
		
				
		self._active_host = []
		self._number  = number
		self._channel = 0
		self._connected = False
		self._enabled = True
		self.device = None
		self._device_parent = None
		self._swing = 0
		self._autoselect_enabled = 0
		self._offset = [0, 0]
		self._color_maps = []
		self._report_offset = False
		self._create_grid()
		self._create_keys()
		self._create_wheels()
Пример #10
0
	def __init__(self, script, number):
		#ButtonMatrixElement.__init__(self)
		NotifyingControlElement.__init__(self)
		self._host = script
		self._active_host = []
		self._number  = number
		self._channel = 0
		self._connected = False
		self._enabled = True
		self.device = None
		self._device_parent = None
		self._swing = 0
		self._autoselect_enabled = 0
		self._offset = [0, 0]
		self._color_maps = []
		self._report_offset = False
		self._local_ring_control = 1
		self._create_grid()
		self._create_keys()
		self._create_wheels()
		self._mod_dial = None
		self._mod_vol = 0
		self._mod_color = 0
 def disconnect(self):
     for client in self._client:
         client = None
     self._client = []
     NotifyingControlElement.disconnect(self)
    def __init__(self,
                 parent,
                 num_params=8,
                 direct_bank=False,
                 mono=True,
                 shared=False,
                 path=None,
                 delayed_update=False,
                 new_skin=False,
                 *a,
                 **k):
        self._parent = parent
        self._use_new_skin = new_skin
        self._mapper = None
        Framework_DeviceComponentBase.__init__(self, *a, **k)
        self._is_osc = hasattr(self._parent,
                               '_osc_control') and self._parent._osc_control
        if not self._is_osc:
            g_hud = False
        self.log(
            'DeviceComponent(STANDARD): num: ' + str(num_params) + ', path: ' +
            str(path) + ', HUD: ' + str(g_hud) + ', OSC: ' + str(self._is_osc),
            True)
        if g_mapper:
            PrEditorParameterProvider.__init__(self, parent)
            self.log('****** create mapper(STANDARD): path: ' + str(path),
                     True)
            PrEditorMapper.__init__(self, PrEditorParameterProvider, path,
                                    num_params)
        DeviceComponentBase.__init__(self, parent,
                                     PrEditorMapper if g_mapper else None,
                                     False, num_params, direct_bank, mono,
                                     shared, path, delayed_update, new_skin)
        k.pop('feedback_mode', None)
        k.pop('lock_button', None)

        def make_hud_encoder(index, name):
            control = HUDControlElement(self, self._hud_state_control, i)
            control.name = name + '_' + str(i)
            return control

        def make_osc_encoder(index, name, osc_msg):
            control = OSCControlElement(self, self._parent.oscServer, i,
                                        osc_msg)
            control.name = name + '_' + str(i)
            return control

        if g_hud:
            self.log('Creating HUD notification', True)
            self._hud_state_control = NotifyingControlElement()
            self._hud_state_control.name = 'HUD_State'
            self._hud_controls = ButtonMatrixElement(rows=[[
                make_osc_encoder(i, 'HUD_Control', '/hud') for i in xrange(8)
            ]])
            self._hud_cs_controls = ButtonMatrixElement(rows=[[
                make_osc_encoder(i, 'HUD_CS_Control', '/hudcs')
                for i in xrange(8)
            ]])
        self._mono = mono
        for light in self.encoder_rings:
            light.enabled = True

        for light in self.device_select:
            light.enabled = False
            light.color = 'DefaultButton.Off' if self._mono else 'Device.NoDevice'
            light.disabled_color = 'DefaultButton.Off' if self._mono else 'Device.NoDevice'

        for light in self.device_enable:
            light.enabled = False
            light.color = 'DefaultButton.Off' if self._mono else 'Device.NoDevice'
            light.disabled_color = 'DefaultButton.Off' if self._mono else 'Device.NoDevice'

        for light in self.parameter_lights:
            light.enabled = False
Пример #13
0
	def disconnect(self):
		for client in self._client:
			client = None
		self._client = []
		NotifyingControlElement.disconnect(self)
Пример #14
0
 def disconnect(self):
     NotifyingControlElement.disconnect(self)
     self._dials = None
     self._dial_coordinates = None
Пример #15
0
 def __init__(self, script):
     NotifyingControlElement.__init__(self)
     self._script = script
     self._dials = []
     self._dial_coordinates = {}
     self._max_row_width = 0
	def disconnect(self):
		NotifyingControlElement.disconnect(self)
		self._dials = None
		self._dial_coordinates = None
Пример #17
0
	def __init__(self, script):
		NotifyingControlElement.__init__(self)
		self._script = script
		self._dials = []
		self._dial_coordinates = {}
		self._max_row_width = 0