Skip to content

Commit

Permalink
feat: add audio to drum rack conversion
Browse files Browse the repository at this point in the history
feat: add audio to simpler track conversion
feat: add clip cropping
refactor: add ident and seq parser for statements
refactor: add clip parser
  • Loading branch information
nuno-andre committed Mar 2, 2021
1 parent 182e562 commit ab8b819
Show file tree
Hide file tree
Showing 43 changed files with 1,298 additions and 963 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ ClyphX
provides an extensive list of _Actions_ related to controlling different aspects
of Live.

These _Actions_ can be accessed via _X-Triggers_ (Session View Clips, Arrange
View Locators or MIDI Controls). Each _X-Trigger_ can trigger either a single
_Action_ or a list of _Actions_.

As an example, a simple _Action_ might toggle Overdub on/off:
```
OVER
over
```

A more complex _Action List_ might mute Tracks 1-2, unmute and arm Track 4, turn
the 2nd Device on Track 4 on, and launch the selected Clip on track 4:
```
1-2/MUTE ON; 4/MUTE OFF; 4/ARM ON; 4/DEV2 ON; 4/PLAY
1-2/mute on; 4/mute off; 4/arm on; 4/dev2 on; 4/play
```

These _Actions_ can be accessed via _X-Triggers_ (Session View Clips, Arrange
View Locators or MIDI Controls). Each _X-Trigger_ can trigger either a single
_Action_ or a list of _Actions_.

**ClyphX** also includes:

- A component called **Macrobat** that adds new functionality to Racks in Live
Expand Down
14 changes: 9 additions & 5 deletions src/clyphx/actions/arsenal.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ def _handle_mode_action(self, script, spec):
if mc:
adjust_property(mc, 'selected_mode_index', 0, mc.num_modes - 1, spec[1:])

def _handle_lock_action(self, script, spec):
@staticmethod
def _handle_lock_action(script, spec):
# type: (Any, Text) -> None
'''Handles toggling the locking of the current track or
mode-specific locks.
Expand Down Expand Up @@ -182,7 +183,8 @@ def _handle_scale_action(self, script, spec, xclip, ident):
self._toggle_scale_offset(scl, value)
scl._notify_scale_settings()

def _capture_scale_settings(self, script, xclip, ident):
@staticmethod
def _capture_scale_settings(script, xclip, ident):
# type: (Any, Clip, Text) -> None
'''Captures the current scale type, tonic, in key state, offset
and orientation and adds them to the given xclip's name.
Expand All @@ -195,7 +197,8 @@ def _capture_scale_settings(self, script, xclip, ident):
comp.orientation_is_horizontal,
)

def _recall_scale_settings(self, comp, spec):
@staticmethod
def _recall_scale_settings(comp, spec):
# type: (Any, Text) -> None
'''Recalls previously stored scale settings.'''
if len(spec) >= 5:
Expand All @@ -209,14 +212,15 @@ def _recall_scale_settings(self, comp, spec):
# deprecated
if len(spec) == 5:
value = ['ON'] if spec[4].strip() == 'TRUE' else ['OFF']
self._toggle_scale_offset(comp, value)
XArsenalActions._toggle_scale_offset(comp, value)
else:
offset = parse_int(spec[4], None, 0, comp._offsets.num_pages - 1)
if offset is not None:
comp._offsets.set_page_index(offset)
comp._orientation_is_horizontal = spec[5].strip() == 'TRUE'

def _toggle_scale_offset(self, comp, arg):
@staticmethod
def _toggle_scale_offset(comp, arg):
# type: (Any, Sequence[Text]) -> None
'''Toggles between sequent and 4ths offsets.
Expand Down
Loading

0 comments on commit ab8b819

Please sign in to comment.