Spectral Selection

From Audacity Development Manual
Revision as of 21:00, 20 October 2014 by Windinthew (talk | contribs) (Workaround for ALT-drag on Linux. Tapping CTRL not apparently needed on Windows (nor does Mouse Preferences say it is needed))
Jump to: navigation, search
Bill 19Oct2014: Here's a start.
  • Peter 20Oct14: And a bloomin' good start Bill for what is (for me certainly) a fiercely complex "piece of kit". I've read this page several times now and I still only have a limited grasp of what's going on - down to the complex nature of the tools rather than your explanation Bill. I think you could do with a bit more in the intro note to explain just why you might need or want to use this for - the example is a good use-case, but that's right at the end when the reader may already have felt TLDR.
    1. I made a thorough spell check with Word
    2. I added divid anchors for the H2 sections
    3. I added a link in the intro to the spectral editing H2 section.
    4. Trying out a custom TOC so the user can see what the page covers - remove it if you don't like it.
  • Peter 20Oct14 later: Bill are you planning to provide full separate pages for the spectral editing commands? If not, then this page would probably need to be renamed "Spectral Selection and Editing" or even just "Spectral Editing".

Spectral selection is used to make selections that include a frequency range as well as a time range.

Tracks must be in one of the spectrogram views in order to use spectral selection.

Spectral selection is used with special Spectral edit effects to make changes to the frequency content of the selected audio.

All of the time-based selection techniques are available when doing spectral selection.

Contents

  1. Making a Spectral Selection
  2. Adjusting a Spectral Selection
  3. Using Spectral Selection - Spectral Editing
  4. Example

Making a Spectral Selection

Gale 20Oct14: Do we need to be mention here that it is often best *not* to draw the selection in the waveform first? It's some way down the page before you find out how to preserve the time range when creating a frequency range.

Here is a track with a few seconds of speech, shown in waveform view.

Spectral 01.png

When you change the track to spectrogram view and drag a selection horizontally to define a time range, you can simultaneously drag vertically to define a frequency range within that time range. This "box" containing a combined frequency and time range is drawn in darker gray as shown below:

Gale 20Oct14 ToDo-2 "Centre" in the image text is UK English.
Spectral 02.png

A spectral selection may begin or end either at 0 Hz or at the maximum allowable frequency for the track (the Nyquist frequency), in which case no center frequency will be shown. In the illustration below the frequency selection goes from 0 Hz to about 4000 Hz.

Spectral 02a.png
  • Bill 19Oct2014: Do we need an illustration of a selection up to the Nyquist frequency? That would entail also describing zooming in spectrogram view which might be useful (but that properly belongs in Zooming I suppose.

Adjusting a Spectral Selection

Peter 20Oct14: Bill, do you think we need in the sentence below an image of the double-triangle cursor "... it changes to <image> to indicate ..."? Or do you fell that the image below is sufficient?
  • Gale 20Oct14. Made that change. Is the envelope icon photoshopped? It looks much smaller than on Windows.
    • When you drag the centre frequency in log(f) mode, should the region stay the same height e.g. if the range is 100 Hz when at the bottom of the spectrogram is the range meant to be much greater when dragged to the top?
  • Ed 20Oct14 : Audacity's image grabbing tool has the ability to capture the pointer; maybe we should include the pointer in these images where appropriate.

When you hover the mouse pointer over the center frequency line it changes to double triangle to show that the center frequency can be dragged. Click and drag to move the center frequency and the current frequency range to a new position as shown below.

Spectral 03.png

To move the upper or lower frequency boundary, hover over the boundary until the pointer changes to double triangle then click and drag.

  • Hold down the ALT key then click and drag to adjust the bandwidth of the frequency range. This moves the upper and lower frequency boundaries so they remain equally spaced around the center frequency (thus not changing the center frequency).
    • While holding ALT you can also left-click at the point to which you want to move the upper or lower frequency range, and the other boundary will also move to maintain the same distance from the center frequency.
Advice Linux users: Hold CTRL then ALT, click then you can release the CTRL key and drag.
Gale 20Oct14: Why do you have to tap the CTRL key? On Windows that makes no difference - you can just ALT and move (as Mouse Preferences says).
  • Hold down the ALT key then tap the CTRL key to move the center frequency and have it snap to frequency peaks. Note that you do not have to click and drag. Once the center frequency has snapped to where you want it you can then click and drag (while still holding down the ALT key) to adjust the upper and lower frequency boundaries.
Ed 20Oct14: we have the note div for things like the previous sentence: "Note that you do not…"; would its use here be visually intrusive? - Probably. If putting it in a div is too intrusive then it should either be a parenthetic inclusion of the previous sentence or, compounded with the following sentence - whichever is appropriate (I'm not quite sure from the context).

Using Spectral Selection - Spectral Editing

Ed 20Oct14: I'm not sure I am really fond of the wording of this section's title. IMHO "Using Spectral Selection" is redundant and the dashed phrase seems to imply that there might be some other use for Spectral Selection (whose discussion would assumedly be in a follow-on section). I propose simply "Spectral Editing" or, if we want to be more verbose, "Using Spectral Selection for Spectral Editing"
  • Ed 20Oct14 (later)  : Now I think I understand better - this is a section about using the "special" effects and has three subsections. I think the section titles should reflect that: "Using spectral editing functions" (for the main section's title); "Effect: Spectral edit multi-tool", "Effect: Spectral edit parametric EQ dialog", "Effect: Spectral edit shelves" (for the three effects' discussions).

Ed 20Oct14 : on other pages we have tried to avoid using bullet point lists when the items do not really reflect a list. In all three of these effect discussions we have "lists" with bullet pointed items but without an introductory sentence describing what the lists entail; we should either make these into real lists with an introductory sentence (my preference) or make them separate paragraphs of normal text (the paragraphs would be too short IMHO).

To make use of the frequency range defined in a spectral selection you must use one of the effects that begins with "Spectral edit". All other effects, as well as all the time-based editing commands (such as Cut, Copy, Delete, Trim, etc.) are available when there is a spectral selection but these effects and commands will not take into account the frequency range of the spectral selection.

Spectral edit multi-tool

  • When the spectral selection has a center, upper and lower frequency this effect performs as a notch filter with the center frequency defined by the center frequency of the spectral selection and the width defined by the upper and lower frequencies of the spectral selection.
  • When the spectral selection begins at 0 Hz this effect performs a high pass filter with a roll-off of 6 dB/octave and with the cut-off frequency defined by the upper frequency of the spectral selection.
  • When the spectral selection ends at the Nyquist frequency of the track this effect performs a low pass filter with a roll-off of 6 dB/octave and with the cut-off frequency defined by the lower frequency of the spectral selection.

Spectral edit parametric EQ

SpectralEditParametricEQ.png
  • When the spectral selection has a center, upper and lower frequency this effect performs a band cut or boost according to the value entered in the "Gain (dB)" control. The center frequency is defined by the center frequency of the spectral selection and the width is defined by the upper and lower frequencies of the spectral selection.
  • When the spectral selection has an upper frequency only or a lower frequency only (and no center frequency) this effect returns an error message.

Spectral edit shelves

SpectralEditShelves.png
  • When the spectral selection begins at 0 Hz this effect performs as a low frequency shelf filter with a roll-off of 6 dB/octave and with the roll-off frequency defined by the upper frequency of the spectral selection. This is similar to adjusting the bass control on a stereo.
  • When the spectral selection ends at the Nyquist frequency of the track this effect performs as a high frequency shelf filter with a roll-off of 6 dB/octave and with the roll-off frequency defined by the lower frequency of the spectral selection. This is similar to adjusting the treble control on a stereo.
  • When the spectral selection has a center, upper and lower frequency this effect performs both as both low and high shelf filters. In this case the roll-off frequency of the low shelf filter is defined by the lower frequency boundary of the spectral selection and the roll-off frequency of the high shelf filter is defined by the upper boundary of the spectral selection with a roll-off of 6 dB/octave.

Example

Here is the same audio, this time contaminated by an annoying high-frequency whistle. You can see the whistle just above 5 kHz.
SpectralEdit 01.png

Start by making a rough selection around the whistle:

SpectralEdit 02.png

Zoom in on the frequency axis to get a closer look:

SpectralEdit 03.png

The center frequency line is close (but not exactly on) the whistle and the range of frequencies is too wide:

SpectralEdit 03a.png

Snap the center frequency line to the whistle by pressing and holding the ALT key, tapping the CTRL key, then moving the mouse until the center line snaps over the whistle. We can then (while still holding the ALT key) click and drag to adjust the upper and lower frequency boundaries until they just cover the red and magenta areas:

SpectralEdit 04.png

Finally, select Edit > Spectral edit multi-tool which performs a notch filter effect on the selected frequencies.

SpectralEdit 05.png
Ed 20Oct14: maybe superimpose the effect's dialog on the above image?
The whistle is gone.