Generate Menu

From Audacity Development Manual
Revision as of 17:23, 22 December 2012 by PeterSampson (talk | contribs) (providing a bit more visual emphasis for the link to the examples page)
Jump to: navigation, search
Peter 10Dec12: I have moved the long discussion ednotes to the Talk page.
  • ToDo ready for editorial review and merciless editing.
  • I do wonder if we should move the Usage&Examples section up to the top before the "Built-in Generators", I think I'd prefer it there - thoughts?
    • Ed 10 December 2012I would move it to the top.
      • Peter 10Dec12: Done - I moved it to the top - much better there imo.
  • Peter 11Dec12: I added back a little more text into the "Usage and Examples" section for greater readability and clarity. I know it repeats material that is in the linked-to page - but I think it bears that repetition.
  • Peter 14Dec12:OK, as suggested by Gale, I've moved back the entire usage section to this page. But in so doing I have changed the formatting to give more consistency with the documentation of parameters in Effects and Analyzers by giving them an H3 heading. I also lifted Amplitude to come before duration as that is the ordering encountered in the generators.

Menu Générer

The items in the Generate menu create new audio containing tones, noise or silence. Generate at a cursor position to insert the new audio and extend the track or with a selection to replace that selection with the newly generated audio. Although, by default, no keyboard shortcuts are provided for the generators, it is possible to set up your own shortcut for any Generate command; for instructions on this please see Keyboard Preferences.

Using Audacity's Generators

  • Generate audio into a new track: If there are no existing tracks, choose the required generator. If there are existing tracks, click outside the tracks (in the gray background) to deselect them, then Generate.
  • Insert generated audio at the cursor position: Place the cursor in the track then Generate. The specified duration of audio will be inserted into the selected tracks at the cursor position extending the length of the selected track(s).
  • Replace an existing selection with generated audio: Select the region then Generate. The selected region(s) will be replaced with the generated audio; the total length of the selected tracks will remain the same, unless you change the length in the generator to replace the selection with a longer or shorter one.
Having placed the cursor or selected the region, there are several ways to select extra tracks so as to generate into those at the same time. The simplest method is to hold down SHIFT then use UP or DOWN arrow on the keyboard. See Audacity Selection for more details.

Amplitude

All generators (except of course Silence) let you type in an amplitude value to set the loudness of the generated audio. Permitted values are between 0 (silence) and 1 (the maximum possible volume without clipping), with a default of 0.8.

Duration

Type (or use the keyboard arrows) to enter the required Duration. If the first digit you want is highlighted, just type the whole number. If the required first digit is not highlighted, use LEFT or RIGHT arrow on your keyboard to move to the first digit, then type. You can also increment a highlighted digit with keyboard UP or DOWN arrow instead of typing.

Gale 13Dec12: Text about images in below div commented out, but we do need one or two images here.
  • If there is no audio selection, Duration initializes to 30.000 seconds except for the DTMF generator which defaults to 1.000 second. However, your last entered Duration is always remembered.
  • If there is selected audio, the generator always displays the exact duration of that selection to the nearest audio sample.

Selection Format for Duration

Whether generating in a selection or not, you can change the Selection Format to another unit of Duration so that the generation will be in those units. To do this, open the context menu by clicking the triangle to right of the digits. You can also open the menu by hovering over or selecting in the Duration digits, then right-clicking or using a keyboard equivalent.

Examples of Generator Usage

See this page in the manual for some examples using the Audacity generators.


Built-in Generators

Chirp...

Chirp generator dialog

Produces four different types of tones like the Tone Generator but additionally allows setting of the start and end amplitude and frequency. Short tones can be made to sound very much like a bird-call. As with Tone, frequencies can be specified anywhere between 1 Hz and half the current project rate shown in the Selection Toolbar.

DTMF Tones...

DTMF tone generator dialog

Generates dual-tone multi-frequency (DTMF) tones like those produced by the keypad on telephones. Enter numbers from 0 to 9, lower case letters from a to z, and the * and # characters. You can also enter the four "priority" tones used by the US Military (upper case A, B, C and D). As with most of the generators you can choose the amplitude and overall duration of the sequence. Use the slider to select the ratio between the length of each tone in the series and the length of the silences between them. This ratio is displayed underneath the slider as the "duty cycle" along with the resulting duration of each tone and silence. For example, if you create four tones in a sequence lasting four seconds, with a duty cycle of 50%, the four tones and the three silences between them will all be the same length (571 milliseconds).

Noise...

Noise generator dialog

Choose amplitude and one of three different "colors" of noise. White noise is that which has the greatest ability to mask other sounds, as it has similar energy at all frequency levels. Pink noise and brown noise both have more energy at lower frequencies, especially brown noise, which has the most muffled, low pitched sound of the three types.

Silence...

Silence generator dialog, as it would appear if a region of just under 4.5 seconds had been selected at 44100 Hz project rate

Creates audio of zero amplitude, the only configurable setting being duration. When applied to an audio selection, the result is identical to Edit > Remove Audio > Silence Audio.

Steve 15Nov12: Is the default "units" for "Generate > Silence" hh:mm:ss_milliseconds? The image shows hh:mm:ss+samples.
  • Peter 15Nov12: Certainly the other examples shown on this page use hh:mm:ss_milliseconds for their units.
  • Gale15Nov12: You are not RTFM :=) "If there is selected audio, the generator always displays the exact duration of that selection to the nearest audio sample, as in the Silence Generator image below." I've tried putting that in a note div now. This information is also in the image hover text.
  • Steve 11Dec12: Even with the hover text, it strikes me as odd and inconsistent that the other generators show default settings when there is no selection, and the hover text says "Noise generator dialogue", "DTMF Tone generator dialogue" and so on rather than a full sentence explaining what action is being performed.
    • Peter 11Dec12: Connie certainly stipulates that default settings (W7 Basic theme) should be used for images. But I think Gale's point here is that the "default" behaviour changes depending whether or not audio is selected.
  • Gale 13Dec12: ToDo-2 Yes that's the point, but unfortunately the div that explained that has been moved to Generators - Usage and Examples... The hover text can be expanded for the other images here, but we still need to say something in the main text about this (for those who do not read the hover text).
    • Steve 13Dec12:Perhaps it would be best to add a second image for "Chirp" with an explanation of the default duration (and that this applies to all built in generators), then replace the "Silence" image with one that is the same as all of the others. Sorry, I can't do Win 7 images.
      • Peter 17Dec12:I moved that div explanation, along withn the Generator Usage, back to this page a couple of days ago so should be clear enough now. Only the Examples are currently on their own page.

Tone...

Tone generator dialog

Choose one of four different tone waveforms: Sine, Square, Sawtooth or Square (no alias), set amplitude and a frequency between 1 Hz and half the current project rate (as shown in the Selection Toolbar). One half is chosen because a given sample rate can only carry frequencies up to half that rate. Although frequencies above 20000 Hz cannot be heard by most humans, generating at up to half the sample rate (22050 Hz at Audacity's default 44100 Hz) can have scientific uses, for example in measuring impulse responses. Note that creating tones at or close to half a given sample rate may (correctly) generate either silence or a pulsing rather than steady tone, according to the type of waveform chosen.


Plug-in Generators

Any additional generators which appear underneath the menu divider are Nyquist or LADSPA plug-ins. Audacity includes the following three Nyquist generators, but more are available on Download Nyquist Plug-ins on our Wiki.

Nyquist generators do not take the length of any selected audio as the length of the audio to be generated. Instead, specify the length required in the appropriate input field(s) of the plug-in. Any selected audio will be replaced by the length of audio specified in the plug-in, thus the total length of the track(s) will change unless the selected and specified lengths are identical.
Ed 10Dec12: In re: "do not take the length of any selected audio…" what is the situation with LADSPA?
  • Steve 11Dec12: On Linux, LADSPA generate plug-ins generally have a duration slider that is set by default to the current selection length or to 30 seconds if there is no selection. However, if there is a selection, then most LADSPA generators fail and produce nothing or cause Audacity to crash.

Ed 10Dec12: In the descriptions of the following three Generators we follow the section titles (Click Track…, Plucky… & Risset Drum…) with a sentence fragment whose first word is capitalized. I feel uncomfortable with the sentence fragments.

  • Peter 11Dec: I'm not entirely comfortable either (though I have got used to it) - but Connie prefers it that way & (oops sorry "and") she's a hard task-mistress!

Click Track...

Generates a track with regularly spaced sounds at a specified tempo and number of beats per measure (bar). This can be used like a metronome for setting a pulse to record against.

Pluck...

A synthesized pluck tone with abrupt or gradual fade-out, and selectable pitch corresponding to a MIDI note.

Risset Drum...

Produces a realistic drum sound consisting of a sine wave ring-modulated by narrow band noise, an enharmonic tone and a relatively strong sine wave at the fundamental.