Ejemplo n.º 1
0
	def _setup_controls(self):
		is_momentary = True
		optimized = False
		resource = PrioritizedResource
		self._livid = DoublePressElement(MonoButtonElement(is_momentary = is_momentary, msg_type = MIDI_NOTE_TYPE, channel = CHANNEL, identifier = LIVID, name = 'Livid_Button', script = self, skin = self._skin, color_map = COLOR_MAP, optimized_send_midi = optimized, resource_type = resource, monobridge = self._monobridge))
		self._dial = [[CodecEncoderElement(msg_type = MIDI_CC_TYPE, channel = CHANNEL, identifier = CODE_DIALS[row][column], name = 'Dial_' + str(column) + '_' +	str(row), num = (column + (row*8)), script = self, optimized_send_midi = optimized, resource_type = resource, monobridge = self._monobridge)	for row in range(4)] for column in range(8)]
		self._button = [[MonoButtonElement(is_momentary = is_momentary, msg_type = MIDI_NOTE_TYPE, channel = CHANNEL, identifier = CODE_BUTTONS[row][column], name = 'Button_' + str(column) + '_' + str(row), script = self, skin = self._skin, color_map = COLOR_MAP, optimized_send_midi = optimized, resource_type = resource, monobridge = self._monobridge) for row in range(4)] for column in range(8)]
		self._column_button = [MonoButtonElement(is_momentary = is_momentary, msg_type = MIDI_NOTE_TYPE, channel = CHANNEL, identifier = CODE_COLUMN_BUTTONS[index], name = 'Column_Button_' + str(index), script = self, skin = self._skin, color_map = COLOR_MAP, optimized_send_midi = optimized, resource_type = resource, monobridge = self._monobridge) for index in range(8)]		
		self._row_button = [MonoButtonElement(is_momentary = is_momentary, msg_type = MIDI_NOTE_TYPE, channel = CHANNEL, identifier = CODE_ROW_BUTTONS[index], name = 'Row_Button_' + str(index), script = self, skin = self._skin, color_map = COLOR_MAP, optimized_send_midi = optimized, resource_type = resource, monobridge = self._monobridge) for index in range(4)]	
		self._code_keys = ButtonMatrixElement(name = 'Code_Keys', rows = [self._column_button])
		self._code_buttons = ButtonMatrixElement(name = 'Code_Buttons', rows = [self._row_button])
		self._encoder_matrix = ButtonMatrixElement(name = 'Encoder_Matrix', rows = [[self._dial[column][row] for column in range(8)] for row in range(4)])
		self._button_matrix = ButtonMatrixElement(name = 'Button_Matrix', rows = [[self._button[column][row] for column in range(8)] for row in range(4)])
Ejemplo n.º 2
0
    def _setup_controls(self):
        is_momentary = True
        optimized = False
        resource = PrioritizedResource
        self._fader = MonoEncoderElement(msg_type=MIDI_CC_TYPE,
                                         channel=CHANNEL,
                                         identifier=MINIM_SLIDER,
                                         name='Fader',
                                         script=self,
                                         mapping_feedback_delay=-1,
                                         optimized_send_midi=optimized,
                                         resource_type=resource)
        self._pad = [[
            MonoButtonElement(is_momentary=is_momentary,
                              msg_type=MIDI_NOTE_TYPE,
                              channel=CHANNEL,
                              identifier=MINIM_PADS[row][column],
                              name='Pad_' + str(column) + '_' + str(row),
                              script=self,
                              skin=self._skin,
                              color_map=COLOR_MAP,
                              optimized_send_midi=optimized,
                              resource_type=resource) for column in range(4)
        ] for row in range(2)]
        self._button = [[
            MonoButtonElement(is_momentary=is_momentary,
                              msg_type=MIDI_NOTE_TYPE,
                              channel=CHANNEL,
                              identifier=MINIM_BUTTONS[row][column],
                              name='Button_' + str(column) + '_' + str(row),
                              script=self,
                              skin=self._skin,
                              color_map=COLOR_MAP,
                              optimized_send_midi=optimized,
                              resource_type=resource) for column in range(4)
        ] for row in range(2)]
        self._side_button = [
            MonoButtonElement(is_momentary=is_momentary,
                              msg_type=MIDI_NOTE_TYPE,
                              channel=CHANNEL,
                              identifier=MINIM_SIDE_BUTTONS[index],
                              name='Side_Button_' + str(index),
                              script=self,
                              skin=self._skin,
                              color_map=COLOR_MAP,
                              optimized_send_midi=optimized,
                              resource_type=resource) for index in range(5)
        ]
        self._top_button = [
            MonoButtonElement(is_momentary=is_momentary,
                              msg_type=MIDI_NOTE_TYPE,
                              channel=CHANNEL,
                              identifier=MINIM_TOP_BUTTONS[index],
                              name='Top_Button_' + str(index),
                              script=self,
                              skin=self._skin,
                              color_map=COLOR_MAP,
                              optimized_send_midi=optimized,
                              resource_type=resource) for index in range(2)
        ]
        self._bottom_button = MonoButtonElement(is_momentary=is_momentary,
                                                msg_type=MIDI_NOTE_TYPE,
                                                channel=CHANNEL,
                                                identifier=MINIM_BOTTOM_BUTTON,
                                                name='Bottom_Button',
                                                script=self,
                                                skin=self._skin,
                                                color_map=COLOR_MAP,
                                                optimized_send_midi=optimized,
                                                resource_type=resource)

        self._matrix = ButtonMatrixElement(name='Pad_Matrix',
                                           rows=[
                                               self._button[:][0],
                                               self._pad[:][0],
                                               self._pad[:][1],
                                               self._button[:][1]
                                           ])
        self._side_button_matrix = ButtonMatrixElement(
            name='Side_Button_Matrix', rows=[self._side_button])
        self._top_button_matrix = ButtonMatrixElement(name='Button_Matrix',
                                                      rows=[self._top_button])