Ejemplo n.º 1
0
    def set_led(self, internal_id, led_status):
        if not self._is_connected:
            return

        controller_type = internal_id[:2]
        controller_id = int(internal_id[2:])

        if controller_type == 'cc':
            MidiControllerTemplate.send_midi_control_change( \
                self, self._MIDI_DEVICE_CHANNEL, controller_id, led_status)
        else:
            self._log('controller type "%s" unknown.' % controller_type)
Ejemplo n.º 2
0
    def disconnect(self):
        self._log('Disconnecting...', True)

        self.withdraw_all_controls()

        self.set_lcd_directly(0, 'Novation ZeRO SL MkII:  disconnecting...')
        self.set_lcd_directly(1, '')

        self._leave_ableton_mode()

        self._is_connected = False
        MidiControllerTemplate.disconnect(self)
Ejemplo n.º 3
0
    def connect(self):
        MidiControllerTemplate.connect(self)
        self._is_connected = True

        self.set_lcd_directly(0, 'Novation ZeRO SL MkII:  initialising...')
        self.set_lcd_directly(1, 'Mackie Host Control:    connecting...')

        self._enter_ableton_mode()

        # select "track" mode ("Mute" + "Solo")
        self._mode_track = self._MODE_TRACK_MUTE_SOLO
        self._restore_previous_mode()

        self.set_lcd_directly(0, 'Novation ZeRO SL MkII:  initialised.')

        self._log('Connected.', True)
Ejemplo n.º 4
0
    def __init__(self, midi_input, midi_output, callback_log):
        MidiControllerTemplate.__init__( \
            self, midi_input, midi_output, callback_log)

        self.display_lcd_available = True
        self.automated_faders_available = False
        self.display_7seg_available = False
        self.display_timecode_available = False
        self.meter_bridge_available = False

        self._lcd_strings = ['', '']

        self._vpot_modes = \
            [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
        self._vpot_positions = \
            [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]

        self._mode_track = self._MODE_TRACK_MUTE_SOLO
        self._mode_edit = self._MODE_EDIT_OFF
        self._mode_other = self._MODE_OTHER_OFF
        self._mode_automap = False
Ejemplo n.º 5
0
    def _set_led(self, led_id, led_status):
        if not self._is_connected:
            return

        MidiControllerTemplate.send_midi_control_change( \
            self, self._MIDI_DEVICE_CHANNEL, led_id, led_status)
Ejemplo n.º 6
0
 def set_display_7seg(self, position, character_code):
     MidiControllerTemplate.set_display_7seg(self, position, character_code)
Ejemplo n.º 7
0
    def send_midi_control_change(self, cc_number, cc_value):
        if not self._is_connected:
            return

        MidiControllerTemplate.send_midi_control_change( \
            self, self._MIDI_DEVICE_CHANNEL, cc_number, cc_value)
Ejemplo n.º 8
0
    def go_offline(self):
        MidiControllerTemplate.go_offline(self)

        self.set_lcd_directly(0, 'Novation ZeRO SL MkII:  initialised.')
        self.set_lcd_directly(1, 'Mackie Host Control:    offline.')