Sub topic 7
Setting levels without clipping
This chapter assumes you can record with software that shows a level meter, and that your microphone is already placed and connected as covered in earlier chapters. It explains how to set the recording level so speech is loud enough to be clean and quiet enough to avoid clipping.
What gain staging means
Gain staging is the practice of setting the signal level at each stage of the chain so that no stage is too quiet or too loud. In a home studio the stages are usually these:
- The microphone produces a very weak electrical signal.
- The preamp (the amplifier in your audio interface, mixer, or USB microphone) raises that signal. The control for this is called gain.
- The analog-to-digital converter turns the signal into numbers.
- Your recording software stores those numbers and may apply a software fader or input volume.
Gain set at the preamp matters most. If the signal is too loud there, the converter clips. If it is too quiet, you must boost it later, and that boosts the noise too.
Digital scale and dBFS
Digital audio has a hard ceiling. The unit is dBFS, decibels relative to full scale. 0 dBFS is the largest number the file can hold. Every real level is negative: -6 dBFS is half of full scale, and -12 dBFS is a quarter.
import math
def dbfs(sample_peak):
"""Convert a peak sample value (0.0 to 1.0, where 1.0 is full scale) to dBFS."""
return 20 * math.log10(sample_peak)
print(round(dbfs(0.5), 1)) # -6.0
print(round(dbfs(0.25), 1)) # -12.0Each halving of the sample value lowers the level by about 6 dB. This gives you a quick mental scale for reading a meter.
What clipping is
Clipping happens when the signal tries to go above 0 dBFS. The converter cannot represent the extra, so the top of each wave is flattened. The result is harsh, buzzy distortion on loud syllables.
Clipping in a digital file cannot be repaired. The original wave shape is gone. Reducing the volume afterwards only makes a quieter distorted file. This is why you prevent it during recording.
The target range
For speech, aim for peaks between -12 dBFS and -6 dBFS. The average level of your speech will then sit lower, often around -24 to -18 dBFS. This gives you three benefits:
- Headroom, which is the space between your loudest peak and 0 dBFS. An unexpected laugh or a raised voice will not clip.
- A signal well above the noise floor, which is the constant background hiss of the electronics and room.
- Room for editing, such as compression and loudness normalization, without strain.
Modern recording uses 24-bit audio, which has a very low noise floor. Because of this, you gain nothing by recording close to 0 dBFS. Recording a little lower is the safer choice.
| Peak level | What it means | Action |
|---|---|---|
| Below -30 dBFS | Too quiet. Noise becomes audible when raised. | Increase gain |
| -30 to -18 dBFS | Usable but low | Increase gain a little |
| -12 to -6 dBFS | Target range | Keep |
| -6 to -1 dBFS | Risky, little headroom | Reduce gain |
| 0 dBFS or red indicator | Clipping | Reduce gain and re-record |
A step-by-step procedure
- Set your microphone in its final position, at the distance you will use during the lesson.
- Set the gain control to a low value. Turn off any automatic gain control in your software or operating system, since it changes the level while you speak.
- Open the meter in your recording software.
- Speak the way you will in the lesson. Read a paragraph of your script at your normal energy. Do not use a quiet "test voice".
- Watch the peaks. Raise the gain until your loudest words reach about -9 dBFS.
- Say a few lines louder, as you would when emphasizing a point. Check that they stay below -6 dBFS.
- Record one minute and look at the waveform, not only the meter.
Peak meters respond instantly. Some meters are slower and show average level. Check which one your software uses, because a slow meter can read well below the true peak.
Position changes the level
Gain and distance work together. If you move closer to the microphone, the signal gets louder, and with a cardioid microphone the bass also increases. A change of a few centimeters can alter your level by several decibels. Set gain with your head in the position you will hold while recording. If you tend to lean in during an excited passage, test that as well.
Plosives (the bursts of air from "p" and "b") often create the highest peaks in speech. A pop filter lowers them. If your peaks come from plosives and not from your voice, fix the placement or add a filter before you lower the gain.
Where to set the level
The level can be adjusted in several places, and they are not equal:
| Control | Effect | Use it? |
|---|---|---|
| Preamp gain knob on the interface | Changes the signal before conversion | Yes, this is the main control |
| USB microphone gain control | Same role, built into the microphone | Yes |
| Operating-system input volume | Often a digital multiplier after conversion | Leave it fixed, set once |
| Software track fader | Changes level after recording | Does not prevent clipping |
If your interface has a "pad" switch or a "peak" light, use them. A peak light that turns red means the preamp or converter is at its limit, even when the software meter looks fine.
Checking a recording with FFmpeg
After a test, you can measure the file. This command prints the mean and maximum volume:
ffmpeg -i lesson.wav -af volumedetect -vn -f null -Look at max_volume in the output. It should be around -9 dB, and it must be below 0 dB. If max_volume reads 0.0 dB, the recording probably clipped.
A second measurement is loudness, which describes how loud the recording sounds to a listener and is measured in LUFS. This command measures integrated loudness against a target of -16 LUFS without writing an output file:
ffmpeg -i lesson.wav -af loudnorm=I=-16:TP=-1.5:LRA=11:print_format=summary -f null -Loudness is a goal for the finished lesson, not for the raw recording. You set recording levels using peaks, then normalize loudness during editing.
Common errors
- Setting the level while speaking quietly. You then clip when you perform the real lesson. Always calibrate with your real delivery.
- Trusting the average meter. Peaks can be 15 dB above the average speech level.
- Leaving automatic gain on. The level pumps up during pauses and brings up the room noise.
- Using a very low gain and boosting later. The noise floor of the preamp rises with the voice.
- Chasing a "hot" level. Louder recording does not mean better quality in 24-bit audio.
- Changing the room or position without rechecking. A new chair or microphone angle can change the level.
A level-setting flow
Summary
Set gain at the preamp, not afterwards. Calibrate with your real speaking voice at your real position, target peaks of -12 to -6 dBFS, and confirm the result with the meter and with a measurement of the saved file. Leave headroom, because clipping cannot be undone.
Exercise
Your meter shows speech peaking at -3 dBFS during the test, and one excited line reaches 0 dBFS. What should you change, and why is it not enough to lower the track fader in your software afterwards?
Show answer
Lower the preamp gain (or the USB microphone gain) until normal speech peaks around -9 dBFS and the excited line stays below -6 dBFS. Then re-record. Lowering the track fader afterwards does not help because the clipping happened at conversion, so the flattened wave tops are already stored in the file, and the fader only makes the distorted audio quieter.
Exercise
A sample peak of 0.125 of full scale is how many dBFS, using the formula 20 * log10(peak)? Is it in the target range?
Show answer
About -18.1 dBFS (0.125 is half of 0.25, so it is 6 dB below -12). It is below the target range of -12 to -6 dBFS, so you can raise the gain by about 6 to 9 dB.