It's interesting that you should mention PWM in relation to compressors. As a student in the 1960s, I did an analysis of what were then the main compressor types, with the aim of finding ways to reduce intermodulation distortion. This distortion is caused by the compression dynamics and the signal information using the same modulation method, with the distinction between them being by frequency separation. If you wanted fast-acting compression, you sacrificed low-frequency audio.Has anyone played around with PWM compressor designs?
I don't know the innards of the Cranesong designs in detail, but my understanding was that the STC8 is a classic stereo FET compressor with huge variety of control on the sidechain. Their more recent Trakker unit (stackable mono) also used a FET in the audio path, but PWM in the FET control circuitry. This makes it very consistent, such that any number of mono Trakker boxes can be coupled together and track perfectly, as is required for multichannel sound stages in, for example, the film industry.When done well it has many advantages, as Boswell mentioned. Check out the STC8 by cranesong....Dave Hills design is beautiful.
I don't know the innards of the Cranesong designs in detail, but my understanding was that the STC8 is a classic stereo FET compressor with huge variety of control on the sidechain. Their more recent Trakker unit (stackable mono) also used a FET in the audio path, but PWM in the FET control circuitry. This makes it very consistent, such that any number of mono Trakker boxes can be coupled together and track perfectly, as is required for multichannel sound stages in, for example, the film industry.
Both of these techniques are quite different from using PWM (or PPM - pulse position modulation) in the forward audio path. I'm not sure whether your original question referred to this aspect or just the side chain.
It's interesting that you should mention PWM in relation to compressors. As a student in the 1960s, I did an analysis of what were then the main compressor types, with the aim of finding ways to reduce intermodulation distortion. This distortion is caused by the compression dynamics and the signal information using the same modulation method, with the distinction between them being by frequency separation. If you wanted fast-acting compression, you sacrificed low-frequency audio.
PWM (as it later became known) allowed the dynamic modulation to be applied to the amplitude of the two-level signal while the audio signal content shifted the high-frequency changeover points. A simple low-pass filter turned this improbable-looking waveform back into audio whose amplitude could be controlled in a linear fashion. The two inputs to the system did not interact at the electronic level, so removing the distortion mechanism. However, as with all compressors, there can be audible modulation effects.
This was a paper project, so at that stage I didn't get to build a demonstration model. By the time I got round to building my own dynamic effect units, FETs had become available, and I used those until more recently, when opto-FETs at last gave what PWM methods had promised.
To think I was grappling with the compression IMD problem over 50 years ago...
I dug around in my paper achives to see if I could find the thesis I wrote on the topic, but it probably got lost somewhere in the intervening years. I remember there being what seemed at the time to be a huge amount of maths involved. Things like summation and integral signs were not mechanical typewriter-friendly.
Your demos are nicely arranged. However, in some of them there is a problem with the stereo image dancing about. It's much better constrained in the last one (finalizeplus).
One more MINOR deviation from the specific subject, but talking about IMD and the potential improvements. I have a whole bunch of DA decoding examples (using the new DHNRDS decoder, that *just happens* to decode DolbyA encoded material generally better than a true DolbyA.)Any problem with the image comes from the DA calibration -- On the 'leaked' (normally available though) examples, I didn't have tones for an estimate of the calibration level, so I had to do the calibratiion by listening for distortion & dynamics (which is incredibly & infinitely difficult.) In most cases, it is even difficult/tricky to determine if the 'compression' comes from the production choices or DolbyA. One of the challenges -- often, undecoded material is EQed with -3dB or -6dB at 3kHz/Q=0.707. So, I try undoing that -- and then choosing one of the common calibration levels. Since most of the gain control activity in the higher frequencies is at/above 3kHz (the MF band is usually pinned or nearly so at 0dB), that means that detecting the correct calibration can easily be 3dB in error -- should it be -17dB or -20dB (because of the possible 3dB additional gain at HF.) It is NOT a trivial piece of software to use for 'leaked' DolbyA, considering the rather frustrating variability of the source material. Professionally maintained recordings, with tones -- the DHNRDS is bordering on trivial to use.
If the calibration is in error, then the gains can get out of sync. As I mentioned, listening for distortion or decoding artifacts is very difficult -- esp for the DHNRDS because it doesn't let bad signals cause distortion (well, not very much.) If there IS a kind of distotrtion, it is mostly due to the gains not lining up, and an apparent ugliness becasue (for example) the HF0/HF1 bands not changing gains in the same way.
The attack/release time is very variable -- between 1msec about 30msec for attack and 30 - 120msec for release (approx), LF/MF are 2X slower than the HF bands, each band can dynamically change the release times in a 2:1 ratio. It is also dependent on the exponential curves -- very tricky thing to nearly perfectly match a true DolbyA -- no simple R/C timeconstants need apply. Per some professional recordists hearing, it appears that the DHNRDS matches a true DolbyA well within DolbyA to DolbyA variation. (No simple feat, considering the conversion from feedback to feedforward, and all of the conversions needed for that.)
The front end settings for the 4 demos were identical for each version though -- absolutely identical, the only difference was in the anti-IMD code (which is an incredibly intricate and CPU intensive piece of code*), where there are three or four modes, but only two of the anti-IMD modes are availabel to the user. The only difference caused by the anti-IMD is the suppression of sidebands during the time the signal is of a substantial level (in essense, when the waveform is large, the gain control speed is dynamically retarded -- much more rapidly than shaping the gain control signal itself.) it is so very obvious when comparing with an actual DolbyA -- the DHNRDS is no longer able to produce the slight grain of a DolbyA (the minimum mode does some curve shaping, thereby still suppressing the distortion a little bit.)
* one hint about the 1st level of anti-IMD, and should probably be done in every software based compressor/expander -- use a push-pull technique, so that in a 1st order sense, the distortion is partially cancelled. It doesn't seem intuitively that it will help, until thinking of the gain control as modulation -- then consider the phase of each sideband. If thinking in a static sense, a push pull scheme might seem superfluous. This stuff is mind-numbingly tricky.
The biggest disadvantage per my hearing in the highest modes -- the slightest detail in sibilance (spit sounds) are transparent. Not necessarily a good thing, therefore, sometimes using one of the modes that aren't so pristine/aggressive at removing IMD can be a good thing.
Perhaps the most eye-opening is ABBA -- imagine ABBA with very little IMD. Probably the closest thing to what was sent to the DolbyA some 40+yrs ago.
Refer to the Orban patent for one analog IMD solution in the case of a limiter. In the analog HW days, it was a daunting challenge... In this brave-new-software world, it is just a very difficult and confusing challenge .
One more add-on: Orban Patent is US 6,205,225
I am taking down the examples -- if anyone is REALLY interested, just drop me a message, and I'll make some really, really good examples available. Just passed a new release to my project partner, that release invalidating any of the DHNRDS demos. The new release of the DHNRDS makes the anti-IMD code a little less needed -- I developed a gain-control-only nonlinear filter that mitigates some more of the unneeded sideband creation without impacting the attack time in any noticeable way. The anti-IMD routines still help (really still clean up the material), but at the cost of lots of CPU.One more MINOR deviation from the specific subject, but talking about IMD and the potential improvements. I have a whole bunch of DA decoding examples (using the new DHNRDS decoder, that *just happens* to decode DolbyA encoded material generally better than a true DolbyA.)
The encoding/decoding process on most noise reduction systems would add some intermodulation distortion (IMD.) Since nowadays we have lots of computing power available, a lot of brute force or simply time consuming algorithms can be used to improve on original designs.
Writing a SUPER DUPER good compressor/expander in a sampled environment has to be done with care so that aliasing will be minimized or eliminated. That is, when mixing the gain control with the original signal, the process is modulation, quite similar to normal AM broadcast modulation. That modulation creates sidebands, and with fast attack/release times, the sidebands can easily wrap the Nyquist frequency (1/2 the sample rate.) This matter is off topic WRT the IMD, but the various IMD issues are made more important due to sampling and aliasing.
In the case of decoding legacy NR systems (for old analog tape), there is a real problem to deal with -- intermodulation distortion. In this brave, new digital world, the IMD issues just don't happen the same. In the old analog world, we had IMD from noise reduction, IMD from AGC/compressors/limiters, IMD even just from tape alone. Some of the forms of IMD cause a smoothing or almost 'dynamic range compressed' sound. Some kinds of IMD can sound grainy. The old DolbyA encode/decode process could cause both forms of IMD, but the 'smoothing' or 'softening' seems to be the most pronounced for my own perception. Of course, there is also a 'grain' that might be perceived in the demo..
I have another site that has various examples of 'leaked' DolbyA material (material purchased as CD or download, but the DolbyA hadn't been properly decoded), and at least one (currently one) example of both normal DolbyA HW decoding, and a decoding example using the DHNRDS decoding with full anti-IMD enabled.
The examples are "ABBA-TakeAChanceOnMe-Polar.mp3" for the original Polar music version, obviously DolbyA decoded. There is another version, decoded from a 'leaked' DolbyA Japanese release (the CD is in storage, so I don't remember all of the details), decoded witih thie DHNRDS decoder. The demo/experiment is not 100% controlled, but the results are so typical that I have great confidence that it is at least mostly accurate. The 'locally' decoded version is "ABBA-TakeAChanceOnMe-DHNRDSDA.mp3". Of course, the lengths have been truncated to be politte to the IP owners, but this example should show the lost detail in the 'Polar Music', DolbyA decoded version. This difference in detail has nothing to do with non-compliance or amount of expansion. Actually, even though the locally decoded version is more detailed, the difference is partially due to the attack/release being carefully shaped (effectively slowed down) and the sidebands have been cancelled in a proprietary way (the sidebands still exist, or there'd be no gain control -- but the sidebands/gain control is generated in a very particular way -- maybe to be patented.) With the selective slow-doown of the gain control time trajectory (not really a difference in attack/release time per-se), and a massaging of the distortion sidebands (pretty much a removal of extraneous signal), the result is clearer/cleaner -- much better reproducing the material before DolbyA encoding 40yrs ago.
Here is the site:
I understand about the frustration. Everytime the I revisit the issue about how much CPU the method uses, it just ends up being -- it is as fast as the method allows... *Really* frustrating.That sounds an interesting scheme, John.
I wish I had had that amount of computing power available when attempting to tackle the IMD problem in the late 1960s.