-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
julien
committed
Apr 22, 2022
1 parent
2f8a797
commit b28d806
Showing
1,110 changed files
with
51,364 additions
and
42,989 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,56 @@ | ||
#Embedded file name: /Users/versonator/Jenkins/live/output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/ADVANCE/Advance.py | ||
# decompyle3 version 3.8.0 | ||
# Python bytecode 3.7.0 (3394) | ||
# Decompiled from: Python 3.8.9 (default, Mar 30 2022, 13:51:17) | ||
# [Clang 13.1.6 (clang-1316.0.21.2.3)] | ||
# Embedded file name: output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/ADVANCE/Advance.py | ||
# Compiled at: 2022-01-27 16:28:16 | ||
# Size of source mod 2**32: 2844 bytes | ||
from __future__ import absolute_import, print_function, unicode_literals | ||
from builtins import range | ||
import Live | ||
from _Framework.ControlSurface import ControlSurface | ||
from _Framework.Layer import Layer | ||
from _Framework.DeviceComponent import DeviceComponent | ||
from _Framework.DrumRackComponent import DrumRackComponent | ||
from _Framework.TransportComponent import TransportComponent | ||
import _Framework.ButtonElement as ButtonElement | ||
import _Framework.ButtonMatrixElement as ButtonMatrixElement | ||
import _Framework.ControlSurface as ControlSurface | ||
import _Framework.DeviceComponent as DeviceComponent | ||
import _Framework.DrumRackComponent as DrumRackComponent | ||
import _Framework.EncoderElement as EncoderElement | ||
from _Framework.InputControlElement import MIDI_CC_TYPE, MIDI_NOTE_TYPE | ||
from _Framework.ButtonMatrixElement import ButtonMatrixElement | ||
from _Framework.ButtonElement import ButtonElement | ||
from _Framework.EncoderElement import EncoderElement | ||
import _Framework.Layer as Layer | ||
import _Framework.TransportComponent as TransportComponent | ||
PAD_CHANNEL = 1 | ||
PAD_IDS = ((81, 83, 84, 86), | ||
(74, 76, 77, 79), | ||
(67, 69, 71, 72), | ||
(60, 62, 64, 65)) | ||
PAD_IDS = ((81, 83, 84, 86), (74, 76, 77, 79), (67, 69, 71, 72), (60, 62, 64, 65)) | ||
|
||
def make_encoder(identifier, name): | ||
return EncoderElement(MIDI_CC_TYPE, 0, identifier, Live.MidiMap.MapMode.absolute, name=name) | ||
return EncoderElement(MIDI_CC_TYPE, | ||
0, identifier, (Live.MidiMap.MapMode.absolute), name=name) | ||
|
||
|
||
def make_button(identifier, name, msg_type = MIDI_NOTE_TYPE, channel = PAD_CHANNEL): | ||
def make_button(identifier, name, msg_type=MIDI_NOTE_TYPE, channel=PAD_CHANNEL): | ||
return ButtonElement(True, msg_type, channel, identifier, name=name) | ||
|
||
|
||
class Advance(ControlSurface): | ||
|
||
def __init__(self, *a, **k): | ||
super(Advance, self).__init__(*a, **k) | ||
(super(Advance, self).__init__)(*a, **k) | ||
with self.component_guard(): | ||
encoders = ButtonMatrixElement(rows=[[ make_encoder(index + 22, u'Encoder_%d' % index) for index in range(8) ]]) | ||
pads = ButtonMatrixElement(rows=[ [ make_button(identifier, u'Pad_%d_%d' % (col, row)) for col, identifier in enumerate(row_ids) ] for row, row_ids in enumerate(PAD_IDS) ]) | ||
device = DeviceComponent(is_enabled=False, layer=Layer(parameter_controls=encoders), device_selection_follows_track_selection=True) | ||
encoders = ButtonMatrixElement(rows=[ | ||
[make_encoder(index + 22, 'Encoder_%d' % index) for index in range(8)]]) | ||
pads = ButtonMatrixElement(rows=[[make_button(identifier, 'Pad_%d_%d' % (col, row)) for col, identifier in enumerate(row_ids)] for row, row_ids in enumerate(PAD_IDS)]) | ||
device = DeviceComponent(is_enabled=False, | ||
layer=Layer(parameter_controls=encoders), | ||
device_selection_follows_track_selection=True) | ||
device.set_enabled(True) | ||
self.set_device_component(device) | ||
drums = DrumRackComponent(is_enabled=False, layer=Layer(pads=pads)) | ||
drums.set_enabled(True) | ||
play_button = make_button(118, u'Play_Button', MIDI_CC_TYPE, 0) | ||
stop_button = make_button(117, u'Stop_Button', MIDI_CC_TYPE, 0) | ||
record_button = make_button(119, u'Record_Button', MIDI_CC_TYPE, 0) | ||
loop_button = make_button(114, u'Loop_Button', MIDI_CC_TYPE, 0) | ||
transport = TransportComponent(is_enabled=False, layer=Layer(play_button=play_button, stop_button=stop_button, record_button=record_button, loop_button=loop_button)) | ||
transport.set_enabled(True) | ||
play_button = make_button(118, 'Play_Button', MIDI_CC_TYPE, 0) | ||
stop_button = make_button(117, 'Stop_Button', MIDI_CC_TYPE, 0) | ||
record_button = make_button(119, 'Record_Button', MIDI_CC_TYPE, 0) | ||
loop_button = make_button(114, 'Loop_Button', MIDI_CC_TYPE, 0) | ||
transport = TransportComponent(is_enabled=False, | ||
layer=Layer(play_button=play_button, | ||
stop_button=stop_button, | ||
record_button=record_button, | ||
loop_button=loop_button)) | ||
transport.set_enabled(True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,25 @@ | ||
#Embedded file name: /Users/versonator/Jenkins/live/output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/ADVANCE/__init__.py | ||
# decompyle3 version 3.8.0 | ||
# Python bytecode 3.7.0 (3394) | ||
# Decompiled from: Python 3.8.9 (default, Mar 30 2022, 13:51:17) | ||
# [Clang 13.1.6 (clang-1316.0.21.2.3)] | ||
# Embedded file name: output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/ADVANCE/__init__.py | ||
# Compiled at: 2021-06-29 09:33:48 | ||
# Size of source mod 2**32: 695 bytes | ||
from __future__ import absolute_import, print_function, unicode_literals | ||
import _Framework.Capabilities as caps | ||
from .Advance import Advance | ||
|
||
def get_capabilities(): | ||
return {caps.CONTROLLER_ID_KEY: caps.controller_id(vendor_id=2536, product_ids=[46, 47, 48], model_name=[u'ADVANCE25', u'ADVANCE49', u'ADVANCE61']), | ||
caps.PORTS_KEY: [caps.inport(props=[caps.NOTES_CC, caps.SCRIPT, caps.REMOTE]), caps.outport(props=[caps.NOTES_CC, caps.SCRIPT])]} | ||
return {caps.CONTROLLER_ID_KEY: caps.controller_id(vendor_id=2536, | ||
product_ids=[ | ||
46, 47, 48], | ||
model_name=[ | ||
'ADVANCE25', 'ADVANCE49', 'ADVANCE61']), | ||
|
||
caps.PORTS_KEY: [ | ||
caps.inport(props=[caps.NOTES_CC, caps.SCRIPT, caps.REMOTE]), | ||
caps.outport(props=[caps.NOTES_CC, caps.SCRIPT])]} | ||
|
||
|
||
def create_instance(c_instance): | ||
return Advance(c_instance) | ||
return Advance(c_instance) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,35 @@ | ||
#Embedded file name: /Users/versonator/Jenkins/live/output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/AIRA_MX_1/ControlElementUtils.py | ||
# decompyle3 version 3.8.0 | ||
# Python bytecode 3.7.0 (3394) | ||
# Decompiled from: Python 3.8.9 (default, Mar 30 2022, 13:51:17) | ||
# [Clang 13.1.6 (clang-1316.0.21.2.3)] | ||
# Embedded file name: output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/AIRA_MX_1/ControlElementUtils.py | ||
# Compiled at: 2022-01-28 05:06:40 | ||
# Size of source mod 2**32: 1170 bytes | ||
from __future__ import absolute_import, print_function, unicode_literals | ||
import Live | ||
from _Framework.Resource import PrioritizedResource | ||
from _Framework.Dependency import depends | ||
from _Framework.InputControlElement import MIDI_NOTE_TYPE, MIDI_CC_TYPE | ||
from _Framework.ComboElement import ComboElement | ||
from _Framework.ButtonElement import ButtonElement | ||
from _Framework.EncoderElement import EncoderElement | ||
import _Framework.ComboElement as ComboElement | ||
import _Framework.ButtonElement as ButtonElement | ||
import _Framework.EncoderElement as EncoderElement | ||
|
||
@depends(skin=None) | ||
def make_button(name, identifier, channel = 0, msg_type = MIDI_NOTE_TYPE, is_momentary = True, is_modifier = False, skin = None): | ||
return ButtonElement(is_momentary, msg_type, channel, identifier, name=name, resource_type=PrioritizedResource if is_modifier else None, skin=skin) | ||
def make_button(name, identifier, channel=0, msg_type=MIDI_NOTE_TYPE, is_momentary=True, is_modifier=False, skin=None): | ||
return ButtonElement(is_momentary, | ||
msg_type, | ||
channel, | ||
identifier, | ||
name=name, | ||
resource_type=(PrioritizedResource if is_modifier else None), | ||
skin=skin) | ||
|
||
|
||
def make_encoder(name, identifier, channel = 0): | ||
return EncoderElement(MIDI_CC_TYPE, channel, identifier, Live.MidiMap.MapMode.absolute, name=name) | ||
def make_encoder(name, identifier, channel=0): | ||
return EncoderElement(MIDI_CC_TYPE, | ||
channel, identifier, (Live.MidiMap.MapMode.absolute), name=name) | ||
|
||
|
||
def with_modifier(control, modifier): | ||
return ComboElement(control, modifiers=[modifier], name=control.name + u'_With_Modifier') | ||
return ComboElement(control, | ||
modifiers=[modifier], name=(control.name + '_With_Modifier')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.