How did the early Dolby noise reducers work?

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Fluky, please go out to a thrift store and buy any random cassette tape deck for a tenner. Each and every one I ever saw had Dolby B/C noise reduction. Save it from the bin and experiment with it.

Also you need an audio interface of fairly good quality and the Rightmark Audio Analyser program.

Record the RMAA test tones, with and without Dolby. Let RMAA analyse it again. That will show you visually what Dolby noise reduction is doing.
We are the KVR collective. Resistance is futile. You will be assimilated. Image
My MusicCalc is served over https!!

Post

Fluky wrote:I read about a "hack" that used the Dolby noise reduction units to get high-frequency enhancing.
Some more background information on that... The frequency response of tape depends (amongst a bunch of other factors) on the tape speed. Here's a graph of a Revox A77 machine running at two different speeds:
Image

What you see there is that at the lower speed the significant loss of high frequencies start at about 6kHz. If you double that speed, that point will move up to twice the frequency: 12kHz.

Cassette tape runs at an even lower speed than the big reel tape used by a Revox A77. So if you do nothing, there's already a loss of high frequencies. This is also shown on the cassette product information, found on many tape labels:
Image

Although Dolby B/C is designed to be used as a noise reduction system, one thing it does is amplify the higher frequencies on the recording. So if you record with Dolby, but play back without Dolby, you get more high frequencies (without having the bonus of noise reduction ofcourse) and the frequency plot would be flatter at the high end.

So the hack was very simple. Without having to resort to inserting an EQ in the signal chain (another extra device) and only with the press of a button already present on every cassette tape deck you'd get better quality.
We are the KVR collective. Resistance is futile. You will be assimilated. Image
My MusicCalc is served over https!!

Post

Fluky wrote:Computing the reverse gain changes of a compressor would be way too advanced for 60s and 70s.
Whut? You're seriously underestimating the capabilities of electronics engineers of that era. The RIAA eq curve (1954) and especially colour TV (also circa 1954, look up "gamma correction") would not be possible if they couldn't compute what an electronic cirquit exactly does to a signal. You need to counter-act all sorts of non-linearities to get a somewhat acceptable consumer product.

All they needed was an understanding of how stuff actually works, and be able to solve differential equations (for an electronics engineer that's not really rocket science) with only a slide rule as an aid:
Image

You'd get results with enough precision, because the electronical components themselves have a precision of only two or three digits mantissa (plus an exponent ofcourse.) That obviously was enough for Rock'nRoll...
We are the KVR collective. Resistance is futile. You will be assimilated. Image
My MusicCalc is served over https!!

Post

BertKoor wrote: So the hack was very simple. Without having to resort to inserting an EQ in the signal chain (another extra device) and only with the press of a button already present on every cassette tape deck you'd get better quality.
Hmm. I thought it'd be more complicated.

And some sources say that at least in the case of Dolby A, the result is not like an EQ, but more like high-frequency compander.

Recreated e.g. in this hardware:
https://www.jrrshop.com/sknote-ave

Also the marketing in Sknote's website could be slightly misleading, IF the "hack" is so simple:
DolA is an old “secret trick”. A noise reduction system, hacked and abused to get a beautiful high frequency enhancement.

Post

Fluky wrote:And some sources say that at least in the case of Dolby A, the result is not like an EQ, but more like high-frequency compander.
The basis of Companding (and compression) is amplification. But non-linear. People did not care for the non-linearity, since trebles were boosted in their point of view anyway.
We are the KVR collective. Resistance is futile. You will be assimilated. Image
My MusicCalc is served over https!!

Post

Fluky wrote:
BertKoor wrote: Also the marketing in Sknote's website could be slightly misleading, IF the "hack" is so simple:
DolA is an old “secret trick”. A noise reduction system, hacked and abused to get a beautiful high frequency enhancement.
If that refers to the 'A-type' trick, that was never a secret, actually got almost overused back in the days.
We emulated that in Satin (2013) as part of the compander section. We dissected two 360 modules and were intrigued that it's true that it just needed disabling the 3 lower bands (there are simple summing resistors) in order to have the 4th active and do the 'airy' thing that works so beautifully on vocals.

Dolby A & B were relatively simple (although not so simple to replicate in SW, actually; and finding the right time constants is often hit&miss), but C is really more complicated. C doesn't come without HXPro and its anti-saturation thing, and getting timings and sliding-band behaviour right through reverse-engineering is quite an endeavour. Thing is, you just can't mimic them entirely by implementing an LTI system.
Sascha Eversmeier
drummer of The Board
software dev in the studio-speaker biz | former plugin creator [u-he, samplitude & digitalfishphones]

Post

I don't get what any of this fuss is about.
Companding, as I understand it, is just a compression/expansion scheme to crunch down dynamics of a signal, also decreasing it's information size, in order to conserve space along transmission or storage medium. Generally as lossless conversion.
After it's expanded(recovered) at the output, the only noise(degradation) that isn't present in the original signal is what would have been generated by the transmission or storage medium.

There are different schemes to all this, but in digital music, there is noting useful about this.
SKNote is just bull shit. You want to accentuate a section of your bandwidth, use EQ. :shrug:
....................Don`t blame me for 'The Roots', I just live here. :x
Image

Post

There were many simple "dynamic EQ" analog devices. As easily designed back than as were analog synths.

There were single-ended noise reductions which tried to make hiss less obvious on playback, without encode. Burwen single ended NR and other similar systems. Like "treble gates" or "treble expanders".

Sometimes implemented with a sliding lowpass filter-- If there is not much treble in the signal the lowpass filter frequency slides down and filters out treble hiss. Then when treble happens, maybe a hihat or cymbal splash, the envelope detector senses more treble and slides the filter frequency up to allow the highs to get thru, assuming that if highs are loud enough in the music then they will be loud enough to mask the tape hiss and/or noisy electronics hiss.

Another way was to implement it as about the same as a simple fixed frequency EQ treble knob. A high shelf EQ. Except that the HF level in the signal is used to control that treble cut, instead of a knob. If the music doesn't have many highs the "treble knob" is turned down and then when highs happen in the music the "treble knob" gets turned up.

Similar results in either case. The gadgets designed/marketed as single ended noise reduction, usually could only cut treble, not boost treble. Cut treble if there are not much highs in the music, but only a max of flat frequency response regardless how loud the treble might get in the music. Maybe several control knobs, but at least one knob for threshold sensitivity to adjust how much treble expansion is appropriate in the music.

Mutron-type envelope follower resonant filters were rather similar circuits, but fine tuned to a different task. I never tried to use a mutron as a noise reduction. Maybe possible in special cases but not the first tool of choice.

BBE enhancers and several other competing devices were also variations of treble expander. Similar to mutrons or single ended NR but tuned to different purpose. The enhancer intended to boost the hell out of highs, sometimes controlled by broadband level, sometimes controlled by mids level. So such a device might apply quite strong treble boosts on note attacks, emphasizing attacks and making (optimistically) a brighter snappier track.

Except for mutron envelope follower filters which worked basically as intended, IMO the other enhancers and simple single ended NR were not so successful. Sometimes better than nothing, but often a noisy or indistinct track would not be improved by single ended NR or enhancer regardless how you set the knobs.

Which is also true with digital variants. It is possible to make a plugin vastly more elaborate than you could ever build out of analog parts, but there remain basic limits in converting sows ears into silk purses. Some digital techniques can convert a few more sows ears into silk purses, but there remain many sows ears uncurable even with dsp techniques. :)

Post

Just wanted to chime in on an actual (almost 100%) emulation of DolbyA -- actually capable of better and less IMD than a true DolbyA for decoding. (My work is only for decoding -- the real ongoing problem, no-one really needs to encode much any more.) The DolbyA is a carefully crafted and well thought out compander scheme, where it only has effect on lower/middle signal level ranges. It is incredibly tricky to emulate in software, not because anything is hit-or-miss, but rather the timeconstants and input filter characteristics need to be varied based on carefully crafted formulas when converting to a correct feedforward scheme. (DolbyA decoding is a feedback compressor in the negative feedback of yet another feedback loop. Impossible to directly emulate without going down to almost the component level with iterative matrix equations -- so impractical.) My decoder (being shown informally at AES, and early versions being passed around) sounds almost 100% just like a real DolbyA -- but when running in one of the lesser quality modes. In the highest quality modes, still mostly sounding JUST LIKE a real DolbyA in decode mode, it cleans up the excess IMD it creates on decoding (as any decoder must create IMD by virtue of the math) as it is created. Can you imagine almost 100% clean decodes of something like ABBA? (very IMD prone on DolbyA.) Normal DolbyA decodes produce a veil or fuzz, only being mitigated by not doing a full decode -- or like on the DHDA -- it does all 4 bands, with full expansion, full NR -- sometimes superior, and accurate emulation of attack/decay and freq resp & audibly much less IMD.
The key thing about the DolbyA design is that the DolbyA HW is an ingenius design from the 1960s -- actually originally diode based -- sometimes being partially disabled by removing the cards on the 301 units. The 360 series are FET based, notably tweaky and very dependent on selected components -- but amazingly smart design choices. The nested feedback loops of the audio signal, while the channels are summed and then re-band-split makes a pure emulation in SW problematical. There are some papers on nonlinear dynamic negative feedback loops being emulated in feedforward fashion, but those papers don't quite cover the deep complexity of a very accurate DolbyA emulation. There is another technique based on a Sony US patent, but my review shows that to be insufficient also. The complexity (but amazing lack of tweakiness) of the DHDA caused great stress on the developer (me) for about 6 months. The time will never be paid back, but the purpose of the effort was not money, but was to make the old music listenable again. A lot of DolbyA encodied material from the '60s-'80s IS being leaked out into consumer space, and decoding it (rather than tone control) is the only way to retrieve full quality.
It is currently being sampled in the pro and archival community, where the old material can be retrieved in its full splendor without doing a D/A, decode, then A/D. The biggest bugaboo about my decoder design is that the highest quality mode will keep your recent 4 core intel machine 50% busy at 96k. (All of the internal behavior adjusts to the external sample rate -- which means that 44.1k decodes are substandard.) The decoder also passes practically all of the spectrum that makes any sense, so the output can pass tests for HD content.
I'll be writing a paper about the trevails -- originally being an up-to-1month project (turning into over 1yr), and no matter what I did in the early days, reading every document and every schematic, couldn't make it sound precisely like a true DolbyA during decode operations. After understanding ALL of the very subtle behaviors (probably one other person who understands the behavior as well as myself -- R Dolby, has passed-on), I do intend on writing a paper on the rather extensive piece of software. (A simple, trivial decode emulating a true DolbyA isn't too awfully complex -- the hard work comes in removing the IMD.) I had aborted attempts, including mistaken destroying of quad material -- I mean everything has gone wrong. Now, it is passing golden ears testing as being superior, yet generally sounding the same.
I not interested in selling on this forum, but trying to show the great difficulty in making such a simple piece of HW (I had designed similar things back in the '70's myself) work in a software emulation --and a paper is really needed as an educational exercise for those who might want to understand this legacy technology. After all of this time, R Dolbys' GENIUS still blows me away. There is a lot more genius in the R Dolby design than what the simple schematic implies. I truly respect my elders :-).
On the other hand, dbx is much, much simpler to accurately emulate -- and even though I have already written prototypes, I don't expect to distribute any dbx decoders for at least 6mos. DolbyB/C will be somwhere between DolbyA and dbx, probably closer to dbx -- there are some tricks in DolbyB/C for accurate emulation. I am probably not going to persue an accurate S or SR decode -- an approximation might be reasonable to do, but it is way, way too complex to do as accurately as the DolbyA decoder is.
If anyone has questions on how DolbyA really works -- feel free to contact me. I am NOT the person to talk to about getting a copy of the DHDA decoder, that is in the hands of someone else ( a pro recording/restoration engineer -- he is handling that side of the project.) It is only being sampled right now anyway, and I am only interested in the technical aspects -- so this is meant as a purely technical discussion.


John

Post

stratum wrote: Tue Aug 01, 2017 3:35 pm In addition to that the article mentions compression during recording and reversing that during playback. Probably the compression used has a known ratio and that the details of compressor is known in advance so that the effect can be reversed.
Compander. With correct tuning it works almost flawlessly, I've implemented it in HarmoniEQ, but for its unique "effect" properties when used with EQ, not for noise reduction.
Image

Post

The problem with any 'compander' that isn't infinitely fast and has a perfect transmission medium is that the compander will produce IMD. As soon as you compress or dynamically change the spectrum (especially bad -- quickly), sidebands are created. Even if the decoding mechanism is practically perfect, there will be sidebands that are not cancelled by decoding. Therefore practical companders in practical situations will always distort the audio. Nowadays, the goalposts are so very high quality, that most of the old compander systems produced too much distortion that couldn't be undone. Perhaps one of the worst high quality companders probably produced the least permanent IMD -- dbx. Anything with a fast attack (and fast or slow release) will splat distortion sidebands all over the place. My DHDA DolbyA encoded material decoder uses incredibly aggressive techniques to minimize the necessary IMD created upon decoding.
When doing these compander schemes -- one can do the simple, obvious signal*gain type operation, or do it better -- which is CPU intensive -- but very worthwhile. The difference in the simple vs. difficult algorithms is astounding. Another 'trick' is to carefully shape the trajectory of the gain control signal -- that really helps also to avoid creating unnecessary audible distortion. One obvious thing that really needs to be done, is to keep the distortion sidebands from aliasing -- because the sampled environment creates additional challenges above those living in the nice, continuous HW world. Every possible consideration has been given -- and some day (probably soon -- within 1yr), I'll write a paper on the techniques. The development was relentless and didn't assume ANYTHING.
The result of the development is a DA decoder that sounds JUST LIKE a real DA sans fuzz, hearing details in vocals that were probably not heard since the initial DA encoding -- sometimes 40+yrs ago.
John

Post

You might want to check this:

https://www.overloud.com/products/dopamine

and the corresponding manual!

Post

johndyson10 wrote: Thu Oct 04, 2018 8:11 pm The problem with any 'compander' that isn't infinitely fast and has a perfect transmission medium is that the compander will produce IMD. As soon as you compress or dynamically change the spectrum (especially bad -- quickly), sidebands are created. Even if the decoding mechanism is practically perfect, there will be sidebands that are not cancelled by decoding. Therefore practical companders in practical situations will always distort the audio.
You are of course correct with your base assumptions. However, practically it is possible to design a transparent or at least good-sounding compander, I think I achieved that in HarmoniEQ, it of course does not apply extreme compression and expanding. Very much depends on time transfer function (envelope) of the compressor and expander, time constants, ratio, threshold and knee - e.g. ratio should be like 1:1.3, very wide knee and a very low threshold. In internal benchmarks compander in HarmoniEQ introduces almost no gain change to the signal and due to very "low-passed" time function side-bands are minor. I also believe expander "undos" side-bands introduced by compressor partially.
Image

Post

Aleksey Vaneev wrote: Fri Oct 05, 2018 6:54 am
johndyson10 wrote: Thu Oct 04, 2018 8:11 pm The problem with any 'compander' that isn't infinitely fast and has a perfect transmission medium is that the compander will produce IMD. As soon as you compress or dynamically change the spectrum (especially bad -- quickly), sidebands are created. Even if the decoding mechanism is practically perfect, there will be sidebands that are not cancelled by decoding. Therefore practical companders in practical situations will always distort the audio.
You are of course correct with your base assumptions. However, practically it is possible to design a transparent or at least good-sounding compander, I think I achieved that in HarmoniEQ, it of course does not apply extreme compression and expanding. Very much depends on time transfer function (envelope) of the compressor and expander, time constants, ratio, threshold and knee - e.g. ratio should be like 1:1.3, very wide knee and a very low threshold. In internal benchmarks compander in HarmoniEQ introduces almost no gain change to the signal and due to very "low-passed" time function side-bands are minor. I also believe expander "undos" side-bands introduced by compressor partially.
You are right that the sidebands can be undone to an extent -- but as soon as you have a finite attack/decay time along with a sampled environment with a limited bandwidth -- then the distortion is there permanently. DolbyA is good at showing that distortion can be partially 'undone', but is mostly on the LF band, where the attack/decay time is able to follow the waveform. As soon as you have that 'fast attack', against the higher frequencies, then you more than likely have sidebands that you cannot get rid of.
There are a few ways to mitigate producing more distortion upon decoding -- some people who have used DolbyAs over the years have suggested that my decoder 'undoes' the previous distortion, but I claim that can do so only to a very limited extent. There are ways of hiding the distortion, and then make them both non-obvious and the also to recover some of the signal from before the initial compression -- wont' got into that subject, but suffice it to say, I got too many other side-effects with my initial design. The results of the test were incredibly good at cleaning up the signal in some cases. Once I rework the previous true distortion removal, I might add it back into the DHDA, but for now -- the DHDA is a wonderfully big and useful step in quality.

It is so interesting to listen to a lot of 1970's/1980's vocals and actually hear the voices when there are complex mixes instead of this 'veil' that most of us (yes, including me) are used to. The 'veil' isn't even obvious untli hearing the alternative clean decode.

I do understand that limited compression/expansion ratios help mitigate creating excessive distortion -- there are some aspects of DolbyA which I disagree with -- much prefer the idea of the subsequent C4 type system. DBX is okay simply because of the kind of attack and decay (but with impossible amounts of modulation noise.) Doing a linear attack/decay is suboptimal WRT distortion, and if doing a new system -- I'd definitely use a 'dB' oriented approach. RMS itself becomes less important as bandwidths narrow, but as long as there is a moderate bandwidth, THATcorp/dbx style RMS (not the real RMS that EEs deal with) is advantageous.

With TLC, distortion can be mitigated a little -- my goal was to deal with a very distorting system -- lots of recordings, including material released to consumers, in DolbyA form. My decoder is meant to ferret out every last bit of detail possible from an already made recording -- and incredibly difficult thing to do ACCURATELY. An approximate solution to DolbyA can be adequate for some applications, but my scheme is meant to (and mostly successful at) being audibly perfect -- and generally very superior to the old HW (not just zero distortion because of totally linear gain control - but infintely better distortion sideband control.) Also, the tonality/frequency response is so similar to the real HW that I doubt that most people could tell in A/B testing (except for the cleaner sound.)

I have a new version of my compressor about ready to be released based upon super-low distortion and very intelligent (not by 'if' statements, but mathematically) attack/release methods. I figure that compressors are 'distorters' and to be given away. I have more respect for signal 'improvement'...
Tomorrow morning, I'll be relasing the new compressor -- my upcoming dbx i/ii decoder will be based on some of the technology in that compressor -- but don't confuse my compressor with a dbx compressor -- mine is more 'silent' -- and can actually be unobtrusive at inf:1 compression.

The compressor is currently 'avaiable', but the new one has more bug fixes (including silent built-in peak limiting.)

The compressor might have some interesting C++ classes and concepts in it for other developers (the actual compressor code is very short, the attack/release classes do all of the work.) The DolbyA compatible decoder uses similar concepts -- has kept it simple enough to be able to enhance beyond the minimal design. The DHDA decoder, however, uses a more complete set of my libraries -- the Compressor uses just enough of my libraries to keep the project simple.

I'll be releasing the new version (the old version does have more flaws than I had hoped) on Tapeheads and Hydrogenaudio tomorrow (after Noon or 13:00 EST US time on Oct 5,2018.) The compressor is the result of only (about) 4-5Hrs work, but based on my class libraries, and absolutely no real testing -- so I do sometimes make bugs.

The DolbyA compatible decoder, on the other hand, gets tested to death, and very EVIL and difficult recordings are used to verify its behavior!!! I just got one recording that almost made me sick that the decoding was so tricky -- but I got it done. The calibration was very different than most, and there was an offset in the HF0/HF1 bands (3k-20k and 9k-20k.) Sounds beautiful now. (They used to do weird things with DolbyA units -- e.g. enhance Karen Carpenter's voice.)

John

Post

AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.
Well -- the compressor code is really simple. It is the source code that is moderately large. The zip file includes all of the source, and feel free to write a plugin if you want!!! Just give me a little blurb for a bit of credit, otherwise -- use to your hearts content. There is some software inside this code, and some dependency on some dlls for libraries, but it is cygwin -- take a look at their www site for their source code. There is also a nice transcendental vector math library written by a person nice enough to freely license it -- the source code & copyright for that is included.

File name: simplecompMB-V1.0A-05Oct2018.zip

REPOSITORY: https://spaces.hightail.com/space/tjUm4ywtDR (https://spaces.hightail.com/space/tjUm4ywtDR)

For those who don't know this compressor -- it is multiband with bands: 20-160,160-2.6k,2.6k-20+k. It is RMS/dB linear, with a peak limiter onthe output. The attack/decay speeds are controlled by current state and recent history. Has very little pumping, and is super fast -- yet also does NOT gainup rediculously quickly. (How can it be fast & slow at the same time? It remembers the history in a very detailed way, and is also VERY NATURAL sounding.) It is actually very usable even at inf:1 compression, but I suggest 1.5:1 or 2:1 at most (for general use.)

It now has a real version number -- I am comfortable with the general quality now.
You still get the source for future hacking on the code, etc.
For the nice RT text display, add the --info=10 switch -- it also gives peak limiter information -- example:

S: 16, INPUT(RMS:-22.83dB, -3.65dB), OUTPUT(RMS:-18.65dB, -1.21dB):
CP LL( -2.07/ +2.58/ +4.90), M( +0.85/ +3.30/ +4.18), H( +1.35/ +3.87/ +4.78), PK( -1.95/ -0.00/ -0.00)
CP RL( -2.23/ +2.58/ +4.90), M( -0.91/ +3.30/ +4.18), H( -0.41/ +3.86/ +4.78), PK( -3.70/ -0.01/ -0.00)

Here is the (long) BASH command line that also uses my DHDA DolbyA compatible decoder as input (this happens to be ABBA SuperTrouper DolbyA compatible decode, and then compression):

sox -v 0.50 "/music/agflac/raw1/ABBA*06*" --type=wav --encoding=floating-point - rate -v 96k | ~jdyson/ap/damulti/da-avx --affinity --ingain=6 --outgain=0.0 --tone=-22.67 --allow=no --info=0 --xfinalize --clarify| ~jdyson/ap/comp/comp-win --cratio=0.67 --thresh=3 --maxgain=6 --outgain=0.0 --info=10 | play -q -

Even though the compressor R+L channels have same gain, the peak limiter is per channel, and the limiter
information is applied to the total gain numbers.
First is the input/output levels.
Next is the Left channel info (LF, MF, HF, and then PEAK limiter) gains.
Next is the Right channel info (LF, MF, HF and then PEAK limiter) gains.
Each triplet for each band is (mingain, avgain, maxgain) over the 1second sample interval.

For sound quality -- the compressor is much better balanced, and has better short term/long term stats.
The peak limiters have been corrected, and is now three stage. The goal is to first do a normal gain control
limiter, then subsequently faster and faster gain control that ends up being soft clipping at the end. The peak limiters are essentially inaudible in most cases.

Remember the supported switches:
--cratio=xx, where the real compression ratio is CR=1/(1-cratio). I know -- I should have fixed this. So, for a true CR=2:1, then the cratio needs to be 0.5. For a true CR=inf:1, then the cratio needs to be 1.0. For a true CR=1.5:1, then the cratio needs to be 0.33.
--thresh=xx, the pivot point for the gain -- but negate the dB (I should have fixed this also.) A typically good number is 6 (means -6dB), or 9 (means -9dB)
--maxgain=xx, the maximum gain-up for the compressor.
--maxlevel=xx, then maximum output level -- is the setting for the peak limiter.
--ingain=xx, the input gain
--outgain=xx, the output gain.
I have no external control for the attack/decay speeds or for the band frequencies. If you want to play with those -- you have the source :-).

If you have any usage questions or want to discuss the source code -- just contact me through this group...
I tend to watch Hydrogenaudio more often, but will also check this group.
John

Post Reply

Return to “DSP and Plugin Development”