Javascript Macro Action Requests

Discussion about: tracktion.com
dRowAudio
KVRAF
1507 posts since 30 Dec, 2012

Post Mon Jun 29, 2015 6:04 am

Hi all, we are aware everyone will be using the new Javascript macros feature in different ways and to create the behaviour you desire we will need to add new actions.

Use this thread to request actions. Please keep them brief and refrain from side discussions (you can start a new thread for these) or it's difficult to keep track of the requests.

If the action isn't self explanatory, please add a little description of how you would like it to work.
We'll do our best to add these over the coming weeks.

Thanks!

User avatar
aMUSEd
KVRAF
31144 posts since 14 Sep, 2002 from In teh net

Re: Javascript Macro Action Requests

Post Mon Jun 29, 2015 6:06 am

Make coffee

Feed the cat

User avatar
whyterabbyt
Beware the Quoth
27737 posts since 4 Sep, 2001 from R'lyeh Oceanic Amusement Park and Funfair

Re: Javascript Macro Action Requests

Post Mon Jun 29, 2015 6:10 am

Will there also be a thread for 'how do I do X in my script' or will this cover that too?
"The bearer of this signature is a genuine and authorised pope."

Kang
KVRist
211 posts since 3 Dec, 2004

Re: Javascript Macro Action Requests

Post Mon Jun 29, 2015 7:05 am

Create a track named X

Rewind X amount

Load plugin with preset X

Any of these possible?

phledo
KVRist
39 posts since 6 May, 2003 from Berlin

Re: Javascript Macro Action Requests

Post Tue Jun 30, 2015 12:35 am

Being able to use QWERTY key strokes would be nice.

Ex.1:
Set tempo for the edit

propertiesPanel ('Tempo')
qwertyKey ('tab' 'tab' 'tab' 'tab' 'tab')
qwertyWrite ('96')
qwertyKey ('enter')

Ex.2:
Rename several tracks

Select a track
qwertyKey ('tab')
qwertyWrite ('Track Name 1')
qwertyKey ('enter')
Select Item Relative: Tracktion.selectItem('down')
qwertyKey ('tab')
qwertyWrite ('Track Name 2')
qwertyKey ('enter')
Select Item Relative: Tracktion.selectItem ('down')
.
.
.
etc.

(Of course I could use an edit template instead. Anyway... :ud:
With the script I could insert a standard live drum setup into any edit and rename the tracks very quickly, for example.)

phledo
KVRist
39 posts since 6 May, 2003 from Berlin

Re: Javascript Macro Action Requests

Post Thu Jul 02, 2015 12:24 am

Render Actions!

I'd like to use some macros to render clips.
Especially: -> Render the selected clip and replace it

dRowAudio
KVRAF
1507 posts since 30 Dec, 2012

Re: Javascript Macro Action Requests

Post Thu Jul 02, 2015 3:57 am

phledo wrote:Especially: -> Render the selected clip and replace it
"Basic Actions" -> "Editing" -> "Merge Selected Clips"

phledo
KVRist
39 posts since 6 May, 2003 from Berlin

Re: Javascript Macro Action Requests

Post Thu Jul 02, 2015 1:26 pm

dRowAudio wrote:"Basic Actions" -> "Editing" -> "Merge Selected Clips"
Thanks Dave.
I wouldn't have used that command on a single clip. ;)
A couple of user definable (action) parameters before rendering would be nice, though.
"Merge Selected Clips" renders always to 32 bit stereo wav? (Unsure)

And again:
The rendered file should get the name of the clip being rendered. ;)

busywait
KVRer
28 posts since 1 Jul, 2013 from Southampton, UK

Re: Javascript Macro Action Requests

Post Thu Jul 02, 2015 1:33 pm

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() );

busywait
KVRer
28 posts since 1 Jul, 2013 from Southampton, UK

Re: Javascript Macro Action Requests

Post Thu Jul 02, 2015 1:38 pm

I would like to be able to bring a new named Edit in to focus.

Currently
Traction.showEditScreen();
exists, but it will only show the last used edit screen. I'd like to be able to referenced a named edit screen

Tracktion.showEditScreen( 'Song 2' );

Or at least add
Tracktion.nextEditScreen();

busywait
KVRer
28 posts since 1 Jul, 2013 from Southampton, UK

Re: Javascript Macro Action Requests

Post Thu Jul 02, 2015 1:39 pm

Not strictly a macro request, but I would like the MIDI Modifier plugg-in to host script so that I could modify or event generate MIDI note and CC data in Tracktion.

Rock
KVRian
1218 posts since 11 Apr, 2002 from Nashville, TN

Re: Javascript Macro Action Requests

Post Fri Jul 03, 2015 7:59 am

busywait wrote:Not strictly a macro request, but I would like the MIDI Modifier plugg-in to host script so that I could modify or event generate MIDI note and CC data in Tracktion.
I would like the inverse ability. I want the ability to trigger keystrokes and scripts and with MIDI.

dupont
KVRian
828 posts since 23 Jun, 2007

Re: Javascript Macro Action Requests

Post Fri Jul 03, 2015 10:50 pm

some midi orientated macros :

create random midi notes within a defined range
random notes velocity
delete double notes
midi data transform (aka Logic X), ex : transform note into controller datas, select note within a defined range...
Tranform a lopped midi clip into one big clip or into several clips.
Note mute/solo

Axl
KVRist
167 posts since 14 Aug, 2004

Re: Javascript Macro Action Requests

Post Sun Jul 05, 2015 8:44 am

- trigger scripts via midi commands (not an action but essential feature)
- send midi event
- set cursor position
- change step clip properties and actions like randomize and clear

dRowAudio
KVRAF
1507 posts since 30 Dec, 2012

Re: Javascript Macro Action Requests

Post Mon Jul 06, 2015 5:49 am

Kang wrote:Create a track named X

Rewind X amount

Load plugin with preset X

Any of these possible?
Hi Kang, I've just added some action to do these now. Here's what the scripts would look like:

Code: Select all

// Insert a Track Named X
var track = Tracktion.insertTrack ('audio');
Tracktion.setName (track, "New Track Name");

// Rewind X Amount
var currentPos = Tracktion.getPosition ('transport');
Tracktion.setPosition ('transport', currentPos - 10.0);
When you say "Load plugin with preset X" do you mean a named preset from the factory presets or a custom preset you have saved to the Tracktion preset library?

Return to “Tracktion”