• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Room acoustics options for Raspberry Pi

Dr.OP

Member
Joined
Jan 7, 2021
Messages
15
Likes
3
Location
Munich
I am starting from the point that software eats the world and Trinnov is a excellent example as it is considered as the end game for HT and it is Linux based. I would like to learn what can be done at the moment with software with as little as possible of hardware. A wishful thinking is to have DIY Trinnov-like system. There is a very long road to it. Kodi can decode 7.1 surround no problem, more channels probably doable. I am not sure about any height sound

Given Linux base system with no limits for no of channels. In this thread I would like to study available options for room correction on Linux.

Workbench:
  • Rpi4 with Arch Linux
  • amp2 from hifiberry as sound card with 18V power supply what gives about 17W per channel
  • "entry hifi" speakers McGrey BSS-265 so entry that there is no even sensitivity numbers for them
  • UMIK-1 to document the experiment.

Available options:

Any suggestions are welcome. Post suggestions here. I will gather the details and add them. Thanks. :D This will be organized as results come in.

Linux:
PulseEffects signal processing tools including parametric equalizer.
CamillaDSP supported platforms: Linux, macOS, Windows.
Camillagui runs in the browser and handles the actual interface.
dsp is an audio processing program with an interactive mode.
Daphile is an audiophile class music server & player OS – targeted to dedicated headless PC.
moOde audio player parametric and graphic Equalizers music playback for the wonderful Raspberry Pi family of single board computers.
Voicemeeter audio mixer application w/ virtual audio device used as virtual I/O to mix/manage any source from/to any audio devices or applications.
DSP for Volumio (previously Brutefir3)
BruteFIR - the convolution engine used by daphile, Volumio's DSP plugin, an LMS plugin and probably others, also manually configurable in a custom alsa config, JACK etc. You can also use it to make crossovers.
BrutefirDRC - the LMS plugin that uses BruteFIR running on the server, configurable per endpoint. Archimago has a howto.
Jconvolver - formerly Zita-convolver, the convolution engine used in PulseEffects, which can also be used with JACK.
Alsaequal - an equalizer you can add to the alsa config. Basic usage is a fixed band graphic equalizer, but it can be used to give a control interface to any other LADSPA plugin via the usual alsa mixer interface. The normal alsa config for ladspa plugins only allows fixed configurations, although for something like an active crossover that's probably an advantage.
REW is free room acoustics analysis software for measuring and analysing room and loudspeaker responses.
oratory1990 is headphone specific equalization.
AutoEq uses EQ profiles to be used with EQ software.
foobar2000 is an advanced freeware audio player with EQ runs under wine.
HQPlayer PEQ, a convolver with impulse response files, cross-feed and multi-channel support/mixing/routing.
Pulseaudio Parametric Equalizer is a python GUI to insert a 3 band PEQ w/ high/low shelves into the pulseaudio audio server.
Calf plugin suite.
LSP (Linux Studio Plugins) is a collection of open-source plugins.

Plus there's a whole host of LADSPA plugins you can use via JACK, alsaequal, or with a fixed configuration in the alsa config file. A good example is the PE32LR parametric equalizer from the Linux Studio Plugins Project which provides the parametric equalizer for PulseEffects.

I will start from the following solutions:
  • dsp
  • CamillaDSP
  • BruteFIR

End goal would be to have a fact based comparison of available solutions.
 
OP
D

Dr.OP

Member
Joined
Jan 7, 2021
Messages
15
Likes
3
Location
Munich
Test routine is slightly sloppy, but is will improve as we go. At the moment I do not see much benefit of proper alignment of all elements. I will start by eliminating weak points one by on. I will start with using acoustic reference for REW. RPi4 can run REW but I believe I have a plenty of low hanging fruits to catch first.

Software configuration;
  • Kodi 18.9 do play test sounds
  • Pulseaudio as a host, allowing us to have a many profiles as we want.

Pulseaudio config to push amp2 to it's limits.
Code:
default-sample-format = s32ledefault-sample-rate = 192000
resample-method = speex-float-5
alternate-sample-rate = 44100

So I prepared 512kMeasSweep_10_to_22050_48k_16-bit_LR_refL as a test tone. I will be using my laptop with REW 5.19 to get initial measurements.

Speakers are toed in towards listening position (stereo) without any height match. Mic is located roughly at the LP and 30-40 above the driver. Given the speakers and bad room acoustics I would think of it as not very relevant. This is a study so I am happy to redo the measurements and redo setup. There is a picture with the layout.
ASR_setup.JPG
 
Last edited:

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,759
Likes
3,066
AFAIK Kodi's decoding of multichannel is limited to the older AC3 and DTS formats. Anything higher is done as passthrough over HDMI, to be decoded by the AVR or TV.

If you're aiming to use Kodi anyway (hence a full desktop session) the easiest thing to try is PulseEffects. It provides both parametric EQ and convolution with a reasonably easy gui.
 
OP
D

Dr.OP

Member
Joined
Jan 7, 2021
Messages
15
Likes
3
Location
Munich
I will start from tests with DSP and the easiest to setup.

Playback chain
512kMeasSweep_10_to_22050_48k_16-bit_LR_refL wav -> Kodi audio engine -> amp2 -> speakers.

Setup of DSP with pulseaudio is straightforward. User can have a many profile as needed. Kodi can easily change between profiles.

Starting point shows "hifi entry" level of speakers. I cannot complain for 50 ish euro and bad room acoustics.

no DSP.png

configuration 1
no DSP & BSS265_1.png

configuration 2
no DSP & BSS265_2.png

configuration 3
no DSP & BSS265_3.png

My "golden year" prefers configuration 3. This configuration is comfortable for movies, for music it is fatiguing (rap). There is no doubt in a huge difference between as it is configuration and DSP configuration.

In the end I still feel that something is missing thus I would like crowd wisdom to help me with the target curve.
 

watchnerd

Grand Contributor
Joined
Dec 8, 2016
Messages
12,449
Likes
10,415
Location
Seattle Area, USA
Are you going to be constrained in how much room correction you can do by the processing power of the Pi / lack of DSP / SHARC chips?
 
OP
D

Dr.OP

Member
Joined
Jan 7, 2021
Messages
15
Likes
3
Location
Munich
AFAIK Kodi's decoding of multichannel is limited to the older AC3 and DTS formats. Anything higher is done as passthrough over HDMI, to be decoded by the AVR or TV.

If you're aiming to use Kodi anyway (hence a full desktop session) the easiest thing to try is PulseEffects. It provides both parametric EQ and convolution with a reasonably easy gui.

I am using a standalone Kodi without a full desktop session. PulseEffects is possible without a full desktop session, but I did not try it. I want to understand all available options and find the most suitable one. I cannot find any comparison of all software options.
 
OP
D

Dr.OP

Member
Joined
Jan 7, 2021
Messages
15
Likes
3
Location
Munich
Are you going to be constrained in how much room correction you can do by the processing power of the Pi / lack of DSP / SHARC chips?

I have no idea. We can test it together if you have an ides about the protocol of the experiment we can make it happen. Ultimately RPi can be replaced with x86 based system. That is simply what I have off the shelf.
 

watchnerd

Grand Contributor
Joined
Dec 8, 2016
Messages
12,449
Likes
10,415
Location
Seattle Area, USA
I have no idea. We can test it together if you have an ides about the protocol of the experiment we can make it happen. Ultimately RPi can be replaced with x86 based system. That is simply what I have off the shelf.

I have a Pi4 with HiFiBerry DAC 2 HD set up right now, running Ropieee.
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,759
Likes
3,066
It would be a good comparison to have, both between engines and between different configurations. When looking at BruteFIR with the Pi 3 and later Pi 4 I was looking more at its triggering of the pop/click issue than its CPU usage, but I think it was in single figures, and pinning it to a single cpu core wasn't a problem. From notes it looks like the config was using:
sampling_rate: 96000;
filter_length: 8192,8; # number of taps N,number of partition P = N*P= filter length
Sample rate, taps, partitions and number of channels will all be factors in cpu use, and are probably broadly comparable between convolution engines. I don't know how you'd make a 'fair' comparison to achieving the same ends through parametric EQ though.

I've not looked at the cpu use when kodi plays different video formats either, but it's substantially more efficient than mythfrontend.
 
OP
D

Dr.OP

Member
Joined
Jan 7, 2021
Messages
15
Likes
3
Location
Munich
I don't know how you'd make a 'fair' comparison to achieving the same ends through parametric EQ though.
That is something to figure out. Knee jerk reaction would be to improve the measurement protocol eg better alignment and doing all in one go. Additional bells and whistles available via REW as it can be run natively on RPi4 itself. At the moment I do no think that CPU will be a bottle neck.

As for music listening I believe that time lag is not relevant for Kodi application a bulk of action happens in the 1-5khz region.
 

RogerM

Member
Joined
Jul 11, 2020
Messages
11
Likes
5
I started down a similar route to you last year so can provide some information on brutefir performance on the Pi4.

Below I detail the FIR processing chain I am currently using on the Pi4. With this configuration I have never had any pop/clink issues, even while I perform additional task on the Pi4 like bulk copying of files onto it, or running GUI desktop.

Brutefir processing chain is...
- Stereo 16 bit 44kHz PCM in.
- Bass tone control = (L and R) x 16k FIR (selected 1 of 3 preconfigured curves)
- Treble tone control = (L and R) x 16k FIR (selected 1 of 3 preconfigured curves)
- Left_Out = 16k FIR for 80Hz HPF and DRC
- Right_Out = 16k FIR for 80Hz HPF and DRC
- Sub_Out = 16K FIR to average Left and Right then apply LPF 80Hz and DRC
- Output = 4 channels of 16bit 44kHz PCM to USB DAC(Xonar U7).

So a total of 7 FIR filters of 16k taps all running together at 44kHz.

Total CPU for the brutefir threads while streaming, as displayed by 'top' command, is around 10% !

Brutefir is using 32 floating point for calculations throughout the chain from input to output, so I am not concerned about losing precision as the digital data goes through the multiple filter stages (does anyone think I am wrong about this ?).

I don't know if the FFT libraries that brutefir is using on the Pi4 are using the main CPUs, or are being offloaded to the GPU core or not, but I am very impressed with the performance !

Software stack I use for playback.
On android phone
Hi-Fi Cast (UPnP Control point to browser and select music)

On Pi4
minidlna (UPnP/DLNA media server)
upmpdcli (UPnP/DLNA render client)
mpd (Media Player)
alsaloopback (loopback of MPD output to brutefir input).
brutefir (FIR processing and output to USB DAC).
 
OP
D

Dr.OP

Member
Joined
Jan 7, 2021
Messages
15
Likes
3
Location
Munich
After tinkering more with dsp I got more satisfying results. Red line refers to a 1db limit set in the REW auto eq and green to 2 db limit. I think it can be done better. Anyway a corrected FR is much less bumpy.
1 db &2 db impulse correction.jpg

In terms of a fair comparison I thought of the following steps.
1. Use the same baseline measurement from REW to setup all DRC programs.
2. Measure outcome and compare. With pulseaudio+ DPS I noticet that an impulse response correction "steals" 1-2 db with the same same settings compared to PEQ only. This could be attributed to some internal processing, normalisation?
3. Out of academic interest i can play 1-2 (10?) min of pink noise and measure CPU load.

At the moment I am quite impressed how much you can do with PEQ tuning.

Next item on the list is to measure my speaker and get a better idea on what can be done.
 

Berlyassocial

Member
Forum Donor
Joined
Jan 26, 2021
Messages
21
Likes
11
Gentlemen

Can anyone navigate me to setting up raspberry pi 4 with a reliable free audioplayer with digital room correction. Audio player should able to be controlled from android remote software and Room correction is very important for me as well.

Planning to use usb out from rpi4 instead of a hat.

Im not into Roon as it seems to be expensive as an audio player.

I see here alot of talks about brutfir but no tutorial how to install it and the associated audio player
 
OP
D

Dr.OP

Member
Joined
Jan 7, 2021
Messages
15
Likes
3
Location
Munich

Berlyassocial

Member
Forum Donor
Joined
Jan 26, 2021
Messages
21
Likes
11
Could you please provide more specifics on your system?

We can undertake this exercise together. Please provide more specifics.

Hey buddy.
Really appreciate you response.

Right now i use foobar2000 with math audio room eq on windows computer to smsl su8 dac to amp

I wanna replace windows computer for a rpi4. I love foobar2000 for power and flexibility it provides.

I went though alot of reading about installing foobar2000 on rpi4 but cant find a versatile way.
Then i read an interesting thread on installng windows 10 on rpi4 but no further information whether foobar2000 will work properly in this configuration.

So since i couldnt find a foolproof way of foobar2000 on rpi4 I started thinking of other ideas. Thats where this particular query comes into place.

Im not interested to buy hifiberry which has dsp because i already own DAC.

So hence i would like to setup digital room correction on an audio player on rpi4 which has a remote app like a foobarcon to control from a smartphone and output via usb to dac.
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,759
Likes
3,066
The volumio plugin is reasonably well documented but not the easiest to install. The docs include a rough guide to using REW to make measurements and create the filters, and this is broadly applicable to the other options below.
https://volumio.github.io/docs/User_Manual/Quick_Start_Guide.html
https://volumio.github.io/docs/Plugins_User_Manuals/brutefir/Drc_with_Volumio.html

I'm not sure of the current state with Moode - I think the current (7.0.x) release has preliminary CamillaDSP support built in, but it's being heavily worked on for the upcoming 7.1.0 release so may be a moving target at the moment.
https://moodeaudio.org/#download

Both use MPD as their main player, so a remote app like Mopidy gives most of the control if you don't want to use the browser interface.

The options for LMS/piCorePlayer are more work in progress than a ready to use solution at the moment. Archimago's guide on using the BrutefirDRC plugin might still work, although the plugin hasn't been updated in some time. If you're not wedded to the rpi4 you could try daphile which runs on PC hardware (including fanless thin clients) and has brutefir built in. There are several apps available, such as Squeezer and iPeng, or you can use the Material Skin plugin with a shortcut to a fullscreen browser session for an experience very close to a native app.
 
OP
D

Dr.OP

Member
Joined
Jan 7, 2021
Messages
15
Likes
3
Location
Munich
You can choose HW of your liking.

I would suggest to got with PiCorePlayer as out of the box solution.

https://archimago.blogspot.com/2016/03/howto-logitech-media-server-brutefirdrc.html

I did not try any of the above, but people are happy with it.

There is an option to use mopidy as a host for music and pulseaudio as convolution engine.

I have the following sound pipe spotify-> (rpi) airplay-> pulseaudio( DSP)-> amp2. Room correction is done using DSP plugin with PEQ by pulseaudio.

I could not justify for myself using impulse FIR instead of PEQ as I did not measure any difference in REW. My bottle neck is "entry Hi-Fi" speakers with a crappy FR.

What is your source of music?
Do you have any preference for rpi distro?
 

Berlyassocial

Member
Forum Donor
Joined
Jan 26, 2021
Messages
21
Likes
11
.

What is your source of music?
Do you have any preference for rpi distro?

Two things i did not understand.
What is HW
what is PEQ

my source is flac files locally stored in hard drive. I dont use any streaming services. But thinking about deezer. but deezer doesnr have bitperfect playback (not sure if bitperfect matters that much interms of SQ)

I dont mind what OS operates on rpi4 my only aim with rpi4 is to use it as streamer which has room correction and maybe to support deezer playlist into the player if it is possible
 
Top Bottom