Home › Forums › Breakaway Professional Products – [discontinued] › Why 15us Pre-emphasis for net streaming?
- This topic has 17 replies, 7 voices, and was last updated 15 years, 5 months ago by JesseG.
-
AuthorPosts
-
November 5, 2008 at 4:28 pm #130LaneMember
Just a quick question that I hope doesn’t have a long and complicated answer. It’s clear why pre-emphasis is required in breakaway fm when used for FM broadcasting. Receivers are designed to receive that, and then roll down that end as a noise reduction method. But why is this done with an internet streaming application, and why specifically 15us? Are players (like winamp, itunes etc.) also doing a similar things that FM receivers are doing? Is there some kind of flag needed to indicate it’s there? Would it somehow be autodetected? If any one has some reference documents they could link about this, I’d appreciate reading them. I haven’t had much luck in my google searches on this topic. What I’ve found related to the cd redbook standard, which appears isn’t used much anyway.
November 6, 2008 at 3:25 pm #5859drshaneMemberShort answer is Winamp and other players do not supply de-emphasis, you will want to turn de-emphasis on for the L/R output of Breakaway FM or your stream will seem excessively bright. Using the pre-emphasis/de-emphasis before/after your multi-band processing will give you the advantage of a trick FM broadcasters use to get their stations louder, yet still maintain a bright sound.
November 7, 2008 at 2:24 am #5860LeifKeymasterHi Lane!
DrShane is right — you have to keep de-emphasis on for the L/R output (unless you’re using the built in plug-in support. Plug-ins always receive de-
emph no matter how you set the L/R out switch.)Pre-emphasis doesn’t have anything to do with loudness though, other than hampering it 🙂.
Pre-emphasis is used on FM for noise reduction reasons. Boost treble (before the transmitter), add noise (in the air), reduce treble (inside the radio), and the audio comes out normal but the noise gets suppressed by the treble reduction.For webcasting though, I’m using it for an entirely different reason. Explaining it requires looking at what happens when you MP3-encode a tightly peak controlled signal.
Breakaway FM has excellent peak control. It really packs the waveform solid, by way of clipping, but it uses a highly advanced clipper that cancels out distortion more effectively than any other before. This means, that even though the output waveform (Amsterdam Preset) looks like this:
Even though it’s obviously clipping pretty much all the time, there’s no audible distortion. It sounds pristinely clean.
The source material here was 10 seconds from the intro of "Sleeping satellite" by Tasmin Archer. The intro is acoustic guitar, synthesizers, and a very bright and sibilant voice. Sibilance (S-sounds) are usually the first thing to distort when clipping.
Here’s a spectral analysis of the above waveform:
Breakaway FM, while controlling peaks, ALSO controls the output bandwidth. You can see here that it’s strictly bandwidth-limited to 16 KHz.
Now, let’s see what happens when this goes through an MP3 encoder at 128 KBps.
See all those overshoots? It happens because of the frequency components thrown away by the MP3 encoder to meet the bitrate quota. If those frequency components happened to be harmonics keeping the peak level down, overshoots will result.
In all the examples here, I’ve used a reference level of -3dB. This means there’s headroom. Normally, when you’re doing web radio, you’re pushing 0dB, meaning there is no headroom for MP3 overshoots. Attenuating several dB’s defeats the purpose of clipping in the first place.
So, what happens when these overshoots (everything above the white lines) are chopped off by the protection clipper in the MP3 decoder?
Flat (no pre/de-emphasis)See all those spikes in the spectrum? That’s distortion. Don’t be fooled by the fact that we only really see them in the black area, they go all the way through to the bottom. They’re usually masked by the audio, but not always! S-sounds, in particular, get really nasty sounding (like a worn stylus on a turntable, only worse).
Here’s the flat spectrum with embedded lyrics, so you can see what to look for above.
The reason S sounds are so critical, is that they have all their energy in a narrow frequency band, and the more distortion is added, the more it sounds like an F. (This is similar to why it’s impossible to tell S and F sounds apart over the phone. With the telephone network’s 3.5 KHz low pass filter, these two sounds have identical spectrum. But, I digress.)
So, to compensate for this, I came up with the idea to use pre-emphasis to my advantage. Pre-emphasis to 15 or 25us barely affects loudness or treble content audibly, but it pulls the treble away from the edges of the waveform, where it would be causing clipping in the MP3 decoder.
15us pre/de-emphasisA lot of spikes have gone, but a few new ones have even appeared. The important thing though is that there are no spikes on S-sounds anymore. Those were the most important ones — the other ones are much less audible.
25us pre/de-emphasisHere, almost no extra clipping happens. 25us pre-emphasis does audibly reduce treble content on some program material, but it’s real subtle — if I was doing a 128kbps stream or below, I would use 25us pre-emphasis.
If i had 192kbps, I would use 15us.
Wow, this took a while! Don’t worry – I can use this for the manual. 😉
Best regards,
///LeifNovember 7, 2008 at 2:36 pm #5861AnonymousGuestLeif, I totally dig when you give these detailed answers! I’m a regular user without a lot of knowledge on audio processing, but every time I check the forum, I feel I’ll be getting a degree in audio mastering. Seriously, your posts are very educational and clear, much easier to understand than other internet sources. 8)
This one should definitely got for the manual! Man, you should also be writing a book on this, but that would leave less time for coding BA, so you may ditch the book idea. 😉
cheers!
November 7, 2008 at 3:31 pm #5862LeifKeymasterLivelike, thank you! Always happy to help, and audio processing is of course my favourite conversation subject 😉.
Funny though, I just noticed the following:
[quote author=”Lane”]Just a quick question that I hope doesn’t have a long and complicated answer.[/quote]
Oops 🙂.
///Leif
November 7, 2008 at 6:59 pm #5863SparkyMemberYou’re forgiven… but I’m glad you did it anyway.
November 8, 2008 at 5:55 pm #5864LaneMemberI appreciate the long and complicated answer, and actually, in the context of my question, the answer isn’t long. The short version being "I came up with the idea to use pre-emphasis to my advantage". So this is a Leifism, and not something I need to worry about in the context of the end user and their player.
I feel like I just got some free education. 🙂 Thanks for your time.
November 9, 2008 at 9:15 am #5865lpy7MemberThanks for the info Leif, very useful.
I have a question about my 128k stream:
As you can see, it rolls off around 16KHz, but bit and pieces of treble get through up until around 17KHz. The stream isn’t clipping or distorting, so is that normal treble above 16KHz or some sort of distortion (at 320k mp3 the result is sometimes similar but reaches up to 20KHz instead of 17KHz) ?
Thanks.
November 10, 2008 at 12:38 am #5866LeifKeymasterHi lpy!
Indeed that’s not clipping. MP3 encoders usually use a much higher threshold above 16 kHz to determine what to keep or throw away, resulting in only brief transients remaining above 16k. Indeed it happens at higher bitrates too, although less pronounced. It also depends on what encoder you use — some do it more, some less.
///Leif
November 10, 2008 at 2:42 am #5867JesseGMemberBut also I think what lpy is wondering about… is why there is signal there at all, since BreakawayFM is low-passed (quite well) at 16kHz.
November 10, 2008 at 7:18 am #5868lpy7MemberSorry JesseG, I probably should’ve stated that I’m not running BreakawayFM, I was curious as to what Leif thought of that analysis. If anything, I would rather a 17khz low-pass, as the encoder I’m using seems to be quite different from most used.
I’ve noticed most 128k streams/encoders are limited to around 15.4khz, and some reaching around 16khz. However, the one I’m using does well right up to 16khz and then has peaks up to 17khz, whilst still sounding very clean, which I think is very good for 128k.
I like BreakawayFM, but I’m not sure that I’d be entirely happy with it just yet. It would be good if the Pre-emphasis had an additional 0us setting, even if just for testing purposes, and maybe a couple of additional bandwidth options such as 16.5khz and 17khz, which although may be too high for FM, would still be fine for web streaming. Or am I being too picky?
November 10, 2008 at 7:26 am #5869LeifKeymasterHi lpy!
When you select 15us pre-emphasis, and check the de-emphasis box, you’re getting flat frequency response. The only difference is that the clipper won’t allow treble near the edges of the waveform. 15us pre-emphasis is so benign that it has no audible drawbacks at all, only advantages (less clipping).
The low pass filter is a different story. The honest answer is, I plan to release a mastering version of my clipper some day, and it won’t be $199. The 16 kHz low pass is basically the only thing keeping BaFM out of the hands of mastering engineers, and they’d kill for an algorithm like this for mastering 😉.
FM can actually do 18 kHz with filters as sharp as mine, and still have a full kHz of 60dB pilot protection contour(referenced to 8% pilot injection).
I personally hear up to 17.5 kHz, but really, I’m completely happy with 16 kHz, because it’s really flat all the way up to 16, with a sharp cutoff thereafter.
For comparison, when you ask the LAME mp3 encoder for 16000hz low pass, you get a transition band between 15677 and 16258 hz, thus the frequency response is really only flat up to 15.6 kHz. This does make an audible difference to me — the difference between 15.5 and 16 is much bigger than the difference between 16 and 17 for me personally.
You’re being too picky .
///Leif
November 10, 2008 at 5:25 pm #5870JesseGMember[quote author=”Leif”]the hands of mastering engineers, and they’d kill for an algorithm like this for mastering[/quote]
This is so true. I have a version that goes almost all the way to 22.05kHz… it’s absolutely the first real paradox in the loudness war, aka the war of loudness… lol
But yeah, back to subject, Leif was correct in his original statement. About the codec being why that’s happening. I didn’t realize you had never actually looked at an mp3 before, in a spectrogram. 😉
November 12, 2008 at 7:58 am #5871lpy7MemberHey Leif,
Yeah understandable, although 17khz sould still be no good for engineers. The encoder I’m using by default has a lowpass of 17KHz @ 128k, making the transition band 16538 – 17071, which I know is still not a big difference, but my ears can hear it. And doing a quick test, I think I can hear up to around 17.5k as well.
I know it is picky, but if we weren’t picky about these little things, Breakaway wouldn’t be as good a product as it has turned out to be 🙂
But anyway, that’s enough encoder talk for me 🙂
November 12, 2008 at 8:07 am #5872LeifKeymasterGood point, lpy. I guess you’ll have to decide if Breakaway Live (formerly ba web) sounds better when it comes out — it has no bandwidth limitation at all, it goes all the way to nyquist.
Also, more advanced versions of Breakaway Broadcast Processor (formerly bafm) will have higher settings as well, probably all the way up to 18k.
Best regards,
///Leif -
AuthorPosts
- The forum ‘Breakaway Professional Products – [discontinued]’ is closed to new topics and replies.