What exactly does the phrase 'leave headroom for mastering' mean?
It's a phrase you will come across commonly on the Internet and elsewhere. Mostly it is taken to mean that your finished audio file should peak some number of decibels below 0 dBFS or your mastering engineer won't be able to do his or her job properly. 'Headroom' is normally considered as the difference in decibels between your highest-level peak and 0 dBFS, which is the highest possible digital signal level.
But there is a lot of uncertainty, doubt and even fear around 'leave headroom for mastering' so, at the risk of making the confusion even worse, I'll try to offer my simplified point of view of some of the possible reasons for this phrase.
Fear of 0 dBFS
Through my reading of the Internet in articles and comments, and through my interactions with actual real human people, it seems that there is a body of opinion that 0 dBFS is a place to stay well clear of. There might be dragons beyond.
To me, this contradicts one of the founding principles of digital audio. With analog audio, distortion increases as you increase the signal level - particularly so with analog tape recorders. So an analog engineer would have to set a recording level that balanced out too much distortion against too much noise (or tape hiss as it was often called).
When digital recording became practical in the 1980s it was regarded as a superbly wonderful thing that both noise and distortion got less and less the closer the level came to 0 dBFS, as long as there was no clipping of course. And this still remains true. The best place to be in a digital recording is very close to 0 dBFS. Anyone who thinks that this is not so should worry about the ability of computers to work with numbers, and stash their savings under their mattress in the form of cold hard cash.
So when you mix your track to a .wav file and audition the file back, then if it sounds the way you want even if it peaks all the way to 0 dBFS (with no clipping), then you're golden. Your mix is great, your .wav file is great. You can listen back to the file at any future time and it will still sound great. You can send the file on physical media or by digital transmission to anyone in the world and they will similarly admire how great your work is.
So, taking things as far as your finished .wav file mix that sounds great, there is no reason to fear 0 dBFS. No clipping though!
(As an aside it is worth mentioning that if there are four consecutive samples at 0 dBFS anywhere in your file, then this may well be a clip. Even three consecutive samples could be. A single sample at 0 dBFS is almost certainly a genuine part of the signal and not a clip. It is extremely unlikely that it will sound like a clip.)
If there is no headroom, then the mastering engineer has no room to work
I've heard this one a fair few times. In the last two decades it has traditionally been seen that one of the functions of mastering is to make a track louder. So if the mix already peaks at 0 dBFS then the mastering engineer has no leeway to do this.
Well this is absurd. The mastering engineer's software has masses of internal headroom above 0 dBFS (which is the upper limit in the digital audio file, not in audio software that can be designed to allow more headroom than anyone could possibly ever need). And if he or she wants to, then what could be easier than pulling down a fader?
Fear of intersample peaks
Firstly, it isn't an intersample peak that you should be worried about, it's an intersample clip. If software and equipment is designed properly, then intersample peaks will be handled with no detriment to the audio. If it isn't, then an intersample peak can cause an intersample clip that might be audible.
Briefly, an intersample peak occurs when the flow of the signal has a trajectory that curves above 0 dBFS, even if the actual samples never exceed that level. The peak occurs between the samples, hence the 'intersample' part of the term, and it only occurs when the file is played. As the file lies dormant on your disk, it is there in latent form only.
It is certainly true that intersample peaks and clips are important issues. However they are an important issue for your mastering engineer. As long as there are no ordinary clips in your audio file, then the mastering engineer will deal with the possibility of intersample peaks and clips using appropriate software tools. That's one of the things you are paying them for.
Leaving the mastering engineer little or nothing to do
Aha, now we are getting to the real issue. If we consider the word 'headroom' in the phrase 'leave headroom for mastering' it doesn't necessarily refer to the difference between your highest peak and 0 dBFS. Instead it means leaving your mastering engineer room for manoeuvre and the scope to do their job properly.
Mastering involves the careful shaping of frequency balance and dynamic range. Frequency balance is an issue that is only minimally relevant here so I will comment just on dynamic range.
As I said earlier, traditionally over the last two decades it has been seen as the mastering engineer's responsibility to make the mix as loud as possible. If a mix already peaks at 0 dBFS, then the way to do that is through compression and limiting. If the peak levels are reduced, which is what compressors and limiters do, and the file is re-normalized to peak back at 0 dBFS, then the average signal level will be higher, and subjectively the master will be louder than the mix, even if both peak at 0 dBFS. (Or whatever level the mastering engineer has chosen in order to avoid intersample peaks and clips.)
But if you have already compressed or limited the mix, you have taken away some of the dynamic range that the mastering engineer wants to work with. And since they do this day-in-day-out with many, many mixes they are in a much better position to make judgments. You might make great music and great mixes, but you have to leave the mastering engineer scope to work their magic.
Yes you can compress the stereo buss if you want, but only so that it sounds good as an intrinsic component of the mix. Using a limiter is something you should avoid if you intend having your work mastered.
And even now, as the trend towards ultimate loudness seems to be receding into the past, control over dynamics is always going to be important, and leaving your mastering engineer scope to do that is vital to the success of your music.
When you hear the phrase 'leave headroom for mastering', if you take it to mean 'don't apply too much compression to your mix, and don't use any limiting', then you will be doing yourself a favour.
One last thing... If a mastering engineer tells you to peak no higher than -6 dBFS or some other level lower than 0 dBFS then just give them what they ask for since it's their preference and they are entitled to it. But one reason they do this is so that the master they deliver to you will be significantly louder than your mix. The 'louder = better' trap is something that we all need to be careful not to fall into.