def _create_controls(self):
     super(MPD226, self)._create_controls()
     self._encoders = ButtonMatrixElement(
         rows=[
             [
                 make_encoder(identifier, 0 if index < 4 else 1, "Encoder_%d" % index)
                 for index, identifier in izip(xrange(8), cycle(xrange(22, 26)))
             ]
         ]
     )
     self._sliders = ButtonMatrixElement(
         rows=[
             [
                 make_slider(identifier, 0 if index < 4 else 1, "Slider_%d" % index)
                 for index, identifier in izip(xrange(8), cycle(xrange(12, 16)))
             ]
         ]
     )
     self._control_buttons = ButtonMatrixElement(
         rows=[
             [
                 make_button(identifier, 0 if index < 4 else 1, "Control_Button_%d" % index)
                 for index, identifier in izip(xrange(8), cycle(xrange(32, 36)))
             ]
         ]
     )
     self._play_button = make_button(118, 0, "Play_Button")
     self._stop_button = make_button(117, 0, "Stop_Button")
     self._record_button = make_button(119, 0, "Record_Button")
 def _create_controls(self):
     super(MPD226, self)._create_controls()
     self._encoders = ButtonMatrixElement(rows=[[ make_encoder(identifier, 0 if index < 4 else 1, 'Encoder_%d' % index) for index, identifier in izip(xrange(8), cycle(xrange(22, 26))) ]])
     self._sliders = ButtonMatrixElement(rows=[[ make_slider(identifier, 0 if index < 4 else 1, 'Slider_%d' % index) for index, identifier in izip(xrange(8), cycle(xrange(12, 16))) ]])
     self._control_buttons = ButtonMatrixElement(rows=[[ make_button(identifier, 0 if index < 4 else 1, 'Control_Button_%d' % index) for index, identifier in izip(xrange(8), cycle(xrange(32, 36))) ]])
     self._play_button = make_button(118, 0, 'Play_Button')
     self._stop_button = make_button(117, 0, 'Stop_Button')
     self._record_button = make_button(119, 0, 'Record_Button')
Exemple #3
0
 def _create_controls(self):
     self._create_pads()
     self._encoders = ButtonMatrixElement(rows=[[ make_encoder(identifier, 0, 'Encoder_%d' % index) for index, identifier in enumerate(xrange(22, 30)) ]])
     self._sliders = ButtonMatrixElement(rows=[[ make_slider(identifier, 0, 'Slider_%d' % index) for index, identifier in enumerate(xrange(12, 20)) ]])
     self._control_buttons = ButtonMatrixElement(rows=[[ make_button(identifier, 0, 'Control_Button_%d' % index) for index, identifier in enumerate(xrange(32, 40)) ]])
     self._play_button = make_button(118, 0, 'Play_Button')
     self._stop_button = make_button(117, 0, 'Stop_Button')
     self._record_button = make_button(119, 0, 'Record_Button')