Javascript Macro Action Requests
- Beware the Quoth
- 35432 posts since 4 Sep, 2001 from R'lyeh Oceanic Amusement Park and Funfair
You'd need to define the expected behaviour for when there's more than one clip on a track, first.Gi.son wrote:How do the opposite? Rename tracks titles clips.
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."
"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."
- Beware the Quoth
- 35432 posts since 4 Sep, 2001 from R'lyeh Oceanic Amusement Park and Funfair
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.Gi.son wrote:I asked how to do it. Why do I need your abstruse speculation
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."
"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."
-
- KVRAF
- 2456 posts since 9 Oct, 2008 from UK
It wasn't abstruse speculation. He asked you to be specific.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
[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.
- Beware the Quoth
- 35432 posts since 4 Sep, 2001 from R'lyeh Oceanic Amusement Park and Funfair
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."
"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."
-
- KVRAF
- Topic Starter
- 1790 posts since 30 Dec, 2012
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.)
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.)
- Beware the Quoth
- 35432 posts since 4 Sep, 2001 from R'lyeh Oceanic Amusement Park and Funfair
Doh. I meant to fix that.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.
'zactly. sorta my point in not using it.(Alternatively you could use clips[0] depending on how what you want your track to be named after.)
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."
"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."
-
- KVRer
- 12 posts since 4 Dec, 2014
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 
- Beware the Quoth
- 35432 posts since 4 Sep, 2001 from R'lyeh Oceanic Amusement Park and Funfair
Sounds very abstruse to me.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
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."
"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."
-
- KVRist
- 358 posts since 3 Dec, 2004
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.
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.
- Beware the Quoth
- 35432 posts since 4 Sep, 2001 from R'lyeh Oceanic Amusement Park and Funfair
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 egKang 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.
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();
}
Code: Select all
Tracktion.delete(tracks[0])
Tracktion.delete(Tracktion.selected())
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."
"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."
- Beware the Quoth
- 35432 posts since 4 Sep, 2001 from R'lyeh Oceanic Amusement Park and Funfair
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.
(* 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."
"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."
