User:PeterSampson/Sand-Box

From Audacity Development Manual
Jump to: navigation, search

My experimentation page

Sand-Box for when I have to make tricksy edits.

Chains - for batch processing and effects automation

FrenchFlagSmall.png Procesamiento en lotes Stapelverarbeitung

A Chain is a sequence of preconfigured commands in a set order (mainly effects) that can be applied automatically to projects or audio files. Any built-in or Nyquist effect shown in the Effect Menu and export commands can be added to a Chain.

How to use Chains

There are two related Chain commands in the File Menu called Edit Chains and Apply Chain. Look first at Edit Chains to determine if an existing Chain (Audacity only ships with one) will suit your needs or to create a new chain. Next, use Apply Chain to perform the action on your selected audio.

The two uses of Chains are for:

  • Batch processing (where many audio files are processed unattended with one or more effects then saved to a new file)
  • Effects automation (where the track or tracks in the current project are subjected to the same prescribed sequence of effects, and optionally, a file exported).

See the examples below.


Edit Chains

Use File > Edit Chains... if you need to create a new Chain or to edit an existing Chain.

  • The Chain can include a number of common Audacity functions and effects to be executed in any order you specify.
  • To create an audio file as part of the Chain process you must include an "Export" command (such as ExportWAV).
  • In many cases the parameters for each command in the Chain can be specified within the Edit Chains dialog.
Edit Chains dialog box
Peter 19Feb13: Note that in default display mode the "Num" column is not displayed wide enough to reveal the "Num" text. I shall be bringing this up as an issue on teh Quality list.

The left hand box in the dialog (labeled Chains) contains a list of already defined Chains. You can:

  • Use left-click (or use the Up or Down arrow on the keyboard) to select the Chain you want to work on.
  • Use the Add button to created a new Chain.
  • Delete a Chain with the Remove button.
  • Rename an existing Chain with the Rname button.
You cannot rename or delete the one chain that is provided as default MP3 Conversion, the buttons are grayed out for that Chain.

The right hand box (labeled Chain) lists the ordered sequence of commands for the Chain selected in the "Chains" box on the left. You can:

  • Add or remove commands for the selected Chain
  • Change the order in which the commands execute in the Chain
  • Edit the parameters for some effects in the Chain

For further details see the Edit Chains page.


Apply Chain

Use File > Apply Chain... to select one of the existing chains and apply it to either:

  • The project in the current window (this is essentially a method of effects automation)
or
  • A selected list of external audio files in a single directory (this is essentially an unattended batch processing of many individual items)
Apply Chain dialog box

The dialog contains the list of all your current chains.

  • Use left-click (or use the Up or Down arrow on the keyboard) to select the Chain you want to apply.
  • Then use the Apply to Current Project button for effects automation.
  • Or use the Apply to Files button to apply the selected chain to a set of files which you select for batch processing.
    • The current Audacity Project window must be empty to use the Apply to Files option.

The current Audacity Project window must be empty to use the Apply to Files option.}}

For more details see the Apply Chain page.


Sample uses of Chains

In this section we look at a couple of sample uses of chains. In the image below you can see that we have added two additional Chains. It is important to note that the only Chain that Audacity ships with is MP3 Conversion (shown as selected in blue). All other Chains must be added by the user.

Edit Chains dialog showing an example of a full dialog window with the MP3 Conversion selected and displayed


Example 1

A batch processing Chain to compress and normalize WAV files then convert them to MP3:

  1. Use Compressor to reduce the dynamic range of each WAV, also normalizing them to maximum amplitude of 0 dB
  2. ExportMP3 then converts them to MP3 format.
Edit Chains dialog showing an example of a chain for batch processing to compress and normalize then export as MP3


Example 2

An effects automation Chain for the current project that applies noise reduction and equalization:

  1. Normalize with settings of:
  2. Noise Removal
  3. Equalization (to perform the frequency adjustment)
  4. Normalize again at different settings (without offset removal, setting a final amplitude of -1 dB).
Edit Chains dialog showing an example of a chain for noise reduction and equalization


Peter 18Feb13: ToDo-1 For review. Following feedback for non-standard/non-default images that illustrate the matter more clearly, I have been experimenting with such images in the Examples note div based on the examples given. Does this help do we want to retain such images?

Now that the note div has been expanded it would proabaly work beter as an H2 headered subsection - thoughts?

  • Gale 18Feb13: I like the idea of putting non-standard images into the examples section, thus letting us keep standard images above. The only real problems are 1) that the settings for each command are not readable (at least for my eyes), which seriously detracts from having the images at all; 2) a horizontal scrollbar is introduced at 1024x768 which violates Consistency 3) the images flow outside the div; I've fixed 3) but I still don't like it. I wonder if we could show (at the actual size):
    • Just the "Chain" panel in these examples OR
    • in Example 1, the Chains panel with the Chain panel underneath it, then just the Chain panel in Example 2
    I've tried each example in its own note div and made Example 1 step like and matched its style with Example 2.
  • Peter 18Feb13: To appease older eyes (mine included) I have adjusted the images here. The LoudMP3 has been trimme to remove the left window, as the right window has to be fairly wide to show all the parameters. For the NR&EQ image I trimmed down the window size as the parameter list is shorter here. Are these any better? Any further ideas?
  • Gale 19Feb13: You could try resizing only the width, as in my image in example 1. I think that loses very little in readability, and in fact you could make it wider than that (780 px?) without bringing in the scrollbar. Also the Chains image could precede both divs with a little bit of text. That's more logical than having Chains in one div only?
  • Peter 19Feb13: A couple of good ideas there Gale.
    1. I added a full dialog window image as a starter pic - showing the default "MP Conversion" selected and displayed - with the Num column widened to show the full "Num" text - shrunk to 94% to get just under the 780 px width.
    2. For the LoudMP3 in Example 1 I retained just the right hand dialog window - expanded the "Num" column - shrunk to 94%
    3. For the NR&EQ for consistency I trimmed this just to show the right hand dialog, expanded the "num" column - retained at 100%
    4. All 3 images shrunk to smallest psoobble Audacity size without showin scrollbars.
    5. I decided that it looks beter as an H2&H3 headered section rather than placing them in notes div container(s)