Improving and Remastering Audio
|This page has been deprecated.|
|The information on this page are likely out-of-date and will not be updated in the forseeable future. It may be removed at any time.|
|This article was written for a now obsolete 1.3 Beta version of Audacity so until it is updated, some material may not be accurate for current Audacity.|
- Peter 5May14: I thought it was sufficiently interesting to page mark for potential link on a future forum reply - so possibly yes to Manual transfer.
- Gale 09Jun14: Steve suggests making this and the sister article "version neutral", and provide links to the "how" (the relevant effects and other pages in the Manual).
- Peter 8Jun14: A good suggestion I will try and find some time to tackle this project later.
|This article is intended to provide initial but detailed guidance on cleaning up poor quality audio files, for example to users starting to digitize their record or tape collection and wanting to do more than just transfer them to hard disk with their existing quality.
Don't shrink back from the length of this article. You could first of all use the Contents above to select the parts most relevant to you, and come back and read the rest later.
Audacity version used: 1.3.4 (Unicode) under Windows XP Home, SP2. Some of the Audacity built-in plug-ins are used, plus the Nyquist Plug-in (a German language version is available to registered users of the German Forum).
This article assumes knowledge of elementary editing techniques such as selecting audio and "cut, copy and paste". The focus is on music files, but the content is relevant to non-music files such as speech as well.
Editing - General
- Suggested Preference settings
- Audio I/O: Length of preview - you may want to enter a value longer than the default
- Directories: Check "Auto save a copy of the project in a separate folder" and enter a value in "Auto save interval"
- Interface: Check "Select all audio in project, if none selected" (this article assumes a check here); check "Automatically fit tracks vertically zoomed"
- Batch: Uncheck "Show Metadata Editor prior to export step" (requires 1.3.4 built from CVS)
- Strongly recommended:
- Use headphones, especially when removing clicks or hiss.
- Use the Preview function in effects wherever possible. You could move the Preference Preview change in here.
- Save Presets: Several Effects allow settings to be saved, most important the effect "Equalize". By using this feature you may accumulate a library of typically settings, which are ready to use later on.
- Beware of long editing sessions - after a while you may no longer hear that the treble or the bass is too strong, or that the sound is fuzzy in places. Save the original file and intermediate versions and listen to them in comparison to your actual state of remastering .
Editing - The Individual Steps
1. Two-Channel Mono Files
If your file consists of two musically identical channels, you may extract one to work with, and keep the original file for later use. This is unnecessary, if you plan to use only steps that work on the entire file and on both channels simultaneously. If you use headphones connected to an amplifier with a stereo/mono switch, use it to check if there are is a difference between stereo and mono. Else test it this way:
- In the menu select .
- In the Track-Menu select "Split Stereo Track".
- Decide which channel may have better technical quality.
- Copy this entire channel into the new track.
- Reunite the split track: Track-Menu, "Make Stereo Track".
- Press "Play", then repeatedly alternate between the original track and the new mono track by clicking "Solo" at the left of the tracks.
If the channels are identical,
- close the original track by clicking the "X" left of the wave display
- and in the remaining channel select "Mono" in the Track-Menu to assure proper playback via both your speakers.
For the export see Exporting with "Solo"-Button or "Mute"-Button activated
2. Unwanted Parts Removal (Trim)
Mark the unwanted section and delete it.
Leave sections with hiss or similar noise at the start or end of the file intact. You may need them later to get a "noise profile".
Remove or attenuate loud noise pulses, that would prevent proper volume editing.
If you delete sections of non-silent audio, take care to produce "clean cuts" .
The effect "Truncate Silence..." may be used to delete "silent" parts.
"Max silence duration (in milliseconds)" - how long you want the silences to be after running the effect "Threshold for silence" - Sounds quieter than this level are treated as silence.
In this example the silence at the start and a gap of 200 ms are both reduced to about 100 ms. The smaller gap is unchanged.
3. DC Offset Removal
DC offset is a cause of clicks when editing. Remove it using by clicking, uncheck "Normalize..." and apply the effect.
If you read the waveform as depicting the movement of the speaker diaphragm while playing your audio, "DC" means that its equilibrium position is displaced. When there is silence, it has to stand still in an unnatural position, and when there is a signal, it is not allowed to swing symmetrically.
4. Noise Reduction
Note that thealso contains noise reduction. You probably need to say here under what circumstances it might be better to use Leveller.
Noise reduction attenuates constant noise like hum or hiss. It is a two step process. First select a region with only noise, take a noise profile, then select a region to apply the effect to and apply it.
What to do first?
- Noise and volume editing or equalizing: Constant noise is best removed before making edits that affect the volume of the audio.
- Noise and declicking: If noise reduction is done in a way which heavily softens spikes, i.e. which makes the curve rounder, it will be more difficult locating them afterwards. On the other hand, if low level clicks and pops are masked by hiss, hum etc., you are not able to locate them to before the noise is reduced. So first use a modest amount of noise reduction, then click removal and possibly a second noise reduction afterwards.
Where to take the noise profile?
- The most accessible parts for getting the noise profile often are those before the audio starts or those after the audio ends. Check if the volume and nature of this noise is the same as "within" the audio. Historical recordings or radio broadcasts are often pre-processed to reduce the hiss of the lead-in and lead-out.
- A noise profile, once taken, may be used until Audacity is closed. Successive noise reductions in the same session don't need new profiles, if the noise is identical. Seen the other way round: You don't have to take the noise profile from your first noisy file. Look at all files with the same noise, to find the best spot for profile taking.
How to check the result?
- Do not only listen to sections, where the noise was prominent, but also to sections, where a sound change may be critical, e.g. airy strings or a solitary organ.
If you are satisfied with the result, you may now remove parts at the beginning and the end of the file that were kept for taking a noise profile.
- When your file contains gradually changing noise, try to apply the "envelope technique" described in the step about equalization, substituting the term "equalization" by "noise reduction".
- While hiss is a mixture of many frequencies, hum may consist of essentially one frequency, such as mains hum which has a frequency of 50 Hz or 60 Hz (on older tapes possibly changed due to tape stretching) or a constant high frequency. Such a high frequency might be inaudible (supersonic). Nevertheless it has to be removed, if it optically masks small spikes.
- Small band noise (mains hum, a single high frequency) is best removed using a notch filter.
- Another type of "inaudible noise" is subsonic noise.I quote from Reducing Noise:
You can recognize sub-sonic noise by eye when the wave depicted in Audacity is not symmetrical along the time axis. As you have already applied normalization (if you have followed my advice so far) the DC components should already have been gone. Asymmetries you still find are sub-sonic noise that you cannot hear by definition but take up space in the dynamic range of your material.
To remove it from your track you may filter the track with an equalizer. Some unknown author (at least to me) has written a Nyquist plug-in for Audacity to solve that task quite perfectly. You can download it from the German Audacity site here: http://audacity.fuchsi.de/download/edgar/plugins/plugins.htm ...the actual file is here: http://audacity.fuchsi.de/download/edgar/plugins/subsonic/Subsonic.nyYou can also try using Audacity's built-in high-pass filter, setting the cut-off frequency to around 25 Hz. You can repeat this same effect a couple of times if a sharper cut-off slope is desired. After removing sub-sonic noise you can generally re-normalize your track, and it will appear louder yet much more defined on the bass level.
5. Click, Pop and Short Dropout Removal
Glitches in an audio file can range from the prominent ticks typical of worn, dirty or mis-pressed vinyl records to many other types of short duration fault. Examples are static from radio broadcasts, dropouts on tape recordings, sizzling, dull pops, several forms of digital noise and so on. Many of these are clearly audible, but hard to locate.
In the following section about manual click removal, the term "click" could equally apply to any of the above mentioned brief glitches.
Locate the clickZoom in horizontally, so that a few seconds of the file are visible. Loud clicks may be already visible as needle-like peaks. Zoom in to them and handle them.
For all others, do the following:
(as soon as you see the click, zoom in to it and handle it)
- Use your headphones. Press play and keep your eyes on the wave display.
- When you hear a click, stop. The click will lie to the left.
- Decide which channel(s) the click was in (left, right or both).
- Select the area, where you suppose the click to be. Press CTRL + B to label that area. When navigating in extreme zoom levels, the label indicates if you are still inside your area.
The initially selected area might cover about 10000 samples, whereas typically a click may extend over only 100 samples.
Try to find a zoom level (both horizontally and vertically), where the flaw becomes visible in the wave display.
- Horizontally zoom in to see small clicks and out, to see volume drops or loud pops.
- Vertically zoom in to see tiny clicks and out to see clicks sitting on the top of large waves.
- Zoom to the upper and the lower half of the curve.
If you do not see the click anywhere, try to "hunt it down" acoustically. Hold down SHIFT while clicking B) and compare your listening impression to that of the current section.to hear your labelled region as a loop. If you hear the click, narrow down the marked section repeatedly, always ensuring it contains the click. Relabel your sections during the process. Eventually the section becomes too small to judge on it, but it still contains a great number of samples. Listen to an equally small section adjacent to the current one (do this by moving the cursor either side of the selection and pressing
If that doesn't help, use the intersection method, as illustrated below: in other words if you can hear the click in both of two partially overlapping larger sections, that click must be located in the smaller section that is common to both.
1: Section containing a click
2: Section too small for judgement
3: Section containing the click
4: Section containing the click
5: must be contained in the cross section
A similar method is that of selective deleting. Mark sections as above and delete them - this time taking extreme care of producing clean cuts. Listen. If the click is still there, the wrong section was deleted! Undo and try another section. Narrow down ... While you're at it, you learn how much may be deleted without being audible!
Hard to find clicks
A spike positioned on a nearly horizontal part of the curve is easily perceived, but one on a steep slope may escape your eye: the hard to see click in the first image below sounds similar to the more easily seen one in the second image. The third image shows the repaired click.
|visible click at 5.438 seconds|
More tips for spotting clicks:
- Compare the waveform to its surroundings! Some glitches don't look as such in isolation but cause the disturbance by being different from their surroundings.
- Check the regularity of the wave: Is there a regular sequence of complete periods? Or is one period shorter than the adjoining ones?
- Check the steepness of the wave. Too steep a wave asks too much from the speaker - so it distorts. But note the steepness of the neighbouring waves often are very similar, the difference may not be discernible!
Handle the click
After locating the click, do one of the following:
- Use the
The marked section may be up to 128 samples wide (according to Audacity, but I found it can work with more samples than that. If a click is too wide, handle it in several sections.
- Use the "Draw Tool".
First zoom in horizontally until you see the individual samples denoted by points on the wave form. Select the "Draw Tool" from the Tools Toolbar and manually repair the click by "drawing" a new curve or by softening (press ALT) the existing one. .
- Use the
Low Pass Filter attenuates higher frequencies giving a result similar to the "Repair" effect. The advantage is that you can apply it to larger regions then "Repair". Constrain yourself to single clicks. Filtering larger sections could result in an audible change in sound equalisation.
- Select the region containing the click
- set the parameters
- Roll-off [dB per octave]: The higher the value, the greater the degree of attenuation of high frequencies, and thereby the greater the softening of the click.
- Filter quality: Play with it, but don't increase it above the default 0.7 value if using a 6 dB roll-off.
- Cut-off frequency [Hz]: All frequencies above the cut-off frequency are attenuated.
- Click "OK"
- Then delete the click.
Deleting small sections as clean cuts should not be audible (in the days of pre-digital recording onto tape, cutting out clicks was the standard method).
Delete not just the spike you see but one entire period of the wave, that is one "main" period. Since your audio is not just a pure sine-tone oscillation but a mixture of many frequencies, there are many periods. But what you can aim to delete in the visible waveform is either the period of one lower or medium frequency, or some sort of period of overlaid frequencies.
If your current audio is really noisy with no clear periods visible, you're lucky! Delete as you like, you probably won't hear it.
- Replace the click with some suitable audio from elsewhere (see precision replacement).
If you deleted a click or crackle and the passage is still not clean, there might be a second click nearby, although you heard only one. Hearing doesn't resolve clicks that are about 30 milliseconds or less apart - clicks as close to each other as that sound as one. At these short time periods, left - right and even first - second hearing become unreliable. Do your own psycho-acoustic research to decide if what you hear is real.
Clicks that aren't clicks
Another easily visible click?
When you zoom in, this looks like an ordinary click! But it isn't. It's part of the percussion in this music. (This is a hard one for auto-declickers!)
and notice the coincidence with the beats in the lower channel.
Finally an unexpected observation: Some soft clicks are not audible in Audacity but in other players and vice versa.
6. Channel Volume Correction
If one channel is louder than the other, you can adjust both channels manually, or use with the default settings. This amplifies both channels separately (but in one process) to -3 dB, so leaving some headroom for equalising later on. With most music the result will be satisfying, although the perceived loudness depends not on the peak level but on an average (RMS) level, represented by the light blue part of the wave display.
As an easy way to choose a custom volume correction, or if normalize does not make both channels sound equally loud, applyto both channels separately. For example, to make the softer channel more like the volume of the louder one, select the louder one and apply a negative amplification to it. If you want to make the whole track as loud as it can be, apply the default -0 dB amplification to each channel in turn.
7. Frequency Spectrum Editing (Equalization)
in opens a window which allows adjusting or drawing an equalization curve in different ways, plus saving, loading and deleting of curves. There are two modes selected by the radio buttons "Draw Curves" and "Graphic EQ".
To the left of the curve display there are two sliders to adjust the vertical scale. The curve display shows two curves, one thick blue (the curve that you construct) and one thin green (the curve used to do the equalization). If you see only one, the green one is hidden behind the blue.
The frequency axis by default has a logarithmic scale, which complies with the way you hear the frequencies (lower frequencies having more volume). The "Length of filter" setting regulates the way in which the green curve is fitted to the blue, as does the dropdown setting "B-spline, Cosine, Cubic" in "Graphic" mode. For more details, read the help in the draft 1.3.5 Manual (some of this manual is still incomplete).
Select the region you want to change open the equalizer window, make your settings, preview, and apply the effect.
You may also want to try.
Try to balance accentuation and attenuation in order to leave the overall volume unchanged, because:
- otherwise over-amplification and clipping might result. If that occurs, you have to "Undo" and either lower the volume before equalization (use with a negative value) or modify the equalization curve. Before you close the "Equalization" window, you can save the settings for reuse.
- the impression of the original and changed equalization depends on the loudness. To judge which sounds "better", the volume of each has to be the same.
- Historical recordings have a much narrower frequency spectrum than contemporary recordings. Don't try to amplify something that is not there. may give you an idea of the frequency range of the recording. If, for instance, a historical recording lacks all higher frequencies in its spectrum, lower the volume of the deep and middle frequencies to obtain a "well-balanced" sound.
- Artificial stereo: Some early 1960s records simulated a stereo effect in a mono recording by separating the frequencies of a mono recording: lower frequencies left - higher frequencies right, or vice versa. If you don't like this effect you can try to correct this by applying the Equalizer on each channel seperately, but again, don't try to amplify frequencies that are not there. Or transform it to mono ( ) or mix some of one channel into the other.
Correcting a gradual change in sound quality calls for a more elaborate method:
Progressing from the starting point of the change, you have to mark sections of gradually decreasing size and for each selection apply minimal equalization.
Consider this example: At time t = 100 seconds the sound starts getting more and more muffled. This continues for 3 seconds. From t = 103 seconds onwards the sound does not change further so from then on sounds equally muffled. The remedying procedure could be:
- Create a selection from 100.0 seconds (s) to the end. Apply minimal accentuation of high frequencies so that the sound immediately before d100 s and immediately after 100 s are equal.
- Create a selection from 100.2 s to the end. Apply the same equalization as before.
- Create a selection from 100.4 s to the end ... and so forth
- The last selection is from 102.8 s to the end of the file (because from t = 103 s onwards there are no further changes in sound quality).
Thus there are 15 separate corrections, an enormous effort to (in effect) simulate an equalization envelope in the same way that the Audacity volume envelope works. The result, of course should be that the gradual loss of brilliance in the sound is removed. The section from 102.8 s to the end of the file has its high frequencies amplified 15 times. Now it should have the same sound as the section prior to t = 100 s.
How many changes you make depends on the given circumstances and the quality you want to achieve. The example assumes a linear change in the sound and only one change!
A recording with frequent changes in equalization, as might result from undulated tapes, may be considered "lost" for hobby purposes.
8. Volume Editing (Amplify / Envelope / Fading)
If you have not done already, remove loud clicks that prevent you from properly adjusting the volume.
Equalizing and amplifying often go hand in hand. Boosting some frequencies using the equalizer may have resulted in a too high volume - correct it now. On the other hand, amplifying a section may result in the need of doing also some equalizing on it, because of the correlation of sound perception and volume.
Again take care not to produce crackle at the borders (see clean cuts). If a volume adjustment of a greater amount is required, do it in several steps, each time slightly changing the position of the borders.
Select the region you want to change (or deselect to select all), use, make your settings, and apply the effect.
Audacity offers a special tool for correcting gradual volume changes - the "Envelope Tool"
For the use of this tool please refer to the section on in the current .
Adjust the envelope, then useto "fuse" the envelope with your audio, thus "fixing" the amplitude changes.
This "rendering" is not compulsory. If you save your track without "mix and render", the rendering is done on the fly and the correct amplitude is saved nevertheless.
But further volume changes are restricted, because Audacity calculates using pre-envelope values until you render.
Example: A 1-second-section has excess loudness (level up to 0 dB). You soften it using the envelope tool (maximum level now -4 dB). Now you want to boost the entire file by 4 dB. Not possible! Audacity remembers the first level up to 0 dB, until you "mix and render".
When adjusting the envelope curve of a stereo track, take special care when moving handle points to the far left or far right. If you unintentionally moved a point outside the wave display area, drag it back before releasing the mouse button. Else a difference between the envelope curves of the two channels will result. In this case use "Undo" and repeat your adjustment.
Select a region, then use theor the .
To obtain a non linear fade, do one of the following:
first a region of silence was appended to the end of the audio,
then the marked region
(end of audio + silent region)
was faded 6 times.
- Use the envelope tool.
9. Dynamics Editing
This section deals with manual changes to the relative dynamics in the audio (that is to the difference between the loud and soft parts. Tools commonly used for these purposes are the compressor, the leveller and the expander. The Audacity compressor allows automatic volume normalisation after running the effect. Therefore as volume editing is often the last step in an editing routine, compressor is often done at the end.
The need for dynamics changes often comes out of comparing different files intended for a playlist.
- Improving dynamics manually
If there are only some peaks, that have significantly higher level than the rest, use the "Peak Finder" plug-in mentioned in the preliminary notes, locate those peaks, attenuate them, then amplify the entire file. This way often 2 or 3 dB may be gained without manipulating the bulk of the audio.
A quote from the Audacity Manual: "Compressor... Highly configurable way of reducing the difference between loud and soft by reducing the loud. If boosted back to maximum possible volume, the result sounds "louder" than before."
Main uses for this effect:
- One file or only a few files of a set of files cannot be amplified to fit the volume of the rest.
- A music track forces you to chose between either not hearing the softer parts at all or bringing the walls down with the louder parts.
- You want to make your audio sound more "powerful".
The compressor is typically applied to an entire file.
Open, choose your settings, apply the effect.
The settings here determine that all parts of the waveform that excess the -30 dB-line are compressed to 1/4 of their size.
Since "Normalize to 0 dB after compressing" is checked, all waves subsequently are "stretched" to achieve maximum level.
The picture below shows the wave form before compression, after compression and after normalization.
Note that the left part of the wave has been amplified at the end.
"Attack time" and "Decay time" are neglected in this example.
A closer look reveals that compression "breaks" (or bends) the curve. The result is called a "knee", which might be an audible distortion.
Another problem is a consequence called "pumping" or "breathing", meaning unnatural volume changes following the "beat" of the music.
Therefore the compression is not executed "full force" from the very start of the excess over the threshold level, but "builds up" for a short time ("Attack time").
After the wave falls back under the threshold level, the compression is carried on for a while with decaying strength ("Decay time").
These settings have to be well balanced. A very short attack time, for instance, augments the risk of audible "knees", a too long attack time conflicts with the idea of compression - very short pulses pass uncompressed.
The Effect "Leveller..." does something similar to the compressor.
It also contains a noise reduction.
Quote: "Simpler way of reducing the difference between loud and soft by increasing the soft sounds much more."
A great advantage is that you cannot "muddle" any parameters. Instead you chose the intensity of the effect.
An expander would act contrary to a compressor, to give the music "air to breathe", to unfold "dramatic effects" etc.. Since nowadays much music is offered in an extremely compressed format, there is an urgent need for an expander. Since Audacity does not contain one, I am looking for a method to simulate expanding with Audacity resources.
"Yes, a compressor with the attack and release times set to near-zero will act solely to flatten out the volume, give or take the odd pop as it kicks in too fast, but to answer his quote:
(1) It's almost standard operating procedure to put a compressor with slow attack and release times on a bass guitar - this amplifies the peaks in relation to the sustain, acting not-quite but almost like an expander.
(2) Lack of an expander would be less of a problem if Audacity had a standard noise gate where you could set the attack and release times to be quite slow. (Unless it's had one added since I last took an update.)
(3) So to get the effect I think you're after: take a copy of your original source material and phase-invert it - let's call this the anti-signal - probably reduce it by 5 to 10 dB to begin with, then put quite heavy compression on it without adding any make-up gain. When your original signal's low, the anti-signal will be almost equal-and-opposite, and the two will cancel down almost to silence. When your original signal's high, the anti-signal won't balance it because of the compression, so most of your original will get through. The net result should act as an expander (someone correct me if wrong...?)"
10. Reconstructing Missing Parts
The missing or unusable part may be as small as a fraction of a second or as large as half of the file.
The following might help in some cases, highly dependent on the individual case.
First replacements) anywhere are dealt with, then those at the start or end of the file. A note to replacing from a second file ends this section.
- Replacement anywhere
- Look elsewhere in the intact part for audio suited for replacement. Copy it, replace it, if necessary adapt the replaced part (volume, sound, leveller, noise reduction, ...). Do your cuts just before the beats or at points of (near) silence.
- Maybe you have a second file with the same content. See the end of this section and proceed accordingly.
- Small gaps (tiny fractions of a second) may be simply deleted (take care to use clean cut techniques) without impairing the hearing pleasure.
Try stretching the audio immediately before or after a gap by using the.
This changes the duration without changing the pitch.
Of cause this change is prone to cause distortion. It may be better to do two small changes instead of one big.
Enter a percentage number.
Negative numbers mean stretching,
positive numbers mean shortening.
Example (see image below):
The gap has a length of 0,1 s. Before the gap you select a region of length 0,9 s.
In the "Percent Change" entry field you type - 10, meaning the selected region will be "negatively shortened" = elongated.
In the length fields you see "from 0,90 s to 1,00 s", which gives you additional 0,1 s, just what you need to bridge the gap.
Instead of entering a value you might move the slider until the "to" value shows the required length.
The corresponding calculation: 1 s - 10% = 1 s - 10/100 * 1 s = 1 s - 1/10 * 1 s = 1 s - 0,1 s = 0,9 s
(With negative change values you have to to start with the result) !!
This did not work as expected. The prolonged section is only about 0,97 s long instead of 1 s.
I found the effect working not at all for a small section of 0,1 s. On a section of length 0,2 s it worked again.
So always check yourself. Apart from this restriction the results are very satisfactory.
Apply the effect and delete the gap.
- Greater replacements have to take into account the musical content. If you like you might go as far as repeating a whole verse. (Herman´s Hermits in their 1965 song "I'm henry VIII I am": "second verse, same as the first").
- Replacement at the beginning of the file
The start of a song often has note sequences and instrumentations, that are not repeated elsewhere in a song.
- Check if changing the pitch (without changing the duration, ) of replacement material is of help.
- If you feel, that any intro is better than none, construct one from the existing material!
- If your song is played as part of a fixed sequence, crossfade it with the preceding song, thus masking the corrupt beginning.
- Replacement at the end of the file
Apply to create a fade where there is none or to shorten an existing fade.
- When the end of the file has a repetitive structure, it is easy to prolong a shortened fade by copying and inserting. Cut just before the beats.
- "Re-Fade" (shorten a long soft fade out): First unfade it: With the "Envelope Tool" and successive use of "Amplify" equalize (in its original meaning) the amplitude of the fading signal (take care of augmented hiss and change in sound), then fade it anew to your liking.
- Obtain a non linear fade by fading part of the fade a second time or by using the envelope tool.
- With all fade outs pay regard to the verse structure, the bars of the music, the lyrics. In some cases a shorter or earlier fade is more gratifying, because it pays more respect to the musical structure.
- Replacement from a second file
- If you have two radio recordings of the same song, don't expect them to be identical! Replacement from such files often raises substantial and unforeseen problems, such as difference in sound, dynamics, speed.
- If Files with different sample rates are involved, see Combining Different Sample Rates