Tutorial: Raspberry Pi as Music Server, DSP, and Crossover

Hi DIYers,
I thought I'd share a little project I've put together for Pi Day! I made a music server, DSP, crossover on the Raspberry Pi 2 using native ALSA hosted LADSPA plugins using Charlie Laub's ACD-L plugins.

Check it out and let me know what you think. I'd also love for you to vote for my instructable in the the Raspberry Pi contests. 🙂

http://www.instructables.com/id/Raspberry-Pi-Music-Server-With-Built-in-Crossover-/

I have to also shout out a big thanks to Richard Taylor, Charlie Laub, and FracoLargo. Without their help I could not have made the thing 🙂

Share and enjoy,
JR
 
Dear JR

nice tutorial.

the Advantage I see with KXStudio and Calf Gear is, that I all have with a very simple GUI.

see diyAudio server HTTPS page

There is no need of hacking any kernel ar adjusting cryptic config files.

Also the JACK Connections can be done by GUI.

Do you think I can run KXStudio with Rasberry or on Intel Compute Stick maybe is better.

Best regards
Guenter
 
Last edited:
Hmm I'm not familiar with kxstudio. One of the key advantages of my system is that it runs "headless", which is to say without a gui. You may not see that as an advantage, however 🙂
Running headless means that the server can sit in an out of the way corner somewhere and requires a lot less processing power. There are many ways to accomplish making a computer based music server and dsp, my way is but one 🙂


Sent from my iPhone using Tapatalk
 
You are right that headless is an advantage if you want.

On the other side I use my setup also as HTPC.
Its connected as well to my TV.
I use it as an file server in my local network and from extern via sftp.
You can login to it via ssh as well.

You can,if you want, use it as an internet server.
....

In this case I have Asrock Z77e-ITX board with i5 and 16 Gbyte.
So it has enough power for some other things working parallel.
If you want, for security, also in a virtual OS for each application.

My setup is automatically loaded at startup of the PC.
So in principle its also headless.
Nevertheless my PC is running 7/24 for other reasons stated above.

Regards
Guenter
 
Hi DIYers,
I thought I'd share a little project I've put together for Pi Day! I made a music server, DSP, crossover on the Raspberry Pi 2 using native ALSA hosted LADSPA plugins using Charlie Laub's ACD-L plugins.

Check it out and let me know what you think. I'd also love for you to vote for my instructable in the the Raspberry Pi contests. 🙂

Raspberry Pi Music Server with Built-in Crossover and DSP

I have to also shout out a big thanks to Richard Taylor, Charlie Laub, and FracoLargo. Without their help I could not have made the thing 🙂

Share and enjoy,
JR

Hi JR

Thanks for this tutorial

I've followed it up to step 4 (I've successfully copied chan_labels_6.wav to my /home/pi/downloads directory) however the output to aplay -L command is as follows:

pi@Pi3:~/downloads $ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
pi@Pi3:~/downloads $ ^C

Does this mean that Raspbian is not detecting my HDMI audio device?

I'm using a 7.1 HDMI audio extractor. I've confirmed that the device is operational

Thanks,
 
Hi JR

Thanks for this tutorial

I've followed it up to step 4 (I've successfully copied chan_labels_6.wav to my /home/pi/downloads directory) however the output to aplay -L command is as follows:

pi@Pi3:~/downloads $ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
pi@Pi3:~/downloads $ ^C

Does this mean that Raspbian is not detecting my HDMI audio device?

I'm using a 7.1 HDMI audio extractor. I've confirmed that the device is operational

Thanks,
What kernel do you have?
It looks like you have a pi3. I've not tried this with that device. If your kernel is 4.4 + there may be another issue with that kernel.
What OS are you using also?

Thanks,
James
 
Hi JR,

this is fantastic! Will try this on my RPi soon. Currently I'm running
Pi -> HiFiBerry Digi -> miniDIGI -> miniDSP 2x4 -> Pioneer VSX 919 (analog inputs) to power stereo two way speakers. I would like to add three subs to my system which would require another (or different) miniDSP board and a different receiver (my Pioneer is 7.1 but for some reason analog inputs are only 5.1) and so going straight from Pi over HDMI to Pioneer seems like a great (and free) way of achieving my goal.

In your view should I expect any difference in SQ by eliminating all the DSP boards and running straight from Pi to the Pioneer via HDMI?

Really surprised there is so little interest in your method..

thanks!
Martin
 
Hi JR,

this is fantastic! Will try this on my RPi soon. Currently I'm running
Pi -> HiFiBerry Digi -> miniDIGI -> miniDSP 2x4 -> Pioneer VSX 919 (analog inputs) to power stereo two way speakers. I would like to add three subs to my system which would require another (or different) miniDSP board and a different receiver (my Pioneer is 7.1 but for some reason analog inputs are only 5.1) and so going straight from Pi over HDMI to Pioneer seems like a great (and free) way of achieving my goal.

In your view should I expect any difference in SQ by eliminating all the DSP boards and running straight from Pi to the Pioneer via HDMI?

Really surprised there is so little interest in your method..

thanks!
Martin

Martin, It sounds like this would work for you. I wouldn't expect an SQ improvement solely from the removal of digital gear, however, (if I'm reading correctly) you are switching from digital to analog to digital to analog, which can introduce noise and other nasty effects.

I'm surprised there's so little interest too, but maybe not everyone is as excited to hack linux kernels as me 😀 (FWIW, the newer kernels are supposed to support 7.1 out without hacking...but where's the fun in that ! ).

Anyhoo, have a go, let me know how it works 🙂
 
Thanks for your response JR.
Well I believe I only have a single DA conversion in my current system. Signal is digital all the way to the miniDSP board where it is split into four channels and then converted to analog and sent to the receiver. I dont think the receiver does another AD-DA conversion because none of its signal processing is available (only volume control). Anyway, I was not hoping for an improvement in SQ over my current system - I was just wondering whether there might be anything in your method which makes it inherently "less optimal" then my setup (be it software crossover vs dedicated DSP board, HDMI connection, etc..)

So I quickly went through your tutorial and well.. it was almost like reading chinese 😀 as I have zero experience with linux.. But I'll try my best.. 😛

I have two questions though..

Would it be possible to mix the two input channels and then apply filtering - which is necessary for filtering subs..

Also I've checked your measurement method and it is quite time consuming and (if I understand correctly) you cannot even verify your filters since you cannot measure filtered response. This is not acceptable for me because I need to equalize my subs based on their in-room response so I measure-equalize iteratively until the measured frequency response is sufficiently flat. This makes me wonder.. would it be possible to use an external USB soundcard (for example this one: https://gear-up.me/axago-usb2-0-stereo-hq-audio-adapter-mini-96khz.html) which has an analog input, for the measurement? This way you could send analog audio from your PC (which is running REW) to the RPi. This audio is then processed (filtered) in RPi and played back via HDMI..

Also, currently I'm running volumio in my RPi and control it remotely (using, PC, smartphone, etc..) Will I be able to do the same using your method?

thanks!
martin
 
Thanks for your response JR.
Well I believe I only have a single DA conversion in my current system.
my bad, I thought the hifiberry was a d/a convertor

Signal is digital all the way to the miniDSP board where it is split into four channels and then converted to analog and sent to the receiver. I dont think the receiver does another AD-DA conversion because none of its signal processing is available (only volume control). Anyway, I was not hoping for an improvement in SQ over my current system - I was just wondering whether there might be anything in your method which makes it inherently "less optimal" then my setup (be it software crossover vs dedicated DSP board, HDMI connection, etc..)
There shouldn't be anything better/worse in terms of SQ, but there's a lot of implementation details in my approach that are left up to the end user... i.e. you 😀
So I quickly went through your tutorial and well.. it was almost like reading chinese 😀 as I have zero experience with linux.. But I'll try my best.. 😛

I have two questions though..

Would it be possible to mix the two input channels and then apply filtering - which is necessary for filtering subs..
you can do that. OTOH, it's probably not actually necessary since most LF content is in more than (stereo) channel anyway. It's easy to do in ALSA though.

Also I've checked your measurement method and it is quite time consuming and (if I understand correctly) you cannot even verify your filters since you cannot measure filtered response. This is not acceptable for me because I need to equalize my subs based on their in-room response so I measure-equalize iteratively until the measured frequency response is sufficiently flat.
You can measure the response of just one channel if you like, you simply mute all the other channels, play with the filters, measure, turn the other channels back on, measure ... or whatever order you like to fiddle with these things 🙂

This makes me wonder.. would it be possible to use an external USB soundcard (for example this one: https://gear-up.me/axago-usb2-0-stereo-hq-audio-adapter-mini-96khz.html) which has an analog input, for the measurement? This way you could send analog audio from your PC (which is running REW) to the RPi. This audio is then processed (filtered) in RPi and played back via HDMI..
you could do that. I'm told getting the analog in working in ALSA is not a problem, but I've never done it myself, so ... YMMV
I use airplay to play the sweep tones from REW, and that is pretty easy, not requiring any further ALSA hacking.

Also, currently I'm running volumio in my RPi and control it remotely (using, PC, smartphone, etc..) Will I be able to do the same using your method?

thanks!
martin
Well ... here's where we get to a real problem...
Volumio uses a custom kernel, so it won't support my hacked kernel drivers, which is why I'm using squeezelite (Volumio is way better in terms of its usability, but SQ wise, they actually seem about the same). The newest version of Volumio (Volumio2) may have a new kernel, previous releases did, but they weren't new enough or they were too new! I haven't looked at the latest Volumio2 beta release, so I can't comment on that, but it *may* work.

Feel free to give it all a shot. I'd start with a new SD card though, I don't want you screwing up your music player system with all this hacking XD

Cheers,
James
 
James, thanks!

I use airplay to play the sweep tones from REW, and that is pretty easy, not requiring any further ALSA hacking.
James

Great! This is (I guess) something which could work for me. (I believe in your tutorial you describe a rather different method - you suggest to simply connect your PC to analog input on your receiver and measure different channels separately, basically bypassing RPi and therefore bypassing any DSP processing..)

Anyway, it seems your method does everything I need, so the only thing left for me to do is to implement it.. 😀

Hope to report success soon! thanks again
martin
 
Very useful, thanks.

I use MoOde, but for a project where I am refurbishing an old valve radio, I wanted to end up with a mono signal, combining L+R, and a subwoofer.

Using your techniques, I think I have found the way!

Excellent instructible, cheers.
 
I'm slowly working my way through your tutorial and so far its been a success! I had to build my own kernel and do other stuff that was totally new to me, but it all seem to work! I'm at step 6 now (which I believe contains some errors).

Anyway I was wondering whether you saw this post: Atlona HD570 distortion / subsonic transients | Richard's Stuff Did you experience similar problems? (Also check the discussion below the post)
 
I'm slowly working my way through your tutorial and so far its been a success! I had to build my own kernel and do other stuff that was totally new to me, but it all seem to work! I'm at step 6 now (which I believe contains some errors).

Anyway I was wondering whether you saw this post: Atlona HD570 distortion / subsonic transients | Richard's Stuff Did you experience similar problems? (Also check the discussion below the post)

What errors?

I'm not sure if I had the same issue as richard, but one thing I noticed is that with the bass boosted, I was getting a lot of subsonic information to the drivers which caused the woofers to flap in the breeze 😱
I sorted that with a 30hz 4th order high pass crossover on the signal. 😎