Phono RIAA Equalization filter (evaluation version available)

Mar 19, 2007 at 8:14 PM Thread Starter Post #1 of 14

jiiteepee

Headphoneus Supremus
Joined
Apr 5, 2005
Posts
1,606
Likes
62
Hello!

THIS THREAD IS 'BOUT THE OLD VERSION OF RIAA EQ SOFTWARE. NEW, IMPROVED VERSION IS AVAILABLE ON ANOTHER THREAD.


Well, after many tries w/ not so good results in using EQ plugins for RIAA compensation, I have now started implementing a solution of my own ... a RIAA reproduction filter to be used when turntable is connected into soundcard without hardware RIAA stage in signal path.

All I can say so far, is that the results I get are really qood but, since I have only one set of hardware to try it with, I would like you to evaluate this too. This filter,

http://img476.imageshack.us/img476/9...ascreendr8.png

(
biggrin.gif
.. Sorry 'bout the visual outlook but ... don't laugh, it should work)


which I have linked below, is prepared only for you. It is optimized for 44.1 kHz audio (any bit depth can be used) and it can be used through Cycling74 Max/MSP runtime enviroment only. ASIO, MME, DS, etc. are supported as well as Windows XP and MAC OS/X 10.3.9-> (there is a runtime for both systems available). For this "evaluation" version, I have included a rumble filter (Subsonic) w/ ability to set the cutoff frequency (5-30Hz) and Q (0.1-1.41). It's allways ON and not very well implemented (see below).

EDIT:
As mentioned, this filter is for 44.1kHz data only. What it means is that the mathematical model is matched for amount of this much samples (sample accurate processing). Biquad method used in this filter uses three samples to get the new output value calculated (current sample and two previous samples). What happens if you set samplerate to 48kHz as for an example ... samples becomes processed wrong --> quality becomes bad.


Here are the needed software:
- "RIAA Filter (for 44.1kHz).rar" (~16kB) NOTE: there is a 48kHz version w/ recording capability linked in post #7.
Mirror 1
Mirror 2
NOTE: Filename may become changed by the file service providers system.
-- 3 files included (2 pictures and the filter .pat file)

"Max/MSP 4.6.2 Runtime" enviroment (PC/MAC) (~4.5MB) -



Setting everything up (Windows):
- connect the turntable into PC through a flat pre-amplifier (no RIAA satage in signal path)
- connect your output device (receiver/amplifier/active speakers/headphones)
- install the Max/MSP runtime enviroment
- extract the "RIAA Filter (for 44.1kHz).rar" to your harddisk
Start the RIAA Filter program either by
- starting the runtime enviroment and Open the "RIAA Filter (for 44.1kHz).pat" or
- double-clicking the "RIAA Filter (for 44.1kHz).pat" (through Windows Explorer -> .pat extention should be associated to Max/MSP runtime then)

In "RIAA Filter (for 44.1kHz)" screen:
- set I/O devices; ASIO recommended (if no sound, remember check settings in mixer software)
- adjust the Subsonic filter by dragging w/ mouse (Hz = 25Hz and Q = 0.71 are good to start from) (see below)
- adjust Gain to somewhere near the 0dB mark (128)
- press the Play/Stop button to enable the playback through filter

NOTE: If you can hear audio when Play/Stop is set "OFF" (there should be total silence) then you need to set something in your mixer softwre (maybe monitoring OFF, mute something, etc.) otherwise the unfiltered signal is summed into playback --> brighten sound.

Some notes:

Subsonic filter:
It's low order highpass filter so the cut is not very sharp ... you can use 25-30Hz as cutoff frequency w/o loosing much from above the 20Hz frequencies.
Example on how # of orders effects (this is lowpass filter) :
http://www.kwon3d.com/theory/filteri..._lpass_f02.gif

RIAA filter:
The original filter coefficients (15 decimal accuracy) gives quite accurate de-emphasis curve (±0.23dB) even it's a 2nd order filter (4th order filter would give ±0.0006dB) .. as the Max/MSP enviroment seem to scale and round the given value into 6 decimal value, it may have some negative effect on accuracy. I have compared the orignal 15 decimal data against rounded 7, 6, 5, 4, 3, and 2 (http://img134.imageshack.us/img134/4356/dectestxv4.png) decimal data and those didn't differ very much by the results (sound/frequency response curve) until you're under 5 decomals. Some other results from measurements:

Phase:

http://img341.imageshack.us/img341/3000/phase441cu2.png

Harmonic distortion:

http://img124.imageshack.us/img124/1...dist441yx5.png


Software:
Gain, and Subsonic controllers resets to "0" when filter is loaded into runtime enviroment so, all these needs to be set every time after filter is loaded otherwise you get bad quality audio if at all. If you get rattle in audio, just toggle the Play/Stop or reassign your I/Os. Hmm.. I hope there are no bugs
since I can't test (or fix in realtime) because of I'm still using W2k and I do not have Max/MSP which also needs least XP being installed (even the runtime won't get installed in W2k SP4).

Hardware:
You need some pre-amplification for turntable output (in most cases) to get signal levels good enough for soundcard input. As you can gain the signal +17dB software wise, it's possible that you can get everything working w/o additional pre-amplifier (I have tried this and it seem to work well but, it is card dependent ofcourse) but, remember that the best input impedance for cardridge is normally 47kΩ (-100kΩ). Pre-amplifier is recommended in any case.

I beg you not to turn this thread into "hardware vs software RIAA". I just wish you could try this filter and comment the results you get. If you don't like the result then just say it and it also would be better if you could specify the reason for your opinion (I need a lot of all kind of information).

jiitee

P.S.

In generally, when trying this RIAA Filter w/o pre-amp and you can't get levels high enough for decent playback then you could also try this:
- download the Max/MSP Trial software
- open the Filter into it, and switch to Edit mode
- drag those objects (background image, etc.) to get those two biquad~objects available

http://img231.imageshack.us/img231/6205/riaapatnn8.png

There are five numerical values stored in those biquad~ boxes, just after the ADC~ object, for both left and right channels ... by multiplying those 3 first values by
- 5 you'll get ~+14dB more gain from filter (filter gain is then ~27dB),
- 10 you'll get ~+20dB (filter gain is then ~+33dB),
- etc.,

... so, If you copy these (these are for 48kHz only)

biquad~ 10, -7.555521, -1.646257113 -1.7327655 0.734553444

values and paste them over those old values in those biquad~ boxes (check also that everything matches there) ... do you start get better output levels? If results are not good yet then just multiply those original w/ 15 etc., or if you start getting distortion then use smaller multiplier. NOTE: Adding gain worses the Harmonic Distortion level but, w/ +33dB gain it should still be well below -100dB.

You should also be able to save the changes you made (the Max/MSP trial is valid for 30 days but, after that you should be able to use the fixed Filter w/ Max/MSP Runtime w/o limitations).
 
Mar 19, 2007 at 9:01 PM Post #2 of 14
I downloaded the files and read a good part of the enormous post you wrote. I'll try it out tomorrow or the day after depending on when I've got enough time to do so.

Btw. Are you suggesting that I should change my $50 interconnect, going from my preamp to my amp, with a $4 one and plug it in to my crappy laptop soundcard? I guess that is exactly what you are suggesting.
blink.gif
 
Mar 19, 2007 at 10:50 PM Post #3 of 14
Quote:

Originally Posted by EnOYiN /img/forum/go_quote.gif

...

Btw. Are you suggesting that I should change my $50 interconnect, going from my preamp to my amp, with a $4 one and plug it in to my crappy laptop soundcard? I guess that is exactly what you are suggesting.
blink.gif



Hmm... the quality of soundcard plays a big role in this method of RIAA EQing. As the RIAA production EQ used in LP is opposite for what this Filter is made for, you should have a card w/ good frequency response by that factor.
Also (to all), remember that connecting turntable directly into soundcard without pre-amplification may not give high enough signal levels. It's possible to gain the signal a bit before filter by using software features but, it's not possible in this implementation. The project version does include this possibility too.

BTW, if here are kX Project driver users, who are interested on this matter, there is a DSP macro for same purpose made by Hannes Rohde. You can DL it from here.

jiitee
 
Mar 21, 2007 at 3:34 PM Post #4 of 14
Right.

I got everything working like it should. (using ASIO and a better interconnect than the $4 one ) I did use my crappy laptop soundcard which isn't all that crappy after all. (crappy enough to not go crazy about it though)

It took me about 5-10 minutes to get it working and then another 2 hours to get it working the way I liked it. I think that this program might be too difficult to use for a lot of people who are not knowledgeable about computers and how Windows works. Maybe I am wrong about this though. Time will tell.

I noticed the following things:

1. Windows really sucks as far as recording goes. There are 5 sliders for everything which are all doing the exact same thing.
2. The adjustable numbers in max/msp (and hence the filter) are hard to use. They are likely to go too far or not far enough. Most likely you can't do anything about it, but it doesn't increase user-friendlyness.
3. This program actually works. There are no bugs for as far as I could discover. It's an RIAA filter indeed. It does the job. It's hard for me to comment on the quality of it since the soundcard I have been using is not comparable to my analog way of playback. If you would use a proper soundcard it would most likely work really well. I think I can recommend this for anyone who has a decent computer based rig and is thinking about buying a recordplayer. This program will save you quite a lot of money especially when the recordplayer you bought isn't world class and you don't feel like spending more on a RIAA filter than a recordplayer.

Aside from these things some suggestions:

1. A button to get both the sliders (L+R gain) to the 0 dB mark without having to drag them there.
2. A button which will allow you to move both gain sliders at the same time.

This concludes pretty much everything I can say about it without testing this program with a better soundcard. When my PC is back home I can test it with that.

Maybe you should post this in the dedicated source forums to get more reactions. I don't think a lot of people who are browsing the computer audio forums own a recordplayer. I think it would be a shame to see your efforts go to waste.

Cheers.
 
Mar 21, 2007 at 5:03 PM Post #5 of 14
Thanks for trying and comments. Sad to hear 'bout those dfficulties you had to get it working.

As I mentioned earlier, this version is build using Max/MSP just for this testing purposes (actually, as it's a .pat file, you can examine/edit/rebuild/whatever if you just have the Max/MSP software available there (w/ trial version you can see the construction but, I suppose you can't save if you want to make any changes)). The project version is programmed using Delphi + VST/ASIO SDKs and becomes released as a VST plugin (and a stadalone product then later), so it's much easier to use then w/ your familiar VST capable software (I have tested the VST version which I already have (not finished yet though) with players lilke Winamp and Foobar and use the Seib's VSTHost/SAVIHost software as a testing bed in generally).

I suppose the hardest part on getting this Max/MSP version to work is to get the original signal prevented to become summed into the processed output signal. When I build this Max/MSP version, I tried everything w/ some Sounblaster card (Audigy 2 or 4) only and I found out that the native ASIO was the easiest driver to get everything working properly. It sure worked w/ others too but there were some 'strange' issues w/ those.

Yes, those sliders and other controls ... I don't know the Max/MSP enviroment at all (~3 hours experiment) so when I made this version I just added those needed components and connected those wires between I/O pins there. Somehow the Max/MSP just seemed to reset everything when the project file was loaded (as does the runtime version too). Also, if I set tose Subsonic parameters to static values those didn't 'open' w/o changing the value either (this is maybe some bug there in Max/MSP). Since I didn't had much time to examine the Max/MSP library, I tried only couple methods to get those not to reset but w/o resolution.

Need to follow this and if the installation/"getting it working" looks too difficult ... maybe I release a VST version (w/o any controls, just the RIAA filter) later this week.

I have equal thread opened on some other forums too so maybe I start getting more replies and comments in couple of days.


jiitee
 
Mar 21, 2007 at 6:45 PM Post #6 of 14
Quote:

Originally Posted by jiiteepee /img/forum/go_quote.gif
Thanks for trying and comments. Sad to hear 'bout those dfficulties you had to get it working.


That was mainly up to Windows. I had some difficulties finding the right sliders.
smily_headphones1.gif
 
Mar 26, 2007 at 10:11 PM Post #7 of 14
No feedback/results yet??

Allright, maybe it is/was too hard to use or too limited to get your attention so, ... I prepared another evaluation version ... now it's fixed for 48kHz instead of 44.1kHz, it can be used without preamplifier too (in most cases) and it's possible to record the output to a 16-/24-/32-/32f-bit wav file (though, this needs another plugin being installed, see below).

I also added a "reset to defaults" button so It's possible to get everything working much easier. Subsonic filter is not improved ... it still cuts only 6dB/oct instead of 'required' 36dB/oct.

'bout recording the output:
You need to install Voxengo Recorder VST plugin into the same directory where to this RIAA Filter is placed to, to get the recorder working. Actually, you could use any plugin but it needs to be renamed equally to the voxengo recorder .dll. Set the "MME Device" to "Sound Mapper" .. otherwise you may hear some unwanted noises (those are not added into recorded file). Set the "Output To " -> "File". Name the file before recording. Set the bit-depth.


Here are links for the new version.
RIAA Filter (optimized for 48kHz) DEMO.rar
Mirror 1 -
Mirror 2 -


Hmm... still waiting some feedback/comments ...


jiitee
 
Mar 28, 2007 at 7:01 AM Post #10 of 14
Quote:

Originally Posted by gevorg /img/forum/go_quote.gif
Very interesting. Can't believe it haven't been done before by some pro-audio software (or it had?). I will definetely give it a shot once I get a turntable.


Yes, it has been done for both PC and MAC.

Couple examples:
For PC - http://www.enhancedaudio.com/newway.htm
For MAC - http://www.channld.com/pure-vinyl.html

I made my own because of I just wasn't ready to pay such a money they ask to get one for my purposes (I don't need those features they've included).

jiitee
 
Mar 28, 2007 at 7:18 AM Post #11 of 14
Quote:

Originally Posted by smsmasters /img/forum/go_quote.gif
Hi, I'm not sure if I understand this. Will this method allow me to equalize my speakers by analyzing the frequencies?


Hmm... no, main usage for this type software is to 'restore' the effect of RIAA EQ (follow the link given below) put in vinyl LP's before pressing process.

Some information on RIAA:
- http://www.euronet.nl/~mgw/backgroun...kground_1.html


jiitee
 
Mar 29, 2007 at 6:39 PM Post #13 of 14
Quote:

Originally Posted by infinitesymphony /img/forum/go_quote.gif
I thought the point of the RIAA curve was to ensure that records would sound right on a home user's system... What's the purpose of adding another curve?


Hmm... this is only for to replace the hardware RIAA with software RIAA so there shouldn't be double RIAA EQ done in any case.

Actually I have my turntable connected into my Hi-Fi system through soundcard and the HighQuality RIAA VST plugin I've made for this ... because the RIAA stage in my amplifier is not good (its accuracy is 0.8dB (30Hz-15kHz) compared to this software based filter which accuracy is 0.0005dB (@ 44.1kHz) - 0.000005dB (@96kHz) so, maybe you understand why in this way .... and sure I can hear the difference well.

jiitee

EDIT: Here are RIAA VST 44.1, 48, 88.2 and 96kHz demos.
 
Mar 29, 2007 at 6:46 PM Post #14 of 14
Oh, duh... That makes sense. For a second there, I forgot that most turntables have to be routed through a dedicated phono stage that incorporates the RIAA curve. I've never had a standalone turntable, so I've never had to think about using the phono stage input on my amp.
smily_headphones1.gif
 

Users who are viewing this thread

Back
Top