Kyma Forum
  Tips & Techniques
  RIAA de-emphasis?

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

next newest topic | next oldest topic
Author Topic:   RIAA de-emphasis?
John Dunn
Member
posted 14 April 2001 14:06         Edit/Delete Message   Reply w/Quote
It would be handy to be able to run old LP albums through Kyma, but short of hooking up a stereo set, the RIAA phono curve is a problem. Anyone know how to make an RIAA de-emphasis Sound?

Here is a URL that gives the math for both the emphasis and de-emphasis, but it is considerably beyond what I can deal with.

http://www.infomaniak.ch/~bonavolt/riaa.htm

[This message has been edited by John Dunn (edited 14 April 2001).]

IP: Logged

David McClain
Member
posted 18 April 2001 02:22         Edit/Delete Message   Reply w/Quote
John,

I took a look at the RIAA description and generated a Mathematica model from his equations. He has, in addition to his equation, defined the 1 KHz correction to be 0.09 dB by means of a constant dB offset.

Looking at the shape of the curve, I estimate that you would need the ability to define an IIR filter with, possibly, two poles and two zeros. I can find these values for you using a tool I wrote to assist my hearing research, but I'm afraid you would need a filter Sound that can take arbitrary pole/zero descriptions - and Kyma doesn't currently offer that (not as far as I know...).

This would be quite easy to program on a DSP prototyping card like those available from Analog Devices (SHARC) and Motorola (DSP56K).

...seems to me that the old audio equipment would have used simple Bessel filters (RC networks) to accomplish this... After all, isn't that what the various time constants are referring to?

In high-tech overkill mode you might be able to have Kyma do this using a block FFT approach and a multiplying wavetable in frequency space. The quality of the sound will not be quite as good as an IIR filter would provide, because, I believe, the Kyma FFT Sounds use blocks of 512 samples. So each filter bandwidth would be around 86 Hz with a sample rate of 44.1 KHz. Also, I believe that the Kyma FFT works in non-overlapped chunks so you would have some edge matching problems between consecutive blocks....

...come to think of it, you need at least twice as many FFT cells as your overall spectral template, and the ability to discard samples from each end of the circular product convolution. This gets very complicated on a Kyma but it is easy to do on your own DSP.

...why not just use a PC program acting in DSP mode offline to do all of this and produce WAV files from your audio? That way you can use whatever technique suits you. Some people might complain about the phase behavior of an IIR filter, so in that case you could use arbitrarily large FIR filters that are phase flat. But again, didn't the old audio equipment use Bessel filters (not phase flat)?

...but if you had my ears you wouldn't need any RIAA Equalization...

- DM

[This message has been edited by David McClain (edited 18 April 2001).]

IP: Logged

David McClain
Member
posted 18 April 2001 03:55         Edit/Delete Message   Reply w/Quote
John,

Have a look at the Kyma Sound Lib under Effects Processing/Crossed Synthesis/Cross Input W/ Forced Air Heater.

The top chain has the components I was referring to, and I see that the Kyma FFT is not limited in length to 512 channels. They also show a novel way of performing the windowed 50% overlap in forward and inverse FFT directions.

All you need to do is remove the bottom chain which is computing a multiplicative amplitude envelope on the input spectrum, and replace it with a recurring RIAA waveshape multiplier ahead of the inverse FFT. Such a waveshape could be generated by an oscillator just like they generate the Hanning and Bristow-Johnson windows going into and out of the FFT's.

This is the high-tech overkill technique I was referring to above... It is very nearly the same as a FIR filter with perfectly phase flat behavior so as not to color your sound. I isolated the top chain and performed a noise source cross correlation spectrum with it and I found it to be amazingly clean!

- DM

[This message has been edited by David McClain (edited 18 April 2001).]

IP: Logged

David McClain
Member
posted 18 April 2001 05:39         Edit/Delete Message   Reply w/Quote

spectral_shaping.zip

 
...attached is a sample of the kind of construction you need for your spectral shaping. There are two AIF files -- one called spectral_shape.aif the other called spectral_joiner.aif. You would replace the spectral_shape.aif with your RIAA Equalization curve.

The other sample file, spectral_joiner.aif, takes the place of the windowing function used previously, and I also removed the input window. There is no need for the input window, and the spectral_joiner.aif window ensures that only the central half of the samples get placed into the output for each FFT pair. (convolutions done this way are circular and so the ends of the input chunk get blended in unpleasant ways; the central half is okay...)

I found that I could perform 1024 point FFT's but the Capy barfed when I tried 4096 points. It doesn't have enough memory with all the requisite delay lines and FFT buffers, apparently. I didn't try allocating sounds to specific processors to see if that would help. But heck, at 48 KHz sample rate a 1024 point FFT gives you filter bandwidths of only 47 Hz, which is probably narrow enough.

I wondered about keeping the system in sync with the spectral shaping oscillator, but apparently this is already handled by the Capy. I see no evidence of spectral drift in the results.

This whole thing runs comfortably on 1 DSP.

[a couple of suggestions:
1. You might want to ensure that your spectral shape has zero for the first sample to remove DC.
2. If you do this, there will be an abrupt discontinuity near DC in the spectrum, and so you might want to pre-filter this shape with a Kaiser window to avoid massive filter leakage effects. This could be done ahead of time so that the spectral shape file is set to go at runtime.
3. This whole thing is mono -- so you need to double up for stereo.]

- DM


[This message has been edited by David McClain (edited 18 April 2001).]

[This message has been edited by David McClain (edited 18 April 2001).]

IP: Logged

John Dunn
Member
posted 20 April 2001 12:25         Edit/Delete Message   Reply w/Quote
David,
Thank you for your very thoughtful comments. As usual with your postings, I find myself both edified and stretched by them.

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