Exemple #1
0
def processMenuMode(command):
    if command.is_lift:
        coord = [command.coord_X, command.coord_Y]

        # Next/prev track
        if coord == [0, 0]:
            ui.previous()
            command.handle("Channel Rack: Previous channel")
        elif coord == [0, 1]:
            ui.next()
            command.handle("Channel Rack: Next channel")

        # Cut, Copy, Paste
        elif coord == [2, 0]:
            ui.cut()
            command.handle("UI: Cut")
        elif coord == [3, 0]:
            ui.copy()
            command.handle("UI: Copy")
        elif coord == [4, 0]:
            ui.paste()
            command.handle("UI: Paste")

        # To piano roll
        elif coord == [7, 1]:
            ui.showWindow(internal.consts.WINDOW_PIANO_ROLL)
            command.handle("Sent to pianoroll")

        # Plugin window
        elif coord == [6, 1]:
            channels.showEditor(channels.channelNumber())
            command.handle("Opened plugin window")
Exemple #2
0
 def _clone_active_pattern(self):
     active_channel = channels.selectedChannel()
     self._show_and_focus(midi.widChannelRack)
     channels.selectAll()
     ui.copy()
     self._new_empty_pattern()
     ui.paste()
     self._select_one_channel(active_channel)
Exemple #3
0
 def _new_pattern_from_selected(self):
     self._show_and_focus(midi.widPianoRoll)
     ui.copy()
     self._new_empty_pattern()
     ui.paste()
     # Hack to fix the pattern shift by moving it to far left most.
     transport.globalTransport(midi.FPT_StripJog, -midi.FromMIDI_Max)
     # Deselect region once we've copied it out.
     transport.globalTransport(midi.FPT_PunchOut, midi.FPT_PunchOut)
 def _new_pattern_from_selected(self):
     self._show_and_focus(midi.widPianoRoll)
     ui.copy()
     self._new_empty_pattern()
     ui.paste()
Exemple #5
0
 def copy(unused_param_value):
     """Copy"""
     ui.copy()