Linux guide?

linuxonly

Member
Thread Starter
Joined
Jul 27, 2024
Posts
112
More  
Preamp, Processor or Receiver
Logitech Z906
DAC
AMD FCH Azalia
Computer Audio
SPDIF output with alsa, pipewire, wireplumber on Fedora 40
Streaming Equipment
Kodi
Front Height Speakers
33 in
Middle Height Speakers
30 in
Rear Height Speakers
57 in
Video Display Device
X11/VGA + X11/DVI
Hi,

New here but I've been experimenting with audio since the late 60s when I connected a reverb and another amp/loudspeaker to get an L-R delayed channel. Then in the 80s I build some noise suppressor circuits like the dns and emulated the scratch suppressor Garrard made. I stopped using the scratch suppressor when I discovered oh horror that its clock frequency was producing and recording a very audible beat around 8kHz with the bias oscillator of my K7 tape recorder. Later in the 90s, I studied the dolby surround specs and build one from scratch with all the features, LPFF HPF, delay and expansion.

Nowadays I have 2 systems.

1 - A debian 12 computer with analog stereo output connected to a home made preamp, then a 3 way stereo electronic crossover plus 3 stereo amplifiers, each amplifier driving its stereo speaker pair: 1 for tweeter, 1 for midrange and 1 for woofer. I have build circa 1976 a pair of 9 cu ft loudspeakers. I have reconed its 15" driver since but still use it as of today. It's not the system of interest in this message.

2 - A fedora 40 computer connected via SPDIF to a Logitech Z906 receiver able to process DTS and Dolby Digital. This is the system I would want to optimise, particularly in the bass region, and particularly for Kodi use.
The analog input/outputs are broken on this computer, hence the SPDIF. I don't/won't use HDMI. Therefore an USB mic would be required.

I understand the concept described in "REW (Room EQ Wizard) Top Tricks: Convolution with Inversion (no EQ filters, all FIR!)" but once I have the optimal curves data, how would I tell this linux computer to process them and correct the sound accordingly?

Understand I would not buy a pricey microphone to get some measurements if I cannot get the computer to use those measurements to 'fix' the sound. I have a 11x12x7.5 listening room with all kind of defects I cannot mitigate e.g. windows and doors. The room is what it is. The best I can do, if understand correctly is to correct the frequencies below 200 Hz or even 80 Hz to strip all peaks and nulls.
 
Last edited:

dcibel

Member
Joined
Sep 10, 2017
Posts
254
I use Easyeffects to provide system-wide EQ functions at my Linux PC. I've not tried the convolver there yet, but the EQ is fully parametric and has both IIR and FIR modes.

For a more "advanced" DSP type of solution, have a look a CamillaDSP.
 

linuxonly

Member
Thread Starter
Joined
Jul 27, 2024
Posts
112
More  
Preamp, Processor or Receiver
Logitech Z906
DAC
AMD FCH Azalia
Computer Audio
SPDIF output with alsa, pipewire, wireplumber on Fedora 40
Streaming Equipment
Kodi
Front Height Speakers
33 in
Middle Height Speakers
30 in
Rear Height Speakers
57 in
Video Display Device
X11/VGA + X11/DVI
I use Easyeffects to provide system-wide EQ functions at my Linux PC.
Hi,

Thanks a lot for your reply.

I've been reading for 3 days and got the same conclusion. Hardware DSPs would be overkill, so would be ROON and similar programs.

I calculated the room modes for the precise measurements. Those I stated initially were approx:

Please compute the standing waves in a room 166x148x90 inches?

Rich (BB code):
To compute the standing waves in a room of dimensions 166x148x90 inches, we need to convert the dimensions from inches to meters first:
166 inches = 4.22 meters 148 inches = 3.76 meters 90 inches = 2.29 meters
Now, we can use the formula:
f = 340 / (2 * l)
where f is the frequency of the standing wave, 340 is the speed of sound in air (in meters per second), and l is the length of the room (in meters).
Let's calculate the frequency of the standing wave for each dimension:
Length (166 inches / 4.22 meters) f = 340 / (2 * 4.22) = 40.3 Hz
Width (148 inches / 3.76 meters) f = 340 / (2 * 3.76) = 45.2 Hz
Height (90 inches / 2.29 meters) f = 340 / (2 * 2.29) = 74.1 Hz
These frequencies correspond to the lowest frequency room modes for each dimension. To find the next modes, we can use the same formula with the width and height of the room.
Here are the first few modes for each dimension:
Length (166 inches / 4.22 meters)
1st mode: 40.3 Hz
2nd mode: 80.6 Hz
3rd mode: 120.9 Hz

Width (148 inches / 3.76 meters)
1st mode: 45.2 Hz
2nd mode: 90.4 Hz
3rd mode: 135.6 Hz

Height (90 inches / 2.29 meters)
1st mode: 74.1 Hz
2nd mode: 148.2 Hz
3rd mode: 222.3 Hz

Keep in mind that this is a simplified calculation and doesn't take into account other factors that can affect room modes, such as the room's shape, furniture, and

Based on that and manual testing (by ear) with white/pink noise and 25-200 Hz sweep, I noticed a 15db boost centered at ~80 Hz and ranging from 70 to 90 Hz. (C#2 - F#2) Probable cause, the 5 speakers of the Z906 area active at the crossover frequency with the addition of room modes in that frequency range. So I applied a single -15db EQ filter FFI with easy effects equalizer in solo mode. Retesting white/pink noise and sweep showed a flat response (by ear). No measuring tools/software yet. Flatter response. Does it sound better? I don't know. I've been listening to this Z906 for years like this and after EQ, I noticed a significant drop particularly with bass guitar, which leads me to increase the main volume to compensate. On the other hand, some male voices do not exhibit exagerated peaks in that frequency range anymore, which is definitely a plus.

This is only the first step in optimisation and was the most obvious. Will test for a week for my ear to get accustomed to this new configuration. I can perform A/B test quite easily by toggling the effect.

One problem though, and it's not a tiny one. Easy effects is only active with mono/stereo material. It doesn't activate with 6 channels. I've read there are possible workarounds. More reading in perspective.


For a more "advanced" DSP type of solution, have a look a CamillaDSP.
Looks promising, once the learning curve step is completed. Thanks for the hint. Might be needed if I can't get pipewire or easy effect to get activated for the 6 channels.
 
Last edited:

linuxonly

Member
Thread Starter
Joined
Jul 27, 2024
Posts
112
More  
Preamp, Processor or Receiver
Logitech Z906
DAC
AMD FCH Azalia
Computer Audio
SPDIF output with alsa, pipewire, wireplumber on Fedora 40
Streaming Equipment
Kodi
Front Height Speakers
33 in
Middle Height Speakers
30 in
Rear Height Speakers
57 in
Video Display Device
X11/VGA + X11/DVI
REW has a room simulator.

Hi John,

Amazing!

Thanks for the comment!

I'm from an era when you wanted a program, you'd have to write one, and that's precisely what you've been doing. Respect!

Capture d’écran du 2024-07-30 10-24-26.png

At first, I didn't hear the narrow peak at 45 Hz affecting F1 and F#1, but after a very slow sweep or pink noise, it's right there and perfectly audible. Added a narrow filter to take care of that.
 
Last edited:

linuxonly

Member
Thread Starter
Joined
Jul 27, 2024
Posts
112
More  
Preamp, Processor or Receiver
Logitech Z906
DAC
AMD FCH Azalia
Computer Audio
SPDIF output with alsa, pipewire, wireplumber on Fedora 40
Streaming Equipment
Kodi
Front Height Speakers
33 in
Middle Height Speakers
30 in
Rear Height Speakers
57 in
Video Display Device
X11/VGA + X11/DVI
That is getting interesting. I'm learning how REW works and that represents a lot of reading. I'm at the measurements help page now.

For experimenting, I placed an usb webcam (for its mic) in a random place in the room and sampled 5 sweeps. Discarded 2 that were too way different and averaged. I know the mic goes at the LP, but I'm just trying to understand the basics from the very beginning.

I generated filters for 20-200 Hz from the EQ panel, applied the Harman curve and imported the 6 resulting filters created by REW into Easy Effects.

To my surprise, there was a significant improvement from manual processing (45 and 80 Hz filter pair). The bass response is way more natural.

Didn't process any phase / delay. Don't know yet how to do it precisely.

Not sure what to do with the C, RR and RL speakers too so I disable them for the moment while measuring LFE, FR and FL.

For my defense, last time I did audio correction / optimization was 15 years ago using Spectrum Lab on Windows XP or an electronic pink noise generator I build and a graphic equalizer. Times are changing...

Ordered a UMIK-1, expecting it within 2 weeks. In the meantime I'll continue reading and experimenting from the dataset I gathered with the toy mic.

Capture d’écran du 2024-07-31 18-11-37.png
 

dcibel

Member
Joined
Sep 10, 2017
Posts
254
My process has been to use "moving mic method" as many call it, which I have created a basic document for here:

The main benefit is that it is fast, easy and reliable vs taking many measurements manually and averaging them. For basic EQ as a "gateway drug" its a good place to start in my opinion. YMMV.

In any case, a webcam mic is not good enough for this, but at least you can take some measurements and see what you can do with them and understand the process until your UMIK arrives.
 

linuxonly

Member
Thread Starter
Joined
Jul 27, 2024
Posts
112
More  
Preamp, Processor or Receiver
Logitech Z906
DAC
AMD FCH Azalia
Computer Audio
SPDIF output with alsa, pipewire, wireplumber on Fedora 40
Streaming Equipment
Kodi
Front Height Speakers
33 in
Middle Height Speakers
30 in
Rear Height Speakers
57 in
Video Display Device
X11/VGA + X11/DVI
moving mic method
Hi,

Thanks a lot. Very instructive. Looking forward to test this!

Do you measure L and R separately, simultaneously or it doesn't matter?

You use pink noise instead of log sweep and that's interesting. However are you sure about the room curve slope? Just asking because pink noise IIRC already exhibits an inherent 3dB/oct slope. Makes me wonder. Or maybe I've thought too much for today;)
 

dcibel

Member
Joined
Sep 10, 2017
Posts
254
Pink noise and log sine sweep have the same power density. Since sweep is more resilient to noise, since only a single frequency is being captured at any given time, however noise signal is much more pleasant and easier to use for RTA. You can experiment with any room curve you wish, the possibilities are endless with REW. ;)

Yes, I do each speaker individually, provided the EQ system being used allows for EQ on a per-channel basis. Depending on the speaker placement, difference between channels may be very similar or very different.
 

linuxonly

Member
Thread Starter
Joined
Jul 27, 2024
Posts
112
More  
Preamp, Processor or Receiver
Logitech Z906
DAC
AMD FCH Azalia
Computer Audio
SPDIF output with alsa, pipewire, wireplumber on Fedora 40
Streaming Equipment
Kodi
Front Height Speakers
33 in
Middle Height Speakers
30 in
Rear Height Speakers
57 in
Video Display Device
X11/VGA + X11/DVI
I use Easyeffects to provide system-wide EQ functions at my Linux PC. I've not tried the convolver there yet, but the EQ is fully parametric and has both IIR and FIR modes.

For a more "advanced" DSP type of solution, have a look a CamillaDSP.
Awesome, thanks a lot. REW can export EQ filters as text files and EA Equalizer can import them as APO filters
Similarly, REW can export impulse fiters and EA Convolver can import and load them.

Convolver adds a lot of latency and EQ destroys the stereo image, YMMV.

Measurement part was the easiest.
 

dcibel

Member
Joined
Sep 10, 2017
Posts
254
There's a fine balance between the number of taps required for EQ at low frequencies and minimizing delay in signal processing. Delay may be irrelevant if you are only listening to music, but for general use with video I would avoid it completely. Personally I don't think impulse response convolution is necessary for EQ purposes, a few bands of PEQ does the task well enough for me.

I do use IR convolution for simulating my speaker crossover designs, however I am using APO EQ under windows for that.
 

linuxonly

Member
Thread Starter
Joined
Jul 27, 2024
Posts
112
More  
Preamp, Processor or Receiver
Logitech Z906
DAC
AMD FCH Azalia
Computer Audio
SPDIF output with alsa, pipewire, wireplumber on Fedora 40
Streaming Equipment
Kodi
Front Height Speakers
33 in
Middle Height Speakers
30 in
Rear Height Speakers
57 in
Video Display Device
X11/VGA + X11/DVI
There's a fine balance between the number of taps required for EQ at low frequencies and minimizing delay in signal processing. Delay may be irrelevant if you are only listening to music, but for general use with video I would avoid it completely. Personally I don't think impulse response convolution is necessary for EQ purposes, a few bands of PEQ does the task well enough for me.

I do use IR convolution for simulating my speaker crossover designs, however I am using APO EQ under windows for that.
Hi,

I agree. I tried several adjustments for IR and also calculated a 20 band EQ filter and the differences are almost inaudible, and all resonances are gone.
 

linuxonly

Member
Thread Starter
Joined
Jul 27, 2024
Posts
112
More  
Preamp, Processor or Receiver
Logitech Z906
DAC
AMD FCH Azalia
Computer Audio
SPDIF output with alsa, pipewire, wireplumber on Fedora 40
Streaming Equipment
Kodi
Front Height Speakers
33 in
Middle Height Speakers
30 in
Rear Height Speakers
57 in
Video Display Device
X11/VGA + X11/DVI
I use Easyeffects to provide system-wide EQ functions at my Linux PC. I've not tried the convolver there yet, but the EQ is fully parametric and has both IIR and FIR modes.

For a more "advanced" DSP type of solution, have a look a CamillaDSP.
Thank you so much for your suggestion! I played a lot with EA but t's limited to stereo and linux.

After 2 months, my setup now consists of a new analog soundcard to replace the SPDIF so every sound is now corrected. No more pass-through and CDSP is up and running both on Linux and on Windows. Amazing progress, I'm very satisfied!
 

linuxonly

Member
Thread Starter
Joined
Jul 27, 2024
Posts
112
More  
Preamp, Processor or Receiver
Logitech Z906
DAC
AMD FCH Azalia
Computer Audio
SPDIF output with alsa, pipewire, wireplumber on Fedora 40
Streaming Equipment
Kodi
Front Height Speakers
33 in
Middle Height Speakers
30 in
Rear Height Speakers
57 in
Video Display Device
X11/VGA + X11/DVI
:)

I was very reticent to experiment on linux where everything stereo was working perfectly well. It's a dual boot computer. I haven't been booting windows for months but I use it for gaming occasionally. It was a lot easier for me to setup camilladsp on windows, reconfigure everything for the new sound card experimentally, and once/if done, apply the configuration to linux. I made an impressive quantity of full backups in the process.

One have to admit, windows 7 sound is a lot easier to reconfigure than alsa, pipewire, wireplumber, services on linux.
 
Top Bottom