Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: RIAA Equalization Emulation (Read 23485 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

RIAA Equalization Emulation

I was wondering if there is some kind of software alternative to a RIAA circuit.  I do have one installed in my EMU 1820m, but I was thinking that software may give me a higher quality solution.

RIAA Equalization Emulation

Reply #1
I was wondering if there is some kind of software alternative to a RIAA circuit.  I do have one installed in my EMU 1820m, but I was thinking that software may give me a higher quality solution.

On the contrary, software emulation is likely to give you much worse quality. Without hardware equalization your sound card would need a much greater dynamic range, making it more likely that you get clipping, or excess noise, or both.

The main problem is that the recorded groove encodes amplitude as displacement, with a little preemphasis added. The phono cartridge, on the other hand, produces an amplitude that is a function of velocity rather than displacement, so high frequencies produce strong signals but low frequencies produce very weak signals. The RIAA equalization compensates for this effect plus the preemphasis.

RIAA Equalization Emulation

Reply #2
It's OK at 20-bits. You may have to let large clicks and pops clip - most restoration software won't mind.

I used the FFT filter in Cool Edit Pro (Adobe Audition), programming it with whatever curve I wanted (mostly to get the correct curve for pre-RIAA records). There are probably better dedicated software options out there now.

I agree with pdg though - it's not going to give you better quality, unless the existing RIAA circuit is broken.

Cheers,
David.

 

RIAA Equalization Emulation

Reply #3
That said, some people do record flat, with good results. (Two software packages - DC6 and Pure Vinyl - are built around it. The Pure Vinyl guy actually went so far as to write an AES preprint dismissing the dynamic range issue as a red herring.)

RIAA Equalization Emulation

Reply #4
I was wondering if there is some kind of software alternative to a RIAA circuit.  I do have one installed in my EMU 1820m, but I was thinking that software may give me a higher quality solution.



I have programmed one as standalone using demos for Max/MSP and SynthMaker and the other as VST/Standalone using Delphi. Here's the MaxMSP version 1.0 you can try (and instructions/coefficients for one sample rate version for Synth Maker).

This RIAA Filter software works now @ 44.1, 48, 88.2 and 96 kHz and the recording (if done as I have set it up) can be done using 16-, 24-, 32- or 32f-bit resolution to a wav file. It's also possible to extent the software to use other type of processing tools through VST/DX plug-ins but, you'll need to modify the project file a bit to load some VST/DX chainer (ACON Digital's EffectChainer as for an example) or certain plug-ins (check the KVR database for some) ... stereo to surround conversion, HRTF, restoration (de-Click, etc.), EQ, etc. comes into mind 1st.

Alternative DL links for RIAA Filter 1.0:
http://jiiteepee.fortunecity.com/riaafilter/index.html


Setting it up.

Needed components:
- download the Max/MSP Runtime (or trial version, if you like to examine/edit the filter software by your self) -
- download and extract the RIAA Filter 1.0.zip (there's an attachment linked in this post) EDIT April 1st . : new, final version v. 1.0 attached.
Additional components:
- download the Voxengo Recorder and Voxengo SPAN, extract those into same directory w/ RIAA_Filter (or install using the installer)

Hardware setup:
- connect your turntable w/o RIAA stage to your PC audio interface (either through a flat preamp or directly (this filter can be used to gain the weak signal up to 36dB if needed))
- set the audio interface for recording (i have tried recording through analog only so I can't be sure if everything works well through S/PDIF too)

On RIAA Filter software:



- open the RIAA_Filter.pat into Max/MSP enviroment
- open the I/O settings dialog and configure driver (samplerate, latency, etc.) and I/O ports properly
- start the engine by pressing the Start/Stop -button
- reset the Filter
- select Filter sample rate (needs to be equal w/ driver sample rate because of, these four filters are fixed for certain sample rates)


Extra options:
You'll get the SPAN and Recorder called by pressing the Open buttons. If nothing happens, move the VST .dll files into same directory with the filter software. These VST's are connected parallel so you can adjust the recording level by the SPAN output graphics/data.

If you like to edit the project file, you need least the trial version of Max/MSP. Editing is enabled through menu option View -> Edit. You can save the project ans use it even after the trial period through Max/MSP runtime.

Issues?
If no audio ... maybe you need to use ASIO drivers, try by resetting the filter, set the subsonic filter parameters (drag with mouse). If still no audio or no filter added (i.e. bassless/bright audio coming out) then, check your connections, levels, check the HW monitoring state, etc.). I found E-MU 0404 USB troublesome when changing sample rate "on-the-fly". If the filter freezes, just kill the MaxRT or Max process through task manager (ctrl-alt-del).

I probably prepare a better subsonic filter someday and maybe add a selection for to link those slider moves.

By setting up Electri-Q for Chebyshev I, HP Filter 36dB/oct @ 20Hz / BW20 it's possible to get quite steep subsonic/rumble filter (lighter line on graph):








Schematic for this filter project:



As seen in picture, I have multiplied the gain coefficients by 10. This gains the filter output signal over +30dB. Harmonic distortion stays still under -100dB but, if you feel it's gained too much then, just change those three first values on each RIAA filter. By dividing values by 10 you'll get the original level (~0dB @ 1kHz (as seen in the background image of tis filter software)). Do not touch into those two last filter coefficients !!



Quote
RIAA Filter software specs:

44.1kHz
Maximum error from 0.00 Hz to 20000.00 Hz = ~0.224dB
Maximum phase error from 0.00 Hz to 20000.00 Hz = ~+/- 30 degrees

where the "phase error" is computed after a constant delay is added or subtracted to make the phase error equiripple

48kHz
Max error from 0.00 Hz to 20000.00 Hz = ~0.14dB
Max phase error from 0.00 Hz to 20000.00 Hz = ~+/- 24 degrees

88.2kHz
Maximum error from 0.00 Hz to 20000.00 Hz = ~0.0082dB
Maximum phase error from 0.00 Hz to 20000.00 Hz = ~+/- 3 degrees

96kHz
Maximum error from 0.00 Hz to 20000.00 Hz = ~0.0057dB
Maximum phase error from 0.00 Hz to 20000.00 Hz = ~+/- 2.4 degrees




There's also commercial software for this (Diamond Cut DC7).

Also, I have prepared a preset for ddfm:IIEQ which is quite accurate too.


Juha

RIAA Equalization Emulation

Reply #5

This is an old thread ... I would have like to edit the previous post rather than bring this live again but as no EDIT option available ...

Update:

My RIAA EQ filter pages can be found @ http://jiiteepee.fortunecity.com/riaafilter/index.html

There you can find some instructions on how to prepare a software based RIAA EQ filter.

Pages are not finished yet so be patient...

Juha

RIAA Equalization Emulation

Reply #6
I was wondering if there is some kind of software alternative to a RIAA circuit.  I do have one installed in my EMU 1820m, but I was thinking that software may give me a higher quality solution.

Audacity has built-in RIAA eq.  Also does some pre-RIAA eq and it's free.

Woody

RIAA Equalization Emulation

Reply #7
I noticed that the issue of cartridge loading was not addressed in this thread. Whatever the cartridge is connected to should have an input impedance of around 47k - unlikely with a typical sound interface or mixer input. For example, my Mackie 1202-VLZ Pro has an input impedance of 1.3k for the mike input (any other input is too low gain). My Mackie Onyx is 2.4k. Values such as these are far too low.

Once you start to add to or modify your inputs, you might as well add an riaa preamp.
Cheers,
Alan

RIAA Equalization Emulation

Reply #8
MC carts can be loaded with just about anything, and do not require additional capacitance. They're a perfect electrical fit for most preamps.

Also, Audacity's RIAA is FIR and not IIR (and thus is completely ignoring phase concerns - this may not be an audible issue though). It also doesn't try to approximate the curve above about 15k or below 30hz. I'm not aware of any error computations made on its frequency response, whereas the more elaborate implementations tend to be very well characterized in their errors.

RIAA Equalization Emulation

Reply #9
MC carts can be loaded with just about anything, and do not require additional capacitance. They're a perfect electrical fit for most preamps.

True. I wasn't thinking of MC, but am envious of those who have one. Not sure my preamp has sufficient gain...
Cheers,
Alan

RIAA Equalization Emulation

Reply #10
...

Also, Audacity's RIAA is FIR and not IIR (and thus is completely ignoring phase concerns - this may not be an audible issue though). It also doesn't try to approximate the curve above about 15k or below 30hz. I'm not aware of any error computations made on its frequency response, whereas the more elaborate implementations tend to be very well characterized in their errors.



Could this Audacity filter be tested/measured somehow ... I have done "production" filters as well which could be used for to prepare audio sample (what kind of sample?) ... could it be possible for Audacity to record/measure the filtered output ?



Juha

RIAA Equalization Emulation

Reply #11
MC carts can be loaded with just about anything, and do not require additional capacitance. They're a perfect electrical fit for most preamps.

True. I wasn't thinking of MC, but am envious of those who have one. Not sure my preamp has sufficient gain...


In early beginning, I used to connect my turntable (MM) directly into SB Audigy 2 inputs (I don't know specs for those input ports) and then, gain the signal as much as needed through RIAA filter gain coefficients ... harmonic distortion for the filter stayed < -100dB in any case.

When I got E-MU 0404 USB, I could connect through it's 1M line inputs (~40-50dB gain was needed to get proper levels ... no extra gain from filter was needed).


Juha

RIAA Equalization Emulation

Reply #12
MC carts can be loaded with just about anything, and do not require additional capacitance. They're a perfect electrical fit for most preamps.

True. I wasn't thinking of MC, but am envious of those who have one. Not sure my preamp has sufficient gain...
The Denon DL110 has MM output levels and costs $100-150 on the street. That's more or less in everybody's price range.

...

Also, Audacity's RIAA is FIR and not IIR (and thus is completely ignoring phase concerns - this may not be an audible issue though). It also doesn't try to approximate the curve above about 15k or below 30hz. I'm not aware of any error computations made on its frequency response, whereas the more elaborate implementations tend to be very well characterized in their errors.



Could this Audacity filter be tested/measured somehow ... I have done "production" filters as well which could be used for to prepare audio sample (what kind of sample?) ... could it be possible for Audacity to record/measure the filtered output ?
Dude, don't think so hard.  Just FFT an impulse response of the filter and compare against theoretical results.

Just out of curiousity I just did this with Audacity. Between 40-15khz the response is +-0.15db of the theoretical curve. It's -1db at 20hz and +2db at 20khz. That's actually pretty decent, but I do have to wonder about the phase differences.

RIAA Equalization Emulation

Reply #13
Just out of curiousity I just did this with Audacity. Between 40-15khz the response is +-0.15db of the theoretical curve. It's -1db at 20hz and +2db at 20khz. That's actually pretty decent, but I do have to wonder about the phase differences.



Right, some of those phase differences are << 1 KHz, and the ear actually can perceive such things.

RIAA Equalization Emulation

Reply #14
...


Dude, don't think so hard.  Just FFT an impulse response of the filter and compare against theoretical results.

Just out of curiousity I just did this with Audacity. Between 40-15khz the response is +-0.15db of the theoretical curve. It's -1db at 20hz and +2db at 20khz. That's actually pretty decent, but I do have to wonder about the phase differences.



But, ... (BTW, how is that done?) ... I don't get 'good' results with that FIR RIAA EQ preset (that's why I'm asking if the effect does stay when exported to a wav file ... least result of applied effect can be seen on Audacity). I did this task by selecting the track (24-bit/48kHz stereo), opened the EQ screen, picked up the RIAA and then loaded it (proper curve appeared into graphics area) ... after leaving the panel by hitting OK, selected EQ became processed ... exoptred to a WAV.

I did three different exports from Audacity after applying the FIR based RIAA EQ preset there, plain EQ generated, same normalized (< -3.0 dB) and same amplified (< -0.0 dB). Compared to 2nd order IIR filter(s) I've prepared, ... well, maybe the audio sample (24-bit .wma < 8MB) explains this better.

Samples:
1. no RIAA
2. FIR
3. FIR + Normalization < -3.0 dB
4. FIR + Amplifying < -0.0 dB
5. IIR < -1.0 dB
6. IIR < -3.0 dB


Am I doing something wrong when exporting the processed file from Audacity ?

iZotope RX showed strange sprectrum for those files which were exported from Audacity ... .


Juha


RIAA Equalization Emulation

Reply #16
I haven't listened to the track yet, but what exactly are you interpreting as being not "good" here? There's nothing in your screenshot that definitely shows a problem. The time domain waveform differences are always going to happen with phase errors like what exists with linear phase RIAA eq. The differences in frequency response are difficult to interpret without knowing exactly what you're measuring.

RIAA Equalization Emulation

Reply #17
I haven't listened to the track yet, but what exactly are you interpreting as being not "good" here? There's nothing in your screenshot that definitely shows a problem. The time domain waveform differences are always going to happen with phase errors like what exists with linear phase RIAA eq. The differences in frequency response are difficult to interpret without knowing exactly what you're measuring.


I got the #3 showing up better by increasing the FFT size from 4k to 16k. Also added those parameters into picture which I used for plots.
Actually, I measured whole pieces (not just those 30s samples which ones I linked).

http://img35.imageshack.us/img35/6846/sadeaducompare63rd.jpg

BTW, the numbers in previous picture are related to the numbering used on list of sample order given earlier.

All those other samples (#2-#6) has been gotten from the sample #1 ....


Juha

RIAA Equalization Emulation

Reply #18
...
The Denon DL110 has MM output levels and costs $100-150 on the street. That's more or less in everybody's price range.
...

Worth a look. Of course, for the probably significant number of people staying with MM, my original comment still applies.
Cheers,
Alan

RIAA Equalization Emulation

Reply #19
After re-reading my earlier comments I should point out that it's only the loading on the cart that I'm concerned with. In fact I use a preamp with correct loading for a MM cart, but no RIAA filter. The idea being that click reduction may work better on an unfiltered signal.

The thinking goes like this: A click is an anomalous rate of change - could be found by differentiating the signal. Could be harder to find if the signal is integrated first, which is basically what the RIAA filter does.

I've been entirely happy with the results, but haven't been able to prove that they're better this way, there certainly isn't a huge difference. It's difficult to make valid comparisons; for a start a non-filtered signal needs different click reduction settings. Whatever the difference may be though, I'm satisfied that it's a good method.
Cheers,
Alan

RIAA Equalization Emulation

Reply #20
Sorry, did I kill this thread? 
Cheers,
Alan

RIAA Equalization Emulation

Reply #21
Nah, I'm just busy. Good point re MM carts - you'd be hard pressed to always choose the DL110 at that price range; I'd likely choose the 440ML over it.

You're right that most of a click's energy exists in the treble (and often goes up into the ultrasonic band). Applying RIAA boosts the energy where transient noise is, relatively, the weakest. At the same time, nothing prevents a click detector from operating in the frequency domain to begin with and highpassing the content for the purposes of transient detection. And the magnitude of the temporal spreading imposed by RIAA is not that high.

A much more potent issue IMHO is whether or not recording at 96khz improves transient detectection, and of course, running flat helps the ultrasonic system response stay above the electrical noise floor. All of this is speculation though.

RIAA Equalization Emulation

Reply #22
...


Dude, don't think so hard.  Just FFT an impulse response of the filter and compare against theoretical results.

Just out of curiousity I just did this with Audacity. Between 40-15khz the response is +-0.15db of the theoretical curve. It's -1db at 20hz and +2db at 20khz. That's actually pretty decent, but I do have to wonder about the phase differences.



But, ... (BTW, how is that done?) ... I don't get 'good' results with that FIR RIAA EQ preset (that's why I'm asking if the effect does stay when exported to a wav file ... least result of applied effect can be seen on Audacity). I did this task by selecting the track (24-bit/48kHz stereo), opened the EQ screen, picked up the RIAA and then loaded it (proper curve appeared into graphics area) ... after leaving the panel by hitting OK, selected EQ became processed ... exoptred to a WAV.

I did three different exports from Audacity after applying the FIR based RIAA EQ preset there, plain EQ generated, same normalized (< -3.0 dB) and same amplified (< -0.0 dB). Compared to 2nd order IIR filter(s) I've prepared, ... well, maybe the audio sample (24-bit .wma < 8MB) explains this better.


Samples:
1. no RIAA
2. FIR
3. FIR + Normalization < -3.0 dB
4. FIR + Amplifying < -0.0 dB
5. IIR < -1.0 dB
6. IIR < -3.0 dB

[/b]

Am I doing something wrong when exporting the processed file from Audacity ?

...

Juha



Hmm... wasn't there anything wrong ... on those FIR results (I accidentally deleted the audio sample ... link in this reply should work for a while)?

IIRC, someone stated once (dsprelated -forum) that  it's quide a "long" FIR filter needed for this RIAA EQ ... is the one in Audacity "long" enough?


Juha

RIAA Equalization Emulation

Reply #23
Uploaded those audio samples 1-6 from my comparison onto Uploads section.



Juha


RIAA Equalization Emulation

Reply #24
Here's an example of Vinyl rip using software based RIAA EQ (+ 12nd order Butt. HP @ 10Hz).

http://www.hydrogenaudio.org/forums/index....showtopic=74376


Recording done using
Turntable: Technics SLQ2 ('78)
Cartridge: Technics EPC 205 CMKIII ('80) + Stylus: Tonar 766 ('01)
Audio Interface: E-MU 0404 USB
by
connecting turntable directly into E-MU HiZ inputs (no additional flat pre-amp was used).

The Vinyl version is recorded using 24-bit/96kHz. RIAA EQ (VST version of 2nd order IIR filter) was added already in recording process (Reaper). High Pass filter is added when exported (rendered) to final audio sample (16/44.1) (done in Sonar 8.1, std settings was used for dither/SRC).

NOTES:
I had to "trim" the recorded track +3.7dB on Sonar to get the level 'bout equal with the sample from CD (Voxengo SPAN showed max +9.4dB for this sample of CD version (K12 -metering system)).

Conversion from 24/96 to 16/44.1 eats a bit from the best possible but, lets take this degradation as a compensation for what was needed to do for the other sample.

This isn't intend to be a comparison between these two samples since, for CD version, I had to go from MP3@320kbps (CBR) to 16/44.1 WAV (my original CD is 'dead') ... . CD sample is from "Best Of" of Don Henley and the Vinyl sample is from "I can't Stand Still" ('82).



Juha