MWP: What does the sub_width and mid_width mean? Is this the lower cutoff frequenzy of the bandpass filter? Looks like a great script by the way.
Re: AlmusVCU
Ive tried it.
Its got a big bug which stops the creation of its xover filters.
If reported it to Anders, but he has been too busy latley to look at it 🙁
Sure, DSPs are made for this, but they are expensive to R&D.
PCs are ready to go (almost) and are powerful enough now to handle large FFTs.
By hand.
The code is above.
I dont quite trust the Matlab filter design tool.
Has anyone here tried AlmusVCU by Anders Torger? It relies on BruteFIR and is designed for ambiophonics and ambisonics. What I found most interesting is that it's designed to be able to be run from a DSP chip. I actually saw a prototype of this a year or two ago while at Ralph Glasgal's Ambiophonics Institute, although I didn't realize it at the time, nor did I know Anders was behind the programming.
Ive tried it.
Its got a big bug which stops the creation of its xover filters.
If reported it to Anders, but he has been too busy latley to look at it 🙁
Anywho, I don't know anything about programming DSPs, but, I have read that they're supposed to be much more efficient at processing than the typical CPU. Putting BruteFIR's capabilities on an external DSP chip would allow many more possibilities for connections and DACs than with computer soundcards. One could use a Windows PC with an AES-16 as a front-end music and dvd server and TiVo, then output 6 or 8 channels to AES receivers, into the DSP(s), then DIY DACs and into UCD400s. Sounds sweet. Upgrading would be much cheaper (and much more fun) than replacing a DEQX when the hardware becomes outdated.
Sure, DSPs are made for this, but they are expensive to R&D.
PCs are ready to go (almost) and are powerful enough now to handle large FFTs.
MWP -- are you coding your filters? Or designing them graphically in MATLAB and then tweaking them by hand?
By hand.
The code is above.
I dont quite trust the Matlab filter design tool.
iffe said:MWP: What does the sub_width and mid_width mean? Is this the lower cutoff frequenzy of the bandpass filter? Looks like a great script by the way.
sub_width and mid_width sets the xover roll off between speakers.
Re: AlmusVCU
DSPs are not more efficient than computer these days. They aren't much cheaper either. Typical Behringer product with two Analog SHARC DSP's costs about $400, and Behringer sure can do it cheap if anyone. You can get nice PC (without the monitor) at that price (2.8 GHz Intel or 2 GHz AMD) and have a lot more flexibility in system design. What we truly need is maybe a combined CPU & DSP device, and I think that I've found one. Unfortunately (for me) that products was sold at discount price of $99 early this year, but as I live in Finland I couldn't get one. That product is now sold for $400, about the same price as Behringer, but it's completely DIY. The device in question is the Analog Device's Blackfin BF-533 EZ-KIT Lite:
http://www.analog.com/en/prod/0,2877,BF533%252DHARDWARE,00.html
The board uses AD1836 for 4ch in / 6 ch output audio I/O (SNR > 100 dBA). It's also got plenty of RAM (32 Mb) and it's capable of running Linux (it's got a RISC CPU in addition to the DSP). So you could actually design the filters in the same unit as running them, and control the DSP with Linux. There are some interest groups in net who use this kit already.
dc said:I don't know anything about programming DSPs, but, I have read that they're supposed to be much more efficient at processing than the typical CPU. Putting BruteFIR's capabilities on an external DSP chip would allow many more possibilities for connections and DACs than with computer soundcards.
DSPs are not more efficient than computer these days. They aren't much cheaper either. Typical Behringer product with two Analog SHARC DSP's costs about $400, and Behringer sure can do it cheap if anyone. You can get nice PC (without the monitor) at that price (2.8 GHz Intel or 2 GHz AMD) and have a lot more flexibility in system design. What we truly need is maybe a combined CPU & DSP device, and I think that I've found one. Unfortunately (for me) that products was sold at discount price of $99 early this year, but as I live in Finland I couldn't get one. That product is now sold for $400, about the same price as Behringer, but it's completely DIY. The device in question is the Analog Device's Blackfin BF-533 EZ-KIT Lite:
http://www.analog.com/en/prod/0,2877,BF533%252DHARDWARE,00.html
The board uses AD1836 for 4ch in / 6 ch output audio I/O (SNR > 100 dBA). It's also got plenty of RAM (32 Mb) and it's capable of running Linux (it's got a RISC CPU in addition to the DSP). So you could actually design the filters in the same unit as running them, and control the DSP with Linux. There are some interest groups in net who use this kit already.
Octave translation for MWP's script
I was fooling with Mark's Matlab script and found it needs a couple of changes to work in Octave.
Change all occurrences of:
t(1,xxxx) = out(1,n);
to
t(1,xxxx)=out👎;
And the save -ascii -double statement doesn't work.
What is that Mark?
-Robert
I was fooling with Mark's Matlab script and found it needs a couple of changes to work in Octave.
Change all occurrences of:
t(1,xxxx) = out(1,n);
to
t(1,xxxx)=out👎;
And the save -ascii -double statement doesn't work.
What is that Mark?
-Robert
Robert,
Would you like to post the Octave version of Mark's code if you get it running? The -double parameter for save just increases the resolution to 64 bits ("double" resolution) I think, just leave it off from the Octave code (use the plain save -ascii <path> <filter> function like you've done in your own filter code).
Btw. is there a way to save the plots somewhere, they disappear from the screen so fast? (I mean with freqz in Octave)
-Mikko
Would you like to post the Octave version of Mark's code if you get it running? The -double parameter for save just increases the resolution to 64 bits ("double" resolution) I think, just leave it off from the Octave code (use the plain save -ascii <path> <filter> function like you've done in your own filter code).
Btw. is there a way to save the plots somewhere, they disappear from the screen so fast? (I mean with freqz in Octave)
-Mikko
BF533 STAMP @Digikey for $193
There's also the BF533 STAMP open source uCLinux project.
STAMP boards are < $200 at Digikey:
http://www.digikey.com/scripts/DkSearch/dksus.dll?PName?Name=ADDS-BF533-STAMP-ND
Project home page:
http://blackfin.uclinux.org/projects/stamp/
STAMP board is modular, and there will be separate Audio board for it which uses the AD1836A codec. It includes also the S/PDIF I/O, which is connected to AUX I2S interface of the AD1836A. The AD codec also takes care of TDM to I2S conversion, so you could design you own audio interface using this codec between some better AKM or other brand converters.
There's also the BF533 STAMP open source uCLinux project.
STAMP boards are < $200 at Digikey:
http://www.digikey.com/scripts/DkSearch/dksus.dll?PName?Name=ADDS-BF533-STAMP-ND
Project home page:
http://blackfin.uclinux.org/projects/stamp/
STAMP board is modular, and there will be separate Audio board for it which uses the AD1836A codec. It includes also the S/PDIF I/O, which is connected to AUX I2S interface of the AD1836A. The AD codec also takes care of TDM to I2S conversion, so you could design you own audio interface using this codec between some better AKM or other brand converters.
Re: Octave translation for MWP's script
Mikko is correct, just drop the "-double" off the line.
AFAIK BruteFIR supports double length coeffs, so i specified it in the Matlab save line.
You probably wont notice a difference without it.
Erm, try setting the gnuplot vars in Octave to dump the image to a file.
Its a little dodgy tho, make sure you do that the command before freqz.
Sometimes itll give a freq response curve, other times itll give the phase reponse 🙁
And the save -ascii -double statement doesn't work.
What is that Mark?
Mikko is correct, just drop the "-double" off the line.
AFAIK BruteFIR supports double length coeffs, so i specified it in the Matlab save line.
You probably wont notice a difference without it.
Btw. is there a way to save the plots somewhere, they disappear from the screen so fast? (I mean with freqz in Octave)
Erm, try setting the gnuplot vars in Octave to dump the image to a file.
Code:
gset term png
gset output "out.png"
gset size 5,5
Its a little dodgy tho, make sure you do that the command before freqz.
Sometimes itll give a freq response curve, other times itll give the phase reponse 🙁
Re: Re: AlmusVCU
I was jazzed about the blackfin when I first heard about it too, but the BIG problem is that the MAC functionality appears to only work with 16-bit operands. No good for hi-fi applications. I'm sure you could 'make it work' for longer word lengths, but you wouldn't be getting max performance out of it.
mhelin said:
The device in question is the Analog Device's Blackfin BF-533 EZ-KIT Lite:
http://www.analog.com/en/prod/0,2877,BF533%252DHARDWARE,00.html
The board uses AD1836 for 4ch in / 6 ch output audio I/O (SNR > 100 dBA). It's also got plenty of RAM (32 Mb) and it's capable of running Linux (it's got a RISC CPU in addition to the DSP). So you could actually design the filters in the same unit as running them, and control the DSP with Linux. There are some interest groups in net who use this kit already.
I was jazzed about the blackfin when I first heard about it too, but the BIG problem is that the MAC functionality appears to only work with 16-bit operands. No good for hi-fi applications. I'm sure you could 'make it work' for longer word lengths, but you wouldn't be getting max performance out of it.
dc said:One more thing... Does anyone have experience using DRC with open baffle speakers?
My initial attempts with full-ish range dipoles wasn't very satisfying, but I didn't really play with it too much. I had pretty audible echo effects. Denis himself has said that he applied it to someones dipoles with very good results, though. It points out the big hurdle with DRC, though - if it doesn't work straight out of the box, it is not at all obvious how to go about tweaking/tuning it to make it work.
I've done some thinking (ie 'dreaming' ) about putting together a set of visualizations for DRC, but as I'm having trouble even finding time to work on my speakers, this never got started. I'd love to be able to generate a set of waterfall and/or spectrogram plots at 'key' stages of the DRC process to help understand the impact of all the tuning parameters.
My guess is that you probably need to set the window sizes so that it doesn't try to over-correct the first rear reflection in the mids - try to get it to correct the bass and the first arrival only.
Re: Re: Re: AlmusVCU
That pretty much rules it out. What is left for the DRC like applications is a PC. C-Media has a new PCI chipset for soundcards, and they claim > 100 dB SNR (soundcards cost <$25). Now you need a quiet PC. You could modify an ADM Athlon-XP to a mobile version and underclock it, so it would be possible to use passive cooling. Another way is to use a mini-itx form factor motherboards (for VIA C3, Pentium-M or P4). Epia-M cost between 100-200$ depending on the CPU. For the Epia-TC you need just a 12VDC supply, for the other a regular ATX supply is needed. Add the cost of the case (or build it DIY, the fancier it looks the better). For a monitor buy a Sony PS One LCD monitor (I just got one for $50 new but haven't got time to connect it to a PC yet). Add RAM and the HD. Not cheap. There is the XBOX, but it doesn't have the audio channels (or does it?). Maybe the PC with integrated GPU, underclocked CPU, a cheap but good soundcard and PCI riser card for it, an external PSU (or regular with extension chords) and a custom built case (or mini-ATX) is the best solution. Some barebones also look nice and aren't so expensive after all.
dwk123 said:
I was jazzed about the blackfin when I first heard about it too, but the BIG problem is that the MAC functionality appears to only work with 16-bit operands.
That pretty much rules it out. What is left for the DRC like applications is a PC. C-Media has a new PCI chipset for soundcards, and they claim > 100 dB SNR (soundcards cost <$25). Now you need a quiet PC. You could modify an ADM Athlon-XP to a mobile version and underclock it, so it would be possible to use passive cooling. Another way is to use a mini-itx form factor motherboards (for VIA C3, Pentium-M or P4). Epia-M cost between 100-200$ depending on the CPU. For the Epia-TC you need just a 12VDC supply, for the other a regular ATX supply is needed. Add the cost of the case (or build it DIY, the fancier it looks the better). For a monitor buy a Sony PS One LCD monitor (I just got one for $50 new but haven't got time to connect it to a PC yet). Add RAM and the HD. Not cheap. There is the XBOX, but it doesn't have the audio channels (or does it?). Maybe the PC with integrated GPU, underclocked CPU, a cheap but good soundcard and PCI riser card for it, an external PSU (or regular with extension chords) and a custom built case (or mini-ATX) is the best solution. Some barebones also look nice and aren't so expensive after all.
Octave version of MWP filters
Here's my 2-way adaptation for Octave of Mark's script. My 3rd filter is a subsonic cutoff that is currently substituting for the drc filter. So remember I have a drc filter feeding into the xo low and high filters for each channel. Sound is good but not much different than previous ones I was using. Note that I am still using 64k taps because the subsonic filter needs almost that many to resolve the sharp cutoff at 35Hz. If it weren't for that, Mark's 8192 taps would be fine.
Here's my 2-way adaptation for Octave of Mark's script. My 3rd filter is a subsonic cutoff that is currently substituting for the drc filter. So remember I have a drc filter feeding into the xo low and high filters for each channel. Sound is good but not much different than previous ones I was using. Note that I am still using 64k taps because the subsonic filter needs almost that many to resolve the sharp cutoff at 35Hz. If it weren't for that, Mark's 8192 taps would be fine.
Code:
n=16; # exponent for filter size (16->64k 15->32k ...)
fsubsonic=35; # sub-sonic cutoff frequency in Hz
fxo=2600; # main 2-way crossover frequency in Hz
wxo=50; # width of xo region in Hz
wsubsonic=5; # width of subsonic cutoff in Hz
fs=44100; # sample rate in Hz
k=2^n; # order of filter, # of coefficients in array
fn=fs/2; # Nyquist frequency
f = [fxo-(wxo/2), fxo+(wxo/2)];
m = [1, 0];
dev = [0.000005, 0.000005];
[n, w, beta, ftype] = kaiserord(f, m, dev, fn);
out = fir1(n,w,ftype,kaiser(n+1,beta),'scale');
l = length(out);
t = zeros(1,k);
if k < l
s = round((l - k) / 2);
e = l - s - 1;
for n = s:e
t(n-s+1) = out(n);
end
else
s = round((k - l) / 2);
for n = 1:l
t(n+s) = out(n);
end
end
tc=t(:);
save -ascii lopassraw.txt tc
freqz(t,1,[],fn)
f = [fxo-(wxo/2), fxo+(wxo/2)];
m = [0, 1];
dev = [0.000005, 0.000005];
[n, w, beta, ftype] = kaiserord(f, m, dev, fn);
out = fir1(n,w,ftype,kaiser(n+1,beta),'scale');
l = length(out);
t = zeros(1,k);
if k < l
s = round((l - k) / 2);
e = l - s - 1;
for n = s:e
t(n-s+1) = out(n);
end
else
s = round((k - l) / 2);
for n = 1:l
t(n+s) = out(n);
end
end
tc=t(:);
save -ascii hipassraw.txt tc
freqz(t,1,[],fn)
f = [fsubsonic-(wsubsonic/2), fsubsonic+(wsubsonic/2)];
m = [0, 1];
dev = [0.000005, 0.000005];
[n, w, beta, ftype] = kaiserord(f, m, dev, fn);
out = fir1(n,w,ftype,kaiser(n+1,beta),'scale');
l = length(out);
t = zeros(1,k);
if k < l
s = round((l - k) / 2);
e = l - s - 1;
for n = s:e
t(n-s+1) = out(n);
end
else
s = round((k - l) / 2);
for n = 1:l
t(n+s) = out(n);
end
end
tc=t(:);
save -ascii subsonicraw.txt tc
freqz(t,1,[],fn)
Ack
All my formatting is missing from the above script. Yukk. Ahh now that's better. Had to put in "code" to get it to look ok. -Robert
All my formatting is missing from the above script. Yukk. Ahh now that's better. Had to put in "code" to get it to look ok. -Robert
Question on convolution?
Mark,
When convolving your sub high and mid low filters, you get a final array that is one tap shy of 8192, ie two 4096 tap filters convolve to make a 8191 tap filter.
Does that matter and what do you do about it?
-Robert
Mark,
When convolving your sub high and mid low filters, you get a final array that is one tap shy of 8192, ie two 4096 tap filters convolve to make a 8191 tap filter.
Does that matter and what do you do about it?
-Robert
Re: Question on convolution?
Yeh, i noticed that while i was testing.
BruteFir doesnt seem to have any problems with it.
RFScheer said:Mark,
When convolving your sub high and mid low filters, you get a final array that is one tap shy of 8192, ie two 4096 tap filters convolve to make a 8191 tap filter.
Does that matter and what do you do about it?
Yeh, i noticed that while i was testing.
BruteFir doesnt seem to have any problems with it.
DRC - the hardest step so far
Has anyone successfully implmented drc using Denis Sbragion's drc programs and Linux?
I've recorded the sweep responses just fine but can't get through the lsconv and drc steps of the procedure with any useful results.
What is the inverse sweep file supposed to look like? I can't resolve it in a sound editor.
Anyone have some sample input files for lsconv that worked for you? I could really benefit from comparing mine with them.
I'm using Ardour-Jack-Brutefir-ALSA for playing and recording the sweep, including reference track. Am using snd and Audacity sound editors.
-Robert
Has anyone successfully implmented drc using Denis Sbragion's drc programs and Linux?
I've recorded the sweep responses just fine but can't get through the lsconv and drc steps of the procedure with any useful results.
What is the inverse sweep file supposed to look like? I can't resolve it in a sound editor.
Anyone have some sample input files for lsconv that worked for you? I could really benefit from comparing mine with them.
I'm using Ardour-Jack-Brutefir-ALSA for playing and recording the sweep, including reference track. Am using snd and Audacity sound editors.
-Robert
Robert,
Any ideas why I get all zeros saved into the *raw.txt files from the MWP's filter design program converted to Octave? If I plot the "tc" matrix it seems to be OK (plots look the same). When I save the "out" matrix everything seems to be OK.
Any ideas why I get all zeros saved into the *raw.txt files from the MWP's filter design program converted to Octave? If I plot the "tc" matrix it seems to be OK (plots look the same). When I save the "out" matrix everything seems to be OK.
Here's a modified version without the extra calculations with t and tc. Notice that even though you specify k=2^16 (64k) taps for filters you'll get a lot of smaller kernel with the wider transfer band (600 Hz here). I haven't listened any of these versions, but the filter is still very steep so I think it might sound as good as any steeper version and allow for very low latency (delay) - except with the subsonic - when implemented with real DSP. Actually with 83 taps the delay is less than 1 ms @44100 Hz fs.
-Mikko
-Mikko
Code:
n=16; # exponent for filter size (16->64k 15->32k ...)
fsubsonic=25; # sub-sonic cutoff frequency in Hz
fxo=1600; # main 2-way crossover frequency in Hz
wxo=600; # width of xo region in Hz
wsubsonic=25; # width of subsonic cutoff in Hz
fs=44100; # sample rate in Hz
k=2^n; # order of filter, # of coefficients in array
fn=fs/2; # Nyquist frequency
f = [fxo-(wxo/2), fxo+(wxo/2)];
m = [1, 0];
dev = [0.01, 0.01];
[n, w, beta, ftype] = kaiserord(f, m, dev, fn);
out = fir1(n,w,ftype,kaiser(n+1,beta),'scale');
save -ascii lopassraw.txt out
freqz(out,1,[],fn)
pause(10);
f = [fxo-(wxo/2), fxo+(wxo/2)];
m = [0, 1];
dev = [0.01, 0.01];
[n, w, beta, ftype] = kaiserord(f, m, dev, fn);
out = fir1(n,w,ftype,kaiser(n+1,beta),'scale');
save -ascii hipassraw.txt out
freqz(out,1,[],fn)
pause(10);
f = [fsubsonic-(wsubsonic/2), fsubsonic+(wsubsonic/2)];
m = [0, 1];
dev = [0.01, 0.01];
[n, w, beta, ftype] = kaiserord(f, m, dev, fn);
out = fir1(n,w,ftype,kaiser(n+1,beta),'scale');
save -ascii subsonicraw.txt out
freqz(out,1,[],fn)
pause(10);
Zeroes
Mikko,
Why zeroes?
Probably you are just seeing a huge array filled mostly with zeroes but there really are values stuffed in the middle of the array.
The reason I did the little tc=t🙂); manipulation was to convert from row format to column format in the array so a simple text editor like gedit could easily read the array. Otherwise, it was throwing away many of the elements because there were too many characters per line.
-Robert
Mikko,
Why zeroes?
Probably you are just seeing a huge array filled mostly with zeroes but there really are values stuffed in the middle of the array.
The reason I did the little tc=t🙂); manipulation was to convert from row format to column format in the array so a simple text editor like gedit could easily read the array. Otherwise, it was throwing away many of the elements because there were too many characters per line.
-Robert
- Status
- Not open for further replies.
- Home
- Source & Line
- Digital Source
- PC music players