Spectral Selection
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.
- I made a thorough spell check with Word
- I added divid anchors for the H2 sections
- I added a link in the intro to the spectral editing H2 section.
- 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".
- Gale 21Oct14: I agree with Peter that more is needed in the intro on what type of audio and what type of glitches therein would benefit from only acting on a selected frequency range. The reason is to get finer control, correct? Also see Click removal using the Spectrogram view. When would one use that Tutorial rather than the tools here? Can you decide what tool to use by inspecting the glitches in Spectrogram View? If so what do you look for?
- Bill 20Oct14:
- The click tutorial uses spectrogram view to "see" the click, but does all the work in waveform view. The point of spectral editing is to do all the work in spectrogram view.
- Gale 21Oct14: OK, though you could (with experience) do the work in spectrogram view there too, unless you actually heard a discontinuity after deleting the click.
- Paul's video tutorial is worth watching and makes the case much better than I could.
- Gale 21Oct14: But we have agreed not to link to that video, I think. The case needs to be made here and is as yet somewhat unclear to anyone coming new to this idea. Given the steep learning curve the case needs to be extremely clear, or users may not bother with it.
- Paul has said (in one of the -devel threads) that he is using it to remove "mouth noises" from narration. I'd like to see how he does that.
- Gale 21Oct14: +1. That should be the main use case, shouldn't it, rather than your "artificial" example? The files that contain the mouth noise should be available so that a Tutorial could be written.
- My example, while somewhat artificial, is based on real experience with old cassette recordings of FM broadcasts that have "multiplex whistle" on them
- In his video he removes a "clang" from behind his voice - quickly and effectively
- It's hard to generalize, but I guess I'd say that any time you need to remove an extraneous sound, and the duration and frequency range of that sound can be identified in spectrogram view, then spectral editing is the way to deal with it
- So the reason is not to get "finer control" but to have a better, faster, more effective work flow.
- Gale 21Oct14: How is this faster than Paul L's De-clicker and De-esser or something else on an entire track? You know the complaints we get about using Repair on clicks one at a time. The case seems to me that this is "more effective".
- Let's go to my example. How would I do this without spectral editing?
- Make a selection then do Plot Spectrum, adjust the plot so I can see the whistle frequency (how do I do that? which controls do I adjust?), use the cursor and the peak display (assuming I've noticed it) to get the exact frequency and write that down, and hope I got the right peak
- Select whole track and do Effect > Notch Filter; type in the frequency I wrote down and guess at the width factor I need.
- Apply the effect, listen to the result, and undo and try again - the most likely mistake is to get the width factor too wide and damage the desired audio
- Gale 21Oct14: I'm surprised that a normal steady noise like hum or whistle can't be picked out in Plot Spectrum. We imply elsewhere that it's easy - yes you may see multiple spikes but you probably want to deal with all of them anyway. So again I find the use case here unconvincing. Not your fault, but the most convincing use case should be presented on this page (I assume that "mouth noises" will be much harder to see in Plot Spectrum, if so that indeed makes the case).
- With spectral editing:
- Switch to spectrogram view; I can see the whistle right away
- Drag a rectangle around the whistle, zoom in, refine the rectangle then do Effect > Spectral edit multi-tool; the center frequency and width of the notch are set from the display so I can be confident that I'm removing just the right frequency range
- I can see right away that the whistle was removed and the desired audio was not appreciably damaged
- The click tutorial uses spectrogram view to "see" the click, but does all the work in waveform view. The point of spectral editing is to do all the work in spectrogram view.
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.
- Cleaning up unwanted sound.
- Enhancing certain resonances, and changing the quality of a voice.
- Removing mouth sounds from voice work.
All of the time-based selection techniques (horizontal selection) are still available when doing spectral selection.
Contents
- Making a Spectral Selection
- Adjusting a Spectral Selection
- Using Spectral Selection - Spectral Editing
- Example
Making a Spectral Selection
Here is a track with a few seconds of speech, shown in waveform view.
Change the track to spectrogram view, hover at a vertical position that you want to be the approximate center frequency to act on, then click and drag a selection horizontally to define a time range. A horizontal line appears between the I-Beam mouse pointer that defines the center frequency.
Drag vertically (with or without continuing to drag horizontally) to define the bandwidth (range of frequencies) to be acted on. A "box" containing a combined frequency and time range is now drawn in darker gray as shown below:
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.
- 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
- 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.
- Bill 20Oct14:
- Yes, the icon is photoshopped in. It looks the same as the actual Audacity window on my computer.
- The bandwidth in terms of octaves around the center frequency is preserved when dragging the center frequency. So the box will get bigger vertically when dragging up in linear view and will stay the same size when dragging in log(f) view.
- ATM Audacity's screen capture tool produces black PNGs for me
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.
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 selection. 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.
| Linux users: Hold CTRL then ALT, click then you can release the CTRL key and drag. |
Gale (later): Sometimes (not always) if you have a tall frequency range, ALT won't move the center frequency and you have to touch CTRL. If CTRL does unlocks in this case it needs explanation why it locks some times and not others. I can sometimes get the same unlock by pressing ALT twice.
Bill 20Oct14: Gale, you have encountered an "unintended consequence" of Paul's design. Here's what's happening. When you hold ALT then tap CTRL the center frequency follows the pointer without a click-and-drag ("un-pins"), also snapping to frequency peaks. If you then stop moving the pointer and release the ALT key you are still in "drag without clicking" mode. So the next time you hold ALT and move the mouse the center frequency will follow the mouse without you having to tap CTRL. You can see this by looking at the status bar messages. Paul's intention was that the "move without dragging" action would be followed by a click-and-drag to reset the bandwidth around the snapped frequency peak. It is the mouse-down (or mouse-up) event that cancels the move-without-dragging action ("re-pins the center frequency"). I have raised this issue on -devel and called it a bug. Note that Paul cannot "re-pin the center frequency" on ALT-up because Windows traps this as the menu-accelerator key and does not send it to Audacity.
- Hold down the ALT key then tap the CTRL key and move the mouse to move the center frequency so it snaps to the vertical location of 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.
Using Spectral Selection - Spectral Editing
- Gale (later): More important perhaps, we should say when we would prefer to use the multi tool or the shelves instead, and when we might want to use spectral EQ. This may need a Tutorial or Wiki page but I think it must be touched on here. Also center frequency and bandwith might need explaining.
- 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).
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 cutoff 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 cutoff frequency defined by the lower frequency of the spectral selection.
Spectral edit parametric EQ
- 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. If either the upper frequency border is at the Nyquist frequency or the lower frequency border is at 0 Hz, an error message will appear.
Spectral edit shelves
- 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
Start by making a rough selection around the whistle:
Click and drag on the vertical scale to zoom in on the offending frequencies:
The center frequency line is close (but not exactly on) the whistle and the range of frequencies extends too far above and below the whistle:
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:
Finally, select which performs a notch filter effect on the selected frequencies.











