Pause Macro for User Input

Happy Thanksgiving!

I was wondering if it’s possible to include a “Pause” option during Macro execution so that when you come to an effect that requires user input, like Noise Reduction, or Punch-Copy/Paste (and maybe more), the user can enter the required information and then resume the Macro?

Otherwise it may require two separate Macros to complete a process.

Not a big deal - just wondering.

Thanks,

Mike

Some Macro commands do pause for user input. For example there is a command “Open:” (which presents a standard dialog box where you can select either audio files, a list of files (.LOF) or an Audacity Project file to open). However, that defeats the point of Macros, which is to run a list of commands without additional user input. Most of the commands that require user input are excluded from the “Macros…” interface, but they are still available by manually editing the Macro “.txt” file. The full list of commands is here in the manual: https://manual.audacityteam.org/man/scripting_reference.html

Win10/Audacity 3.1.3
I am still getting my head around this philosophy of “Audacity Macros”, and I am trying NOT to be my naturally obstreperous self.
I have problems with the logic of statements like this.

(1) “… the point of Macros, which is to run a list of commands without additional user input …”
I have never, as a programmer, thought that a macro/subroutine/batch file/function and so on, in any of the programming and operating system languages I have used (going back to the ICL-1900 series GEORGE3 operating system) should not permit interaction with a user.
If the user is not present or declines to provide input, go with a default value or cancel the rum.

It is not at all clear to me why a computer system should tell a human what can be done; I mean in the philosophical sense. If I - as a program/macro designer - decide that there is a need for user intervention, I ought to be able to make use of the computer platform’s (obvious) ability to provide the interface for that user intervention.

(2) I think I am strongly supported in this by the accompanying statement " Most of the commands that require user input are excluded from the “Macros…” interface, but they are still available by manually editing the Macro “.txt” file’, which, me being me, I have now done!

So I have created a macro that solicits user input even though the command is excluded from the Tools, Macro, New, Insert list of commands. (OK, I am a bit ticked off after spending time picking carefully over the entrails of that box for File/Open/Import and the like!)

I have an audacity macro which solicits input from the user.
How can that ever be reconciled with the point of Macros, which is to run a list of commands without additional user input?
(We need a smiley icon for some old geezer scratching his already-bald head).

As you (all) might suspect, I am going ahead with leaps and bounds and am just this far from a super DOS batch file which, for any WAV chapter of a book, will assemble a larger WAV file with the prefix AND suffix WAV files embracing the chapter WAV file AND a 1-second silence at the front AND a 5-second silence at the end, all thanks to Audacity macros. I can’t recall ever being this happy in my life.
Or, at times, as puzzled.

I keep in mind that Audacity is an Open Source project and is staffed and built by volunteers who are keen to maintain and enhance the program.
I am just as keen to maintain my sanity!
With warmest thoughts
Chris

Audacity Macros are not really a programming language. Audacity Macros are just a simple list of commands. If you want programming features, you will need to use a programming language.


As you are on Windows, I assume that you are familiar with Windows “NotePad”.
Can you edit audio with NotePad?
Do you feel that it’s “wrong” that you can’t edit audio with NotePad, or do you just accept that you need to use the right tool for the job?

Hi again Steve. I understand and accept that Audacity macros do not have Conditional Statements (If/Then/Else), or Iterative statments (FOR/DO loops), and that for that capability I will need to look at Nyquist; still on my list!
But my point here is not about whether Audacity is/not a programming language, as much as glaring inconsistencies in the features offered and not offered by Audacity, at least through the eyes of a still-wet-behind-the-ears newcomer.

My point is not the capability of the Macros system, but its inconsistencies.


Timely that you should mention it. I have this afternoon made two proposals (different boards) about using the “.LOG” feature of Notepad for billing records, something I have been using since around 1990.

The inconsistencies I see are that
(1) Interactive commands are not allowed in a macro via the Tools, Macro interface because “you can’t have interactive commands in a macro”, but
(2) Interactive commands are allowed in a macro, as long as you use Notepad to edit the text file.

That said (phew!) I must thank you again for your guidance. This afternoon I completed Assemble all Chapters of a Book

A major step. I have a BATch file and an Audacity macro to assemble all chapters of a book.

(1) Suppose a project folder such as “L:\Henry Lawson**S**hort **S**tories in **P**rose and **V**erse” populated with seventeen chapters identified by number “SSPOV_01.wav”, “SSPOV_02.wav”, “SSPOV_03.wav” representing individually recorded chapters and another series “SSPOV_01_Preface.wav” etc and “SSPOV_01_Suffix.wav” which were recorded in a single session with a slightly different tone from the text of the chapters.

(2) Suppose a DOS batch file which can process each triplet of files (“SSPOV_01_Preface.wav”, “SSPOV_01.wav”, “SSPOV_01_Suffix.wav” and offer them up to Audacity 3.1.3

(3) Suppose a single Audacity macro which can assemble three prepared WAV files to a single WAV file; pre/appends silences, and then export as an MP3 file.
Then we can assemble the component files of a book in about five minutes, almost all of it automatic, and hence error-free, and it is usually elimination of errors in processing that saves us the most time.

I have just finished working on a group project with 107 “chapters”, and my chapters averaged around 20 pages each.
I have yet to document the system but once that is done I can post it here for critical review :smiley:

I have found a few more puzzles along this path, but will post them in a new topic, after I have searched the forum to see if they have already been reported.
Thanks again for you presence and guidance.
Chris