• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required as is 20 years of participation in forums (not all true). Come here to have fun, be ready to be teased and not take online life too seriously. We now measure and review equipment for free! Click here for details.

Digital Room Correction Noob

Joined
Apr 6, 2020
Messages
7
Likes
1
#1
Hi all,

After reading about the benefits of digital room correction (DRC) I have become interested in learning a little more about it before having a go at applying it to my stereo setups. There are so many options out there that before disappearing down the rabbit hole and selecting something not fit for purpose, I just wanted to make sure that my basic understanding and underlying assumptions were correct, and then ask for some help in figuring out how best to proceed!

My starting point
All of my music is PCM and ranges from 16/44.1 to 24/192. It sits on a little Raspberry Pi running PiCorePlayer as a Logitech Media Server (LMS) hidden away in a cupboard, and feeds several Squeezeboxen scattered about the house. This all seems to work fairly seamlessly, with the attached Squeezebox Touch's having a nice touchscreen interface which is wife and child friendly meaning that you don't have to grab a phone or a tablet to control them, and each is able to send out anything up to 24/192 via their optical or USB ports to an attached DAC. It would be great to be able to apply room correction in the digital domain between the Squeezebox and the DAC so that each of these could be better tuned to the rooms that they are in.

I have no real experience of DRC apart from the very automated approach used by modern home theatre receivers, but the general process here seems similar if a little more manual. You take a set of calibration measurements around the listening room, run these through some software to create filters for that room, and then apply those filters to audio that is played in that room to try and create a more optimised listening environment. There seems to be many software tools out there to generate correction filters, but from my brief skim of the internets Audiolense seems to strike a good balance of ease of use and state of the art features.

So, I can see how I would go about creating filters using Audiolense with a suitable microphone to measure my room, but after this I get a bit stuck with how to actually apply these filters. I presume that I am going to want to run the processing at the highest resolution of my audio files so as not to degrade their quality, so 24bits and 192kHz, and reading around it seems like the ideal FIR filter length people try to achieve for the best results is ~65k taps.

What are the options
I guess this all requires processing horsepower; looking around at the readily available hardware (such as the OpenDRC-DI) none of it can get anywhere near this, so does this mean that you are stuck running the convolver on JRiver using a big old PC in your listening room? Unfortunately for me this isn't a workable solution.

People also seem to run convolvers on single board computers like the Raspberry Pi or ODROID C2. I don't want to run one on my LMS music server as this sends audio to many different rooms around the house, but it would be great to be able to drop a Pi-like-thing into the USB chain between each Squeezebox and DAC, running a convolver with a different filter setup for each individual room. Are you limited by the resolution and FIR taps that you can sensibly run on a Pi-like-thing even when just using two channels? Can you set one up to take USB audio from a network player, run an open-DRC compatible convolver, and spit out room-corrected high-res USB audio to a DAC? I am guessing not as I can't find anyone doing this...

To be clear, I do not know my way around a Linux distro, but can just about be trusted to follow instructions to put the right files onto an SD card and plonk it into a Pi.

Many thanks for the input!
 

QMuse

Major Contributor
Joined
Feb 20, 2020
Messages
3,124
Likes
2,637
#2
Hi all,

After reading about the benefits of digital room correction (DRC) I have become interested in learning a little more about it before having a go at applying it to my stereo setups. There are so many options out there that before disappearing down the rabbit hole and selecting something not fit for purpose, I just wanted to make sure that my basic understanding and underlying assumptions were correct, and then ask for some help in figuring out how best to proceed!

My starting point
All of my music is PCM and ranges from 16/44.1 to 24/192. It sits on a little Raspberry Pi running PiCorePlayer as a Logitech Media Server (LMS) hidden away in a cupboard, and feeds several Squeezeboxen scattered about the house. This all seems to work fairly seamlessly, with the attached Squeezebox Touch's having a nice touchscreen interface which is wife and child friendly meaning that you don't have to grab a phone or a tablet to control them, and each is able to send out anything up to 24/192 via their optical or USB ports to an attached DAC. It would be great to be able to apply room correction in the digital domain between the Squeezebox and the DAC so that each of these could be better tuned to the rooms that they are in.

I have no real experience of DRC apart from the very automated approach used by modern home theatre receivers, but the general process here seems similar if a little more manual. You take a set of calibration measurements around the listening room, run these through some software to create filters for that room, and then apply those filters to audio that is played in that room to try and create a more optimised listening environment. There seems to be many software tools out there to generate correction filters, but from my brief skim of the internets Audiolense seems to strike a good balance of ease of use and state of the art features.

So, I can see how I would go about creating filters using Audiolense with a suitable microphone to measure my room, but after this I get a bit stuck with how to actually apply these filters. I presume that I am going to want to run the processing at the highest resolution of my audio files so as not to degrade their quality, so 24bits and 192kHz, and reading around it seems like the ideal FIR filter length people try to achieve for the best results is ~65k taps.

What are the options
I guess this all requires processing horsepower; looking around at the readily available hardware (such as the OpenDRC-DI) none of it can get anywhere near this, so does this mean that you are stuck running the convolver on JRiver using a big old PC in your listening room? Unfortunately for me this isn't a workable solution.

People also seem to run convolvers on single board computers like the Raspberry Pi or ODROID C2. I don't want to run one on my LMS music server as this sends audio to many different rooms around the house, but it would be great to be able to drop a Pi-like-thing into the USB chain between each Squeezebox and DAC, running a convolver with a different filter setup for each individual room. Are you limited by the resolution and FIR taps that you can sensibly run on a Pi-like-thing even when just using two channels? Can you set one up to take USB audio from a network player, run an open-DRC compatible convolver, and spit out room-corrected high-res USB audio to a DAC? I am guessing not as I can't find anyone doing this...

To be clear, I do not know my way around a Linux distro, but can just about be trusted to follow instructions to put the right files onto an SD card and plonk it into a Pi.

Many thanks for the input!
It can be done with this plugin for Volumio. I bellieve there is also a Volumio plugin so you can access your music on LMS.
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
2,093
Likes
1,546
#3
I know you said you don't want to do it that way, but here's archimago's brutefirdrc howto using the old server side plugin just in case, as I don't think the alternatives will be so easy. I'm not sure how easy it would be to apply to PiCorePlayer's LMS install, but a Pi 4 could probably handle correction for several players simultaneously. If that's not enough you could move up to some PC hardware.

I don't know of an off-the-shelf way to do what you're asking. It really ought to be easier - the various software parts required are all available, but not joined up like, say, picoreplayer.

See this thread for making the Raspberry Pi Zero or 4 appear to be a USB audio device, at least to MacOS or Linux. Note that it's a fixed sample rate, but that's how the convolvers are usually run anyway. This isn't a prepackaged solution - there will be wrinkles to iron out as they're found, and I don't think it's a great solution. Using an optical port like the Hifiberry Digi+ I/O would be easier, but still needs some assembly.

Another option is to use another device as a Squeezebox Touch equivalent, but running a convolver. The easiest way it probably to run daphile on a second hand thin client (so no moving parts) with a touchscreen display, and with the local control option enabled. Daphile has brutefir available as a preconfigured option - all you have to do is upload the files. I don't remember whether it runs a web browser for the local control, or uses the same interface as the Touch. The slightly trickier option is to use a Pi and the touchscreen - I don't think there's a easy way to get brutefir configured in picoreplayer, so you'd probably have to set it up in raspbian.

If you aren't wedded to FIR things would be easier, either with a nanodigi or a Hifiberry DAC+ DSP - they have a guide to using it for room correction with REW. In that case once the filters are stored to the DSP card it doesn't actually need the Pi any more.
 
OP
The Moog
Joined
Apr 6, 2020
Messages
7
Likes
1
Thread Starter #4
Hi QMuse,
It can be done with this plugin for Volumio. I bellieve there is also a Volumio plugin so you can access your music on LMS.
Thanks QMuse,

I guess the family are used to using the Squeezeboxes, so swapping that out for something else might face a bit of, erm, resistance. I was hoping for something 'invisible' that I could plug in between the source and the DAC. Can anyone tell me what the BruteFIR Volumio plugin can manage in terms of resolution/FIR tap length, as that might be a good indication of what can be achieved using a small low-power single board computer?
 

QMuse

Major Contributor
Joined
Feb 20, 2020
Messages
3,124
Likes
2,637
#5
Hi QMuse,


Thanks QMuse,

I guess the family are used to using the Squeezeboxes, so swapping that out for something else might face a bit of, erm, resistance. I was hoping for something 'invisible' that I could plug in between the source and the DAC. Can anyone tell me what the BruteFIR Volumio plugin can manage in terms of resolution/FIR tap length, as that might be a good indication of what can be achieved using a small low-power single board computer?
Up to 192k sample rate and up to 262144 filter size. Supports fiters in wav, txt and dbl format. Supports multichannel DACs, XO filters, HP and LP filters, volume dependent filters and works with RPI4 without any issues (but not on RPI3). See volumio site for more info on supported platforms.

As a front-end to Volumio I'm using BubbleUPnP on Android and Linn Kinsky on Windows 10. Music is on NAS running UPnP media server.
 
OP
The Moog
Joined
Apr 6, 2020
Messages
7
Likes
1
Thread Starter #6
I know you said you don't want to do it that way, but here's archimago's brutefirdrc howto using the old server side plugin just in case, as I don't think the alternatives will be so easy. I'm not sure how easy it would be to apply to PiCorePlayer's LMS install, but a Pi 4 could probably handle correction for several players simultaneously. If that's not enough you could move up to some PC hardware.

I don't know of an off-the-shelf way to do what you're asking. It really ought to be easier - the various software parts required are all available, but not joined up like, say, picoreplayer.

See this thread for making the Raspberry Pi Zero or 4 appear to be a USB audio device, at least to MacOS or Linux. Note that it's a fixed sample rate, but that's how the convolvers are usually run anyway. This isn't a prepackaged solution - there will be wrinkles to iron out as they're found, and I don't think it's a great solution. Using an optical port like the Hifiberry Digi+ I/O would be easier, but still needs some assembly.

Another option is to use another device as a Squeezebox Touch equivalent, but running a convolver. The easiest way it probably to run daphile on a second hand thin client (so no moving parts) with a touchscreen display, and with the local control option enabled. Daphile has brutefir available as a preconfigured option - all you have to do is upload the files. I don't remember whether it runs a web browser for the local control, or uses the same interface as the Touch. The slightly trickier option is to use a Pi and the touchscreen - I don't think there's a easy way to get brutefir configured in picoreplayer, so you'd probably have to set it up in raspbian.

If you aren't wedded to FIR things would be easier, either with a nanodigi or a Hifiberry DAC+ DSP - they have a guide to using it for room correction with REW. In that case once the filters are stored to the DSP card it doesn't actually need the Pi any more.
Thanks for the input somebodyelse,

It is somewhat infuriating that all of the pieces of the puzzle look to be out there, but none of them seem to fit nicely together! I had assumed that I would be dealing with a fixed sample rate set to 24/192 to do all of the processing, that anything below this would be upsampled for processing, and the output to the DAC would be fixed at 24/192 regardless of what the input was.

If I could somehow mash BruteFIR and LMS together, and it could automatically apply the filters on a per player basis then that would also work for me. As noted, I would also be happy to procure a Pi-like-device per player if it could just be dropped into the digital chain between the network player and the DAC, and had assumed that I could just use the USB ports on the Pi-like-device as digital inputs and outputs without the need for any other digi I/O?

I have only looked at FIR implementations after reading about the benefits of this approach rather than through any exhaustive testing. I just thought that when selecting a route forward why not go with the most advanced... maybe that shall be my downfall!
 
OP
The Moog
Joined
Apr 6, 2020
Messages
7
Likes
1
Thread Starter #7
Up to 192k sample rate and up to 262144 filter size. Supports fiters in wav, txt and dbl format. Supports multichannel DACs, XO filters, HP and LP filters, volume dependent filters and works with RPI4 without any issues (but not on RPI3). See volumio site for more info on supported platforms.

As a front-end to Volumio I'm using BubbleUPnP on Android and Linn Kinsky on Windows 10. Music is on NAS running UPnP media server.
So it looks like the compute power is there with these single board computers to do the job; I am only looking to run two channels of 24/192 room correction with ~65k taps and no digital XO right now (digi XO does sound really interesting, but would require a little more planning and investment so is probably something for the future). I can't believe that no one is selling a Pi running BruteFIR in a nice box with some digi I/O as an OpenDRC platform that you can load filters to via USB.
 

QMuse

Major Contributor
Joined
Feb 20, 2020
Messages
3,124
Likes
2,637
#8
So it looks like the compute power is there with these single board computers to do the job; I am only looking to run two channels of 24/192 room correction with ~65k taps and no digital XO right now (digi XO does sound really interesting, but would require a little more planning and investment so is probably something for the future). I can't believe that no one is selling a Pi running BruteFIR in a nice box with some digi I/O as an OpenDRC platform that you can load filters to via USB.
I was giving it a thought but couldn't find any decent Pi hat with SPDIF input.

I looked at HIFIBERRY DIGI+ I/O but it has some serious limitations.
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
2,093
Likes
1,546
#9
Thanks for the input somebodyelse,

It is somewhat infuriating that all of the pieces of the puzzle look to be out there, but none of them seem to fit nicely together! I had assumed that I would be dealing with a fixed sample rate set to 24/192 to do all of the processing, that anything below this would be upsampled for processing, and the output to the DAC would be fixed at 24/192 regardless of what the input was.
I suspect they fit, they're just not currently available already assembled ;-) The fixed rate certainly makes things easier.
If I could somehow mash BruteFIR and LMS together, and it could automatically apply the filters on a per player basis then that would also work for me.
As I understand it that's exactly what the brutefirdrc LMS plugin does. I've not tried it, let lone tried it on PiCorePlayer which is somewhat different to a normal linux install. It should be possible though, and upstream PiCorePlayer might be interested in including it once it's working.
As noted, I would also be happy to procure a Pi-like-device per player if it could just be dropped into the digital chain between the network player and the DAC, and had assumed that I could just use the USB ports on the Pi-like-device as digital inputs and outputs without the need for any other digi I/O?
You need to use a device mode USB port to appear as an audio device. The Pi Zero has one that's intended for this, but it's the only port so you'd need a hat to get the audio out. The Pi 4 type C power socket can be used as a device mode port, although it would benefit from separate 5V power applied via the pin headers, especially if you're using other USB-powered devices plugged into the Pi. I've only tried it for short periods, so I don't know how stable it is or whether it'll have sync issues. If you're lucky it'll Just Work (TM). The other Model B Pis can't use device mode as the USB goes through a hub. A Model A might be usable as a device if you get an A to A cable, but that's just a guess.

I've had all the bits working, just not joined up in quite that configuration before. If I've still got that disk image it shouldn't take much to get it working.
I have only looked at FIR implementations after reading about the benefits of this approach rather than through any exhaustive testing. I just thought that when selecting a route forward why not go with the most advanced... maybe that shall be my downfall!
Something to keep in reserve if the other options don't work out then.
 
OP
The Moog
Joined
Apr 6, 2020
Messages
7
Likes
1
Thread Starter #10
@somebodyelse, I guess not knowing my way around Linux, to me the fact that no-one has assembled them neatly together is functionally the same!

I had assumed that there would be no benefit to running your room correction at the native resolution, and that upsampling to the maximum resolution to do your correction (compute power permitting) and outputting to the DAC at that resolution would be fine. I'll see what I can find on the BrutefirDRC plugin for LMS, and see if it can perform correction on a per player basis. I would be happy to upgrade my current PiCorePlayer LMS server from a Pi3 to a Pi4 if this is needed.

I hadn't realised your point about device mode USB sockets and had just naively thought that a USB was a USB, but that makes sense. A working plugin for PiCorePlayer would make this moot though; if I can perform DRC centrally for each room then that iseems to be a neater solution than doing it locally in each room.
 
Joined
Sep 15, 2020
Messages
13
Likes
6
#11
Hi, I'm in a similar position - LMS/Touch for family friendly playback but wanting to try room correction to improve the sound. I have an Odroid N2 running Kodi that could be another player via squeezelite but I can't figure out how to get all the pieces to play nicely together. I'm going to have another look at brutefir but there's also CamillaDSP that may be an option. May I ask what you ended up doing and, if it worked, were the results worth the effort?

Thanks
 
OP
The Moog
Joined
Apr 6, 2020
Messages
7
Likes
1
Thread Starter #12
@sparkyuk, I did a bit of research and although it seems like all of the various components to do this are out there, I haven't found a neat way of achieving this while still keeping my family-friendly Touch players. If I could build or buy a box with a single board computer that could take USB audio from each Touch, run two channels of 24/192 room correction with ~65k taps, and squirt this out over USB to a DAC I would be keen to give it a go.
 
Joined
Sep 15, 2020
Messages
13
Likes
6
#13
Thanks for the reply. I'm going to try and follow archimago's steps and see if I can get that working. This uses server side processing but does appear to allow settings per player. I've got the plugin and brutefir package installed on my Fedora based LMS machine and have made some measurements with REW. The next step is to figure out how to get the filters into the correct format, there's a lot of info out there so I'm hopeful that shouldn't be too much trouble.
 
OP
The Moog
Joined
Apr 6, 2020
Messages
7
Likes
1
Thread Starter #14
I would be interested to hear your experiance if you manage to get it working, especially if you can set it up to do per-player room correction to each Squeezebox device from an LMS install on a something like a Pi 4.
 
Joined
Sep 15, 2020
Messages
13
Likes
6
#15
I would be interested to hear your experiance if you manage to get it working, especially if you can set it up to do per-player room correction to each Squeezebox device from an LMS install on a something like a Pi 4.
If you're a Pi user have a look at https://github.com/Lykkedk/SuperPlayer which may be an option. I've tried to set this up on the Odroid N2 I have but it's running a Kodi specific OS called Coreelec and I can't get the custom squeezelite it uses to run due to missing 32-bit libraries.
 

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
2,093
Likes
1,546
#16
If you're a Pi user have a look at https://github.com/Lykkedk/SuperPlayer which may be an option. I've tried to set this up on the Odroid N2 I have but it's running a Kodi specific OS called Coreelec and I can't get the custom squeezelite it uses to run due to missing 32-bit libraries.
Have you tried asking for the source of the custom squeezelite so you can recompile for coreelec?

Edit: There's now https://github.com/Lykkedk/SuperPlayer_v2.0 too - freshly added and currently lacking in documentation.
 
Joined
Sep 15, 2020
Messages
13
Likes
6
#17
Have you tried asking for the source of the custom squeezelite so you can recompile for coreelec?

Edit: There's now https://github.com/Lykkedk/SuperPlayer_v2.0 too - freshly added and currently lacking in documentation.
It's a possibility but it may be a bit of a stretch for me to get the build environment up and running under CoreELEC as it is designed as a minimal OS for Kodi media players. Something to bring up on the CamillaDSP discussion thread perhaps.
 
Joined
Nov 29, 2020
Messages
7
Likes
0
#18
Hi - any solutions found here? I'm early in the process and have several chromecast devices and a QNAP on which I could run a server. I can explore raspberry pi & hat solutions or potentially others (but I am looking to do something with as low of a cost as possible, but if I have to do a bit of saving for a better solution, that's fine). I'd start with one endpoint, but would eventually like to have 3-4 with room correction on each.
 
Joined
Sep 15, 2020
Messages
13
Likes
6
#19
I'm still at the digging around stage, not helped by the fact I have a new pair of Revel M106 speakers so I need to redo my room measurements. Once that's done I think I'm going to try and go the LMS/Brutefir route but it's still a work in progress.
 
Top Bottom