Audio4Linux / JDSP4Linux

An audio effect processor for PipeWire and PulseAudio clients
GNU General Public License v3.0
915 stars 35 forks source link

[Feature Request] Graphic EQ for each channel #113

Closed oversky closed 1 year ago

oversky commented 1 year ago

Can we have independent graphic EQ for left and right channel? For people who don't have a dedicated room to music, speakers are often placed asymmetric, and result in different room reflection. If we can EQ each channnel separately according to the measurement data, we will get a more balanced sound and image. Thank you.

oversky commented 1 year ago

If there is no space to put dual channels in the UI, may I suggest a separate tool to convert the csv file to impulse respone for convolution. Thanks.

timschneeb commented 1 year ago

Can we have independent graphic EQ for left and right channel?

This is a good idea, although JDSP4Linux is just a port of https://github.com/james34602/JamesDSPManager, so I'm not the original author of the algorithms and don't have a very deep understanding of them. But I'll see if I can get it working; I added this to my to-do list, but I don't have an ETA at the moment.

may I suggest a separate tool to convert the csv file to impulse respone for convolution.

That sounds easier to do, but then again, I don't have much knowledge about signal processing, so I would need to find some program library that implements these algorithms for me. But I'll try to stick to your first request for now.

oversky commented 1 year ago

I would need to find some program library that implements these algorithms for me. But I'll try to stick to your first request for now.

From the filename, I guess the algorithms is in JDSP4Linux-master\libjamesdsp\JdspImpResToolbox.c ImpRes means Impulse Response for graphic EQ.

timschneeb commented 1 year ago

No, the ImpResToolbox only contains algorithms to read/resample impulse responses from .wav file format and an utility function to generate an interpolated EQ graph display for the UI. The libjamesdsp code doesn't contain anything for converting graphic eq data to an impulse response as far as I know.

oversky commented 1 year ago

JDSP4Linux-master\libjamesdsp\subtree\VeryOldOpen_source_edition\Audio_Engine\eclipse_libjamesdsp_free_bp\jni\ArbFIRGen.c ArbitraryEqMinimumPhase, return finalImpulse are two keywords to me.

https://sourceforge.net/p/equalizerapo/code/HEAD/tree/trunk/filters/GraphicEQFilter.cpp Here is the source code of EqualizerAPO with such comment: // Minimum phase spectrum from coefficients

Can you take a look?

timschneeb commented 1 year ago

The EqualizerAPO code looks right, also used by AutoEQ for creating impulse responses from similar data: https://github.com/jaakkopasanen/AutoEq/blob/75ef88f072dc39a8241d2c7a05aa6afecde59357/autoeq/frequency_response.py#L367.

Also, I was wrong, the current JDSP code does actually have this at libjamesdsp/subtree/Main/libjamesdsp/jni/jamesdsp/jdsp/generalDSP/ArbFIRGen.c (the path you linked was correct but for the older version).

I'll see if I can separate it into a separate utility.

timschneeb commented 1 year ago

I put up the new tool here: https://github.com/ThePBone/geq2imp

It supports choosing separate CSV files for the left and right channels. Check the readme for compile instructions.

oversky commented 1 year ago

I opend an issue in geq2imp. Got and warning email "Issue assignment: All jobs have failed"

timschneeb commented 1 year ago

Got and warning email "Issue assignment: All jobs have failed"

My mistake, I copy-and-pasted lots of stuff from this repo to the geq2imp one to save time, including some GitHub automation workflows, which caused the error.