It’s embarrassing to be hung up on something so seemingly simple. All I want to do is start at the first track, perform an operation on the clip, move to the next track, perform and operation on the clip, etc…
Move Focus to First Track
Cursor to Track Start
Select Cursor to Track End
(perform operations)
Move Focus to Next Track
Cursor to Track Start
Select Cursor to Track End
(perform operations)
What happens is all the operations get performed on the single clip in the track where my cursor happens to have last clicked on. (if my cursor is in the fourth track, all the operations are done on that fourth track) Apparently putting ‘focus’ on a track is not enough. You apparently have to ‘select’ that track? Then the cursor goes to the start of the track with focus?
The documentation for Scripting commands is largely generated automatically. Additional documentation written by a human would be a beneficial. Note that @waxcylinder is a volunteer contributor, and now that Audacity is owned by a commercial company, responsibility for providing documentation lies with the Audacity Team management.
For many years I too was mightily puzzled as to the difference between “Selection” and “Focus”.
But I always knew that Selection was what one needed for most operations (same is true in other
audio and video editors I use, along with Word and Excel) - and that Focus was somewhat secondary
and limited in its scope.
This is clearly linked two from the custom TOC (Table Of Contents on the page.
Personally I have never found Focus to be any use at all (but apparently it can be of use to VI users
though how they see the yellow border is a mystery to me). I would actually prefer it if we didn’t have the
concept of focus - but I don’t think it will go way anytime soon if ever.
Obviously from :@jademan 's post some users can still get confused thinking that focus is more powerful
and useful than its limited use is. So I can consider adding a Tip div in the Macros (and maybe Scripting)
documentation re the importance of selection - and add a link to the above section on the selecting
audio page.
But remember that Macros and in particular Scripting are somewhat advanced features of Audacity and
are really intended for experienced and knowledgeable users - and one would reasonably expect such
users to understand the need for, and the uses of selection as it is fundamental to the use of Audacity.
If I understand correctly Muse’s long term plan is to have all the uses of Audacity stuff moved over into their GitHub book, their “Support” site:
Some things have already been moved there from the manual, for example FFmpeg installation.
This will leave the Manual ultimately as a pure reference manual describing the various menu items, prefs setting and effects etc. This is why I restructured the Manual a few releases ago so the the old fromt page eas divided into three sections:
The Reference section - this acts as the landing page
How to use Audacity
Tutorials for Audacity.
I, as a part time volunteer, endeavour to keep the Manual as up to date as possible - but I suspect that once the GUI changes with the Qt conversion I am likely to be unable to keep up with such major changes (I struggled recently with the Export dialog changes needed for the upcoming 3.4.0 as that involved editing a very large number of pages).
All looks clear to me on all three pages with regard to selection
The underlying problem is that some users can get confused between “selection” and “ficus” - but I find it hard ti mitigate that - - nor can I make users RTFM
When the Parameter description says " (default:unchanged) ", I think what it really means is: “Not changed by the code that calls the command”.
If we take a fictitious command as an example, let’s call it “Foo”, and it takes one optional argument “Bar”, then the auto-generated documentation might say:
Scripting Id __ Action _________ Parameters ______ Foo: ____ Does foo. ____ bool Bar (default:unchanged)
We might assume that if Bar is not enabled, then whatever Barwould effect if Bar were used, is not changed.
Unfortunately that may not be the actual case.
Even though the scripting command ignores Bar when Bar is not enabled, the actual behaviour depends on the default behaviour of Foo (the command that runs when calling the scripting command Foo:).
The act of calling the scripting command Select: without enabling the Track parameter, falls back to the default behaviour of the “Select” code, and the default behaviour is that it applies the selection to the first track.
The wiki script that automates the documentation does not know the implementation details of the commands in Audacity, so when a parameter is ignored, it assumes that the thing that the parameter refers to will be “unchanged”. Due to implementation details in Audacity, that may not be the case - the actual effect depends on how the command is implemented in Audacity.
Another change that could be made is to change the name of the “Toggle Focused Track” command to “Select(Unselect) Focused Track”. Perhaps this should be an Enhancement request.
I have worked through all three Macros pages in the 3.4.0 alpha manual and bolded references to “Selecting” where I think appropriate - and helpful (where they may aid understanding). And in most cases added links to the Selecting Audio page.
I have also tweaked a few bits of page layout to make the reading a little more digestible.
Thanks for starting this topic. I went through the thread, but unable to discern / infer (from the posts) whether you were able to write a macro for doing this.
I am quite interested in the solution as-is as well as using it as a seed for building on it for other similar functions.
My first plan was to go to the first track, perform operations, go to second track, perform operations, go to third track…. Etc., etc.
01 Select Tracks Mode=”Set” Track=”0” TrackCount=”1”
02 Select Track Start to End
03 (Perform your operations)
: (Perform your operations)
: (etc.)
0x
10 Select Tracks Mode=”Set” Track=”1” TrackCount=”1”
11 Select Track Start to End
12 (Perform your operations)
Note how Track=”increments from 0 (first track), to 1 (second track), to etc…”
While this worked it was cumbersome. Looping is not available, condition checks (are you at last track?) is not available…. Etc.
So, what I elected to do was import one track at a time, do my work, then export that track and import the next.
01 Select Track Start to End
02 Stereo To Mono
03 thru 0x Filter Curves, Normalize, etc. etc.
:
:
11 Export as WAV
12 -END-
With your MACRO Manager open you select your Macro then at the bottom of the MACRO Manager there is a button labled ‘Files…’. Open it, select the audio files you want to work on, select ‘Open’ and Audacity sucks in the first file, operates on it and ‘Exports’ the result. Then, sucks in the second file, operates on it and saves the result. Then, …… etc.
Using this method I finished over 700 audio files in a little over two hours.