Two question topic. Linkwitz & LED Meter | Algorithm Design | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Two question topic. Linkwitz & LED Meter
Avatar
Member
Members
April 29, 2020 - 7:24 pm
Member Since: February 21, 2020
Forum Posts: 56
sp_UserOfflineSmall Offline

Hey there! 

I have been playing with Rack AFX for a few years now. I am currently using 6.9 with the first book as I  have some plugins heavily invested there.

First Question: I am implementing the Linkwitz-Riley crossover but I want it to be of a higher order. I.e cascading 2 of them together.  When I cascade them together, I also did this in the dynamics processor project downloaded, it creates a large bump in frequency just below the fc, and when rolling upwards appears to have a large triangle dip, which I thought could be phasing but didn't seem to be. Is this theory I have misunderstood? I can attach files later if needed.

Second Question: This one I am sure I am being silly. I am trying to track the input gain of a plugin. Simple I thought. I have my LED meter set up called 'm_fClipMeter'. 

Then I have this little section: 

// Initial Variables.
float fLeftInput = pInputBuffer[0]*m_fInputGain;
float fRightInput = uNumInputChannels == 1 ? fLeftInput : pInputBuffer[1]* m_fInputGain;

m_fClipMeter = max(fabs(fLeftInput), fabs(fRightInput));

I have my meter inside Rack AFX set up as linear and PEAK. but it looks NOTHING like the input meters inside rack afx.

Any ideas?

Chaes

Avatar
Admin
April 30, 2020 - 3:17 am
Member Since: January 1, 2020
Forum Posts: 103
sp_UserOfflineSmall Offline

Hi Chaes,

I'm no expert but I think I can help on your first question.

 

A Linkwitz-Riley filter attenuates -6db at the cutoff which is what's needed for a flat crossover.

By chaining two of them together you're dropping at a combined -12db at the cutoff which is too steep and produces a notch.

A Butterworth filter though attenuates only -3db at the cutoff.

So it's possible to form a -6db L-R response from chaining two Butterworth filters together. 

You can use a couple of kButterHPF2 and kButterLPF2's in this way to obtain the four-pole crossover.

I've tested and it works great but strangely I found that it wan't needed to flip the polarity of one of the two outputs as normal. Cool bonus, but I'm not sure why that's so.

If you want a higher order say 8 I think it should be possible to do in much the same way. You'd just need to design and chain together a couple of 4th-order Butterworth filters.

That should be possible by chaining a couple of regular kLPF2 filters and using the resonance coefficients obtained from this awesome site https://www.earlevel.com/main/2016/09/29/cascading-filters/. 

i.e res values of 0.54119610 and 1.3065630 should work but I haven tried this yet.

 

on your second question are you using an integer style max instead of fmax?

Avatar
Admin
April 30, 2020 - 3:31 am
Member Since: January 1, 2020
Forum Posts: 103
sp_UserOfflineSmall Offline

Just found the Wikipedia article answering my own question

" Fourth-order Linkwitz–Riley crossovers (LR4) are probably today's most commonly used type of audio crossover. They are constructed by cascading two 2nd-order Butterworth filters. Their slope is 24 dB/octave (80 dB/decade). The phase difference amounts to 360°, i.e. the two drives appear in phase, albeit with a full period time delay for the low-pass section. "

So yeah nothings for free in audio dsp, the low band is actually doubly 180 rotated out of phase. Just appearing to meet up again as if nothing happened. 

Avatar
Admin
April 30, 2020 - 11:16 am
Member Since: January 29, 2017
Forum Posts: 689
sp_UserOfflineSmall Offline

The RackAFX meters in the old v6.9 were setup as log, RMS meters with attack time = 10mSec and release time = 500mSec.

During development of the VSTGUI4 addition in RackAFX5, we noticed that there was a timing discrepancy between the update interval, which is now hardcoded at 50mSec. This had been variable in earlier versions to make the meters look more or less "jerky" as they moved around but it also affected the attack and release times which made it difficult to use.

The current version RAFX7 reconciles the timer differences better so that the GUIs match more closely with the main interface meters.

Hope that helps - 

Will

Avatar
Member
Members
May 2, 2020 - 1:50 am
Member Since: February 21, 2020
Forum Posts: 56
sp_UserOfflineSmall Offline

So in which way can I best accurately track the gain into the plugin? I want to track clipping as a Led Meter,

 

Set my LED meter set to attack time = 10mSec and release time = 500mSec, the settings would also be set to PEAK and Logarithmic? or?

// Initial Variables.
float fLeftInput = pInputBuffer[0]*m_fInputGain;
float fRightInput = uNumInputChannels == 1 ? fLeftInput : pInputBuffer[1]* m_fInputGain;

m_fClipMeter = fmax(fabs(fLeftInput), fabs(fRightInput));

Avatar
Admin
May 3, 2020 - 12:32 pm
Member Since: January 29, 2017
Forum Posts: 689
sp_UserOfflineSmall Offline

I always use RMS and log detection for the metering. But there are a ton of different standards including a bunch for digital audio/broadcast. 

The RMS value will reflect the time averaged power in the signal while peak will not. The choice of log/linear is mainly the application and what you expect the user to want to see. 

Will 

Avatar
Member
Members
May 5, 2020 - 9:26 pm
Member Since: February 21, 2020
Forum Posts: 56
sp_UserOfflineSmall Offline

I would like to simply meter the input of the plugin in gain, so if it hits 0 gain, it goes red. So basically mimic the ones inside the Rack Program for the Inputs and the VU input. But I cant seem to mimic.

 

Regarding my first question, the big peak resonance seems to be amplified when I cascade filters... I am simply running a lowpass at 300 Hz and it has a huge peak around 80 hz. This is for all my filters it seems when I run it inside ableton after exporting. Is this something to do with the new software vs the old way of doing things? Or is there something I am not understanding?

Avatar
Admin
May 7, 2020 - 1:32 pm
Member Since: January 1, 2020
Forum Posts: 103
sp_UserOfflineSmall Offline

for that purpose you might want to try something like,

@header,

int Clipped = 0; 

@audio rate,

if (fabs(fLeftInput) > 1.0f || fabs(fRightInput) > 1.0f ) { Clipped = 1; }

m_fClipMeter = Clipped;

you could then setup a control and/or a timer to reset the Clipped value back to 0 

 

regards the filters ,

make sure you're not duplicating the filter objects as they operate using an internal memory state which will get messed up if they are reused multiple times.

instead declare and setup a new instance for each filter that you want to cascade

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
2 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Chaes: 56

Skyler: 48

StevieD: 46

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

Nickolai: 43

clau_ste: 39

jeanlecode: 37

Member Stats:

Guest Posters: 1

Members: 768

Moderators: 1

Admins: 6

Forum Stats:

Groups: 13

Forums: 42

Topics: 842

Posts: 3347

Moderators: W Pirkle: 689