Creating a DIY DSP “server” that can apply FIR filters to all incoming sounds?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi Guys,

I was wondering if there were any examples or literature of DIYers creating their own headless DSP PC. I am building a 2 way speaker and want to implement a digital XO on it.

Has anyone created a small PC whose only job is to act like a Digital XO and apply DSP and FIR filters to all sounds coming to it? Should this XO PC run Linux or Windows? Can this XO PC be connected to a normal work PC, MacBook and receive all sounds from them, like YouTube, Foobar, Video Games etc?

Possible Chain: Windows PC/MacBook to DSP XO PC to 4 Channel DAC to 4 Amp Modules to Tweeters and Woofers

I’ve been reading a lot of great work done in the past few years by some genius members of this community, hoping someone can point me to some data to help me out.

Thanks for your time!
 
Yes, I do these kind of things all the time using a variety of hardware and free software running under Linux. The question is how much latency can you live with, because there will definitely be some. If you envision this to work for video+audio, it might not be all that practical, however, for audio it's a solution that works very well and is only limited by your DAC(s) and ADC (if using analog input).

Look for threads in the PC Based forum here, or you can do a Google search for ecasound. Here is a good overview by Richard Taylor that got me to dive in:
Digital Crossover/EQ with Open-Source Software: HOWTO | Richard's Stuff

More audio stuff from him:
Loudspeakers | Richard's Stuff

My LADSPA plugins page is found here:
LADSPA-plugins
 
Yes, I do these kind of things all the time using a variety of hardware and free software running under Linux. The question is how much latency can you live with, because there will definitely be some. If you envision this to work for video+audio, it might not be all that practical, however, for audio it's a solution that works very well and is only limited by your DAC(s) and ADC (if using analog input).

Look for threads in the PC Based forum here, or you can do a Google search for ecasound. Here is a good overview by Richard Taylor that got me to dive in:
Digital Crossover/EQ with Open-Source Software: HOWTO | Richard's Stuff

More audio stuff from him:
Loudspeakers | Richard's Stuff

My LADSPA plugins page is found here:
LADSPA-plugins

Thank you for sharing, I have been reading a lot in the past few days and you have made great contributions to this community. In your opinion, are there any ways to minimize the latency, in the rare cases where I would want to use video + audio?
 
There are many solutions if you only want IIR filters, but since you want FIR filters the list gets much shorter.
These are the ones I have found (and I have probably missed a few):
Linux:
BruteFIR: BruteFIR
Jconvolver: Kokkini Zita - Linux Audio
And of course my own CamillaDSP :)

Windows:
EqualizerAPO: Equalizer APO download | SourceForge.net
ConvolverVST: ConvolverVST

Both BruteFIR and CamillaDSP can capture from the spdif input of a soundcard and send the processed output to the same or another card, with no other software involved.

How do you want to control volume?

For video there should be no problem as long as you don't make very long filters. I have used 1024 and 2048 taps without noticeable audio-video delay.
 
Thank you for sharing, I have been reading a lot in the past few days and you have made great contributions to this community. In your opinion, are there any ways to minimize the latency, in the rare cases where I would want to use video + audio?

ecasound has good control over the buffer size. The smaller the buffer, the lower the latency. This is set using the -B option with a real-time option. You can set the buffer manually using the -b option. It's explained in the man pages. You try to make it as low as possible but avoid audio glitches. I think you can get it under 50msec, possibly down to 20msec if you only use IIR filters. FIR filters induce their own latency that comes on top of the throughput latency of the PC audio chain.

The big hurdle in my opinion is the buffering done by ALSA, which is the Linux audio interface to sound cards. I have not had much luck trying to tweak ALSA for very low latency. There is a forum member, phofman, who might be able to provide some useful guidance on that.
 
There are many solutions if you only want IIR filters, but since you want FIR filters the list gets much shorter.
These are the ones I have found (and I have probably missed a few):
Linux:
BruteFIR: BruteFIR
Jconvolver: Kokkini Zita - Linux Audio
And of course my own CamillaDSP :)

Windows:
EqualizerAPO: Equalizer APO download | SourceForge.net
ConvolverVST: ConvolverVST

Both BruteFIR and CamillaDSP can capture from the spdif input of a soundcard and send the processed output to the same or another card, with no other software involved.

How do you want to control volume?

For video there should be no problem as long as you don't make very long filters. I have used 1024 and 2048 taps without noticeable audio-video delay.
Hi Henrik,

Thank you for commenting, I was reading about your CamillaDSP a few days ago, really brilliant work!

So as it stands, I have an old i7 PC that I can convert into a dedicated DSP Box, and I currently have some Topping D90 DACs (with I2S inputs) that have digital volume control built in.

I have read that I can build IIR/FIR filters in rePhase, load them into my main working PC through EqualizerAPO, output to 2x Topping D90 DACs or 1x Okto DAC8, and everything should be fine, with not too bad added latency. There may be an issue with clock drift by using 2x Topping DACS vs just 1x Okto DAC, not sure yet if that is a concern.

My main concern is that the speakers become essentially useless unless my main PC is on at the same time. To become source agnostic, I thought that creating a dedicated DSP XO box in a Linux or Windows environment would be perfect.

If I go the route of the DSP XO box, my only issue is just sorting digital inputs from a PC/MacBook/NAS and analog inputs from a turntable, and then getting digital USB/SPDIF/I2S outputs into my 2x Topping/1x Okto DAC.

My concern with option 2 is minimizing latency as much as possible as the signal travels, and sorting out the hardware. My chain inspiration comes from the picture attached (tortuga audio).

Thank you again for sharing your knowledge, wonderful community here :wave2:
 

Attachments

  • Possible Chain.png
    Possible Chain.png
    201.3 KB · Views: 385
Last edited:
The RPi USB-audio gadget would fit the bill perfectly here... The four cores should handle the load, IMO. Separate USB controllers for the gadget (input) and soundcard (output) sides. Connecting another USB or I2S capture would be possible. Built-in small touch TFT for control and a smart soundcard with integrated fully configurable multichannel DSP is done.
 
Other than using RPi based solutions, I’ve been wondering how I should connect a PC, a MacBook, and a turntable to this DSP box.

I would need to add 2 SPDIF and 2 RCA inputs for the DSP PC to process, before outputting to the DACs. Has anyone found an elegant solution for this? I’ve been waffling between a PCIe card, some kind of USB Bus, the MiniDSP UDIO-8, and the MiniDSP MCHstreamer.

Any guidance is much appreciated, right now I’m finishing the cabinets before I start running measurements on the Umik-1. As of now, I’m planning on using rePhase to generate the FIR filters, but I’ve been reading up on a lot of other interesting options. I’d like to get a prototype chain up and running soon though, so I can work out issues while I wait for parts to arrive.

I’m hoping to make a PC version of the MiniDSP nanodigi, hopefully I’m on the right track.
 
Last edited:
Other than using RPi based solutions, I’ve been wondering how I should connect a PC, a MacBook, and a turntable to this DSP box.

I would need to add 2 SPDIF and 2 RCA inputs for the DSP PC to process, before outputting to the DACs. Has anyone found an elegant solution for this? I’ve been waffling between a PCIe card, some kind of USB Bus, the MiniDSP UDIO-8, and the MiniDSP MCHstreamer.

Any guidance is much appreciated, right now I’m finishing the cabinets before I start running measurements on the Umik-1. As of now, I’m planning on using rePhase to generate the FIR filters, but I’ve been reading up on a lot of other interesting options. I’d like to get a prototype chain up and running soon though, so I can work out issues while I wait for parts to arrive.

I’m hoping to make a PC version of the MiniDSP nanodigi, hopefully I’m on the right track.

Yeah, input management is a bit of a problem when trying to assemble a DSP appliance that works like a conventional multi-source system. I'm not aware of anything that really fits the bill off-the-shelf. Maybe a Meridian G-series processor, but that's $$$ (A 561 might be ok if you're willing to live with 44.1/48 sample rates only). For our Living Room system where remote control and multiple sources were needed, I went with a MiniDSP SHD which is a nice unit, but is limited to 2-way xovers and is strictly IIR.

When I had something close to what you describe running in the past, I used a Behringer SRC2496 to handle the inputs. It supports 1 input of each type - 1 coax spdif, 1 toslink, 1 xlr aes/ebu, and 1 stereo analog input. The analog input is digitized, and the digital inputs are run through a sample-rate-converter so that you have a single universal fixed-rate digital output. Even better, you can slave the SRC2496 to a word-clock output from your sound card so that the sound card is the master and you don't have problems with having to re-sync to the input clocks. (although not too many interfaces have wordclock output. The moto 828ES does. I was using a Steinberg MR816)
This worked really well, but everything is manual, it's ugly, and the inputs are limited. Plus, it appears the SRC2496 is discontinued and I'm not aware of a directly comparable unit. (still available on ebay though)

In terms of designing a current system, something like the SHD might be the best candidate (which is why I ended up with it), although it's pricey and you might not really use all the features if you're going to run an external FIR engine. It handles a couple digital inputs and analog inputs, and outputs over coax SPDIF. Plus, it has Dirac room correction which is generally seen as pretty good and simpler than something like DRC-fir. If you want multiple analog inputs you'll have to use an additional external switcher, and if you have more than a couple digital sources you might also need a switcher. (The SHD studio unfortunately doesn't have any analog inputs)

You could also just run a bunch of inputs into a big studio style soundcard and use software to choose which input channels to use, but I'm not aware of any that support multiple digital AND analog inputs at the same time - most only have a single digital input unless they're all-digital interfaces, and only things like the Okto or Motu 8D have SRC on the inputs so that the interface can remain the master and run at predictable rate. I guess you could link a Motu 8A and 8D via AVB but I'm guessing that's out of the budget
 
Yeah, input management is a bit of a problem when trying to assemble a DSP appliance that works like a conventional multi-source system. I'm not aware of anything that really fits the bill off-the-shelf. Maybe a Meridian G-series processor, but that's $$$ (A 561 might be ok if you're willing to live with 44.1/48 sample rates only). For our Living Room system where remote control and multiple sources were needed, I went with a MiniDSP SHD which is a nice unit, but is limited to 2-way xovers and is strictly IIR.

When I had something close to what you describe running in the past, I used a Behringer SRC2496 to handle the inputs. It supports 1 input of each type - 1 coax spdif, 1 toslink, 1 xlr aes/ebu, and 1 stereo analog input. The analog input is digitized, and the digital inputs are run through a sample-rate-converter so that you have a single universal fixed-rate digital output. Even better, you can slave the SRC2496 to a word-clock output from your sound card so that the sound card is the master and you don't have problems with having to re-sync to the input clocks. (although not too many interfaces have wordclock output. The moto 828ES does. I was using a Steinberg MR816)
This worked really well, but everything is manual, it's ugly, and the inputs are limited. Plus, it appears the SRC2496 is discontinued and I'm not aware of a directly comparable unit. (still available on ebay though)

In terms of designing a current system, something like the SHD might be the best candidate (which is why I ended up with it), although it's pricey and you might not really use all the features if you're going to run an external FIR engine. It handles a couple digital inputs and analog inputs, and outputs over coax SPDIF. Plus, it has Dirac room correction which is generally seen as pretty good and simpler than something like DRC-fir. If you want multiple analog inputs you'll have to use an additional external switcher, and if you have more than a couple digital sources you might also need a switcher. (The SHD studio unfortunately doesn't have any analog inputs)

You could also just run a bunch of inputs into a big studio style soundcard and use software to choose which input channels to use, but I'm not aware of any that support multiple digital AND analog inputs at the same time - most only have a single digital input unless they're all-digital interfaces, and only things like the Okto or Motu 8D have SRC on the inputs so that the interface can remain the master and run at predictable rate. I guess you could link a Motu 8A and 8D via AVB but I'm guessing that's out of the budget


Thanks for sharing your experiences, every bit helps as I try to sort this out.


I have an old PC that I'm going to throw a bootable SSD into, and I have an old Soundblaster ZXR with RCA and SPDIF inputs. I'll pilot it as a potential DSP box with some test filters through EqualizerAPO, see if I can get sound out the other end.



I'm also trying to find out if I can just use USB to AES/SPDIF/I2S to get everything wired up
 
Small update for anyone following along, I'm exploring potential solution for connecting multiple source devices to the DSP PC, and from one DSP to multiple stereo DACs.


Sources via USB out (switcher for different digital sources) to MCHStreamer out via i2S soldered in to MCHstreamer #2 via USB in to DSP PC.



Theoretically, this should allow my DSP PC to be seen as a "digital audio input" by my sources, and thus allow me to send full bandwidth audio down the line to the DSP PC. Furthermore, I can easily swap the digital source (PC, MacBook, ADC from Turntable) using a switcher. Of course, this is academic, I still have to buy and solder 2 MCHstreamers to see if I can make this work.


Finally, I can just go DSP PC to MCHstreamer #3 in front of 2 Topping D90 DACs, and make them be seen by the DSP PC as one multichannel DAC. That being said, I'm a bit worried about wiring up 9ft HDMI cables into the I2S ports on my DACs, don't know if I run the risk of signal degradation along the way.


Any experience on using the MCHstreamers in such a manner would be greatly appreciated :)
 
Well, your solution is, uh, creative. And will almost certainly not work. You have 2 clock sources in play, and that is going to be a problem.

You seem to be over-complicating things in an effort to avoid spdif, and I'd say that in this day and age that's not something you should be too worried about. Modern DACs have very good jitter immunity and you're unlikely to encounter an audible problem from it. Plus, by using IIS you might actually make things worse since the jitter suppression techniques might not apply to IIS inputs since they carry the master clock directly. This is particularly true if you're planning to run a 9' IIS connection - remember that IIS was NEVER designed to be a multi-box interconnect and I can easily see a 9' IIS link being far worse than any spdif problems you're trying to avoid. My advice is to start simple and only solve a problem if it's actually a problem.

If you only care about USB output and are planning to use a USB switch, you should be able to get away with something like this.

switch -> UsbToSpdif -> spdif -> MCHStreamer ->USB -> PC -> (same) MCHStreamer -> spdif->DACs

The UsbToSpdif could be a 2nd MCHStreamer, but doesn't have to be - you could use a simpler off-the-shelf part. If you do use a 2nd MCHStreamer, you could try slaving its clock to an spdif output from the 'primary' MCHStreamer which in theory would result in a single global clock source, but that shouldn't really be necessary and might consume an output you could otherwise use for the DACs. You could of course use IIS rather than spdif out to the DACs, but I'd strongly urge you to get the simple case working first and add IIS only if you have incurable Tweakers Urge.
 
Last edited:
Well, your solution is, uh, creative. And will almost certainly not work. You have 2 clock sources in play, and that is going to be a problem.

You seem to be over-complicating things in an effort to avoid spdif, and I'd say that in this day and age that's not something you should be too worried about. Modern DACs have very good jitter immunity and you're unlikely to encounter an audible problem from it. Plus, by using IIS you might actually make things worse since the jitter suppression techniques might not apply to IIS inputs since they carry the master clock directly. This is particularly true if you're planning to run a 9' IIS connection - remember that IIS was NEVER designed to be a multi-box interconnect and I can easily see a 9' IIS link being far worse than any spdif problems you're trying to avoid. My advice is to start simple and only solve a problem if it's actually a problem.

If you only care about USB output and are planning to use a USB switch, you should be able to get away with something like this.

switch -> UsbToSpdif -> spdif -> MCHStreamer ->USB -> PC -> (same) MCHStreamer -> spdif->DACs

The UsbToSpdif could be a 2nd MCHStreamer, but doesn't have to be - you could use a simpler off-the-shelf part. If you do use a 2nd MCHStreamer, you could try slaving its clock to an spdif output from the 'primary' MCHStreamer which in theory would result in a single global clock source, but that shouldn't really be necessary and might consume an output you could otherwise use for the DACs. You could of course use IIS rather than spdif out to the DACs, but I'd strongly urge you to get the simple case working first and add IIS only if you have incurable Tweakers Urge.


Great insight here, thanks for sharing. I was gifted the second transparent Topping DAC, which is why I'm hesitant to sell them for an Okto DAC8. So I'm stuck going from my DSP PC to 2x Stereo DACs. I didn't want to buy a capture card so I thought the MCHStreamer might be a nice option here for full-bandwidth connections, but I'm definitely concerned about long runs of I2S. I'm also just a bit confused what you meant by "(same) MCHStreamer".

I'm not married to the MCHStreamers, do you think there are any other multichannel USB audio interfaces I should be looking at, for the two DACs?
 
Member
Joined 2007
Paid Member
Controversial suggestion, why not sell the PC and the DACs and get a 2nd hand loudspeaker management system? should be able to get a lake processor, symetrix qsc, or other high end option 2nd hand. Especially in a few weeks when venues start going under.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.