Macros Examples
This page provides some examples of how the Macros feature in Audacity can be used.
Last updated
This page provides some examples of how the Macros feature in Audacity can be used.
Last updated
© Muse Group & contributors. Contents licensed under the Creative Commons-Attribution 4.0 license.
A batch processing Macro to compress and normalize WAV files then convert them to MP3:
Insert Compressor to reduce the dynamic range of each WAV, also normalizing them to maximum amplitude of 0 dB
Insert Export as MP3 to convert them to MP3 format
Click Apply Macro to: Files... to select the files on which to run the Macro.
Click OK to close the Manage Macros window
Alternatively you can choose Tools > Apply Macro..., select the Loud MP3 Macro then click Apply Macro to: Files... where you can select the files on which to run the Macro
An effects automation Macro for the current project that applies noise reduction and equalization:
Insert Normalize with settings of:
Remove any DC offset
-10 dB (to allow for boosting frequencies later in the Macro without clipping)
Insert Noise Reduction
Insert Filter Curve EQ (to perform the frequency adjustment)
Insert another Normalize at different settings (without offset removal, setting a final amplitude of -1 dB)
Click OK to close the Manage Macros window
When later needed in your workflow, choose Tools > Apply Macro..., select the NR&EQ Macro then click Apply Macro to: Project to apply the Macro to the selected track(s) in the current project window.
If a Noise Profile exists, that Noise Profile will be used. It is often best to capture a suitable Noise Profile before running a Macro.
If a Noise Profile does not exist:
If the Macro is applied to the current project (as above), the current selection is used to create the Noise Profile. Therefore, other effect commands in the Macro will also only apply to that selection. If an export command is added, the entire file will be exported.
If the Macro is applied to files, the first file (all of it) is used to create the Noise Profile. It may be useful to prepare a file containing a suitable Noise Profile and name it so that it is alphabetically the first file of those to be run in the Macro.
The Select command with 'Relative To=Selection' can be used to extend and contract a selection.
Command: "Select: RelativeTo=Selection Start=-1 End=1" Description: This command expands a selection by two seconds
Command: "Select: RelativeTo=Selection Start=1 End=-1" Description: This command contracts a selection by two seconds
Command: "Select: RelativeTo=Selection Start=1 End=1" Description: This command moves a selection right by one second
Command: "SelTrackStartToEnd" Description: This command (from Select > Region > Track Start to End) Selects all audio in all selected tracks.
Command: "SelNextClip" and "SelPrevClip" Description: These commands are useful with Clips
This Macro takes a single mono track, and converts it to a stereo track, with one channel a spectrogram and the other a wave.
It is one example of how to creatively abuse the Macro system, since audacity is not set up to handle mixed views on wave tracks.
Note the use of a TrackCount of 0.5 to select just one of two channels in a stereo track.
The TrackCount of 0 is used to unselect all tracks.
With normal project rate of 44100Hz, this selects about 126 samples centered on the cursor, and applies the 'Repair' effect to it. 'Repair' can only handle up to 128 samples.