Javascript Macro Action Requests

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

Post

How do the opposite? Rename tracks titles clips.

Post

Gi.son wrote:How do the opposite? Rename tracks titles clips.
You'd need to define the expected behaviour for when there's more than one clip on a track, first.
An idiot on Set Theory:
"In some cases there is an object called red that contains everything that is red. In much the same way a pot is a plate."

Post

I asked how to do it. Why do I need your abstruse speculation. I import several large undivided clips on several tracks pressing Cmd

Post

Gi.son wrote:I asked how to do it. Why do I need your abstruse speculation
There's no speculation, and it was actually a remarkably simple question. Maybe you think software works by magic, but in the real world, you generally have to properly define what software should do before you can expect to define how it does so.

In this case, its pretty much a certainty that a track could contain more than one clip, so if you want code that causes the track to be renamed according to the clips on it, it'd be kind of sensible to define how it deals with that because, whether you believe it or not, it actually makes a difference to how you would do it. It could be made to use the name of the first clip on a track, or the last clip on a track, or something else.

Given that its looks fairly damn trivial to change the provided code to do what you want, but your question indicates that doing so is beyond you, its not such a leap that you wouldn't actually be able to modify any example code you were given if it didn't actually behave the way you expected, so confirming what you do expect would be kind of sensible. But Im sure that's way too 'abstruse' a concept for you.
Last edited by whyterabbyt on Tue Jul 21, 2015 10:48 pm, edited 1 time in total.
An idiot on Set Theory:
"In some cases there is an object called red that contains everything that is red. In much the same way a pot is a plate."

Post

Gi.son wrote:I asked how to do it. Why do I need your abstruse speculation. I import several large undivided clips on several tracks pressing Cmd
It wasn't abstruse speculation. He asked you to be specific.
[W10-64, T5/6/7/W8/9/10/11/12/13, 32(to W8)&64 all, Spike],[W7-32, T5/6/7/W8, Gina16] everything underused.

Post

Quick speculation on what to change inside the main for loop for one abstruse possible interpretation of an incomplete specification.

Code: Select all

{
var track = tracks[i];
var clips = Tracktion.getClipsFromTracks (track);
var clipName = Tracktion.getname(clips[clip.length]);
Tracktion.setName (track, clipName);
}
An idiot on Set Theory:
"In some cases there is an object called red that contains everything that is red. In much the same way a pot is a plate."

Post

Thank You! I'm not a programmer, I'm a musician.Please explain to me how this script is imported into Tracktion

Post

It's worth noting that some of these actions are only present in (as yet unreleased v6.2.1).

whyterabbyt's script is almost there except the 4th line would need to use clips[clip.length - 1] to avoid an array overflow.
(Alternatively you could use clips[0] depending on how what you want your track to be named after.)

Post

dRowAudio wrote:It's worth noting that some of these actions are only present in (as yet unreleased v6.2.1).

whyterabbyt's script is almost there except the 4th line would need to use clips[clip.length - 1] to avoid an array overflow.
Doh. I meant to fix that.
(Alternatively you could use clips[0] depending on how what you want your track to be named after.)
'zactly. sorta my point in not using it. ;)

so final version should be

Code: Select all

{
var track = tracks[i];
var clips = Tracktion.getClipsFromTracks (track);
var clipName = Tracktion.getname(clips[clip.length - 1]);
Tracktion.setName (track, clipName);
if (clips.length >1){
   Tracktion.setName (track, "omigod we have more than one clip, what do I do? WHAT DO I DO?");
}
An idiot on Set Theory:
"In some cases there is an object called red that contains everything that is red. In much the same way a pot is a plate."

Post

dear whyterabbyt. Tracktion I liked its flexibility in routing, virtual cables in the rack is a way to combine my creative thoughts, while not all smooth, but I'm thinking to forget about the Pro Tools, and mixing in Tracktion This very interesting for me. I not have many clips on start mixing, i have many big, solid audiofiles on everything tracks, in every projects. So important for me this script, but I'm not a programmer and unfortunately did not understand how to import it into the program :wink:

Post

Gi.son wrote:dear whyterabbyt. Tracktion I liked its flexibility in routing, virtual cables in the rack is a way to combine my creative thoughts, while not all smooth, but I'm thinking to forget about the Pro Tools, and mixing in Tracktion This very interesting for me. I not have many clips on start mixing, i have many big, solid audiofiles on everything tracks, in every projects. So important for me this script, but I'm not a programmer and unfortunately did not understand how to import it into the program :wink:
Sounds very abstruse to me.
An idiot on Set Theory:
"In some cases there is an object called red that contains everything that is red. In much the same way a pot is a plate."

Post

It is with that I started, very abstruse for you

Post

I've been enjoying these new additions. There is so much potential to speed things up even more, and I think with some practice (and thoughtful key commands) my tracking setup speed is going to be incredible.

Can someone help me with this one?

I would like to duplicate selected track, mute the duplicated track and then delete all clips from the duplicate.

Is it possible to add a modifier to a track name when duplicating? Vocal1, Vocal2, etc. If not, that would be a great addition.

Post

Kang wrote:I've been enjoying these new additions. There is so much potential to speed things up even more, and I think with some practice (and thoughtful key commands) my tracking setup speed is going to be incredible.

Can someone help me with this one?

I would like to duplicate selected track, mute the duplicated track and then delete all clips from the duplicate.

Is it possible to add a modifier to a track name when duplicating? Vocal1, Vocal2, etc. If not, that would be a great addition.
I was trying to figure this out, but couldnt quite manage. The duplicate is easy, I just can't figure out a couple of things eg

1.how to get the script to automatically select the duplicated version of the track.
2. how to delete a clip. sounds odd, but there's Tracktion.deleteSelected to delete a user-selected object, but Im either missing the syntax for deleting an enumerated object, or missing the call for making an enumerated object into the current selection.

Code: Select all

// do the duplications
Tracktion.duplicate();

//    how do I find the right track, should duplicate return an object?
//    maybe newTrack = Tracktion.duplicate();  ?
var newTrack = Tracktion.getSelectedEditElements ('track');

// do the Mute (wont work unless track is selected)
Tracktion.setMute (newTrack, true);

//delete the clips on the track (doesnt currently work)
var clips = Tracktion.getClipsFromTracks (newTrack);
for (var c = 0; c < clips.length; ++c)
   {
   // this delete doesnt seem to work
   Tracktion.deleteSelected(clips[c]);
  // and I have no way I can see of doing this
  Tracktion.selectObject(clips[c]);
  Tracktion.deleteSelected();
   }
This makes me wonder a little bit; there's calls for doing stuff to selected items, and calls for doing stuff to enumerated items, but they're not orthogonal, so for 'completeness we kind of need a way to go back and forth, or maybe a slightly different syntax eg

Code: Select all

Tracktion.delete(tracks[0])
Tracktion.delete(Tracktion.selected())
Anyways, that's just a thought.

Meanwhile, as an FR, can we get access to a track's plugin chain, so we can, for example,
check if a plugin exists in a track (and where)
insert/delete/swap a plugin on a track
move a plugin's position on a track
wrap a certain number of plugins in a track into a rack
An idiot on Set Theory:
"In some cases there is an object called red that contains everything that is red. In much the same way a pot is a plate."

Post

Another thought; there's an awful lot of 'wasted' space on my 1920x1080 laptop screen(*) for the 3/4 columns of 'context-specific' buttons/menus/options directly below the track layout. Even with Tracktion at half the width of my screen there's enough to display everything, so at twice that the buttons are just wiiiiide for its own sake.

(* and even moreso on the 2560x1440 screen on my workstation.)

So as an FR can we maybe have an extra couple of columns of buttons for selected-item context-specific custom scripts? Maybe even with some smarts for dropdown menu variations.
An idiot on Set Theory:
"In some cases there is an object called red that contains everything that is red. In much the same way a pot is a plate."

Post Reply

Return to “Tracktion”