Macros

From Audacity Development Manual
Revision as of 13:05, 20 February 2013 by PeterSampson (talk | contribs) (Apply Chain: trying to make the initial sentence a little clearer)
Jump to: navigation, search
Gale 13Feb13: ToDo-2 Although clearly this is much better than before, equally clearly there are still debates about the manner of presentation of this landing page and how much complexity it should have. So it is hardly finished.


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 show the existing chains.Select one of them by using the cursor or the up/down arrows, then either:

  • choose Apply to Current Project to run the Chain on the entire project in the current window or
  • choose Apply to Files to run the Chain on selected external audio files in a single directory
Apply Chain dialog box
Accessed by: File > Apply Chain...
Advice If you already have audio in the current project window, you must save and close that project using File > Close before applying a Chain to files.
Gale 16Feb13: I still prefer my more concise version of this section which avoids repetition. And I prefer to tell user to save and close (which is what the Audacity message box says) not just say "must be empty".
  • Ed 16Feb13: Gale's version works for me with a few tiny exceptions.
  1. I feel the first sentence is too concise; I believe that since this is a headed section the first sentence should go a little more toward "tell them what we are going to tell them". A judicious melding of my first sentence and his seems in order.
  2. Since the picture has no referent and is really only there for its artistic merit it should go below the advice div.
  3. I still believe that this is the place for a nonstandard set of pictures and offer two (see my post on Forum Crew) just as food for thought. The current Edit Chains image is just too wide; careful photoshopping can tighten up the spacing between the buttons; this is also a chance to add non-shipped chains. Note that I have intentionally chosen a non-standard color scheme as a visual clue that these are nonstandard images; we would also make a note of this in the text; I would propose an addition to Connie making this (or something similar) the consistent method for visually contrasting nonstandard images.

For more details see the Apply Chain page.

Chain Examples

In this section we look at a couple of examples of how a Chain might be used. In the image below 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: LoudMP3

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: NR&EQ

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)
  • Gale 19Feb13: I think this works quite well, Peter. On balance I think I prefer Examples in a note div, because most of our examples are such, and because it breaks up what is becoming a long page of undifferentiated white. I tried this, anyway. If not, I think some kind of visual differentiation is needed to show that this is an examples section. Put "Example 1" and "Example 2" in a note div? Put the images in a note div?

    I wonder if the image in Example 2 should be of a window expanded to the same width as the image in Example 1? I think it would look better, in spite of the wasted space in the window (otherwise, it's "wasted" on the page and doesn't look any better for it).

    Also since we have named the example Chains, how about giving that name in the examples. This makes it clearer, given we don't show the Chains window in the examples.

  • Peter 19Feb13:I'm quite happy with the two examples in two different note divs. I extended the NR&EQ image to have the same width as the LoudMp3. And I added the Chain names to the H3 titles. A good day in the sand-pit methinks :-))