Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 04-06-2020, 02:47 PM   #561
David Carlyon
Human being with feelings
 
Join Date: Feb 2019
Posts: 182
Default

Quote:
Originally Posted by ErBird View Post
Anti-aliasing aside, do you have any idea how Voxengo achieved such stunning fft graphics?
Is it cubic splines? If so, is there a sacrifice in accuracy to get a better visual?

This is 4096 block size, smoothing off:
I have no answer to your question, only an agreement that span is great!
Have you looked at melda's multi analyser? It's display is amazing also (not as often talked about, but great quality IMO)
It has an insane amount of settings - you can really get into it and change just about everything. Not sure if that would give you any insight?
David Carlyon is offline   Reply With Quote
Old 04-06-2020, 02:52 PM   #562
David Carlyon
Human being with feelings
 
Join Date: Feb 2019
Posts: 182
Default

First off, thanks a lot for this EQ - what a great acheivement!!
Really awesome to see things like this being developed for Reaper.
It looks beautiful!

How does Fabfilter deal with the Nyquist problem without adding latency?
One thing i have been looking into lately is automation, and what i have found is latency can often make automation inaccurate. Now, this one only introduces 16 samples so i am sure its negligible....but it is still something i am thinking about.
David Carlyon is offline   Reply With Quote
Old 04-13-2020, 04:05 AM   #563
80icio
Human being with feelings
 
Join Date: Mar 2016
Location: Italy
Posts: 322
Default

Incredible Script! very useful EQ
Thanks so much

I have CRAVE eq which is a stunning EQ plug in,
somehow they look pretty similar...are you the man behind that EQ???
80icio is offline   Reply With Quote
Old 04-14-2020, 02:52 AM   #564
nitsuj
Human being with feelings
 
nitsuj's Avatar
 
Join Date: Nov 2017
Posts: 292
Default

Quote:
Originally Posted by David Carlyon View Post
First off, thanks a lot for this EQ - what a great acheivement!!
Really awesome to see things like this being developed for Reaper.
It looks beautiful!

How does Fabfilter deal with the Nyquist problem without adding latency?
One thing i have been looking into lately is automation, and what i have found is latency can often make automation inaccurate. Now, this one only introduces 16 samples so i am sure its negligible....but it is still something i am thinking about.
Thanks!!

Solving the Nyquist 'cramping' problem without oversampling is a good question. In the beginning, I intended ReEQ to have a similar feature set and simplicity to Ableton's EQ8. I got carried away and now I think it surpasses it. But EQ8 also solved the Nyquist issue by oversampling (HQ mode). Some other EQs such as Studio One's built-in EQ also solve it by having an 'HQ' oversampling mode - at the cost of a little latency.

It's addressed in the literature but not fully. There's a fix for the 'peak' filter near Nyquist by Orfanidis but it's using Direct Form for bi-quads and ReEQ, like EQ8, uses Andy Simper's SVF derivation. Also, other filter shapes aren't addressed there. The MeldaProduction EQs optionally have either the 'analog' peak, which I think is the Orfanidis one, or you oversample. Quite a few analog modelled channel plugins use something like Orfanidis to de-cramp the peaks.

It's definitely a solved problem but I haven't looked extensively into how. Fabfilter Q3, DMGAudio Equilibrium etc all solve it and for all filter shapes. So I'm thinking there's a fundamentally different way of doing the filter math that makes it straightforward.

In the end, I went for a solution that's at least on par with the stock EQs in other DAWs whilst building a lot on the feature set to surpass them. It's super transparent and in truth you don't always need HQ and can drop back to ECO which also improves performance. But yeah, the trade-off is a few samples latency.

Maybe I'll look into it some more at some point.
nitsuj is offline   Reply With Quote
Old 04-14-2020, 02:54 AM   #565
nitsuj
Human being with feelings
 
nitsuj's Avatar
 
Join Date: Nov 2017
Posts: 292
Default

Quote:
Originally Posted by 80icio View Post
Incredible Script! very useful EQ
Thanks so much

I have CRAVE eq which is a stunning EQ plug in,
somehow they look pretty similar...are you the man behind that EQ???
You're welcome!

No, I'm not the person behind Crave EQ. I did look at a few different EQs and non-EQ plugins and took a little inspiration though.
nitsuj is offline   Reply With Quote
Old 04-14-2020, 06:06 AM   #566
pepe44
Human being with feelings
 
pepe44's Avatar
 
Join Date: Jul 2013
Location: Portugal
Posts: 1,827
Default

any chance we can get to introduce data values ? values for frequency for example. using the mouse doesn't match the value i want , say 150Hz for example.
thanks.

EDIT: dB´s per octave should be a nice add too. If i need to set a 150 Hz band pass filter with a Q factor of 1 and 36 dB per octave filter, i would i do that ?
pepe44 is offline   Reply With Quote
Old 04-14-2020, 06:32 AM   #567
MaXyM
Human being with feelings
 
Join Date: Aug 2018
Posts: 454
Default

Hello
Thanks for outstanding tool.

I spotted two issues:
1. if window is small, controls are automatically hiding. There is no any kind of substitution (info or mini-menu). I spent several minutes trying to figure out what broke
2. sometimes, the frequency node stops reacting on left mouse clicks when covered by control pane. It remains "untouchable" even after disabling the pane.

with regards

Last edited by MaXyM; 04-14-2020 at 06:58 AM.
MaXyM is offline   Reply With Quote
Old 04-14-2020, 06:58 AM   #568
nitsuj
Human being with feelings
 
nitsuj's Avatar
 
Join Date: Nov 2017
Posts: 292
Default

Quote:
Originally Posted by pepe44 View Post
any chance we can get to introduce data values ? values for frequency for example. using the mouse doesn't match the value i want , say 150Hz for example.
thanks.

EDIT: dB´s per octave should be a nice add too. If i need to set a 150 Hz band pass filter with a Q factor of 1 and 36 dB per octave filter, i would i do that ?
I had a bunch of test code for keyboard value input. There's an issue though. You can only tell a JSFX to get total keyboard focus all the time. That means that when you're not entering a value, none of the Reaper keys would work unless you click off the JSFX window. You can't toggle it either, so you can't just take focus when entering a value. It's all the time. It thought that was really annoying so didn't pursue it.

I agree though that entering precise values is a good thing to have. I've wanted to do it several times. I have an idea that'll still use the mouse but bring up a widget that lets you do it by clicking. Not as fast as keyboard entry but at least you'll be able to do it. I'll give it some more thought.
nitsuj is offline   Reply With Quote
Old 04-14-2020, 07:02 AM   #569
nitsuj
Human being with feelings
 
nitsuj's Avatar
 
Join Date: Nov 2017
Posts: 292
Default

Quote:
Originally Posted by MaXyM View Post
Hello
Thanks for outstanding tool.

I spotted two issues:
1. if window is small, controls are automatically hiding. There is no any kind of substitution (info or mini-menu). I spent several minutes trying to figure out what broke
2. sometimes, the frequency node stops reacting on left mouse clicks when covered by control pane. It remains "untouchable" even after disabling the pane.

with regards
Thanks for the feedback.

The controls hide mainly to allow embedding in TCP and MCP in Reaper 6. There's no flag you can check to see if you're embedding so I had to use the size of the window to signify it. I'll likely leave that as it is for now.

Regarding the bug - yeah, it shouldn't do that. If the pane is disabled then you should have full screen selection access. I'll sort that out. Until then you can use the panel next/prev node to select it then use the knobs to alter gain.
nitsuj is offline   Reply With Quote
Old 04-14-2020, 07:56 AM   #570
pepe44
Human being with feelings
 
pepe44's Avatar
 
Join Date: Jul 2013
Location: Portugal
Posts: 1,827
Default

Quote:
Originally Posted by nitsuj View Post
I had a bunch of test code for keyboard value input. There's an issue though. You can only tell a JSFX to get total keyboard focus all the time. That means that when you're not entering a value, none of the Reaper keys would work unless you click off the JSFX window. You can't toggle it either, so you can't just take focus when entering a value. It's all the time. It thought that was really annoying so didn't pursue it.

I agree though that entering precise values is a good thing to have. I've wanted to do it several times. I have an idea that'll still use the mouse but bring up a widget that lets you do it by clicking. Not as fast as keyboard entry but at least you'll be able to do it. I'll give it some more thought.
Maybe if you enable a values box, not pretty i know, but at least would be functional for this task.
Many JSFX have that like he simple tone generator you can add values.
pepe44 is offline   Reply With Quote
Old 04-14-2020, 08:56 AM   #571
MaXyM
Human being with feelings
 
Join Date: Aug 2018
Posts: 454
Default

Quote:
Originally Posted by nitsuj View Post
The controls hide mainly to allow embedding in TCP and MCP in Reaper 6. There's no flag you can check to see if you're embedding so I had to use the size of the window to signify it. I'll likely leave that as it is for now.
Could you please check size of the window when the pane is hiding?
IMO the window is pretty big yet (I recall it must have been about 1000px)
MaXyM is offline   Reply With Quote
Old 04-14-2020, 11:05 AM   #572
nitsuj
Human being with feelings
 
nitsuj's Avatar
 
Join Date: Nov 2017
Posts: 292
Default

Quote:
Originally Posted by pepe44 View Post
Maybe if you enable a values box, not pretty i know, but at least would be functional for this task.
Many JSFX have that like he simple tone generator you can add values.
That was one of the options I considered. To enable a visible single slider value that you can generically 'assign' to parameters like cutoff, resonance, etc. Thing is, not only would it look weird and work weirdly, but you'd want a different range of values depending on the parameter you're wanting to change. A frequency param would have a different range (and scale) to a resonance parameter and so on. Comes out really kludgy.
nitsuj is offline   Reply With Quote
Old 04-14-2020, 11:14 AM   #573
nitsuj
Human being with feelings
 
nitsuj's Avatar
 
Join Date: Nov 2017
Posts: 292
Default

Quote:
Originally Posted by MaXyM View Post
Could you please check size of the window when the pane is hiding?
IMO the window is pretty big yet (I recall it must have been about 1000px)
There are three size modes: Full, Compact and Very Compact.

Full is what you see normally, usually with everything visible. Compact happens when the window is lower than 600x320. Very Compact happens when the window is lower than 300x160. By 'lower', I mean if either width or height goes below the mode width and height thresholds.

Those resolutions are double for retina displays to account for retina having twice the resolution.
nitsuj is offline   Reply With Quote
Old 04-14-2020, 11:25 AM   #574
ErBird
Human being with feelings
 
Join Date: Jan 2017
Location: Los Angeles
Posts: 1,161
Default

Quote:
Originally Posted by nitsuj View Post
It's addressed in the literature but not fully. There's a fix for the 'peak' filter near Nyquist by Orfanidis but it's using Direct Form for bi-quads and ReEQ, like EQ8, uses Andy Simper's SVF derivation. Also, other filter shapes aren't addressed there. The MeldaProduction EQs optionally have either the 'analog' peak, which I think is the Orfanidis one, or you oversample. Quite a few analog modelled channel plugins use something like Orfanidis to de-cramp the peaks.
There's also Martin Vicanek's paper.
ErBird is offline   Reply With Quote
Old 04-14-2020, 03:35 PM   #575
nitsuj
Human being with feelings
 
nitsuj's Avatar
 
Join Date: Nov 2017
Posts: 292
Default

Quote:
Originally Posted by ErBird View Post
Indeed there is. A kind fellow has just pointed me at that and I've remembered that I have that paper already downloaded from some time ago.

The issues there are that it's missing resonant shelves, notch filter and corrected 6db lowpass and highpass filters. I'm also not sure what the characteristics are when you rapidly change the frequency and resonance for automation (the SVF I use is rock solid).

If anybody could point me at a reference implementation then I'd be willing to take a closer look. I've been unable to find one.
nitsuj is offline   Reply With Quote
Old 04-14-2020, 06:44 PM   #576
ErBird
Human being with feelings
 
Join Date: Jan 2017
Location: Los Angeles
Posts: 1,161
Default

Quote:
Originally Posted by nitsuj
If anybody could point me at a reference implementation then I'd be willing to take a closer look. I've been unable to find one.
Sure, there's one here:
https://forum.cockos.com/showthread....64#post2091164

The matching concepts are interesting, but I don't really trust any of them. They tend to eventually show their flaws. I think you're right for favoring the SVF/TPT filters. They're basically as good as it gets, despite the cramping.
ErBird is offline   Reply With Quote
Old 04-14-2020, 07:33 PM   #577
nitsuj
Human being with feelings
 
nitsuj's Avatar
 
Join Date: Nov 2017
Posts: 292
Default

Quote:
Originally Posted by ErBird View Post
Sure, there's one here:
https://forum.cockos.com/showthread....64#post2091164

The matching concepts are interesting, but I don't really trust any of them. They tend to eventually show their flaws. I think you're right for favoring the SVF/TPT filters. They're basically as good as it gets, despite the cramping.
Thanks! Can't believe I missed that. If there'd have been resonant shelves, notch and 6db low/highpass then I'd have been sorely tempted to give them a go. Might be able to derive the notch but I'm a bit stumped for the shelves and 6db filters.

I wonder if the Fabfilter and DMGAudio folk are using matching algorithms? Equilibrium supports a lot of different filter shapes - it'd be a pain to have to formulate matching/compensation for everything... But I dunno, maybe they went to all the trouble.

What flaws do you think show up? I've heard people talk about phase near Nyquist but it's most likely inaudible?
nitsuj is offline   Reply With Quote
Old 04-14-2020, 10:41 PM   #578
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by ErBird View Post
Sure, there's one here:
https://forum.cockos.com/showthread....64#post2091164

The matching concepts are interesting, but I don't really trust any of them. They tend to eventually show their flaws. I think you're right for favoring the SVF/TPT filters. They're basically as good as it gets, despite the cramping.

All "analogue" sounding EQs use either oversampled BiQuads or "analogue" matched filter.
If you have the right implementation of "analogue" matched filter it could sound very pleasant wo any flaws.
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 04-14-2020, 10:42 PM   #579
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by nitsuj View Post
I wonder if the Fabfilter and DMGAudio folk are using matching algorithms?

FF and DMG do.
gEQ12, CS3301 and CS5501 do as well.
__________________
www.tbproaudio.de

Last edited by TBProAudio; 04-14-2020 at 10:48 PM. Reason: Just checked DMG, DMG Equilibrium has match filters
TBProAudio is offline   Reply With Quote
Old 04-16-2020, 09:41 AM   #580
Ahurac
Human being with feelings
 
Join Date: Apr 2020
Posts: 3
Default Just introducing myself in the conversation :)

Hello there, I just want to say that ReEQ is amazing, it made me stop using FabFilter Pro Q3 for this awesome free alternative.
But I have a litte issue with it : when applying a low-cut, ReEQ start using a looooot of CPU, except when a sound is played through the plug-in (so when it's inactive it munch CPU but when it's active no problems.)
What's that all about? Did I miss something in my way of using it? Thank for your answers
Ahurac is offline   Reply With Quote
Old 04-16-2020, 11:29 AM   #581
ErBird
Human being with feelings
 
Join Date: Jan 2017
Location: Los Angeles
Posts: 1,161
Default

By flaws I mean the curve-matching concepts tend to come with added constraints (usually a frequency limit below Nyquist) outside which the approximation fails.
Not that they they can't sound good or that they cause audio artifacts.

Here's someone demonstrating Orfanidis's peak falling apart:


I was curious how the Vicanek filters compare to common plugins. Here are the results. I wonder if Crave EQ is using additional FIR correction like DMG.

ErBird is offline   Reply With Quote
Old 04-16-2020, 03:38 PM   #582
nitsuj
Human being with feelings
 
nitsuj's Avatar
 
Join Date: Nov 2017
Posts: 292
Default

Quote:
Originally Posted by ErBird View Post
By flaws I mean the curve-matching concepts tend to come with added constraints (usually a frequency limit below Nyquist) outside which the approximation fails.
Not that they they can't sound good or that they cause audio artifacts.

Here's someone demonstrating Orfanidis's peak falling apart:
Yes, I've tested Fabfilter with Plugin Doctor and you can see the characteristic 'lifting'/matching of the curve next to Nyquist. What's interesting is that Fabfilters visual rendered curves aren't exactly the same as the audio curves you see. Very close, but not the same. Which is fair enough. Even in ReEQ I use RBJ to render the filters and SVF to process the audio.

With the Orfanidis method, I expect that the way that the peak doesn't quite work is still less audible and intrusive than the whole peak cramping.
nitsuj is offline   Reply With Quote
Old 04-16-2020, 03:39 PM   #583
nitsuj
Human being with feelings
 
nitsuj's Avatar
 
Join Date: Nov 2017
Posts: 292
Default

Quote:
Originally Posted by Ahurac View Post
Hello there, I just want to say that ReEQ is amazing, it made me stop using FabFilter Pro Q3 for this awesome free alternative.
But I have a litte issue with it : when applying a low-cut, ReEQ start using a looooot of CPU, except when a sound is played through the plug-in (so when it's inactive it munch CPU but when it's active no problems.)
What's that all about? Did I miss something in my way of using it? Thank for your answers
Thanks for the feedback. I've had a couple of reports of this - it shouldn't be doing it. I'll take a look when I get the chance.
nitsuj is offline   Reply With Quote
Old 04-16-2020, 03:40 PM   #584
nitsuj
Human being with feelings
 
nitsuj's Avatar
 
Join Date: Nov 2017
Posts: 292
Default

Quote:
Originally Posted by TBProAudio View Post
FF and DMG do.
gEQ12, CS3301 and CS5501 do as well.
Very cool. Your EQs look great!

Did you solve for resonant shelves too?
nitsuj is offline   Reply With Quote
Old 04-16-2020, 10:07 PM   #585
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by nitsuj View Post
Did you solve for resonant shelves too?

No, just Bell/Peak, LC and HC. For the rest user can use OS
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 04-17-2020, 03:43 AM   #586
nitsuj
Human being with feelings
 
nitsuj's Avatar
 
Join Date: Nov 2017
Posts: 292
Default

Quote:
Originally Posted by ErBird View Post
Here's someone demonstrating Orfanidis's peak falling apart:
I've just realised what's happening here....I was focussed on the very right-hand side of the curve as it moves towards Nyquist. The whole bell shape changes shape!! Blimey, that's pretty rough. Could it be an error in implementation perhaps?
nitsuj is offline   Reply With Quote
Old 04-18-2020, 09:27 AM   #587
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by nitsuj View Post
I've just realised what's happening here....I was focussed on the very right-hand side of the curve as it moves towards Nyquist. The whole bell shape changes shape!! Blimey, that's pretty rough. Could it be an error in implementation perhaps?

Looks odd. Which EQ is this?


In any case Orfanidis will never fully replace 2x/4x oversampling.
But the filter itself could sound very smooth, if implemented right
__________________
www.tbproaudio.de

Last edited by TBProAudio; 04-18-2020 at 09:33 AM.
TBProAudio is offline   Reply With Quote
Old 04-18-2020, 11:54 AM   #588
ErBird
Human being with feelings
 
Join Date: Jan 2017
Location: Los Angeles
Posts: 1,161
Default

Quote:
Originally Posted by TBProAudio View Post
Looks odd. Which EQ is this?
In any case Orfanidis will never fully replace 2x/4x oversampling.
But the filter itself could sound very smooth, if implemented right
From the last post here:
https://www.dsprelated.com/showthrea...p/360023-1.php

IDK. The word on the street tends to be that it has issues.

Quote:
Originally Posted by nitsuj View Post
Could it be an error in implementation perhaps?
Maybe, but I used the code directly from Orfanidis's paper.
At lower Q settings it becomes unpredictable and blows up at certain frequencies.
At a "reasonable" Q there's still cramping.
Vicanek's does a lot better.



"Orfanidis code is unusable for general audio equalization as it has "glitches" at certain frequencies where bandwidth is erratically expanded. Maybe in theory its fine."
"By the way, the MATLAB code is presented in Orfanidis paper, check it out. It IS glitchy."

Still searching for Knud Christensen's paper.

Code:
desc: Peak Filter Comparison
author:ErBird

slider1:0<0,7,1{RBJ,Orfanidis,Vicanek}>Type
slider2:50<0,100,0.1>Freq (%)
slider3:632<20,22050,1>Freq (Hz)
slider4:0<-24,24,0.1>Gain (dB)
slider5:0.707<0.1,4,0.001>Q

@init

pi = $pi;

function sinh(x)
(
  0.5*(exp(x)-exp(-x));
);

function cosh(x)
(
  0.5*(exp(x)+exp(-x));
);

function asinh(x)
(
  log(x+sqrt(x^2+1));
);

function rbj_peak(freq, gain, Q)
instance(b0, b1, b2, a0, a1, a2)
local(A, s, w0, cosw0, sinw0, alpha)
(
  A = 10^(gain/40);
  w0 = 2*$pi*freq/srate;
  cosw0 = cos(w0);
  sinw0 = sin(w0);
  alpha = sinw0/(2*Q);
  b0 = 1 + alpha*A;
  b1 = -2*cosw0;
  b2 = 1 - alpha*A;
  a0 = 1 + alpha/A;
  a1 = -2*cosw0;
  a2 = 1 - alpha/A;
  b0 /= a0;
  b1 /= a0;
  b2 /= a0;
  a1 /= a0;
  a2 /= a0;
);

function orfanidis_peak(freq, gain, Q)
instance(b0, b1, b2, a0, a1, a2)
local(G0, G, GB, w0, dW, F, G00, F00, num, den, G1, G01, G11, F01, F11, W2, DW_, C, D, A, B)
global(srate, pi)
(
/*
 G0 = reference gain at DC
 G = boost/cut gain
 GB = bandwidth gain

 w0 = center frequency in rads/sample
 Dw = bandwidth in rads/sample

 b = [b0, b1, b2] = numerator coefficients
 a = [1, a1, a2] = denominator coefficients
 G1 = Nyquist-frequency gain
*/
G0 = 1;
G  = 10^(gain/20);
GB = 10^(gain/40);
w0 = 2*$pi*freq/srate;
Dw = 2*w0*sinh((sin(w0)/w0)*asinh(1/(2*Q)));

F = abs(G^2 - GB^2);
G00 = abs(G^2 - G0^2);
F00 = abs(GB^2 - G0^2);
num = G0^2 * (w0^2 - pi^2)^2 + G^2 * F00 * pi^2 * Dw^2 / F;
den = (w0^2 - pi^2)^2 + F00 * pi^2 * Dw^2 / F;
G1 = sqrt(num/den);
G01 = abs(G^2 - G0*G1);
G11 = abs(G^2 - G1^2);
F01 = abs(GB^2 - G0*G1);
F11 = abs(GB^2 - G1^2);
W2 = sqrt(G11 / G00) * tan(w0/2)^2;
DW_ = (1 + sqrt(F00 / F11) * W2) * tan(Dw/2);
C = F11 * DW_^2 - 2 * W2 * (F01 - sqrt(F00 * F11));
D = 2 * W2 * (G01 - sqrt(G00 * G11));
A = sqrt((C + D) / F);
B = sqrt((G^2 * C + GB^2 * D) / F);

b0 = (G1 + G0*W2 + B)/(1 + W2 + A);
b1 = -2*(G1 - G0*W2)/(1 + W2 + A);
b2 = (G1 - B + G0*W2)/(1 + W2 + A);
a0 = 1;
a1 = -2*(1 - W2)/(1 + W2 + A);
a2 = (1 + W2 - A)/(1 + W2 + A);
);

function vicanek_peak(freq, gain, Q)  //Coded by TBProAudio
instance(a, s, q, w0, cosw0, sinw0, alpha, b0, b1, b2, a0, a1, a2)
local(AA, f0, _test, AA0, AA1, AA2, phi0, phi1, phi2, r1, r2, BB0, BB1, BB2, w, p)
global(srate)
(
  AA = 10^(gain/20);

  f0 = freq/(srate/2.0);
  // Poles
  a0 = 1.0;
  a2 = exp(-0.5*$pi*f0/(sqrt(AA)*q));
  _test = 4*AA*q*q;

  (4*AA*q*q > 1) ?   // complex conjugate poles
  (
    a1 = -2*a2*cos(sqrt(1 - 1/(4*AA*q*q))*$pi*f0);
  ):                 // real poles
  (
    a1 = -2*a2*cosh(sqrt(1/(4*AA*q*q) - 1)*$pi*f0);
  );
  a2 = a2^2;

  // Zeros
  AA0 = (1.0 + a1 + a2)^2;
  AA1 = (1.0 - a1 + a2)^2;
  AA2 = -4*a2;

  phi1 = sin(0.5*$pi*f0)^2;
  phi0 = 1.0 - phi1;
  phi2 = 4*phi0*phi1;

  r1 = (phi0*AA0 + phi1*AA1 + phi2*AA2)*AA^2;
  r2 = (AA1 - AA0 + 4*(phi0 - phi1)*AA2)*AA^2;

  BB0 = AA0;
  BB2 = (r1 - phi1*r2 - BB0)/(4*phi1^2);
  BB1 = r2 + BB0 + 4*(phi1 - phi0)*BB2;

  b1 = 0.5*(1 + a1+ a2 - sqrt(BB1));
  w   = 1.0 + a1 + a2 - b1;
  b0 = 0.5*(w + sqrt(w^2 + BB2));
  b2 = -BB2/(4*b0);    
);

function filter(x)
instance(b0, b1, b2, a1, a2, x_old, x1, x2, y1, y2)
(
  x_old = x;
  x = b0*x + b1*x1 + b2*x2 - a1*y1 - a2*y2;
  x2 = x1;
  x1 = x_old;
  y2 = y1;
  y1 = x;
  x;
);

@slider

  filter_type = slider1;
  f_low = 20;
  f_high = 22050;
  freq = floor(f_low*(f_high/f_low)^(0.01*slider2));
  slider3 = freq;
  gain = slider4;
  Q = slider5;

filter_type == 0 ?
(
  left.rbj_peak(freq, gain, Q);
  right.rbj_peak(freq, gain, Q);
):
filter_type == 1 ?
(
  left.orfanidis_peak(freq, gain, Q);
  right.orfanidis_peak(freq, gain, Q);
):
filter_type == 2 ?
(
  left.vicanek_peak(freq, gain, Q);
  right.vicanek_peak(freq, gain, Q);
);

@sample

spl0 = left.filter(spl0);
spl1 = right.filter(spl1);
ErBird is offline   Reply With Quote
Old 04-18-2020, 02:01 PM   #589
David Carlyon
Human being with feelings
 
Join Date: Feb 2019
Posts: 182
Default

Does any one know what the Steven Slate 'Infinity EQ' does to solve this issue?
I know he says it has 'analog matched' curves - or maybe just analog modelled...but it is not oversampled - zero latency.

One thing i personally would love for this EQ is to be able to see a note name read out when in MCP/TCP mode. Would be very useful.
Great work on this! Love the Reaper community, such a creative bunch.
David Carlyon is offline   Reply With Quote
Old 04-18-2020, 02:45 PM   #590
sai'ke
Human being with feelings
 
sai'ke's Avatar
 
Join Date: Aug 2009
Location: NL
Posts: 1,453
Default

Sounds like the Vicanek filters are pretty good then? Especially since we're in double precision land anyway (he does mention that filter construction with the matched ones requires it)

Since you love testing things Erbird, did you happen to give them a trial by fire with audio-rate modulation or sudden gain transitions?
__________________
[Tracker Plugin: Thread|Github|Reapack] | [Routing Plugin: Thread|Reapack] | [More JSFX: Thread|Descriptions|Reapack]
sai'ke is offline   Reply With Quote
Old 04-18-2020, 06:06 PM   #591
ErBird
Human being with feelings
 
Join Date: Jan 2017
Location: Los Angeles
Posts: 1,161
Default

Quote:
Originally Posted by sai'ke View Post
Sounds like the Vicanek filters are pretty good then? Especially since we're in double precision land anyway (he does mention that filter construction with the matched ones requires it)

Since you love testing things Erbird, did you happen to give them a trial by fire with audio-rate modulation or sudden gain transitions?
Actually, that's exactly what I was doing. Maybe you can try out my test JS?
It's hard to assess when each filter starts to break down. Even TPT has it's limits, albeit well beyond the others and with less artifacts.
I don't see Vicanek's filter performing any better than RBJ's. Am I using the wrong direct form?

Code:
desc:LP Filter Comparison
author:ErBird

slider1:0<0,2,1{RBJ,Vicanek,TPT}>Type
slider2:20<20,20000,1>Freq (Lower Limit)
slider3:20000<20,20000,1>Freq (Upper Limit)
slider4:50<0,100,0.00001>Freq (%)
slider5:632<20,22050,1>Freq (Hz)
slider6:0.707<0.5,16,0.0001>Q

slider8:0<0,1,1{Off,On}>Modulate Cutoff
slider9:0<0,2,1{Sine,Triangle,Square}>Shape
slider10:1<1,200,0.00001>Rate (Hz)

@init

pi = $pi;

function sinh(x)
(
  0.5*(exp(x)-exp(-x));
);

function cosh(x)
(
  0.5*(exp(x)+exp(-x));
);

function asinh(x)
(
  log(x+sqrt(x^2+1));
);

function initialize_parameter_smoother()
instance(cutoff, g, G_LP)
global(pi, srate)
(
cutoff = 500;
     g = tan($pi*cutoff/srate);
  G_LP = g/(1+g);
);

function smooth_parameter()
instance(G_LP, target, s, v, y)
(
  v = G_LP*(target - s);
  y = v + s;
  s = y + v;
  y;
);

function rbj_lp(freq, Q)
instance(b0, b1, b2, a0, a1, a2)
local(A, s, w0, cosw0, sinw0, alpha)
(
  A = 10^(gain/40);
  w0 = 2*$pi*freq/srate;
  cosw0 = cos(w0);
  sinw0 = sin(w0);
  alpha = sinw0/(2*Q);
  b0 = 0.5*(1 - cosw0);
  b1 = (1 - cosw0);
  b2 = 0.5*(1 - cosw0);
  a0 = 1 + alpha;
  a1 = -2 * cosw0;
  a2 = 1 - alpha;
  b0 /= a0;
  b1 /= a0;
  b2 /= a0;
  a1 /= a0;
  a2 /= a0;
);

function tpt_lp_coeff(freq, Q)
instance(g, h, i)
global(srate)
(
  g = tan($pi*freq/srate);
  h = 1/(1 + g/Q + g*g);
  i = (1/Q + g);
);

function vicanek_lp(freq, Q)  //Coded by TBProAudio
instance(b0, b1, b2, a0, a1, a2)
local(w0, cosw0, sinw0, alpha, AA, f0, _test, AA0, AA1, AA2, phi0, phi1, phi2, r1, r2, BB0, BB1, BB2, w, p)
global(srate)
(
  f0 = freq/(srate/2.0);
  
  // Poles
  a0 = 1.0;
  a2 = exp(-0.5*$pi*f0/Q);
  (2*q > 1) ?   // complex conjugate poles
  (
    a1 = -2*a2*cos(sqrt(1 - 1/(4*q*q))*$pi*f0);
  ):            // real poles
  (
    a1 = -2*a2*cosh(sqrt(1/(4*q*q) - 1)*$pi*f0)
  );
  a2 = a2^2;
  
  // Zeros
  AA0 = (1 + a1 + a2)^2;
  AA1 = (1 - a1 + a2)^2;
  AA2 = -4*a2;

  phi1 = sin(0.5*$pi*f0)^2;
  phi0 = 1 - phi1;
  phi2 = 4*phi0*phi1;

  r1 = (AA0*phi0 + AA1*phi1 + AA2*phi2)*q^2;

  BB1 = (r1 - AA0*phi0)/phi1;

  b0 = 0.5*(sqrt(BB1) + 1 + a1 +a2);
  b1 = 1 + a1 +a2 - b0;
  b2 = 0;
);

function direct_form_filter(x)
instance(b0, b1, b2, a1, a2, x_old, x1, x2, y1, y2)
(
  x_old = x;
  x = b0*x + b1*x1 + b2*x2 - a1*y1 - a2*y2;
  x2 = x1;
  x1 = x_old;
  y2 = y1;
  y1 = x;
  x;
);

function tpt_lp(x)
instance(hp, bp, lp, Q, g, h, i, s1, s2)
(
  hp = h*(x - i*s1 - s2);
  bp = g*hp + s1;
  lp = g*bp + s2;
  s1 = g*hp + bp;
  s2 = g*bp + lp;
  lp;
);

freq_x.initialize_parameter_smoother()

@slider

filter_type = slider1;
f_low = slider2;
f_high = slider3;
Q = slider6;

@sample

slider8 == 0 ?
(
  freq_x.target = slider4;
  freq_x = freq_x.smooth_parameter();
  freq = f_low*(f_high/f_low)^(0.01*freq_x);
  slider5 = freq;
):slider8 == 1 ?
(
  //Modulation-------------------------------------------
  adj = $pi*slider10/srate;
  
  slider9 == 0 ?
  (
    mod = 100*(sin(pos))^2;
  ):slider9 == 1 ?
  (
    pos <= 0.5*$pi ?
    (
      mod = 100*(2/$pi)*pos;
    ):(
      mod = 100*(2-(2/$pi)*pos);
    );
  ):slider9 == 2 ?
  (
    pos <= 0.5*$pi ?
    (
      mod = 0;
    ):(
      mod = 100;
    );
  );
  pos=pos+adj;
  (pos >= $pi) ? pos -= $pi;
  
  freq_x = mod;
  slider4 = freq_x;
  freq = f_low*(f_high/f_low)^(0.01*freq_x);
  slider5 = freq;
  //-----------------------------------------------------
);

filter_type == 0 ?
(
  left.rbj_lp(freq, Q);
  right.rbj_lp(freq, Q);
):filter_type == 1 ?
(
  left.vicanek_lp(freq, Q);
  right.vicanek_lp(freq, Q);
):filter_type == 2 ?
(
  left.tpt_lp_coeff(freq, Q);
  right.tpt_lp_coeff(freq, Q);
);

spl0 = spl1 = 0.25*(rand(2)-1);

filter_type == 0 || filter_type == 1 ?
(
  spl0 = left.direct_form_filter(spl0);
  spl1 = right.direct_form_filter(spl1);
):filter_type == 2 ?
(
  spl0 = left.tpt_lp(spl0);
  spl1 = right.tpt_lp(spl1);
);
ErBird is offline   Reply With Quote
Old 04-19-2020, 09:11 AM   #592
BrokenTriplet
Human being with feelings
 
Join Date: Apr 2020
Posts: 22
Default

I guess this is kind of really nitpicky, but...

The buttons are kinda wonky in 1.08. I don't have earlier versions to test, but they don't look wonky in the screenshots I see, but this is what I get one my (non-HiDP) display:



Basically, it seems all the 'small' buttons are 2 pixels too short, and text everywhere is 2 pixels far down except for the phase symbols which are 1 pixel too far down.

When I correct those on a copy of the script, I get:



Which is what I imagine is the intended result, except I don't seem to be able to correct the dbScale button so far.
BrokenTriplet is offline   Reply With Quote
Old 04-20-2020, 12:54 AM   #593
nitsuj
Human being with feelings
 
nitsuj's Avatar
 
Join Date: Nov 2017
Posts: 292
Default

Quote:
Originally Posted by BrokenTriplet View Post
I guess this is kind of really nitpicky, but...

The buttons are kinda wonky in 1.08. I don't have earlier versions to test, but they don't look wonky in the screenshots I see, but this is what I get one my (non-HiDP) display:

Basically, it seems all the 'small' buttons are 2 pixels too short, and text everywhere is 2 pixels far down except for the phase symbols which are 1 pixel too far down.
I need to fix this. I'm on Mac and both retina and normal display look like the bottom image. Are you on PC by any chance?
nitsuj is offline   Reply With Quote
Old 04-20-2020, 01:43 AM   #594
BrokenTriplet
Human being with feelings
 
Join Date: Apr 2020
Posts: 22
Default

Quote:
Originally Posted by nitsuj View Post
I need to fix this. I'm on Mac and both retina and normal display look like the bottom image. Are you on PC by any chance?
I am, yes, 1920x1080 display (well, 2 of them, but reaper is full screen on one.
BrokenTriplet is offline   Reply With Quote
Old 04-21-2020, 02:26 PM   #595
onewayout
Human being with feelings
 
Join Date: Feb 2008
Location: So Florida
Posts: 1,395
Default

Quote:
Originally Posted by nitsuj View Post
Thanks for the kind words all, it's much appreciated. I hope you get some great use out them.

Sju, I'm on a Mac 15" laptop so everything is kind of calibrated on that although I did support non-retina. In theory ReSpectrum is using Verdana with a fixed size of 9 for non-retina. Can you tell me what machine / OS / screen size you're on? I'll investigate.

Eliseat, I think you might have the same issue too if you tried to do it with another EQ. I'll have a think about a solution. I could introduce an offset for frequency and dB - it's those that you'd modulate. The code would keep the handles in place but add the offsets for audio processing. That'd take another 10 slider slots bringing the total up to 62 - pretty close to the 64 limit!

Reaperto, thanks for reminding me about the listen feature I'd implemented. I'd forgotten all about it! ReSpectrum has it too.
Thx For the GREAT EQ!
I have been using it for about a month and LOVE IT!! I sent it to a friend of mine and they are getting two different ReEQ vsts...one says ReEQ and the other ReEQ.jsfx did they install it wrong??

I can't remember how I installed mine but it seems to work fine..I just downloaded the manual pdf and all looks well on my side..Thx, Jeff
onewayout is offline   Reply With Quote
Old 04-21-2020, 11:59 PM   #596
bwsd
Human being with feelings
 
Join Date: May 2011
Location: KZ ALA
Posts: 110
Default

Quote:
Originally Posted by sai'ke View Post
Sounds like the Vicanek filters are pretty good then
Yes!!!
I have been watching the Vicanek model for a long time and I like how its filters sound. I already wrote nitsuj in PM that he would integrate the Vicanek model into ReEQ
bwsd is offline   Reply With Quote
Old 04-22-2020, 12:01 AM   #597
bwsd
Human being with feelings
 
Join Date: May 2011
Location: KZ ALA
Posts: 110
Default

Quote:
Originally Posted by ErBird View Post
Maybe you can try out my test JS?
I don't see Vicanek's filter performing any better than RBJ's.
I tried - Vicanek is the best!
bwsd is offline   Reply With Quote
Old 04-22-2020, 12:08 AM   #598
bwsd
Human being with feelings
 
Join Date: May 2011
Location: KZ ALA
Posts: 110
Default

And yet, Vicanek does not need oversampling. It sounds great without AA.
bwsd is offline   Reply With Quote
Old 04-22-2020, 02:09 AM   #599
nitsuj
Human being with feelings
 
nitsuj's Avatar
 
Join Date: Nov 2017
Posts: 292
Default

Quote:
Originally Posted by onewayout View Post
Thx For the GREAT EQ!
I have been using it for about a month and LOVE IT!! I sent it to a friend of mine and they are getting two different ReEQ vsts...one says ReEQ and the other ReEQ.jsfx did they install it wrong??

I can't remember how I installed mine but it seems to work fine..I just downloaded the manual pdf and all looks well on my side..Thx, Jeff
The file that Reaper loads is called 'ReEQ.jsfx'. It's a source file that's compiled when it's loaded into Reaper, so you can look at the top of the file and make sure the version is the latest one (v1.0.8 as of today).
nitsuj is offline   Reply With Quote
Old 04-22-2020, 02:14 AM   #600
nitsuj
Human being with feelings
 
nitsuj's Avatar
 
Join Date: Nov 2017
Posts: 292
Default

Quote:
Originally Posted by bwsd View Post
Yes!!!
I have been watching the Vicanek model for a long time and I like how its filters sound. I already wrote nitsuj in PM that he would integrate the Vicanek model into ReEQ
It'll probably happen at some point. If there was a drop-in reference, that is, resonant shelf filters, notch and 6db filters then I'd have done it already.

Those aren't easy to come by - I haven't found them yet. I think somebody said on here that the resonant shelf filters need an iterative solution. All this means I'll have to find a good dedicated amount of time to figure those out.
nitsuj is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:42 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.