Improving and Remastering Audio

Preliminary Notes
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 
 * Click
 * 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.

Back to Top

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: If the channels are identical,
 * 1) In the menu select.
 * 2) In the Track-Menu select "Split Stereo Track".
 * 3) Decide which channel may have better technical quality.
 * 4) Copy this entire channel into the new track.
 * 5) Reunite the split track: Track-Menu, "Make Stereo Track".
 * 6) Press "Play", then repeatedly alternate between the original track and the new mono track by clicking "Solo" at the left of the tracks.
 * 1) close the original track by clicking the "X" left of the wave display
 * 2) 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

Back to Top

2. Unwanted Parts Removal (Trim)
Mark the unwanted section and delete it.

In addition, consider the following:

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. There are two parameters: "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.

This applies also for the silence "within" your music!

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.

Back to Top

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.

Back to Top

4. Noise Reduction
If you are working on a mono file, of which you saved the original 2-channel file at the start, check for replacements from this file.

Note that the also 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.

For details, see Noise Removal and this technical note.

In addition consider the following:

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.

Special conditions:
 * 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.ny You can also try using Audacity's built-in high-pass filter, setting the cutoff frequency to around 25 Hz. You can repeat this same effect a couple of times if a sharper cutoff 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.

Back to Top

5. Click, Pop and Short Dropout Removal
If you are working on a mono file, of which you saved the original 2-channel file at the start, check for replacements from this file.

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 click

Zoom 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)
 * 1) Use your headphones. Press play and keep your eyes on the wave display.
 * 2) When you hear a click, stop. The click will lie to the left.
 * 3) Decide which channel(s) the click was in (left, right or both).
 * 4) Select the area, where you suppose the click to be. Press 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 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 ) and compare your listening impression to that of the current section.

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.

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.

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 ) 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.
 * 1) Select the region containing the click
 * 2) set the parameters
 * 3) Rolloff [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.
 * 4) Filter quality: Play with it, but don't increase it above the default 0.7 value if using a 6 dB rolloff.
 * 5) Cutoff frequency [Hz]: All frequencies above the cutoff frequency are attenuated.
 * 6) 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. [[image:delete entire period.jpg|780px]]  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).
 * 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!)

Click   to enlarge

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.

Back to Top

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, apply to 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.

Back to Top

7. Frequency Spectrum Editing (Equalization)
If you are working on a mono file, of which you saved the original 2-channel file at the start, check for replacements from this file.

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 drop-down 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.

In addition consider the following:

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.

Special conditions:
 * 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:
 * 1) 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.
 * 2) Create a selection from 100.2 s to the end. Apply the same equalization as before.
 * 3) Create a selection from 100.4 s to the end ... and so forth
 * 4) 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.

Back to Top

8. Volume Editing (Amplify / Envelope / Fading)
If you are working on a mono file, of which you saved the original 2-channel file at the start, check for replacements from this file.

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.

Amplify

Select the region you want to change (or deselect to select all), use, make your settings, and apply the effect.

Envelope Tool

For the use of this tool please refer to the section on in the current.

Adjust the envelope, then use to "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.

Fading

Select a region, then use the or the.

To obtain a non linear fade, do one of the following:
 * Fade part of the faded region a second time. [[image:FADE1.jpg|non-linear fade type 1, step 1]] [[image:FADE2.jpg|non-linear fade type 1, step 2]]
 * Fade a region several times. [[image:FADE3.jpg|left|non-linear fade type 2]] In this example

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.

Back to Top

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.


 * Compressor

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.

In addition consider the following:

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.


 * Leveller

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.


 * Expander

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.

Back to Top

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.
 * 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
 * If Files with different sample rates are involved, see Combining Different Sample Rates

back to top