Javascript Macro Action Requests

Discussion about: tracktion.com
Post Reply New Topic
RELATED
PRODUCTS

Post

Allow me a suggestion, that goes to the developers and the contributors.

Please, develop a meta-plugin to be used by macros, that can also store edit-based macros, i.e. that have been customized to do some work that is particular to the current mix, referencing to certain distinct tracks etc.

I would call it MacroTron :)
It should follow the technical principles of the "text" stock plugin. The text is stored in the edit XML.

Features:

* the MacroTron should have its own little object model. This has the main purpose, that it can store permanent macro data in the edit.
So, we can assign a js variable value to a MacroTron object, and it will be saved as if it were some plugin eq parameter. A numbered parameter array or a named collection would do.
When we run a macro, it can use data that is particular to the current edit.

* instead of memo texts, MacroTron can save a bunch of macro scripts, as well as respective help texts, and somehow communicate with the UI to quickly click those macros, and show the help when hovering before click. The UI can also edit those plugin parameters that are actually macro permanent data, with knob controls and text edit controls.

* the MacroTron plugin sits in a track, and the user who does program a macro for it, can use the track reference (that exists in the object model), or not use it, and just have the track be some home of some metaplugin without further direct connection.

* with the preset mechanism, we can proliferate a particular complex MacroTron that we had put together, to other projects and edits.


(I am optimistic that a big part of this task can be done with reusing good code that already exists.)

Post

-- just recently discovered Keyboard Shortcut Macros (Scripts)

thanks Tracktion Devs :)

No rush, but I have been struggling with finding a way to GoTo / JumpTo or even Select the First Track -- I think that would be (Track[0])

for now, as long as I physically select a Track, I can run this script to Mute a Track I am already on (already selected):

var track = Tracktion.getTrackFromSelectedObject();
Tracktion.setMute (track, true);

also Interestingly:

as long as I have already selected a track, this command works:

Tracktion.selectItem ('bottom');

(which will 'JumpTo' and highlight/select the highest numbered track)

but this command does not work:

Tracktion.selectItem ('top');

doesn't seem to do anything


no rush

thanks much

keep up the awesome work

Ira

San Jose, CA
USA

Post

Is there a reason why the (for .. in .. ) construct does not work in scripts?

Actually... most anything for working with objects is missing :( :x

Post

Robert Randolph wrote:Is there a reason why the (for .. in .. ) construct does not work in scripts?

Actually... most anything for working with objects is missing :( :x
It's not implemented in the JUCE Javascript interpreter I'm afraid. We'll have to use ".length" for now.

Post

dRowAudio wrote:
busywait wrote:Event handlers for selections and marker clips on the Marker Track.

I want to register a macro to be run when the selected region is entered for the first time.

Like, I want to be able to turn on loop mode when the play head enters the selected region (that is, when and if the cursor hits the 'in' marker)

I don't know if registering handlers for these events would be best done in code or with a bit more UI. Certainly there is room in the Marker Clip properties panel for a macro to be referenced.

Maybe code would look like
selection.onEnter( toggleTransport('loop') );
or
Markers( 'Marker 1' ).onEnter( selectCurrentMarkerAndLoop() );
That's a very cool idea. It's not something the current engine would support though as all these scripts are parsed and run when the action is called (i.e. a key press or "Run Script" button).
It might be possible to add dispatchers to events like this which would yield a slightly different paradigm: select marker clip -> add action -> on enter -> run script X

I do like the idea of more Javascript-esque event handlers though. Perhaps it's something we'll look into in the future.
bump, from a couple of years ago. any possibility yet of some kind of callback from specific selection/deselection events happening?
Last edited by whyterabbyt on Wed Aug 29, 2018 11:40 am, edited 1 time in total.
my other modular synth is a bugbrand

Post

Axl wrote:- trigger scripts via midi commands (not an action but essential feature)
bump. would make controllers more flexible.
my other modular synth is a bugbrand

Post

dRowAudio wrote:
whyterabbyt wrote:Those, like the examples in the video, all seem to imply that X is fixed; hardcoded into the script. Are we likely to get user-interaction capabilities that let us define them at runtime eg

Code: Select all

var track = Tracktion.insertTrack ('audio');
var trackName = prompt.String("Track Name?);
Tracktion.setName (track, trackName);

var currentPos = Tracktion.getPosition ('transport');
var rewindTime = prompt.Float("Rewind By (secs)?);
Tracktion.setPosition ('transport', currentPos - rewindTime);
This isn't currently possible but is certainly something I'll be looking into once the feature is out of beta.
bump, from 2015. any news on some kind of user interaction with macros yet?
my other modular synth is a bugbrand

Post

Kang wrote:Would it be possible to control armed inputs?
kvruserr wrote:FR regarding record arm/enable
first macro: only record arm track x and y
second macro only record arm track a and b
bump, from 2015 and 2016. Control over inputs and arming still seems to be lacking?
my other modular synth is a bugbrand

Post

dRowAudio wrote:
Rock wrote:Does something like Tracktion.isArmed or Tracktion.isRecordEnabled exist? Is there another way of determining if a track is record enabled? If there is no way, please add.
Currently no, and because these properties are stored in a different part of the Edit, not with the track node, there's no way to get them using the raw tree object.

I've added them to the list of scripts to add but we're finalising a new release at the moment so are unlike to get added in the next few weeks. Hopefully soon after that though.
Bump from 2017. Querying stuff is good....
my other modular synth is a bugbrand

Post

AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.
dRowAudio wrote: Tue Jul 07, 2015 10:22 am
Kang wrote:Also, what about named markers on the fly?
Just added this. You can now add the clip types: 'barsBeatsMarker' & 'absoluteMarker'.
insertClip also returns an object so you can rename it or move it around etc.

Code: Select all (#)

// Insert Bars/Beats Marker Clip
var clip = Tracktion.insertClip ('barsBeatsMarker');
Tracktion.setName (clip, "Hello world!");
I defined macros for both marker types:
Tracktion.insertClip ('barsBeatsMarker');
Tracktion.insertClip ('absoluteMarker');
Both create a B&B-marker.
What are the Codes for a TC-marker and a Wave-File marker Could anybody help?

Post

This looks like a bug. I can't think of an easy work around at the moment but will add it to the bug tracker.

Post

whyterabbyt wrote: Wed Aug 29, 2018 11:46 am
dRowAudio wrote:
Rock wrote:Does something like Tracktion.isArmed or Tracktion.isRecordEnabled exist? Is there another way of determining if a track is record enabled? If there is no way, please add.
Currently no, and because these properties are stored in a different part of the Edit, not with the track node, there's no way to get them using the raw tree object.

I've added them to the list of scripts to add but we're finalising a new release at the moment so are unlike to get added in the next few weeks. Hopefully soon after that though.
Bump from 2017. Querying stuff is good....
Sorry, we're absolutely swamped at the moment. I don't know when we'll get a chance to add this but I would certainly like to...

Post

Any chance this topic could become a “sticky”?
iMacPro 1,1 | 64gb | OSX 10.15.7
http://www.gesslr.com
http://www.storyaudio.com

Post

• Tracktion.armSelectedTracks(); (to work like Tracktion.soloSelectedTracks() Perhaps a way to also get the status.

• I tried to create a macro to name each track after its input, but there seems to be no way to get the input names.
_______________________________________________________
As a related suggestion. Please include %input% as a variable for auto-naming clip files.

For example currently the default is: %projectdir%\%edit%_%track%_Take_%take%
_______________________________________________________

Post

I was looking at this to see if there was some way to automate transient marker insertion. Seems there's only getTransients and scroll to transient, but not insert marker. Am I missing something, or is this the case?

Post Reply

Return to “Tracktion”