Kyma Forum
  Kyma Sound Exchange
  Dave's Ultimate Stereo

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   Dave's Ultimate Stereo
David McClain
Member
posted 20 April 2003 02:38         Edit/Delete Message   Reply w/Quote

ultimatestereo.kym

 
Attached is a stereo listening environment -- the ULTIMATE! I use this all the time, many weeks in the making, whenever I'm not making noise with my Kyma.

The Sound is capable of processing mono as well as stereo sound, and should present no problems with phase cancellation when mixing to mono. No comb filtering artifacts are present, but many psychoacoustic enhancements are provided.

It takes 6 DSP's to run this full out, and it must be run at 44.1 KHz sample rate.

Here's a guided tour of the VCS... Starting at the upper left is a bypass switch for A/B comparisons, and an input attenuator used to prevent the Sound from clipping on strong input signals. Signals are accepted on Capy inputs 1&2 and 3&4.

Below that is a row with 4 functional groupings of controls. Enhancement is applied to derived Mid and Side channels, and these are differently enhanced. At the left are K1 and K2. K1 controls the proportion of Mid channel enhancement, while K2 controls that applied to the Side channel.

The enhancement consists of a 6 channel compressor on S with EQ postgain, added to the original S signal. Compression threshold is fixed at -30 dB with a compression ratio of 1.67. This produces a maximum enhancement of 12 dB, being stronger for weak signals than for strong signals.

On the Mid channel we have a 6 channel expander with postgain EQ, added to the original M channel signal. Expansion begins at -30 dB and has an expansion ratio of 0.833. But unlike an Expander, per se, the expansion only applies to signals above threshold, not below. As well, the sidechain used in these expanders comes from the corresponding S-channel bandpass. The idea here is that when the S channel is strong, the corresponding M channel is given as much as a 6 dB additional boost so that the S channel processing doesn't overpower it.

The two rows of sliders below the K1 and K2 controls are the postgain EQ levels in dB applied to the M and S channels, post-compression and post-expansion. You see that by default the M channel is mostly flat with a high end rolloff. The S channel is a bathtub curve, low in the midrange, and higher at the ends, with more gain at the high end than in the bass region.

These enhanced signals are added back to their corresponding input channels in amounts determined by K1 and K2 in dB. As you increase K1 the M channel dominates, and as you increase K2 the side information becomes more important -- increasing the stereo spread.

Delay compensation has been carefully crafted throughout to keep signals in the M and S channels in lockstep.

Because I use this Sound mostly for headphone listening, and hence, sounds are presented from the side, the M channel needs to be compensated for the side to front HRTF (head related transfer function) in order to make it appear to come from the front or back. (I often hear it above my head, but at least not from the side.)

For this purpose, I worked out the inverse FIR filter from the MIT data on HRTF measurements made at 44.1 KHz sample rate. That's the sole reason this Sound needs to run at 44.1 KHz. I don't consider running at 48 KHz for listening purposes worth the trouble of resampling all the impulse response files to rebuild this filter. At any rate, that FIR filter is the approximate filtering needed to make side presented sounds appear as though they are coming from in front of you.

Following this HRTF processing in the M channel we move into a bass enhancement section. That's the second group of controls in that 2nd row of controls. There is a bass boost gain in dB, and an M channel delay control used to delay the original signal prior to mixing with the psychoacoustic bass harmonics. I find that the bass enhancement is deepest around 4 ms delay. You can shut off the bass enhancement by dropping its gain to -40 dB. Bass is enhanced by using a peak detector with a 1 ms attack and 30 ms release to act as a synchronous sawtooth generator.

Bass enhancement is applied only to the M channel, in keeping with the psychoacoustics of bass sounds being difficult to place by ear. There is no reason to present them from the sides, and in fact, when you do, you invite some degree of nausea at strong bass enhancement settings. After a few minutes of listening with improperly presented side bass, you begin to feel like an astronaut on his first journey!

Following the K1 and K2 and M channel HRTF and Bass processing, we move into a high frequency processor that is applied separately to both M and S channels. That's the third group of controls moving left to right on the 2nd row from the top. There are 4 controls here. First is a threshold control for a noise gate to prevent excess noise buildup. Next is a cutoff frequency for a high pass filter preceding the processing. The next control determines the dB gain applied to the HF enhancements.

Above the Threshold control is a fader that crossfades between either of HF enhancement, or HF exciter. The enhancement simply adds a high pass filtered signal to itself, enhancing those highs already present. The exciter uses a DC biased half-wave rectifier passing through another high pass filter tuned to twice the entrance cutoff frequency. The exciter provides psychoacoustic harmonics of mostly 2nd and 3rd order, but others are present as well. The bottom crossfade setting is pure exciter, while the top is pure enhancement. Between them you get a mix of both kinds of processing. Good settings are program material dependent.

At the extreme right of that row are 3 controls for "BBE" processing. This is simply a modified differentiator applied to left and right reconstructed channels, to compensate for phase droop in headphones and speakers. The first control, Alpha, determines the location of the single zero in the Z-plane. At a setting of 1.0 you have a digital differentiator which allows no low frequencies to pass. A setting of 0.0 turns it off, as does the "BBE" toggle above. There is a postgain dB available next to Alpha, to restore lost amplitude as a result of this processing.

I have several models of headphones here: I normally mix with Sennheiser HD600's. These have phase droop after the signal runs through the mixing console (an A&H GL3300) and a Samsom S-Phone headphone amplifier. Its phase droop is cured with a BBE setting having Alpha = 0.7, Gain = +6 dB.

The other headphones I normally use are Beyerdynamic DT-831's. These are essentially spectrally flat through my system here, and so I run this Sound with the "BBE" processing turned off. They sound terrific!

As mentioned before, the next two rows control the dB gain applied in the 6 channels for M and S. Channels are bandpass centered at 250 Hz, 500 Hz, 1 KHz, 2 KHz, 4 KHz, and 8 KHz. All the bandpass filters are formed by cascade high-pass and low-pass filters. These are all 1st order filters.

The Attack and Release controls apply to the 6-channel compressors and expanders. Nominal settings are for 1 ms attack and 500 ms release.

Hidden from view is some processing that seeks to prevent excessive side channel enhancement whenever a large amount of reverberation is detected in the 500 Hz to 2 KHz region. When this occurs, a control signal is added to the sidechains on the 500 Hz, 1 KHz, and 2 KHz bands to prevent them from applying too much compression gain to the S channel. The simultaneous enhancement of M along with enhancement of S prevents the side channel from overwhelming the mid channel. You get plenty of side enhancement -- just adjust K2 and K1 to taste.

Many weeks of careful analysis, checking, double checking, and triple checking, etc., have gone into producing this masterpiece Sound. Delay compensation has been carefully added wherever a compressor with attack delays introduce some in one of a pair of signal chains. The M channel HRTF FIR filter has corresponding delay compensation in the S channel to keep everything time aligned through the whole system. At the very end of all the enhancement processing the M and S channels are recombined into stereo L and R channels for output to your mixer.

The sound coming from this Sound is remarkable in cleanliness, clarity, and flexibility. I can't stand to listen to CD's anymore without turning on my Kyma and starting ULTIMATE!

Most of the ideas embodied in this Sound are not original with me. I lifted good ideas gleamed from various sources, and modified them to work better (or just plain work!). Credit goes to a lot of pioneers in the field. I am a midget seeking to enjoy their inspiration. Patented ideas are incorporated in this Sound, and so it cannot be sold for profit without first licensing the technology from the various Patent holders. But there is a "fair use" clause in Patent Law, and as long as we use it for personal enjoyment that is entirely legal.

Enjoy!

- DM

[This message has been edited by David McClain (edited 20 April 2003).]

IP: Logged

David McClain
Member
posted 20 April 2003 20:58         Edit/Delete Message   Reply w/Quote

ultimatestereo.kym


USERPROG.zip

 
I've Done IT!!!

Attached is the UltraStereo in several versions, each incorporating inverse filters of various kinds. My own favorite is the one set up for 63 Hz HPF + 7 KHz LPF. All of these inverse filters are enabled as the final stage of processing in the left and right channels, using the "BBE" toggle button on the VCS.

All of these inverse filters attempt to produce the reciprocal filter for a system that mixes together twice the low frequency high-pass filter, twice the high frequency low-pass filter, and the inverted signal itself. The filters are all 2-pole filters. This attempts to model the effects of headphones and speakers.

The trick to inverting the filter is the presence of that original signal added to (er, subtracted from...) the filter outputs. That prevents the system from ever having a pole on the frequency axis (the unit Z-domain circle). This makes it possible to invert the filter transfer function without running into the huge difficulties often associated with deconvolution.

The effect of these inverse filters is to enhance the very low bass region, and the very high "air" frequencies, while at the same time providing a positive phase slope to cancel the negative phase droop exhibited by speakers and headphones.

The results are even more remarkable than ever before!

The Sound file includes a number of different configurations incorporated into the Ultimate Stereo environment, as well as the filters themselves. To run these Sounds, you need to use my Microsound named DirectIIR, included in the Zip file. This Microsound produces a 2nd order IIR filter, given the coefficients for the numerator and denominator polynomials in 1/z.

Presently there is no simple way to compute these coefficients on the fly in response to a VCS control. I'm looking for a way though... For the time being, these filters were designed by means of a program I had to write in Mathematica. Things than can be adjusted are the filter cutoff frequencies (-3 dB points) and filter Q's, as well as the amount of LPF and HPF to combine before subtracting the input signal. All of these make some difference. For now, the filter Q's were set to 0.707 giving a nice broad transition region.

The combinations are all 2 times the filters minus the input signal. Varying that combination permits changing mostly the depth of the phase correction. There are some combinations that produce inverse filters with the poles outside the unit circle in the Z-plane. When that happens you don't want to run those filters because they are saturating oscillators.

I never like to give up on an idea, so here we go... I did have to find the poles and zeros in order to compute the inverse filters. I would like to find a more direct way, analogous to an Op-Amp, but in digital form. If we can ever find such a device, then all you have to do is insert the transfer function in the input spicket and out comes its inverse.

I rather doubt we'll find such a thing for Kyma. The best I can envision is a very high sample rate subsystem running a feedback controlled op-amp simulation, with the signal of interest running at a much lower sample rate. So if we want frequencies up to 20 KHz, then I would imagine the need to run the op-amp model at 200 KHz or higher.

Enjoy!

- DM

[Aside from the fantastic deep bass response, the other really impressive thing, to me, is that I can understand the lyrics of music, whereas without the inverse filters I never could...]

[This message has been edited by David McClain (edited 20 April 2003).]

IP: Logged

capy66n320user
Member
posted 21 April 2003 14:08         Edit/Delete Message   Reply w/Quote
Hi David,

Thanks once again for sharing your insights and work with the members of this forum!

The following links maybe somewhat informative concerning the creation of Inverse Impulse Response Filters using the Mourjopoulos least-squares technique (Inverse Filter) and with minimum-phase technique (Flatten Spectrum).
http://www.ramsete.com/aurora/inverse.htm http://www.ramsete.com/aurora/spectrum.htm

This study in software auralisation was accomplished using CoolEdit Pro with Aurora Software plugins.
http://www.syntrillium.com/cep/ http://www.ramsete.com/aurora/home.htm

There are also a number of interesting publications regarding the Aurora extensions, their algorithms and psychoacoustics in general at:
http://www.ramsete.com/Public/Papers/list_pub_auro.htm

For Windows and Unix programmers, there is a public domain C-language library of software routines for signal processing available at:
http://www.tsp.ece.mcgill.ca/MMSP/Documents/Software/

IP: Logged

David McClain
Member
posted 23 April 2003 02:34         Edit/Delete Message   Reply w/Quote
Wow!! Thank you very very much! This is great stuff!

I have only scanned a few of the articles regarding automobile EQ systems and inverse filters. Most of the inverse filters appear to be FIR. I thought about doing such a thing for the phase droop of the speakers, but decided against it, because my own experience has shown that you need 3x wavelength samples for the number of taps for the wavelength of the lowest frequency of interest. In this case that would have made prohibitively large FIR filters for Kyma (approx. 3,000 taps).

But I did do such a thing (FIR) for the inverse HRTF filter in the M channel using the MIT data. There the frequencies of interest were mostly above 500 Hz, and a 90 tap filter works fine there.

But clearly, you guys have been doing this stuff for quite some time, and I'm just a newbie at it. I really appreciate all the great reference material. I will have a close look at the Mourjopoulis theory and that of Neely and Allen.

The inverse filter I found for the speaker system corrects approximate amplitude response and phase droop, but uses a 4-pole IIR filter. This was found, as it appears for my own vernacular, by a crude regularization of a singular matrix. The subtraction of the primary signal from a large multiple of the broad bandpass filter representing the model of the speakers serves as a kind of regularization. Once I discovered this technique the inversion was straightforward since I already knew the poles and zeros of the model filters.

But again, thanks so much for sharing your knowledge! I am deeply grateful to you.

- DM

IP: Logged

David McClain
Member
posted 24 April 2003 05:29         Edit/Delete Message   Reply w/Quote

ultimatestereo.kym

 
Reworked a number of things...

1. A more careful analysis of the required HRTF inverse filter for side listening to apparent frontal sounds. The Sound file here includes that new FIR filter in addition to reworked stereo listening Sound. The new FIR filter is a bit longer, now has a Kaiser window applied to it, and it has been checked for amplitude and phase consistency when applied to the side listening HRTF, as compared with the HRTF for front listening. The cascade of the HRTF inverse and the side HRTF impulse response produces a front-like HRTF impulse response that is within a dB or so across the whole spectral range, and the phase error is smaller than a few degrees everywhere.

Also improved is the S channel delay compensation to be applied with this HRTF filter in the M channel. A delay of 127 samples at 44.1 KHz sample rate is correct for producing the required frontal phase.

You may, or may not, detect some subtle changes with this new filter in place. It is subtle...

2. Reworked the phase droop inverse filter for headphones and speaker systems. This one is based on a model which has a 63 Hz highpass filter cascaded with a 4 KHz lowpass, both are 2nd order filters, not Butterworth filters. The model was adjusted to diminish the high frequency amplitude corrections, while leaving the bass extension unchanged. It sounds fantastic!

This droop correction filter is also included separately in the Sound file. It is a 4 pole correction filter, and it is an exact inverse filter for the proposed model. However, this is necessarily an approximation of reality. It does go a long way toward correcting otherwise uncorrected systems.

-----
I have translated the entire system, and then some, to C++ to run on a high-performance Pentium processor. The equivalent Sound requires a Pentium with at least 1.2 GHz clock speed. It is useful for listening to CD's on the computer system. It does sound quite good, though a bit shy of the sound quality I have become accustomed to with Capybara. No doubt the A/D's and DAC's in Capy are superior.

One thing I discovered during that porting effort was that the bass enhancement, which sounds good on Capy, based on a PeakDetector creating synchronous sawtooth waves - does not sound so good on the PC. There I had to revert to the half-wave rectifier to get presentable sounds. Not sure why this happens...

Writing the DSP processing routines as C++ classes and taking advantage of the OO hierarchy was easy. Just a few hundred lines of code. But the ordeal is getting sound into and out of the DSP code... Really makes you appreciate Kyma!!

- DM

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c