How to get an Inverse RIAA curve in a DAW

This is where record cutters raise questions about cutting, and trade wisdom and experiment results. We love Scully, Neumann, Presto, & Rek-O-Kut lathes and Wilcox-Gay Recordios (among others). We are excited by the various modern pro and semi-pro systems, too, in production and development. We use strange, extinct disc-based dictation machines. And other stuff, too.

Moderators: piaptk, tragwag, Steve E., Aussie0zborn

Post Reply
User avatar
EmAtChapterV
Posts: 250
Joined: Sun Jan 06, 2013 6:49 pm
Location: Vancouver, BC

How to get an Inverse RIAA curve in a DAW

Post: # 65669Unread post EmAtChapterV
Sun Sep 08, 2024 9:05 pm

I have a regular + inverse RIAA curve VST plugin for Reaper, but it's abandonware and too twitchy to be safe in a recording chain. (Each pixel you move the slider toggles between regular and inverse?! Geez...) So I sat down with ReaEQ, Reaper's stock VST EQ plugin, and fiddled around with some numbers. Here's what I came up with.

Bring up two new instances of ReaEQ. Delete all the stock EQ points, and input these instead:

ReaEQ #1
- High Shelf 10500 Hz, +28.7 dB gain, 1.41 octave width;
- Band 40000 Hz, -2.5 dB gain, 2.30 octave width;
- Band 1000 Hz, -0.8 dB gain, 1.00 octaves.

ReaEQ#2
- Low Shelf 100 Hz, -27.5 dB gain, 1.43 octave width;
- Band 20 Hz, +4.8 dB gain, 2.32 octave width;
- Band 1000 Hz, +0.8 dB gain, 1.00 octaves.

This way #1 only affects frequencies above 1000 Hz while leaving everything below it completely unaffected; #2 vice versa. Much more useful when you have a Presto or other non-feedback head that damps and rolls off the low end by other means. Engage one, or the other, or both. Make sure you have a ton of headroom ready - I had a -20 dB pad in between the tone generator and the EQ. I'd also recommend adding another High Shelf to EQ #1 with around -6 to -9 dB gain at 24 to 30 kHz, to taste, once testing is complete, to keep the amp and cutterhead from exploding. It will start rolling stuff off around 14 to 18 kHz.

Testing this internally against the old plugin gave ±0.1 dB from 23 Hz to 36.5 kHz, and ±0.5 dB from 18 Hz to 39.8 kHz. Running it (gently and and at an *extremely* low level!) through a Pro-Ject PhonoBox and the phono stage of a late 70s stereo system gave a couple of results, assuming my Focusrite Scarlett is totally flat. The PhonoBox had a +0.7 dB hump at 135 Hz and dropped -0.5 dB above 4 kHz (just about within its published specs), and was ±1.0 dB from 17 Hz to 31 kHz. It was easily correctable to ±0.1 dB 22 Hz to 20 kHz with a couple of mild EQ settings. The old stereo system had +0.5 dB humps at 25 Hz and 31 kHz but was otherwise flat ±0.1 dB from 19 Hz to 39 kHz, which startled and impressed me coming from a completely stock 46 year old piece of consumer electronics.

User avatar
markrob
Posts: 1658
Joined: Wed Nov 28, 2007 1:14 am
Location: Philadelphia Area

Re: How to get an Inverse RIAA curve in a DAW

Post: # 65672Unread post markrob
Mon Sep 09, 2024 12:07 pm

Hi,

Nice job making that work. The only issue I see with that approach is using a bunch of second order filters to approximate the amplitude response curve might not mimic the phase response of the cascade of first order filters used to define the standard. It would be interesting to see if that is true by running a phase response test. If the EQ has a minimum phase mode as opposed to liner phase, be sure to choose that option that results in phase response that is closer to an analog filter. Not sure if any of my concerns are a big deal in any event.

The old VST 2 32 bit plugin I designed many years ago, is no longer supported by 64 VST 3 hosts. If I get some time, I might try to update it for the current standard. My original plugin had adjustable turn over points so you could adapt to non-standard or half speed modes and also a version with the 500hz turnover removed for Presto type heads as you have done with your version.

Mark

User avatar
EmAtChapterV
Posts: 250
Joined: Sun Jan 06, 2013 6:49 pm
Location: Vancouver, BC

Re: How to get an Inverse RIAA curve in a DAW

Post: # 65674Unread post EmAtChapterV
Tue Sep 10, 2024 3:19 am

[attachment=0]50hz-square-posteq.png[/attachment]

Hmm, I definitely see what you mean. 50 Hz square wave as an illustrative torture test; the other end of the spectrum has its own weird problems when it comes to oversampling. Feeding the RIAA plugin back into its inverse setting yields proper squares again. More research to be done, I guess.

(And oh good lord neither the inverse RIAA plugin nor my EQ settings like square waves. That's some frightening spikey garbage being output...)
You do not have the required permissions to view the files attached to this post.

User avatar
markrob
Posts: 1658
Joined: Wed Nov 28, 2007 1:14 am
Location: Philadelphia Area

Re: How to get an Inverse RIAA curve in a DAW

Post: # 65680Unread post markrob
Tue Sep 10, 2024 3:20 pm

Hi,

Great idea! Better results than I thought.

The tilt is due to low frequency roll off. To get a flatter top at 50hz, you would need a low frequency cutoff of around 5Hz or even lower .

The leading and trailing edge ringing seems like what you would expect if you hit the network with too steep of an edge. Try running a bandwidth limited square wave (e.g. filtered with a 20 Khz first order low pass). Running at a higher sample rate (96 or 192Khz) may be needed to test at 20Khz. I suspect you might get the same result if you attempt to sample a square wave directly to your audio input. You may already know this, but here is a nice paper on using square waves for testing audio response.

Mark
square_wave_testing.pdf
You do not have the required permissions to view the files attached to this post.

User avatar
dmills
Posts: 205
Joined: Sun Jun 16, 2019 3:33 pm
Location: Uk

Re: How to get an Inverse RIAA curve in a DAW

Post: # 65696Unread post dmills
Thu Sep 12, 2024 1:10 pm

No such thing as a square wave in digital audio, you have to band limit, and in fact the best you can really do at 1kHz is not all that square... You only get a 1kHz fundamental plus odd harmonics out to the 19th, and what is fun is that above 6.66kHz a square wave will look exactly like a sine wave if done correctly!
It is quite a sensitive test of a digital waveform generator.

On the subject of digital IRIAA, if you have something that lets you enter biquad coefficients directly, both RIAA and inverse RIAA can be done as a single biquad section, with the proviso that you get a little warping at high frequency due to the Z transform, so run oversampled to reduce that.

User avatar
markrob
Posts: 1658
Joined: Wed Nov 28, 2007 1:14 am
Location: Philadelphia Area

Re: How to get an Inverse RIAA curve in a DAW

Post: # 65697Unread post markrob
Thu Sep 12, 2024 1:40 pm

Hi,

That's basically what I did in my original plugin design. Rather than use the Bilinear Z transform with warping as is normally done, I used the matched Z transform that directly maps the poles and zeros into the z plane. It works well, but does deviate from the correct response as you get close to the Nyquist limit. So, for best results, you need to oversample. At 44.1Khz, its off by almost 3db, but at 96Khz only off by .6db at 20Khz. Here's the calc's from a Mathcad page I made long ago.

Mark
Riaa.pdf
You do not have the required permissions to view the files attached to this post.

User avatar
EmAtChapterV
Posts: 250
Joined: Sun Jan 06, 2013 6:49 pm
Location: Vancouver, BC

Re: How to get an Inverse RIAA curve in a DAW

Post: # 65698Unread post EmAtChapterV
Thu Sep 12, 2024 2:42 pm

This is all very useful information.

My DAC is normally set to 96 kHz unless I have some specific reason to switch to 44.1. But I think I'd probably need a proper analog oscilloscope to get a true reading of what it's outputting at ultrasonic frequencies.

Post Reply