DIY DSP for Digital Room Correction
Continuing on from page 3, post 56 of the "DIY Digital Parametric EQ" thread....
(I wanted to start a thread here so as not to hijack the Parametric EQ thread with my ramblings)....
@Kevin - I've been using PC based DRC for a few years now, and I've used ACXO Player etc. a few times. I'm currently using Denis Sbragion's DRC to generate the filters (as does ACXO), but the main goal is to try to get away from using a PC at all....
Firstly, I've got major problems with ASIO playback on my new Quad Core system - I have a nasty audio glitch which happens every 25 seconds or so (this can be 50 seconds, or 12 seconds etc. depending on the latency / buffer setting.)....
Although I have HD-DVD on the PC, and do use it to output to the projector, it would be great to have the amp perform the usual DD / DTS / THX processing and have DRC applied on the speakers at all times (with a choice of house curves / XO's etc.)
It seems that it would be much better to do everything in the digital realm rather than getting a sound card with 6 or 8 inputs, then having so many ADC / DAC conversions. Also, many integrated amps won't output audio from the internal decoder while allowing external inputs simultaneously.
Unless you encode back to AC3 or DTS again after DRC has been applied on the PC, you generally have to connect to the amp via analog cables. I my case, this would mean four or more 5-metre cables, probable noise problems, and ground loop issues etc. (I can't even get AC3 / DTS passthrough to work atm.)
All these issues mean that although DRC is still a HUGE improvement, there are often lots of unneccesary ADC / DAC conversions in the loop, and the practical hassles of using PC's takes some of the enjoyment out of things.
The other big reason I'm looking into a DSP project is simply for the learning experience and the fact that I can't find a commercial solution that's remotely affordable compared to a PC. I think it would be a hugely rewarding project, and I'd love to start programming a nice LCD UI and adding features.
Then again, as far as I've been told, it does take a large amount of processing power to compute the FIR filters.....
eg. if MACs = (filter length in samples) * (sample rate), then for a single 50ms filter at 48KHz, it would need 115,200,000 MACs !!!
Is this just the case for raw computation, or are there ways of partitioning the filter algorithms? As you can tell, I don't have much idea when it comes to DSPs, but I'm hungry to learn. I have a fair amount of experience with FPGA programming - would an FPGA be a better choice?
How much of what you are using is open source??
Most of it can be done with open source software....
I use rec_imp (part of DRC) to record the log sweeps from each speaker and extract the speaker / room impulses. Then DRC itself is used to create the correction filters....
The filters are then loaded into either Voxengo Pristine Space (commercial) or you could use ConvolverVST instead (open source) to run the filters on. ConvolverVST is a tad trickier to set up on first use, but still good.
Pristine Space or ConvolverVST can run under VSTHost (open source), or in Console (commercial).
The main thing is having a sound card with drivers which can route everything from Windows (WDM / MME) through VSTHost, then from VSTHost out to the speakers via ASIO.
Or, you could use something like Virtual Audio Cable (must be registered I think, source code can be purchased?) which should work with most sound cards.
So basically, DRC / ConvolverVST / VSTHost are all open source. All you would need then is a method for passing the audio through VSTHost or a sound card which supports DirectWIRE etc.
If you are interested in moving away from a PC what is your target platform? Linux? Embedded Linux with a AD Sharc or Freescale DSP? What are your thoughts?
Re: DIY DSP for Digital Room Correction
Are you trying to play music from hard drive?
I discovered an interaction between PCI hard drive controller and sound card which caused glitches on my Windows XP based system.
I also found that simple IIR filters are much less intense for a PC than FIR.
And mostly, I found that things like antivirus programs can really effect audio.
I am using a Quad Core system with RME sound cards and IIR style filters with no problems provided I don't play music while the hard drive is running.
I will say that I've been looking for a non PC (Windows or Linux) solution to FIR/IIR filtering for years.
A DIY version of the Behringer DCX2496 is what I'd like.
Something where you have a choice between IIR or FIR filters.
Something where instead of buying an expensive sound card, it includes reasonably good DAC's.
Nice to see that you're like-minded when it comes to a non-PC solution!....
I'm using an Audiotrak Prodigy HiFi 7.1 sound card atm. I don't think I had any glitches when it was running on my older HTPC (Athlon XP 2800+). The new PC is a Quad (Q6600) and I've also heard that SATA or IDE controllers can be a common cause of audio problems.
I actually have the hard drive and DVD writer on the same IDE channel (yes, I should know better, I'm a PC engineer!), but I have to backup some files on my SATA drives before I can get my RAID setup running on here again. With any luck, using SATA alone might help (probably unlikely though.)
The glitch I get is always within the same period of time (around 25 seconds with the Audiotrak buffer set to 512 samples). It only happens on the ASIO output and does not seem to get recorded when looping ASIO back to WDM (using DirectWIRE). Some of the Audiotrak drivers are terrible (I've tried every version I could), which is a shame because the DirectWIRE feature is something I'd hate to be without now.
I know most of the high end audio cards can loop signals back digitally etc., but I've invested a fair amount in this stuff already, and would rather ditch the PC for the filtering side of things altogether. However, if I didn't have these glitch problems, I would gladly go ahead and add the 8-channel muxit interface to the card and my amp.
All I really need to know is how much power is actually needed as a guide to if it's even cost effective to use a DSP or FPGA? Is it worth me trying to hail a DSP guru?
Edit: Yes, I play all music from the hard drive (MP3's atm, or DivX / DVD / HD-DVD).
Also, with a stand-alone unit my aim would be to bypass the multiple ADC / DAC conversions altogether, and only ever have the one set of DACs before the power amps. (or even use digital amps.)
I don't mind if it runs Linux or something similar (eg. Blackfin) as long as it has enough power, but without it costing more than a basic PC....
I think this is going to be the main challenge because a basic PC for running 6-8 channels of FIR filters with a cheap I2S modded sound card can be brought for much less than £180 nowadays.
I like the idea of SHARC / Blackfin DSPs simply because they are used so commonly in AV amps etc. and seem to be geared toward audio processing.
But, if I only knew how to calculate the power needed and what the raw algorithm is, I could start playing with my basic FPGA dev board....
As far as I understand it - the number of taps you have is simply the filter length (in samples), the calculation basically shifts the incoming audio bits through each "tap", it then multiplies each of the "tap samples" with the corresponding sample from the filter itself. (although the filter's bits are reversed before loading.). The results are then summed, then, erm, something else happens! (magic dust?)
The problem is, the DSP / processor has to be fast enough to multiply all the taps at once (at the sample rate), which results in needing a massive number of multiplications per second.
(Even if the sample rate was 48KHz initially, I would happily use a DSP box in place of the PC. The thing is, it would be nice to have 6 or possibly 8 channels of filtering.)
OzOnE, i suppose you have tried Asio4all?
Sometimes they work better.
A while back I purchased a dspstak 21261zx - c96k46 ADSP-21261 Cyclone DSP and FPGA Eval Package.
I think it was like $300 and took weeks to get.
I never did anything with it because:
a) Needed 8 channels of 24/96
b) Getting everyone to agree on a DSP platform to work on is hard.
this post here might worth reading. I know there is another thread on the same subject on diyhifi.org. The previous version of this project is described here and is having somewhere here on this forum a separate thread as it has on diyhifi.org too a separate one. Plenty of informations on these 4 threads.
As you might see, comercial hardware solutions have some shortcomings for this kind of implementation. (specially when including the price in the equation). The need for sufficient procesing power, memory space and large number of I/O, while keeping the costs and the heat/EMI interferences low triggerd the need for a diy hardware solution.
This kind of dsp/crossover, whith all the hard number crunching taking part in the computer while the DACs are totaly isolated from the PC is what we would really need.
|All times are GMT. The time now is 08:39 PM.|
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Copyright ©1999-2016 diyAudio