I discovered a bug in this plugin: Example…
I use Audacity a lot for normalizing samples, so the steps are:
Normalize a batch of them
Since some samples don’t sound as long as others, their files are of course shorter than those of bass notes.
The regular “normalize” in Audacity does it properly: some note files are longer/shorter than others.
However, when using the RMS plugin, then exporting multiple, ALL the files come out at the same
length, this length being that of the LONGEST sounding files. Thus, much disk space is wasted, for sample
files that should be (e.g.) 8 seconds in length all turn out to be MUCH longer; the folder shows that each and every file is exactly the same length.
Just thought I’d point this out, to include in your “bug” list.
Hi David. This is due to a limitation in “Nyquist plug-ins” and applies to all Nyquist plug-ins.
Nyquist plug-ins process the entire “selection”, regardless of whether the selection contains audio or not. If the audio track selection includes “empty space”, then Nyquist sees that as “silence” and processes it accordingly. The reason that you are getting tracks padded with silence at the end is because you are using a selection that goes beyond the end of the audio, and then applying a Nyquist plug-in to the selection.
Yes that’s possible. In fact there are two ways, depending on whether you are writing a “Nyquist Effect” or a “Nyquist Macro”.
There’s an important distinction between “Nyquist Effects” and “Nyquist Macros”. In the former type, it is Nyquist that modifies the project. In the latter, it is Audacity’s “Scripting” commands that modify the project. You should only use one or the other. Attempting to combine the two will lead to unexpected problems.
For Nyquist Effects, so long as there are less than 1000 audio clips in a track, you can get a list of start and end times of each clip with:
(get 'track 'clips)
And, just to be clear, then, Nyquist Macros are scriptable, have functions, and allow you to create loops and logical (if/then) branches?
I ask this, because I’ve tried the “Macros…” tool — which allows you visually to enter a batch of practical steps into a single laundry list.
"Tools:Apply Macro" will then apply these, in strict sequence, to a single Audacity selection:
• when Audacity gets to the bottom of that list, it stops;
• you can’t, say, test for the number of tracks and tell it to run the same list n times - track by track;
• you can’t check the name of each track and modify that automatically to name a duplicate track for export.
But do I understand this is not “Nyquist Macros” — nor are the routines of “(aud do… )” statements used by Nyquist Effects plugins?
— That there is actually now a third option, called “Nyquist Macros”?
When I start to wrap my brain around Nyquist Macros, will it be through typing instructions into routines that may include variables, functions, loops, branches and other logical programming features?
If so where would I enter those instructions:
— into the Nyquist prompt?
— into my own .txt file to save and upload?
— some other way?
Sorry that this is digressing a little from the original request.
Exactly so. A “normal” Macro is, as you say, a simple laundry list that runs top to bottom, then stops.
“AUD-DO” is a special Nyquist command, which sends a “Scripting command” to Audacity.
In a (normal) “Macro”, you might have a Scripting command:
In Nyquist, we can send that exact same command via AUD-DO:
(aud-do "Select:Start=0 End=1")
The simplest way to run Nyquist (including “Nyquist Macros”) is via the Nyquist Prompt. This is particularly useful when working out (developing) the code, and when working with very simple scripts.
The Nyquist Prompt becomes a bit cumbersome when dealing with more complex Nyquist programs (lots of typing), and it’s not convenient for Nyquist programs that you want to use frequently. This is where “Nyquist Plug-ins” come in.
A “Nyquist Plug-in” is simply a Nyquist program that can be installed into Audacity (like the “High Pass Filter” effect, or any of these Nyquist plug-ins: Missing features - Audacity Support
To create a “Nyquist Plug-in”, you write your Nyquist program as a plain text file, add the required “headers”, and change the file extension from “.txt” to “.ny”.
A Nyquist script that may be run in the Nyquist Prompt:
(mult 0.5 (noise))
The above code will generate white noise into the selection, and amplify (multiply) it to half height (-6 dB).
A “Nyquist plug-in” that does exactly the same thing:
I have attached what is coming up every time I try to pass the ACX requirements. I’m having a hard time getting the RMS levels correct. It says they are under. How can I bring them up, without bringing everything else out of whack?
Normalize the RMS so that it is within the required range (I’d suggest -21 dB).
The peak level will probably then be too high, so use the Limiter effect to bring the peaks down (Limiter - Audacity Manual)
I’d suggest using the default settings except for “Limit to (dB)” which I’d suggest setting a little below -3dB, say -3.2 dB.
The noise floor shown by ACX Check is too low. ACX say there should be consistent “room tone” during gaps. You’ve got deathly silence rather than room tone.
The posted suite guarantees Peak and RMS. The only variable after that is background noise or Room Tone.
That will just get you past the AC Robot which checks technical specifications similar to ACX Check. You also have to pass Human Quality Control where a real human listens for theater problems such as chapter matching, stuttering and wet mouth noises.
Thanks once again, Steve, for a full and comprehensive reply above.
Sorry to have been so long getting back to it.
I am still not entirely clear, though about Nyquist, “Nyquist Macros,” and “Scripting Commands.”
I feel I must still be misunderstanding something fundamental here.
What I gather is that Nyquist is not Audacity and Audacity is not Nyquist; the latter has been constructed in order to make use of the former.
Is there, perhaps, some special Nyquist language application — perhaps complete with coding/editing facility — that I could choose to run, separate from Audacity, that would then pipe instructions to Audacity via “Aud-Do”?
If I write code in a plain text file and either copy it into the Nyquist Prompt, or upload it as a plug-in, is that what you’d call a “Nyquist Macro” (as opposed to “pure” Nyquist)?
Am I right that such a “Nyquist Macro” routine or plug-in would not require “Aud-Do” at the beginning of each statement?
Would such a Nyquist Macro routine allow me, for example, to check the name of the selected track, then export the selection as a sound file with the name, say, “trackNameString_1.mp3” ?
If so, how do I come by a detailed description of Nyquist language, commands and functions — with especial reference to those which apply to Audacity?
Forgive me. I know that I am asking this question in the wrong place. I would be very happy to ask it somewhere else if you have a better idea under which category/ies to file it?
Nyquist is a programming language for audio, and is available separately from Audacity: Nyquist Info
(Nyquist was created by Roger Dannenberg, who is also one of the co-founders of Audacity).
Nyquist was shoehorned into Audacity in a very early Audacity release (I’m unsure which version) and has been included with Audacity ever since.
Some of the points below are quite “technical” and are not really necessary for normal use of Nyquist or Audacity. (You don’t need a mechanic’s understanding of how cars work to drive a car).
I’m not sure if it’s possible to pipe commands from the stand alone version of Nyquist. That’s an academic question, as Nyquist in Audacity does not need to “pipe” commands to Audacity. The version of Nyquist built into Audacity is a “shared library” rather than a stand alone application. As a shared library, it is plugged into Audacity’s data structures.
It is possible to “pipe” commands to Audacity from other languages (such as Python). The language must support a feature called “named pipes” (Named pipe - Wikipedia).
That’s the basic mechanism for passing “Scripting” commands from Nyquist to Audacity.
Nyquist sends “Macro Scripting” commands to Audacity using the Nyquist function “aud-do”.
The “aud-do” command takes one argument (one “parameter”) which is the “Macro Scripting command”.
In the next Audacity release, there is an alternative way to pass scripting commands from Nyquist to Audacity, via a bunch of new Nyquist functions. I’m in the process of documenting this now.
If the code uses “Macro Scripting” commands to modify the Audacity project, then we call it a “Nyquist Macro”.
If the code uses only normal Nyquist commands to modify the project, then we call it a “Nyquist Script” (when run in the Nyquist Prompt), or a “Nyquist Plug-in” (when installed as a plug-in).
“Nyquist Macros” are usually “tool” type plug-ins, and appear in Audacity’s “Tools” menu. There are exceptions to this, but it is generally the case.
Yes, that’s possible with a Nyquist Macro.
It is also “possible” with just normal Nyquist, but is somewhat easier with a Nyquist Macro.