• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Query armed state of selected track in multitrack?

Explorer ,
Sep 11, 2017 Sep 11, 2017

Copy link to clipboard

Copied

On my continuing quest to buld the perfect CEP Audition Punch & Roll extension, I've got a question.


I've got a full, non-destructible extension working for Punch & Roll on Audition now, which I'm planning to release on the marketplace for free. -

Adobe Audition Punch & Roll Extension - Non-Destructive - YouTube

It's a significant upgrade over my previous destructive, waveform-only version, and infinitely more reliable.

Right now, however, I have to enforce an 'only record on track 1' limitation for the extension.
The reason for this is that I have no other way to guarantee that the SELECTED track is the same track that the recording is taking place on, so trimming clips doesn't work properly if you have a different track selected than the one that is armed to record.

I currently work around this by 'shifting to previous track' multiple times before starting a punch (i.e. ensuring that track 1 is always the selected track.)
This is pretty silly, and curtails some of the more advanced use cases that folks are asking for.

So, my question(s) are relatively simple -
1) Is there a way to query whether recording is armed on the SELECTED track? I can query whether recording is enabled, but that doesn't take into account track selection - it just returns true if ANY track is armed. If I can query this, and the current selected track is not armed, I can pop a dialog saying 'nope, please select an armed track, sorry!' and prevent mishaps.

2) Can I force your track selection TO an armed track? If I can do that, I can force your track selection to the first armed track in sequence, and that similarly solves the problem.


Thanks for any help!
Travis

TOPICS
SDK

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 12, 2017 Sep 12, 2017

Copy link to clipboard

Copied

Hi,

There is currently no support to request the "armed" state of a track. Unfortunately I can't offer a workaround here.

The selection of a track can be accessed via the read/write property "selected" at the AudioTrack object.

mfg,

patrick

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 12, 2017 Sep 12, 2017

Copy link to clipboard

Copied

So, if that's the case, I can probably set up something so that you can set the desired punch track in the extension dialog, and it can ensure that it is properly selected for a punch (if you want to choose track 3 or whatever)


However, I'm having trouble sussing out the proper syntax to actually get an AudioTrack to operate on, and can't find any samples anywhere.
Also, the script dictionary doesn't show a 'selected' property for the AudioTrack object. (I see one for a Clip though, for instance) -

Is there any chance you can direct me to how I'd access the selected property on a track, to query and set it, or where I'd find documentation on doing so?

Thanks!

csGlobalInterface.evalScript('app.activeDocument.audioTracks.getAudioTrack(1).selected=1', function(result)

{

alert( result );

});

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 13, 2017 Sep 13, 2017

Copy link to clipboard

Copied

Just a little bump on this - would love to try and implement something based on selected track, but am having trouble finding information supporting the read/wright selected state -

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 13, 2017 Sep 13, 2017

Copy link to clipboard

Copied

So well, I have to apologize, I made a little mistake here.

In short, there is no 'selected' property available, though it's on the list of future improvements. I'm sorry.

However, iterating over tracks is a simple task.

E.g. iterating over all tracks (independent of the type of the track):

// prerequisite: the currently active document is a multitrack document

for (var t=0; t<app.activeDocument.audioTracks.length; t++)

{

     var track = app.activeDocument.audioTracks;

}

Iterating over all audio clip tracks:

// prerequisite: the currently active document is a multitrack document

for (var t=0; t<app.activeDocument.audioTracks.audioClipTracks.length; t++)

{

     var track = app.activeDocument.audioTracks.audioClipTracks;

}

Hope that helps.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 18, 2017 Oct 18, 2017

Copy link to clipboard

Copied

LATEST

Hi,

You probably wanna check out the latest release of Audition which comes with some small improvements in this area.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines