Open kkerti opened 6 days ago
New Session Management Feature: A Session
component has been introduced. This new class enables the setup and management of a "session box". It provides features such as track control and scene management.
Improved Backend Module: The updated AbletonJS.py
integrates the new Session
class. This enhancement now allows the initialization process of the machines to handle 'session' control functionality seamlessly.
Enhanced Main Index: In the main 'index.ts', there's a new 'session' instance initialization to control the session ring, which is an essential part of the runtime environment and helps in resource allocation.
Testing the New Session Management: Tests are created to ensure the efficient working of new session management operations including its setup and handling offsets, which is the displacement or difference in the position.
Code Refactoring for Enhanced Readability: The syntax for constructors in various classes has been modishly rewritten to follow the updated coding standards and improve readability.
New Namespace Session Class: A fresh Session
class is included in ns/session.ts
. This class expands the capabilities by defining commands for setting up new sessions and managing offsets. This will offer improved control over multiple parameters of a session.
I just removed the unused property and also ran prettier with prettier --config .prettierrc -w src/
. I think it's worth adding this to readme and also I'm not sure if the prettier config should be applied to the python code as well. Thank for checking it out!
I have started to extend the codebase with the session ring creation feature of the Live API. I tried my best to follow the code pattern laid down by @leolabs and on the typescript side I think I nailed it, but the python side is not my strong suit. I wanted to open this PR early, so I can give visibility for this development and also get feedback.
Overview
This project is by far the best when it comes to controlling Live through javascript environments (nodejs and typescript). My goal was to utilise this package to give the intech studio Grid MIDI controllers greater control over Ableton. I could've used other tool for the job, but I like the idea of basing this integration on an open source tool, where the code for the integration itself can be easily altered, javascript fits better the ecosystem around Grid.
Controlling a red ring was also requested by others in this discussion here: #114
Status
I have created two functions,
setup_session_box
,set_session_offset
and put them under theSession
handler. Thens
namespace for the functions issession
. I think this naming is misleading, as really what I'm doing here is calling methods on theControlSurface
instance, which has thesession
property.In the handler object where AbletonJS initialises everything, the
Session
class gets assigned. I don't like the fact that here I just lazily pass in theself
, which contains the reference to theControlSurface
forself.session
, probably I should passself.session
, but on the other handset_highlighting_session_component
exists onControlSurface
.To do...
Get feedback, if this can be truly a part of ableton-js! And also check if the newer APIs are any better, like using this:
I have added two tests for creating the session ring itself and also moving the session ring. Tested with Ableton Live 11.