Ejemplo n.º 1
0
def channelToggleMute(selectedChannelNum):
    channels.muteChannel(selectedChannelNum)
    if channels.isChannelMuted(selectedChannelNum) is 1:
        return "Channel rack: Mute track: " + getChannelName(
            selectedChannelNum)
    else:
        return "Channel rack: Unmute track: " + getChannelName(
            selectedChannelNum)
Ejemplo n.º 2
0
    def Sync(self, flags):
        """ Syncs up all visual indicators on keyboard with changes from FL Studio. """
        # Update buttons
        if flags & midi.HW_Dirty_LEDs:
            led_map = {
                ArturiaLights.ID_TRANSPORTS_RECORD:
                ArturiaLights.AsOnOffByte(transport.isRecording()),
                ArturiaLights.ID_TRANSPORTS_LOOP:
                ArturiaLights.AsOnOffByte(ui.isLoopRecEnabled()),
                ArturiaLights.ID_GLOBAL_METRO:
                ArturiaLights.AsOnOffByte(ui.isMetronomeEnabled()),
                ArturiaLights.ID_GLOBAL_SAVE:
                ArturiaLights.AsOnOffByte(transport.getLoopMode() == 1),
                ArturiaLights.ID_GLOBAL_UNDO:
                ArturiaLights.AsOnOffByte(general.getUndoHistoryLast() == 0),
                ArturiaLights.ID_TRACK_SOLO:
                ArturiaLights.AsOnOffByte(
                    channels.isChannelSolo(channels.selectedChannel())),
                ArturiaLights.ID_TRACK_MUTE:
                ArturiaLights.AsOnOffByte(
                    channels.isChannelMuted(channels.selectedChannel())),
                ArturiaLights.ID_TRANSPORTS_STOP:
                ArturiaLights.AsOnOffByte(not transport.isPlaying()),
                ArturiaLights.ID_TRANSPORTS_PLAY:
                ArturiaLights.AsOnOffByte(transport.getSongPos() > 0),
                ArturiaLights.ID_GLOBAL_OUT:
                ArturiaLights.AsOnOffByte(
                    arrangement.selectionEnd() > arrangement.selectionStart()),
                ArturiaLights.ID_NAVIGATION_LEFT:
                ArturiaLights.AsOnOffByte(ui.getVisible(midi.widChannelRack)),
                ArturiaLights.ID_NAVIGATION_RIGHT:
                ArturiaLights.AsOnOffByte(ui.getVisible(midi.widMixer)),
                ArturiaLights.ID_OCTAVE_PLUS:
                ArturiaLights.LED_OFF,
                ArturiaLights.ID_OCTAVE_MINUS:
                ArturiaLights.LED_OFF,
            }
            self._lights.SetLights(led_map)
            self._encoders.Refresh()

        # Update display
        channel_name = channels.getChannelName(channels.selectedChannel())
        pattern_number = patterns.patternNumber()
        pattern_name = patterns.getPatternName(pattern_number)
        update = (
            flags & (
                1024  # HW_Dirty_Patterns
                | 2048  # HW_Dirty_Tracks
                | 16384  # HW_Dirty_Names
                | 32  # HW_Dirty_FocusedWindow   (channel selection)
            )) > 0
        self._paged_display.SetPageLines(
            'main',
            line1='[%d:%d] %s' %
            (channels.selectedChannel() + 1, pattern_number, channel_name),
            line2='%s' % pattern_name,
            update=update)
Ejemplo n.º 3
0
     def UpdateLEDs(self):

        if device.isAssigned():
            playstatus = [transport.isPlaying()]
            recstatus = [transport.isRecording()]
            loopstatus = [transport.getLoopMode()]
            metrostatus = [ui.isMetronomeEnabled()]
            prestatus = [ui.isPrecountEnabled()]
            quanstatus = [ui.getSnapMode()]
            mutestatusc = [channels.isChannelMuted(0)]
            solostatusc = [channels.isChannelSolo(0)]
            mutestatusm = [mixer.isTrackEnabled(mixer.trackNumber())]
            solostatusm = [mixer.isTrackSolo(mixer.trackNumber())]

            for a in playstatus:
              if a == 0: #not playing
                  KompleteDataOut(0x14, 0x01) #stop on

              elif a == 1: #playing
                  KompleteDataOut(0x14, 0x00) #stop off

            for b in recstatus:
               if b == 0: #not recording
                  KompleteDataOut(0x12, 0x00)

               elif b == 1: #recording
                  KompleteDataOut(0x12, 0x01)

            for c in loopstatus:
               if c == 0: #loop mood
                  KompleteDataOut(0x16, 0x00)

               elif c == 1: #playlist mode
                  KompleteDataOut(0x16, 0x01)

            for d in metrostatus:
               if d == 0: #metro off
                  KompleteDataOut(0x17, 0x00)

               elif d == 1: #metro on
                  KompleteDataOut(0x17, 0x01)

            for e in prestatus:
              if e == 0: #pre count on
                  KompleteDataOut(0x13, 0x00) 

              elif e == 1: #pre count off
                  KompleteDataOut(0x13, 0x01) 

            for f in quanstatus:
              if f == 3: #quantize off
                  KompleteDataOut(0x22, 0x00)

              elif f != 1: #quantize on
                  KompleteDataOut(0x22, 0x01)
    def Sync(self):
        """ Syncs up all visual indicators on keyboard with changes from FL Studio. """
        # Update buttons
        active_index = channels.selectedChannel()
        led_map = {
            ArturiaLights.ID_TRANSPORTS_RECORD: ArturiaLights.AsOnOffByte(transport.isRecording()),
            ArturiaLights.ID_TRANSPORTS_LOOP: ArturiaLights.AsOnOffByte(ui.isLoopRecEnabled()),
            ArturiaLights.ID_GLOBAL_METRO: ArturiaLights.AsOnOffByte(ui.isMetronomeEnabled()),
            ArturiaLights.ID_GLOBAL_SAVE: ArturiaLights.AsOnOffByte(transport.getLoopMode() == 1),
            ArturiaLights.ID_GLOBAL_UNDO: ArturiaLights.AsOnOffByte(general.getUndoHistoryLast() == 0),
            ArturiaLights.ID_TRACK_SOLO: ArturiaLights.AsOnOffByte(channels.isChannelSolo(active_index)),
            ArturiaLights.ID_TRACK_MUTE: ArturiaLights.AsOnOffByte(channels.isChannelMuted(active_index)),
            ArturiaLights.ID_TRANSPORTS_STOP: ArturiaLights.AsOnOffByte(not transport.isPlaying()),
            ArturiaLights.ID_TRANSPORTS_PLAY: ArturiaLights.AsOnOffByte(transport.getSongPos() > 0),
            ArturiaLights.ID_GLOBAL_OUT: ArturiaLights.AsOnOffByte(
                arrangement.selectionEnd() > arrangement.selectionStart()),
        }
        self._lights.SetLights(led_map)

        # Update selected channel
        bank_lights = [ArturiaLights.LED_OFF] * 9
        if active_index < len(bank_lights):
            bank_lights[active_index] = ArturiaLights.LED_ON
        self._lights.SetBankLights(bank_lights)

        # Update display
        channel_name = channels.getChannelName(active_index)
        pattern_number = patterns.patternNumber()
        pattern_name = patterns.getPatternName(pattern_number)

        # Update knob mode
        if self._encoders.GetCurrentMode() == ArturiaInputControls.INPUT_MODE_CHANNEL_PLUGINS:
            plugin_name = plugins.getPluginName(active_index) if plugins.isValid(active_index) else ''
            self._encoders.SetKnobMode(plugin_name)
            self._encoders.SetSliderMode(plugin_name)

        if channel_name.startswith('Analog Lab'):
            channel_name='Analog Lab'

        self._paged_display.SetPageLines(
            'main',
            line1='[%d:%d] %s' % (active_index + 1, pattern_number, channel_name),
            line2='%s' % pattern_name)
        self._encoders.Refresh()
Ejemplo n.º 5
0
def processMuteSolo(channel, command):

    if channels.channelCount() <= channel:
        command.handle("Channel out of range. Couldn't process mute",
                       silent=True)
        return

    if command.value == 0: return
    if channels.isChannelSolo(channel) and channels.channelCount() != 1:
        channels.soloChannel(channel)
        action = "Unsolo channel"

    elif command.is_double_click:
        channels.soloChannel(channel)
        action = "Solo channel"
    else:
        channels.muteChannel(channel)
        if channels.isChannelMuted(channel):
            action = "Mute channel"
        else:
            action = "Unmute channel"

    command.handle(action)
Ejemplo n.º 6
0
    def updateLEDs(self):
        if device.isAssigned():
            # play button
            if transport.isPlaying() and transport.getLoopMode():
                self.updateLED(CONTROLS.BUTTONS.PLAY, COLORS.RGB.GREEN,
                               ANIMATIONS.BLINKING.QUARTER)
            elif transport.isPlaying():
                self.updateLED(CONTROLS.BUTTONS.PLAY, COLORS.RGB.ORANGE,
                               ANIMATIONS.BLINKING.QUARTER)
            else:
                self.updateLED(CONTROLS.BUTTONS.PLAY)

            # record button
            if transport.isRecording():
                self.updateLED(CONTROLS.BUTTONS.RECORD, COLORS.RGB.RED)
            else:
                self.updateLED(CONTROLS.BUTTONS.RECORD)

            # double loop [song/pattern] button
            if transport.getLoopMode():
                self.updateLED(CONTROLS.BUTTONS.DOUBLE_LOOP)
            else:
                self.updateLED(CONTROLS.BUTTONS.DOUBLE_LOOP, COLORS.BW.WHITE)

            # metronome button
            if ui.isMetronomeEnabled():
                self.updateLED(CONTROLS.BUTTONS.METRONOME, COLORS.BW.WHITE)
            else:
                self.updateLED(CONTROLS.BUTTONS.METRONOME)

            # device [channel rack] button
            if ui.getFocused(midi.widChannelRack):
                self.updateLED(CONTROLS.BUTTONS.DEVICE, COLORS.BW.WHITE)
            else:
                self.updateLED(CONTROLS.BUTTONS.DEVICE)

            # mix [mixer] button
            if ui.getFocused(midi.widMixer):
                self.updateLED(CONTROLS.BUTTONS.MIX, COLORS.BW.WHITE)
            else:
                self.updateLED(CONTROLS.BUTTONS.MIX)

            # clip [playlist] button
            if ui.getFocused(midi.widPlaylist):
                self.updateLED(CONTROLS.BUTTONS.CLIP, COLORS.BW.WHITE)
            else:
                self.updateLED(CONTROLS.BUTTONS.CLIP)

            # browse [browser] button
            # if ui.getFocused(midi.widBrowser):
            #     self.updateLED(CONTROLS.BUTTONS.BROWSE, COLORS.BW.WHITE)
            # else:
            #     self.updateLED(CONTROLS.BUTTONS.BROWSE)

            # layout button
            if ui.getFocused(midi.widPlaylist):
                if self.playlist.layout == LAYOUTS.PLAYLIST.PATTERNS:
                    self.updateLED(CONTROLS.BUTTONS.LAYOUT, COLORS.BW.WHITE)
            else:
                self.updateLED(CONTROLS.BUTTONS.LAYOUT)

            # quantize/snap button
            if ui.getSnapMode() != 3:
                self.updateLED(CONTROLS.BUTTONS.QUANTIZE, COLORS.BW.WHITE)
            else:
                self.updateLED(CONTROLS.BUTTONS.QUANTIZE)

            # numbered upper buttons
            for idx, button in enumerate(CONTROLS.BUTTONS_UPPER, 1):
                if ui.getFocused(midi.widMixer):
                    if (idx == self.mixer.encodersTarget):
                        self.updateLED(button, COLORS.RGB.WHITE)
                    else:
                        self.updateLED(button)
                elif ui.getFocused(midi.widChannelRack):
                    if (idx == self.channels.encodersTarget):
                        self.updateLED(button, COLORS.RGB.ORANGE)
                    else:
                        self.updateLED(button)
                elif ui.getFocused(midi.widPlaylist):
                    if (idx == self.playlist.encodersTarget):
                        self.updateLED(button, COLORS.RGB.GREEN)
                    else:
                        self.updateLED(button)
                else:
                    self.updateLED(button)

            # pads
            for idx, pad in enumerate(CONTROLS.PADS_64):
                self.updateLED(pad, 0)
                if ui.getFocused(midi.widMixer):
                    idx += 1  # do not include the master track (0)
                    if idx < mixer.trackCount():
                        self.updateLED(
                            pad, getClosestColor(mixer.getTrackColor(idx)))
                        if mixer.isTrackSelected(
                                idx) and not mixer.isTrackEnabled(idx):
                            self.updateLED(pad, COLORS.RGB.GREEN)
                            self.updateLED(pad, COLORS.RGB.RED,
                                           ANIMATIONS.BLINKING.HALF)
                        elif mixer.isTrackSelected(idx):
                            self.updateLED(pad, COLORS.RGB.GREEN)
                            self.updateLED(
                                pad, getClosestColor(mixer.getTrackColor(idx)),
                                ANIMATIONS.PULSING.HALF)
                        elif not mixer.isTrackEnabled(idx):
                            self.updateLED(pad, COLORS.RGB.RED,
                                           ANIMATIONS.PULSING.HALF)
                elif ui.getFocused(midi.widChannelRack):
                    if idx < channels.channelCount():
                        self.updateLED(
                            pad,
                            getClosestColor(channels.getChannelColor(idx)))
                        if channels.isChannelSelected(
                                idx) and not channels.isChannelMuted(
                                    idx):  # NOTE asked this bug to be fixed!
                            self.updateLED(pad, COLORS.RGB.GREEN)
                            self.updateLED(pad, COLORS.RGB.RED,
                                           ANIMATIONS.BLINKING.HALF)
                        elif channels.isChannelSelected(idx):
                            self.updateLED(pad, COLORS.RGB.GREEN)
                            self.updateLED(
                                pad,
                                getClosestColor(channels.getChannelColor(idx)),
                                ANIMATIONS.PULSING.HALF)
                        elif not channels.isChannelMuted(
                                idx):  # NOTE asked this bug to be fixed!
                            self.updateLED(pad, COLORS.RGB.RED,
                                           ANIMATIONS.PULSING.HALF)
                elif ui.getFocused(midi.widPlaylist):
                    idx += 1  # NOTE asked this bug to be fixed!
                    if idx <= patterns.patternCount():
                        # self.updateLED(pad, getClosestColor(patterns.getPatternColor(idx)))
                        # if patterns.isPatternSelected(idx) and not patterns.isPatternEnabled(idx):
                        #     self.updateLED(pad, COLORS.RGB.GREEN)
                        #     self.updateLED(pad, COLORS.RGB.RED, ANIMATIONS.BLINKING.HALF)
                        # elif patterns.isPatternSelected(idx):
                        #     self.updateLED(pad, COLORS.RGB.GREEN)
                        #     self.updateLED(pad, getClosestColor(patterns.getPatternColor(idx)), ANIMATIONS.PULSING.HALF)
                        # elif not patterns.isPatternEnabled(idx):
                        #     self.updateLED(pad, COLORS.RGB.RED, ANIMATIONS.PULSING.HALF)
                        if (idx == patterns.patternNumber()):
                            # self.updateLED(pad, getClosestColor(patterns.getPatternColor(idx)))
                            self.updateLED(pad, COLORS.RGB.GREEN)
                            self.updateLED(pad, COLORS.RGB.RED,
                                           ANIMATIONS.PULSING.HALF)
                        else:
                            self.updateLED(
                                pad,
                                getClosestColor(patterns.getPatternColor(idx)))
Ejemplo n.º 7
0
     def UpdateOLED(self):

        if (ui.getFocused(0) == 1) == True: #mixer volume control
            #spells out 'Mixer' on tracks 1 through 8 on OLED
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x00, 0x4D, 0x69, 0x78, 0x65, 0x72, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x01, 0x4D, 0x69, 0x78, 0x65, 0x72, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x02, 0x4D, 0x69, 0x78, 0x65, 0x72, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x03, 0x4D, 0x69, 0x78, 0x65, 0x72, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x04, 0x4D, 0x69, 0x78, 0x65, 0x72, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x05, 0x4D, 0x69, 0x78, 0x65, 0x72, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x06, 0x4D, 0x69, 0x78, 0x65, 0x72, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x07, 0x4D, 0x69, 0x78, 0x65, 0x72, 0xF7]))

            if mixer.isTrackEnabled(mixer.trackNumber()) == 1: #mute light off
               device.midiOutSysex(bytes([0x00, 0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x43, 0x00, 0x00, 0xF7]))
               KompleteDataOut(0x66, 0x00)
               
            elif mixer.isTrackEnabled(mixer.trackNumber()) == 0: #mute light on
               device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x43, 0x01, 0x00, 0xF7]))
               KompleteDataOut(0x66, 0x01)
            
            #if (mixer.isTrackSolo(mixer.trackNumber()) == 1) == True: trying to figure out how to turn off solo when mute turns on the same track
            #   if mixer.isTrackEnabled(mixer.trackNumber()) == False: 
            #      device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x44, 0x01, 0x00, 0xF7]))
            #      KompleteDataOut(0x69, 0x01)

            if (mixer.isTrackSolo(mixer.trackNumber()) == 0) == True: #solo light off
               device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x44, 0x00, 0x00, 0xF7]))
               KompleteDataOut(0x69, 0x00)

            elif (mixer.isTrackSolo(mixer.trackNumber()) == 1) == True: #solo light on
               device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x44, 0x01, 0x00, 0xF7]))
               KompleteDataOut(0x69, 0x01)


        if (ui.getFocused(1) == 1) == True: # channel rack
            #spells out 'Ch. Rack' on tracks 1 through 8 on OLED
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x00, 0x43, 0x68, 0x2E, 0x20, 0x52, 0x61, 0x63, 0x6B, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x01, 0x43, 0x68, 0x2E, 0x20, 0x52, 0x61, 0x63, 0x6B, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x02, 0x43, 0x68, 0x2E, 0x20, 0x52, 0x61, 0x63, 0x6B, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x03, 0x43, 0x68, 0x2E, 0x20, 0x52, 0x61, 0x63, 0x6B, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x04, 0x43, 0x68, 0x2E, 0x20, 0x52, 0x61, 0x63, 0x6B, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x05, 0x43, 0x68, 0x2E, 0x20, 0x52, 0x61, 0x63, 0x6B, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x06, 0x43, 0x68, 0x2E, 0x20, 0x52, 0x61, 0x63, 0x6B, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x07, 0x43, 0x68, 0x2E, 0x20, 0x52, 0x61, 0x63, 0x6B, 0xF7]))

            if channels.isChannelMuted(channels.channelNumber()) == 1: #mute light off
               device.midiOutSysex(bytes([0x00, 0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x43, 0x00, 0x00, 0xF7]))
               KompleteDataOut(0x66, 0x00)
               
            elif channels.isChannelMuted(channels.channelNumber()) == 0: #mute light on
               device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x43, 0x01, 0x00, 0xF7]))
               KompleteDataOut(0x66, 0x01)
            
            #if (mixer.isTrackSolo(mixer.trackNumber()) == 1) == True: trying to figure out how to turn off solo when mute turns on the same track
            #   if mixer.isTrackEnabled(mixer.trackNumber()) == False: 
            #      device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x44, 0x01, 0x00, 0xF7]))
            #      KompleteDataOut(0x69, 0x01)
            if channels.channelCount() >= 2: 
               if (channels.isChannelSolo(channels.channelNumber()) == 0) == True: #solo light off
                  device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x44, 0x00, 0x00, 0xF7]))
                  KompleteDataOut(0x69, 0x00)

               elif (channels.isChannelSolo(channels.channelNumber()) == 1) == True: #solo light on
                  device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x44, 0x01, 0x00, 0xF7]))
                  KompleteDataOut(0x69, 0x01)
                  


        if (ui.getFocused(2) == 1) == True: # playlist
            #spells out 'Playlist' on tracks 1 through 8 on OLED
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x00, 0x50, 0x6C, 0x61, 0x79, 0x6C, 0x69, 0x73, 0x74, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x01, 0x50, 0x6C, 0x61, 0x79, 0x6C, 0x69, 0x73, 0x74, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x02, 0x50, 0x6C, 0x61, 0x79, 0x6C, 0x69, 0x73, 0x74, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x03, 0x50, 0x6C, 0x61, 0x79, 0x6C, 0x69, 0x73, 0x74, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x04, 0x50, 0x6C, 0x61, 0x79, 0x6C, 0x69, 0x73, 0x74, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x05, 0x50, 0x6C, 0x61, 0x79, 0x6C, 0x69, 0x73, 0x74, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x06, 0x50, 0x6C, 0x61, 0x79, 0x6C, 0x69, 0x73, 0x74, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x07, 0x50, 0x6C, 0x61, 0x79, 0x6C, 0x69, 0x73, 0x74, 0xF7]))

        if (ui.getFocused(3) == 11) == True: # piano roll #disabled
            #spells out 'Piano Roll' on tracks 1 through 8 on OLED
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x00, 0x50, 0x69, 0x61, 0x6E, 0x6F, 0x20, 0x52, 0x6F, 0x6C, 0x6C, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x01, 0x50, 0x69, 0x61, 0x6E, 0x6F, 0x20, 0x52, 0x6F, 0x6C, 0x6C, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x02, 0x50, 0x69, 0x61, 0x6E, 0x6F, 0x20, 0x52, 0x6F, 0x6C, 0x6C, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x03, 0x50, 0x69, 0x61, 0x6E, 0x6F, 0x20, 0x52, 0x6F, 0x6C, 0x6C, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x04, 0x50, 0x69, 0x61, 0x6E, 0x6F, 0x20, 0x52, 0x6F, 0x6C, 0x6C, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x05, 0x50, 0x69, 0x61, 0x6E, 0x6F, 0x20, 0x52, 0x6F, 0x6C, 0x6C, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x06, 0x50, 0x69, 0x61, 0x6E, 0x6F, 0x20, 0x52, 0x6F, 0x6C, 0x6C, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x07, 0x50, 0x69, 0x61, 0x6E, 0x6F, 0x20, 0x52, 0x6F, 0x6C, 0x6C, 0xF7]))

        if (ui.getFocused(4) == 11) == True: # piano roll # disabled 
            #spells out 'Piano Roll' on tracks 1 through 8 on OLED
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x00, 0x42, 0x72, 0x6F, 0x77, 0x73, 0x65, 0x72, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x01, 0x42, 0x72, 0x6F, 0x77, 0x73, 0x65, 0x72, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x02, 0x42, 0x72, 0x6F, 0x77, 0x73, 0x65, 0x72, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x03, 0x42, 0x72, 0x6F, 0x77, 0x73, 0x65, 0x72, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x04, 0x42, 0x72, 0x6F, 0x77, 0x73, 0x65, 0x72, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x05, 0x42, 0x72, 0x6F, 0x77, 0x73, 0x65, 0x72, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x06, 0x42, 0x72, 0x6F, 0x77, 0x73, 0x65, 0x72, 0xF7]))
            device.midiOutSysex(bytes([0xF0, 0x00, 0x21, 0x09, 0x00, 0x00, 0x44, 0x43, 0x01, 0x00, 0x48, 0x00, 0x07, 0x42, 0x72, 0x6F, 0x77, 0x73, 0x65, 0x72, 0xF7]))