Skip to content

Commit

Permalink
At last ... 11.1 sources
Browse files Browse the repository at this point in the history
  • Loading branch information
julien committed Apr 22, 2022
1 parent 2f8a797 commit b28d806
Show file tree
Hide file tree
Showing 1,110 changed files with 51,364 additions and 42,989 deletions.
61 changes: 36 additions & 25 deletions ADVANCE/Advance.py
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)
21 changes: 17 additions & 4 deletions ADVANCE/__init__.py
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)
10 changes: 8 additions & 2 deletions AIRA_MX_1/Colors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#Embedded file name: /Users/versonator/Jenkins/live/output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/AIRA_MX_1/Colors.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/Colors.py
# Compiled at: 2022-01-28 05:06:40
# Size of source mod 2**32: 589 bytes
from __future__ import absolute_import, print_function, unicode_literals
from _Framework.ButtonElement import Color
BLINK_LED_CHANNEL = 14
Expand All @@ -19,4 +25,4 @@ class Rgb:
GREEN_BLINK = Blink(21)
BLUE_HALF = Color(44)
BLUE = Color(45)
BLUE_BLINK = Blink(45)
BLUE_BLINK = Blink(45)
32 changes: 23 additions & 9 deletions AIRA_MX_1/ControlElementUtils.py
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'))
17 changes: 9 additions & 8 deletions AIRA_MX_1/NotifyingMixerComponent.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#Embedded file name: /Users/versonator/Jenkins/live/output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/AIRA_MX_1/NotifyingMixerComponent.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/NotifyingMixerComponent.py
# Compiled at: 2022-01-28 05:06:40
# Size of source mod 2**32: 1293 bytes
from __future__ import absolute_import, print_function, unicode_literals
from _Framework.MixerComponent import MixerComponent
import _Framework.MixerComponent as MixerComponent
from _Framework.Control import ButtonControl

class NotifyingMixerComponent(MixerComponent):
u"""
Special mixer class that uses return tracks alongside midi and
audio tracks and includes controls for incrementing/decrementing
between sends.
"""
send_index_up_button = ButtonControl()
send_index_down_button = ButtonControl()
modifier_button = ButtonControl(color=0, pressed_color=127)
Expand All @@ -28,4 +29,4 @@ def _adjust_send_index(self, factor):
new_index = self.send_index + factor
if 0 <= new_index < self.num_sends:
self.send_index = new_index
self._show_msg_callback(u'Tone/Filter Controlling Send: %s' % self.song().return_tracks[self.send_index].name)
self._show_msg_callback('Tone/Filter Controlling Send: %s' % self.song().return_tracks[self.send_index].name)
64 changes: 32 additions & 32 deletions AIRA_MX_1/NotifyingSessionComponent.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#Embedded file name: /Users/versonator/Jenkins/live/output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/AIRA_MX_1/NotifyingSessionComponent.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/NotifyingSessionComponent.py
# Compiled at: 2022-01-28 05:06:40
# Size of source mod 2**32: 4593 bytes
from __future__ import absolute_import, print_function, unicode_literals
from builtins import range
from future.moves.itertools import zip_longest
Expand All @@ -7,25 +13,22 @@
from _Framework.SessionComponent import SessionComponent, SceneComponent

class SpecialSceneComponent(SceneComponent):
u"""
Special scene class that indicates whether any clips are
playing/triggered on the scene.
"""

def __init__(self, *a, **k):
super(SpecialSceneComponent, self).__init__(*a, **k)
(super(SpecialSceneComponent, self).__init__)(*a, **k)
self._playing_value = 127
self._scene_index = 0

def scene_name(self):
if self._scene and self._scene.name:
return self._scene.name
if self._scene:
if self._scene.name:
return self._scene.name

def set_playing_value(self, value):
self._playing_value = value

def set_scene(self, scene):
if scene != self._scene or type(self._scene) != type(scene):
if scene != self._scene or (type(self._scene) != type(scene)):
self._scene = scene
self._on_is_triggered_changed.subject = scene
self._on_scene_color_changed.subject = scene
Expand All @@ -37,19 +40,20 @@ def update_light(self):
self._update_launch_button()

def _update_launch_button(self):
if self.is_enabled() and self._launch_button is not None:
value_to_send = self._no_scene_value
if self._scene:
if self._has_fired_slots():
value_to_send = self._triggered_value
elif self._has_playing_slots():
value_to_send = self._playing_value
if self.is_enabled():
if self._launch_button is not None:
value_to_send = self._no_scene_value
if self._scene:
if self._has_fired_slots():
value_to_send = self._triggered_value
elif self._has_playing_slots():
value_to_send = self._playing_value
else:
value_to_send = self._scene_value
if value_to_send is None:
self._launch_button.turn_off()
else:
value_to_send = self._scene_value
if value_to_send is None:
self._launch_button.turn_off()
else:
self._launch_button.set_light(value_to_send)
self._launch_button.set_light(value_to_send)

def _has_fired_slots(self):
for track in self.song().tracks:
Expand All @@ -67,14 +71,10 @@ def _has_playing_slots(self):


class NotifyingSessionComponent(SessionComponent):
u"""
Special session class that uses the status bar to display
the scene name or number being controlled.
"""
scene_component_type = SpecialSceneComponent

def __init__(self, *a, **k):
super(NotifyingSessionComponent, self).__init__(*a, **k)
(super(NotifyingSessionComponent, self).__init__)(*a, **k)
self._last_scene_offset = self._scene_offset
self._on_offset_changed.subject = self

Expand All @@ -88,7 +88,7 @@ def _enable_skinning(self):
super(NotifyingSessionComponent, self)._enable_skinning()
for scene_index in range(self._num_scenes):
scene = self.scene(scene_index)
scene.set_playing_value(u'Session.ScenePlaying')
scene.set_playing_value('Session.ScenePlaying')

def _reassign_tracks(self):
tracks_to_use = self.song().tracks
Expand All @@ -97,12 +97,12 @@ def _reassign_tracks(self):
self._update_stop_track_clip_buttons()
self._update_scene_launch_buttons()

@subject_slot_group(u'fired_slot_index')
@subject_slot_group('fired_slot_index')
def _on_fired_slot_index_changed(self, track_index):
super(NotifyingSessionComponent, self)._on_fired_slot_index_changed(track_index)
self._update_scene_launch_buttons()

@subject_slot_group(u'playing_slot_index')
@subject_slot_group('playing_slot_index')
def _on_playing_slot_index_changed(self, track_index):
super(NotifyingSessionComponent, self)._on_playing_slot_index_changed(track_index)
self._update_scene_launch_buttons()
Expand All @@ -111,11 +111,11 @@ def _update_scene_launch_buttons(self):
for scene in self._scenes:
scene.update_light()

@subject_slot(u'offset')
@subject_slot('offset')
def _on_offset_changed(self):
if self._last_scene_offset != self._scene_offset:
name = self._scenes[0].scene_name()
if not name:
name = self._scene_offset + 1
self._show_msg_callback(u'Controlling Scene %s' % name)
self._last_scene_offset = self._scene_offset
self._show_msg_callback('Controlling Scene %s' % name)
self._last_scene_offset = self._scene_offset
Loading

0 comments on commit b28d806

Please sign in to comment.