Matching Equalizer

All your LV2 and LADSPA goodness and more.

Moderators: MattKingUSA, khz

tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Matching Equalizer

Post by tramp »

I've written a matching EQ LV2 plugin.

It's purpose is to analyze two sources and create then a EQ curve to
apply the EQ characteristics from the first source to the second one.

Image
Useage

GxMatchEQ is a profiling EQ.

You could analyze the spectral profile of a sound source by press 'Match1'. Press 'Match1' again when done.

Now you could (optional) save the profile by press 'Profile' and select 'save', enter a name for it in up popping text input field and press 'ok'. This way you could later reuse it to compare it with other sound sources.

After that (or after loading a profile from the menu), you could profiling the second sound source, the one you want to match the spectrum of the first source by press 'Match2'. Press 'Match2' again when done. GxMatchEQ will calculate and apply the needed EQ settings to match the spectrum of the first profile. Those EQ settings you could save as preset (host side).

That's it. You could save/load/delete up to 15 profiles and unlimited presets. Surely you could set the EQ settings by hand (mouse or keyboard) at any time, to match the result even more to your taste.

To clear the EQ settings, press 'Clear'. That will clear the EQ parameters, but keep the loaded profile in use.

If a profile is loaded, you could see it as little blue bar's in the EQ screen, and the profile name is displayed above.
https://github.com/brummer10/GxMatchEQ.lv2
On the road again.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Matching Equalizer

Post by merlyn »

Hey tramp!

Good to see you back!

This looks great and, as far as I know, something that has been missing from Linux plugins.
User avatar
milo
Established Member
Posts: 1242
Joined: Wed Sep 06, 2017 2:55 am
Location: Southern Utah, USA
Has thanked: 275 times
Been thanked: 218 times
Contact:

Re: Matching Equalizer

Post by milo »

What's the use case for this? Would you put in on the master bus during the mastering process and match it to a track you are trying to emulate the sound of?

Maybe you could use it as a sort of automated noise filter?

What else? I'm intrigued with the possibilities.
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: Matching Equalizer

Post by CrocoDuck »

Great stuff! I kinda wanted to do a similar thing. Maybe in the near future.
User avatar
sysrqer
Established Member
Posts: 2520
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Re: Matching Equalizer

Post by sysrqer »

This is amazing, a really big step for linux. Thank you and great work (perhaps my moaning didn't fall on deaf ears? 8) )

As a feature request it would be great to have a wet/dry so you can dial in a percentage of the effect.
User avatar
sysrqer
Established Member
Posts: 2520
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 319 times
Been thanked: 148 times
Contact:

Re: Matching Equalizer

Post by sysrqer »

milo wrote:What's the use case for this? Would you put in on the master bus during the mastering process and match it to a track you are trying to emulate the sound of?.
That is one major use case, yes. You can use that over your mix or use it as a guide for what might be missing or wrong with your mix.
milo wrote:Maybe you could use it as a sort of automated noise filter?
I guess so? Try it.
milo wrote: What else? I'm intrigued with the possibilities.
I'm sure there are a lot of possibilities for abuse, find a gramophone recording and sample the eq and put that over an intro, or a drum bus? Change the wet/dry (feature request) over the period of a verse or chorus to gradually modulate the eq morph? Combine with an automated reverb send slope? How about sampling the eq from the reverb...?
User avatar
funkmuscle
Established Member
Posts: 2801
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 129 times
Been thanked: 31 times

Re: Matching Equalizer

Post by funkmuscle »

Daaaaaaaaaamn!!!!!! This is freakin' awesome!! Just took it for a test ride!!! It's amazing dude!!! You've outdone yourself again!! :D
User avatar
funkmuscle
Established Member
Posts: 2801
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 129 times
Been thanked: 31 times

Re: Matching Equalizer

Post by funkmuscle »

One thing I've noticed though it's very taxing on the CPU. I'm getting a lot of popping and when I look at the DSP it jumps from 45% up to about 80 to 90%. This is Mixbus 32C.
User avatar
sadko4u
Established Member
Posts: 986
Joined: Mon Sep 28, 2015 9:03 pm
Has thanked: 2 times
Been thanked: 359 times

Re: Matching Equalizer

Post by sadko4u »

funkmuscle wrote:One thing I've noticed though it's very taxing on the CPU. I'm getting a lot of popping and when I look at the DSP it jumps from 45% up to about 80 to 90%. This is Mixbus 32C.
Because it looks like applying set of recursive filters:
https://github.com/brummer10/GxMatchEQ. ... eq.cc#L768
This math is pretty computation-intensive.

Also there can be two problems that can dramatically change the performance: DAZ and FTZ flags for x86 archtecture.
Floating-point for x86 unit is badly performing with denormal floating-point values, so they can do a serious computation bottleneck and should be replaced with zeros instead. Setting special bits DAZ and FTZ of the FPCSR register before evaluating run_dsp_() method can help a lot.
LSP (Linux Studio Plugins) Developer and Maintainer.
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: Matching Equalizer

Post by tramp »

funkmuscle wrote:One thing I've noticed though it's very taxing on the CPU. I'm getting a lot of popping and when I look at the DSP it jumps from 45% up to about 80 to 90%. This is Mixbus 32C.
What CPU do you use?

Here, on
CPU:
Topology: Quad Core model: Intel Core i5-7400 bits: 64 type: MCP
arch: Kaby Lake rev: 9 L2 cache: 6144 KiB
flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 24000
Speed: 3300 MHz min/max: 800/3001 MHz Core speeds (MHz): 1: 3300 2: 3300
3: 3300 4: 3300
GxMatchEQ use 1,5% DSP load as much on 128/2 frames/periode.
This is with Mixbus-4.3.19

EDIT:// However, you may want to do a new checkout, I've now added, a suggested by @ sadko4u the set FZ (Flush to Zero) and DAZ (Denormals Are Zero) flags. Hope that helps.
On the road again.
User avatar
funkmuscle
Established Member
Posts: 2801
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 129 times
Been thanked: 31 times

Re: Matching Equalizer

Post by funkmuscle »

updated to the latest git and same issue:

Code: Select all

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 21
model           : 1
model name      : AMD FX(tm)-4100 Quad-Core Processor
stepping        : 2
microcode       : 0x600063e
cpu MHz         : 3631.305
cache size      : 2048 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
or

Code: Select all

Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   48 bits physical, 48 bits virtual
CPU(s):                          4
On-line CPU(s) list:             0-3
Thread(s) per core:              2
Core(s) per socket:              2
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       AuthenticAMD
CPU family:                      21
Model:                           1
Model name:                      AMD FX(tm)-4100 Quad-Core Processor
Stepping:                        2
Frequency boost:                 enabled
CPU MHz:                         2720.868
CPU max MHz:                     3600.0000
CPU min MHz:                     1400.0000
BogoMIPS:                        7234.42
Virtualization:                  AMD-V
L1d cache:                       32 KiB
L1i cache:                       128 KiB
L2 cache:                        4 MiB
L3 cache:                        8 MiB
NUMA node0 CPU(s):               0-3
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled v
                                 ia prctl and seccomp
Vulnerability Spectre v1:        Mitigation; __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Full AMD retpoline, STIBP disabled,
                                  RSB filling
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtr
                                 r pge mca cmov pat pse36 clflush mmx fxsr sse s
                                 se2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtsc
                                 p lm constant_tsc rep_good nopl nonstop_tsc cpu
                                 id extd_apicid aperfmperf pni pclmulqdq monitor
                                  ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx 
                                 lahf_lm cmp_legacy svm extapic cr8_legacy abm s
                                 se4a misalignsse 3dnowprefetch osvw ibs xop ski
                                 nit wdt lwp fma4 nodeid_msr topoext perfctr_cor
                                 e perfctr_nb cpb hw_pstate ssbd vmmcall arat np
                                 t lbrv svm_lock nrip_save tsc_scale vmcb_clean 
                                 flushbyasid decodeassists pausefilter pfthresho
                                 ld
User avatar
ufug
Established Member
Posts: 525
Joined: Tue Jan 10, 2012 12:28 am
Has thanked: 71 times
Been thanked: 22 times

Re: Matching Equalizer

Post by ufug »

Looking forward to seeing what I can do with this one!

A potentially cool feature would be a "reverse" button which would create an opposite profile. It might be a useful starting point for giving space in the mix to two similar sounds. I do that manually with EQ a lot if I am doubling guitar parts. Just a thought.

Glad you are back at it, tramp. I was just wondering what you were up to the other day when gxSVT saved the day for me on a weak bass track...
listenable at c6a7.org
User avatar
funkmuscle
Established Member
Posts: 2801
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 129 times
Been thanked: 31 times

Re: Matching Equalizer

Post by funkmuscle »

It's awesome! As a test, I was using Smells Like Teen Spirit as a reference track for a mix.
I placed MatchEQ in the Master Bus, grabbed the profile(1) then the profile(2) to my song. This made my mix more pro sounding. I just need to overcome the DSP maxing out issue.
User avatar
sadko4u
Established Member
Posts: 986
Joined: Mon Sep 28, 2015 9:03 pm
Has thanked: 2 times
Been thanked: 359 times

Re: Matching Equalizer

Post by sadko4u »

tramp wrote:EDIT:// However, you may want to do a new checkout, I've now added, a suggested by @ sadko4u the set FZ (Flush to Zero) and DAZ (Denormals Are Zero) flags. Hope that helps.
You've done it not in right way. FPCSR is thread-local register and will be reset if your code will be executed in another thread. Moreover, Ardour also changes the value of the FPCSR register, so there is no guarantee that you'll get right FPCSR state in the void Gx_matcheq_::run method.

Please consider how in LSP I've implemented set/restore DAZ and FTZ flags:
https://github.com/sadko4u/lsp-plugins/ ... #L113-L115
https://github.com/sadko4u/lsp-plugins/ ... pp#L86-L98
https://github.com/sadko4u/lsp-plugins/ ... .h#L17-L26
https://github.com/sadko4u/lsp-plugins/ ... xcsr.h#L74
LSP (Linux Studio Plugins) Developer and Maintainer.
tramp
Established Member
Posts: 2335
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 454 times

Re: Matching Equalizer

Post by tramp »

sadko4u wrote:Please consider how in LSP I've implemented set/restore DAZ and FTZ flags:
Thanks, well we could try that, but, to be honest, even when I build GxMatchEQ without enabling the sse register, so without any Denormal protection, the max dsp load here is 1,5%. No spices, no issues at all.

@funkmuscle
Have you tried GxMatchEQ in a other host, say jalv or carla? Do you've the same issue there?
Have you as well issues when you didn't use a profile, so that GxMatchEQ only sit on the masterbus without alter the sound?
On the road again.
Post Reply