Jack, Xine, Mplayer, Mythtv, DRC Room correction? - AVS Forum
Forum Jump: 
Closed Thread
 
Thread Tools
post #1 of 85 Old 10-10-2004, 05:44 PM - Thread Starter
Senior Member
 
chrisbirkinshaw's Avatar
 
Join Date: Jul 2003
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
http://www.avsforum.com/avs-vb/showt...x&pagenumber=1

I was reading the above thread, and had a look at the Wiki page (http://drc.wildgooses.com/index.php/Main_Page) but noticed no one had posted on that topic for some time. I am currently deciding whether to spend money on a TAG Processor or spend it on one of the Hush ATX PCs (http://www.hushtechnologies.com/start.html) and implement a full DVD player/AC3 decoder/room EQ all in one box.

Has anyone got anywhere with coupling mplayer or xine through Jack and into BruteFIR or something similar? I am concerned however that the quality of the AC3 and DTS decoding in linux is inferior to that of an external processor, has anyone made any comparisons?

Also, does anyone know if xine supports Jack, or if Jack output for MythTv is coming?

Chris


Edit: I have been reading the AlmusVCU docs and it seems I will need a separate PC to my HTPC if I am to avoid drop outs and other such nastiness (if anyone has filters running on the same PC as their vid decoder please let me know how it performs). There is then the problem of getting the machine running AlmusVCU to decode AC3 and DTS from a digital input - is this possible??
chrisbirkinshaw is offline  
Sponsored Links
Advertisement
 
post #2 of 85 Old 10-11-2004, 01:34 AM
Member
 
ewildgoose's Avatar
 
Join Date: Mar 2003
Location: London
Posts: 164
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Hi, I am the author of that web page. I am building a massive home theatre system and want to be able to do multichannel audio with DRC correction all round. The main reason for the DRC correction is both for better two channel stereo at the front, and also so that I can blend in some rather cheap (£50) NXT flat panel rear speakers in with a big active speaker on the front. This sort of stuff is all a piece of cake in the digital domain

To do this, Brutefir does all the application of your filters to the audio signal, so you need all your apps to output via this. Easiest way is to use the Jack framework as the audio output layer, but support for this is still in the early stages in many applications. So I am adding code to do this to the apps that I need, basically, mplayer, mythtv and probably Ogle. I don't use Xine because it doesnt really fit with the idea of using only a remote control and you never knowing that its a PC under the hood. (Everything else is seemless, it just looks like a cool PVR)

Mythtv Jack output is written, and so is the mplayer stuff (but needs a bit more tweaking). I am currently doing multichannel output via mplayer, although there are a few bugs which need working out (very annoying, but not terminal ones)

I hope to make the web page much more detailed about what I have done with my system, but right now I am soldering and hammering things full time to get it all finished. Wait a week or three to see the final outcome.

As for whether you should get a commercial design or a PC, thats really down to you. The PC will always do more, but it's definitely in it's infancy right now, and the standalone player will certainly be more robust and need less tweaking. However, you can do a ton of stuff more with the PC than you will ever be able to do with the standalone player. So basically up to you whether you want fully packaged convenience, or "worlds your oyster" but I need to configure it - type package.

However, please note that all the video and audio processing that *I* do on my box, ie full software resizing (awesome quality) and audio resampling, audio filtering, etc is VERY cpu heavy. I am getting towards the limits of this processor with only 6 channels and a standard def TV using a Pentium 2.8Ghz. You need a butch PC is you want a full on system basically. However, for just basic audio correction you can get by with a much lower spec machine.

Good luck all

Ed W
ewildgoose is offline  
post #3 of 85 Old 10-11-2004, 02:51 AM - Thread Starter
Senior Member
 
chrisbirkinshaw's Avatar
 
Join Date: Jul 2003
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Thanks for posting Ed, I think I will scrap my current mythtv box (Athlon XP2100) and go for a new system altogether that will do mplayer/mythtv/jack/brutefir. My whole system is actively biamped, and now I am considering getting rid of my external analog x-overs for the front pair and doing the xover digitally. Do you think a top of the line current P4 would do 8 channels of output as well as resize to 1280x720?

I also noticed the M-Audio delta 1010 whilst looking around. It seems like a good budget option for this type of thing. It also has analog inputs which would be useful if I ever got a DVD-A player.

http://www.m-audio.com/products/en_u...1010-main.html

One other thing - have you done any comparison between liba52 and an external AV processors or receivers? I noticed the windows camp are always saying a HTPC can't touch a processor at AC3/DTS decoding.

Chris


ps. I find xine excellent once you have lirc set up and just use the basic "xixe-ui" with splash screen etc turned off. You would be hard pressed to tell it was a HTPC (apart from the slowish boot accross my wireless network!)
chrisbirkinshaw is offline  
post #4 of 85 Old 10-11-2004, 03:17 AM
Member
 
ewildgoose's Avatar
 
Join Date: Mar 2003
Location: London
Posts: 164
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Hi, Don't scrap your current machine until you at least discover that it isn't powerful enough. It may be plenty.

8 channels of audio should be easy. However, if you need to resample these, say from 48Khz to 44Khz, then this will chew 30% CPU if done properly. So you could set everything up to prefer either films at 48Khz or music at 44Khz. Big CPU saving.

Resizing is "free" if done in XV, but if you use mplayer software resizing with bicubic splines then say goodbye to another 20% CPU at 720x576 rates, more with higher res. Again, just don't do it if you are short of CPU

There are many good audio cards. Actually, perhaps the best out there right now for any money is the RME 9636 digital card plus the ADI8-S special edition 8 way DAC which is done as a bundle. This looks awesome for quite reasonable money! I personally have an RME9632 plus the 4 way expansion card, and this probably cost me half as much as the combo listed above! The M-Audio cards have good support in Linux as well though (I think?)

As for whether the decoding is as good as a commercial unit I couldn't say... I don't have such a thing to compare against... So without anything to compare against, all I can say is that it's very satisfactory using the linux decoders, and I have even tested the new DTS decoder under Xine and got sound out of all the speakers, etc...! You can certainly still do all kind of delay calculations and with Jack of course you can do *much more* powerful bass redirection...

(Actually, I am planning to use some very steep bass filters to allow me to run my NXT flat panel rears almost full range and then I have a rather decent set of rear speakers for a paltry £50...)

All in all it recreates that cinema experience for me, and sounds similar to the sound I get when I try one of the really expensive demos at a hifi shop. But in my opinion bass is much better on my setup than in the average HT hifi demo where it's designed to just rattle your eyeballs...

Ed W
ewildgoose is offline  
post #5 of 85 Old 10-11-2004, 09:02 AM - Thread Starter
Senior Member
 
chrisbirkinshaw's Avatar
 
Join Date: Jul 2003
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I didn't quite mean scrap, I just mean I have some money I can spend on a new one ;-)

I want to do a linkwitz transform circuit digitally (http://sound.westhost.com/project71.htm) for my sub and rears but am not sure if this is a bit ambitious. I have a set of figures for dB boost to be applied at various frequencies, can I model this into BruteFIR?

I guess the best bet is to try and get it all running with my current Audigy 2ZS and then see how it sounds. I saw an M-audio 1010 go on eBay for £300 which is very reasonable, and means I could then afford a 3.2GHz Prescott :-)


Chris

ps. what is the difference between AlmusVCU and BruteFIR?

Edit: Is it possible to have two presets - one for 48kHz and one for 44.1kHz? Is there any way to do something like ProLogic II or DTS Neo on linux?
chrisbirkinshaw is offline  
post #6 of 85 Old 10-11-2004, 09:16 AM
Member
 
ewildgoose's Avatar
 
Join Date: Mar 2003
Location: London
Posts: 164
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Brutefir only implements FIR filters so you need to describe your required filter in terms of FIR coefficients. This probably means a quick bit of Matlab code. See also the Music-DSP FAQ site, perhaps there is some code there already.

For Bass filters you should be able to use Linear-Phase filters which have a convenient property of having no phase distortion at all... This is better than an LR if you see what I mean. However, it creates a pre-echo effect which is audible when used for a tweeter crossover so you will need to using something which is more min phase, like a LR crossover, there

Lookup the "fir1" function in Matlab and that should generate your crossovers quite nicely. I will write some code to do all that stuff if I get a bit of time (not in the next week).

Brutefir does convolution of fir filters at high speed. AlmusVCU is some nice software that with the help of an LCD screen lets you configure Brutefir and generate crossover filters and turn on and off various filters. ie a frontend to Brutefir basically.

I would stick with your Audigy and use that first. The quality of your sound card will be second order compared with the boost you get from doing an active system this way. Also keep your PC until you find out what spec you need. A Prescott may not be nearly enough if you turn on all the knobs.... Your current machine will be fine if you don't ...

All the best

Ed W
ewildgoose is offline  
post #7 of 85 Old 10-12-2004, 10:46 AM
Senior Member
 
VespaMan's Avatar
 
Join Date: Jan 2002
Location: Stockholm, Sweden
Posts: 224
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
chrisbirkinshaw,

While I have a hush, and loving it, I'd say that depending of your needs, one PC doing all that may be a bit optimistic, especially if you are going for HDTV material.

With my Hush, I changed the motherboard to a intel one, (gigabit & digital spdif out), changed the graphics for a nv5700ultra (which has good reviews in the crt forum (for VGA, that is), and better drivers than ATI binaries). I do think that an external processor will win over most/all(?) PC hardware, unless you are doing "interesting stuff ;-)". (I use Freevo and xine, booting over the lan)

- Micael
VespaMan is offline  
post #8 of 85 Old 10-12-2004, 11:36 AM - Thread Starter
Senior Member
 
chrisbirkinshaw's Avatar
 
Join Date: Jul 2003
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally posted by VespaMan
chrisbirkinshaw,

While I have a hush, and loving it, I'd say that depending of your needs, one PC doing all that may be a bit optimistic, especially if you are going for HDTV material.

With my Hush, I changed the motherboard to a intel one, (gigabit & digital spdif out), changed the graphics for a nv5700ultra (which has good reviews in the crt forum (for VGA, that is), and better drivers than ATI binaries). I do think that an external processor will win over most/all(?) PC hardware, unless you are doing "interesting stuff ;-)". (I use Freevo and xine, booting over the lan)

- Micael
Well that's the thing - I am doing "interesting stuff" - LAN boot, Gentoo, MythTV, Xine with TVtime deinterlacing and resize - so external hardware is out of the question. Plus if I bought an external DD/DTS processor, then a room correction unit I would be looking at some serious expenditure. £1000 for a Hush PC is therefore very little by comparison. (I am not doing HD by the way, since I live in the UK)

I will see how much of my XP2200 the DRC takes up and take it from there. If it comes to it I could always feed 5.1 out of my HTPC (Hush) into a separate PC hidden in the cupboard via ADAT lightpipe and do the DRC and DAC there...

Ed:
What i actually want to do is boost the output below driver resonance in a sealed box so that I can use my bass drivers below resonance, and model the system Q at the same time. Check out the link and read about the linkwitz transform circuit. Do you think this will be possible digitally?

Chris
chrisbirkinshaw is offline  
post #9 of 85 Old 10-12-2004, 12:34 PM
Member
 
ewildgoose's Avatar
 
Join Date: Mar 2003
Location: London
Posts: 164
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
You can certainly do the Linkwitz transform digitally, and it will only take about 2-10% CPU, but I think you will find that you run out of digital headroom if you need to do too much boost. Your sound card will have between 95-120db SNR depending on quality, and so if you boost the levels 20db then you have between 75-100db quality. You really want a fairly decent soundcard (like most are these days), to be at the upper end of that.

The Linkwitz circuit is actually quite cheap, I would suggest that one possibility is to use this to get a rough EQ on your system and then use DRC to generate a perfect correction (which will then only need perhaps 10db or so of digital correction). DRC is definitely useful even with the Linkwitz circuit though!!! Its not an either / or situation

Anyway, best thing is just to try it.

For comparison I have an infinite baffle sub which is basically the same kind of arrangement, but because it's in a bigger box, the rolloff is much less steep. I intend to do all the correction digitally.

I would suggest also looking at the Behringer units to do any crossovers. It simplifies things a lot if you have a system with nice reliable consumer grade components and then just use the PC to do the icing, ie the room correction bit.

Don't get me wrong though. DRC is powerful enough to correct even the phase distortion introduced by the analogue filters in the Behringer DCX2496... The author (Denis Sbragion) believes there is even no need to do nice linear phase crossovers in the PC, he believes that DRC can correct even normal speaker crossovers.... However, personally I think there may be many advantages in removing them and going "active".

So I think you are on the right track, but you might want to consider some supporting electronics to make life easier for the PC. Certainly makes it easier to get started as well, and the outlay is of the order £100-200, so not big bucks at all.

I see no reason for a second PC at this stage, nor for an external DTS decoder.... However, we all have different goals, so feel free to feedback on how you get on. It's easy to get started and fix the problems on the way!

Good luck all
ewildgoose is offline  
post #10 of 85 Old 10-12-2004, 02:59 PM - Thread Starter
Senior Member
 
chrisbirkinshaw's Avatar
 
Join Date: Jul 2003
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
If I bought an ultradrive (3 in 6 out) for the front speakers I could also put the sub through it and do the basic EQ for the linkwitz transform. I would also be able to have a setting in the ultradrive where the sub was fed off the front speakers for stereo listening. Maybe I could trigger the setting changes from the PC?

However losing 12dB dynamic range (that's the boost I need) on the sub and 8dB on the rear channels doesn't bother me too much. If DRC can correct for my analog 24dB/oct xover for the front and rears then maybe there is no need for the ultradrive.

However, as you said it's best to try and get going with what I've got first.

I'll post as I progress!
chrisbirkinshaw is offline  
post #11 of 85 Old 10-12-2004, 04:10 PM - Thread Starter
Senior Member
 
chrisbirkinshaw's Avatar
 
Join Date: Jul 2003
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Just a further thought - Ed: Can you post your config files for bruteFIR and any others people might find useful?

many thanks,

Chris
chrisbirkinshaw is offline  
post #12 of 85 Old 10-12-2004, 11:47 PM
Senior Member
 
VespaMan's Avatar
 
Join Date: Jan 2002
Location: Stockholm, Sweden
Posts: 224
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Chris,

It will be very interesting to folow your progress, since we have very similar set-up.
And if the audio overhead is low enough, I guess one could actually use it while doing hdtv if disabling tv-time filters (which is not really as important in hd) and using xxmc instead of xv.

- Micael
VespaMan is offline  
post #13 of 85 Old 10-13-2004, 01:20 AM
Member
 
ewildgoose's Avatar
 
Join Date: Mar 2003
Location: London
Posts: 164
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Chris, if you can afford the DCX2496 Omni-drive at least for initial testing, then I think your life will be made easier. It will mean that you can test things with a CD player via the digital in, and feed in analogue sources via the other inputs, and perhaps it even has enough digital inputs that you can feed in PC and CD player at the same time...?

I would suggest setting up the DCX for crossover duties, and possibly dialing in your 12dB boost that way (are you sure it's only 12db? I would have thought more than that was required...?)

If you do the bass boost in the DCX then you will get some analogue phase shift, just like you would with the linkwitz circuit. On the other hand it means that everything will run fairly well without the PC hooked up.

Then you can just use the DCX for crossovers and run the boost through the PC which can use linear phase adjustments in the lower range for an even lower distortion. DRC can also fix the phase distortion caused by the DCX crossovers, and do final smoothing of the frequency range, and also even fix some of the problems caused by room reflections(!!)

If you don't go with the DCX, then you need to download a copy of Octave/Matlab and start learning how to program up some crossovers is the main problem. I can post some directions, but it's still something you can probably do without when just getting going. At a later stage I will write some software to generate this for you, but it's not going to be for a while yet.

Like I said, I personally do everything on the PC with no external boxes, but I am worrying a lot about blowing up tweeters...

I can post some config files at a later stage. I have no living room floor at the moment and working full time on that at the moment. However, they are pretty basic, I suggest looking at the brutefir site and working through the demo config, just try to get something which goes from spdif in, to analogue out, with no filtering ("coef -1") and then try to get your CD player to be make noises through the analogue out when you play it via the digital input. After that you just chuck in a filter file and off you go...

Good luck
ewildgoose is offline  
post #14 of 85 Old 10-13-2004, 08:28 PM - Thread Starter
Senior Member
 
chrisbirkinshaw's Avatar
 
Join Date: Jul 2003
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
The driver I'm using (Peerless XLS 10") for the sub has a low resonance, so in a 25L box only needs 12.25dB of boost to get down to 20Hz, with a final system Q of 0.71.

What would happen if I connect the sub to the mono sub out of my analogue stereo 3-way crossover currently serving my front speakers, and then perform DRC on the whole thing. Would DRC be able to equalise the sub response as much as 12dB? That would be amazingly simple if it worked, and very cheap for me too...
chrisbirkinshaw is offline  
post #15 of 85 Old 10-20-2004, 10:10 AM - Thread Starter
Senior Member
 
chrisbirkinshaw's Avatar
 
Join Date: Jul 2003
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Hi all,

I downloaded and compiled/installed DRC and BruteFIR without any trouble, then using the "measure" script distributed with DRC generated my filters:

measure 16 44100 5 21000 45 2 plughw plughw impulse.pcm

My BruteFIR config is as follows:


logic: "cli" { port: 3000; };

coeff "main-left" {
format: "FLOAT_LE";
filename: "/etc/drc/left-dxf.pcm";
};

coeff "main-right" {
format: "FLOAT_LE";
filename: "/etc/drc/right-dxf.pcm";
};

input "left-in", "right-in" {
# device: "file" { path: "/root/test.pcm"; };
# device: "alsa" { param: "plughw"; };
device: "jack" { ports: "alsa_pcm:capture_1", "alsa_pcm:capture_2"; };
sample: "AUTO";
channels: 2;
};

output "left-out", "right-out" {
# device: "file" { path: "/tmp/out.pcm"; };
# device: "alsa" { param: "plughw"; };
device: "jack" { ports: "alsa_pcm:playback_1", "alsa_pcm:playback_2"; };
sample: "AUTO";
channels: 2;
};

filter "main-left" {
inputs: "left-in"/0;
outputs: "left-out";
coeff: "main-left";
};

filter "main-right" {
inputs: "right-in"/0;
outputs: "right-out";
coeff: "main-right";
};


As you can see I have tried file-->file processing, and also using alsa and jack as input/output plugins. The file processing worked perfectly, and I was quite impressed by the results, however if I use jack the audio seems to start again from the beginning every 2-3 secs, overlapping each time until it is a crazy mess of echoes. I was not able to use alsa (without jack) - there is no error message but my CPU goes to 100% and nothing happens.

My soundcard is an audigy 2zs (emu10k1), maybe I will have to get something a little better.

Has anyone got any ideas?

Chris
chrisbirkinshaw is offline  
post #16 of 85 Old 10-20-2004, 03:56 PM
Member
 
ewildgoose's Avatar
 
Join Date: Mar 2003
Location: London
Posts: 164
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I'm not familiar with the measure script, but it sounds nice. It should get you a nice impulse response and you can check it in cooledit or similar. Use the freq response option and click on the first big spike and you should get a crude freq plot below.

In answer to the other question, yes DRC should basically be run with full range left and right channels and it will derive a correction based on the full set of speakers. Having a seperate sub output is really just a special case of having a three way speaker instead of a two way speaker. It's also an "active" system instead of a passive system, ie crossovers are in front of the amp, not behind it. In my opinion, active systems with lots of amps are a good way to proceed in general.

Your Jack output was probably connect to your jack input, hence the reason it was echoing. Also notice that Brutefir config *demands* that you connect the input up with Jack, even though this is not strictly required. So if you check with qjackctl you can see that you microphone AND your sound app are both connected to the brutefir input. This will probably cause the feedback loop you are seeing.

Basically just fire it up in jack mode and then manually disconnect the Alsa inputs into Brutefir.

My Jack/brutefir config is below. I start it with:

jackd -d alsa -d rme9632 -r 44100 -p 1024

Notice that I have an RME soundcard which is not the default output. This config does 5.1 channel surround processing to a 4.1 set of speakers (no center). I high pass and low pass everything, and the sub woofers are stereo.

I have modified mplayer to have decent jack support and perfect sync. Patches are on the mplayer-dev list, but they are not yet been included in cvs (sadly). Also the mplayer resampler is a bit poor, so I would recommend using 48000 as your base freq if you want to use Jack mostly for films. I also have a patch outstanding to mythtv for jack output. I will probably have a bash at ogle or xine next (I like the look of xine, but it never seems to work properly for me, always pops up screens with error messages that need a mouse to get rid of...?)


>>>>>>>>>>>
# Base config. This isn't needed I think?
float_bits: 32;
sampling_rate: 44100;
filter_length: 1024,64;
overflow_warnings: true;
show_progress: true;
max_dither_table_size: 0;
monitor_rate: true;
powersave: true;
allow_poll_mode: true;
lock_memory: false;
debug: false;

logic: "cli" { port: 3000; };

coeff "lowpass"
{
filename: "/home/myth/filters/filter_lowpass.pcm";
format: "FLOAT_LE";
# attenuation: 2;
blocks: -1;
shared_mem: false;
};

coeff "highpass"
{
filename: "/home/myth/filters/filter_highpass.pcm";
format: "FLOAT_LE";
# attenuation: 2;
blocks: -1;
shared_mem: false;
};

coeff "highpass_rear"
{
filename: "/home/myth/filters/filter_highpass.pcm";
format: "FLOAT_LE";
# attenuation: 2;
blocks: -1;
shared_mem: false;
};

# Input
input "lf_in", "rf_in", "lr_in", "rr_in", "center_in", "lfe_in"
{
device: "jack" { ports: "alsa_pcm:capture_1", "alsa_pcm:capture_2",
"alsa_pcm:capture_3", "alsa_pcm:capture_4",
"alsa_pcm:capture_5", "alsa_pcm:capture_6"; };
sample: "AUTO";
channels: 6/0,1,2,3,4,5;
};

output "lfh_out", "rfh_out", "lr_out", "rr_out", "lfl_out", "rfl_out"
{
device: "jack" { ports: "alsa_pcm:playback_1", "alsa_pcm:playback_2",
"alsa_pcm:playback_3", "alsa_pcm:playback_4",
"alsa_pcm:playback_5", "alsa_pcm:playback_6"; };
sample: "AUTO";
channels: 6/0,1,2,3,4,5;
delay: 90,90,310,310,0,0;
};

# Filter defs
filter "lfh_filter"
{
from_inputs: "lf_in"/0.0, "center_in"/3.0;
to_outputs: "lfh_out"/0.0;
process: 0;
coeff: "highpass";
delay: 0;
};
filter "rfh_filter"
{
from_inputs: "rf_in"/0.0, "center_in"/3.0;
to_outputs: "rfh_out"/0.0;
process: 0;
coeff: "highpass";
delay: 0;
};
filter "lfl_filter"
{
from_inputs: "lf_in"/0.0, "center_in"/3.0;
to_outputs: "lfl_out"/0.0;
process: 0;
coeff: "lowpass";
delay: 0;
};
filter "rfl_filter"
{
from_inputs: "rf_in"/0.0, "center_in"/3.0;
to_outputs: "rfl_out"/0.0;
process: 0;
coeff: "lowpass";
delay: 0;
};
filter "lr_filter"
{
from_inputs: "lr_in"/0.0;
to_outputs: "lr_out"/0.0;
process: 0;
coeff: "highpass_rear";
delay: 0;
};
filter "rr_filter"
{
from_inputs: "rr_in"/0.0;
to_outputs: "rr_out"/0.0;
process: 0;
coeff: "highpass_rear";
delay: 0;
};

filter "lfe_filter"
{
from_inputs: "lfe_in"/0.0;
to_outputs: "lfl_out"/3.0, "rfl_out"/3.0;
process: 0;
coeff: -1;
delay: 0;
};
>>>>>>>>>>
ewildgoose is offline  
post #17 of 85 Old 10-20-2004, 05:10 PM - Thread Starter
Senior Member
 
chrisbirkinshaw's Avatar
 
Join Date: Jul 2003
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I checked using qjackctl and everything looked fine:

BruteFIR outputs -------> ALSA pcm playbacks
ALSA pcm captures -----> BruteFIR inputs

I also checked that the source wasn't routed out to playback in alsamixer.

I tried routing the ALSA pcm captures -----> ALSA pcm playbacks without BruteFIR running, and I get music but with a very obvious flanger type effect. I tried starting jack in many ways:

jackd -d alsa -r 48000
jackd -d alsa -r 44100
jackd -d alsa -r 48000 -p 512
jackd -d alsa -r 44100 -p 512
jackd -R -d alsa -d emu10k1 -r 48000 -p 512 -z s
jackd -R -d alsa -d emu10k1 -r 44100 -p 512 -z s

In each case jack ran without any complaints, however the audio was still pitch-shifted without DRC running.....

I then tried playing around with the filter_length setting, since in the 3 example configs I have seen for BruteFIR people have used different values. Changing this affected the severity of the echo effect I was hearing using BruteFIR and jack, so I'm now thinking this may be the key. Do you know how I might work out what value I should use?

Chris
chrisbirkinshaw is offline  
post #18 of 85 Old 10-21-2004, 04:59 AM - Thread Starter
Senior Member
 
chrisbirkinshaw's Avatar
 
Join Date: Jul 2003
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
In response to my own question - the length of the filter is defined in the drc config file as "PLOutWindow", set by default at 65536 taps. Denis Sbragion, the author of DRC, explained that this can be partitioned to reduce latency by setting "8192,8" in the brutefir config as the filter length.

I have fixed my problem though - in alsamixer there was a slider called "PCM Capture" - it seems this captures the master output and cycles it back in a loop!

I am now going to set up filtering for all my speakers....

ps. with 65536 tap filters in stereo I am only using 3% of CPU!

Chris
chrisbirkinshaw is offline  
post #19 of 85 Old 10-21-2004, 06:16 AM
Member
 
ewildgoose's Avatar
 
Join Date: Mar 2003
Location: London
Posts: 164
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Indeed, Brutefir's specification of filter length is either: 65535 if you want it done with a long delay, or X,Y (where X*Y=65535), if you want it done in partitions for faster speed.

Basically CPU goes up quite dramatically as the number of partitions increases. I have mine set for 1024 x 64. This uses about 10-15% CPU on a P2.8, but it makes the partition size the same as my Jack block size and hence no extra delay occurs.

In general set Jack buffer size (param "-p") to be the same as your brutefir latency size.

You can use jack with quite a few programs these days. Try my patches for mplayer and mythtv. There is also an xmms output layer. Bang on to the authors of other software if you need support as well.

There is also an Alsa to jack plugin. This means you can tell your apps to use alsa, but point them to this special device and have the output redirected to Jack. It doesn't work very well for me, but in the future it may be a good option for apps which don't support Jack...

Any other issues, drop a note here!

Ed W
ewildgoose is offline  
post #20 of 85 Old 10-21-2004, 06:55 AM - Thread Starter
Senior Member
 
chrisbirkinshaw's Avatar
 
Join Date: Jul 2003
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Cheers for the tip, my jack starup line is now:

jackd -v -R -d alsa -d emu10k1 -p 1024 -z s -r 44100

I have set the filter_length in BruteFIR to 1024,64 and now CPU usage is around 11% on XP2100+.

One problem remains... I cannot get jack to pickup any more than playback_1 and playback_2 despite my emu10k1 card (Audigy 2zs) having 8 outputs. Any ideas?

Ed: I noticed someone selling your RME card with the balanced in/out expansion for £230 which looks like a good deal, though for the same money I could get an RME 96/8 (second hand £100) and a Behringer ADA8000 8 channel A-D/D-A converter. The Behringer unit has got good reviews, with lots of surprise at its price. The benefit of this is that it would be outside of the PC's case, so should reduce noise. How do you find the analog section of your RME card?

Chris
chrisbirkinshaw is offline  
post #21 of 85 Old 10-21-2004, 07:16 AM
Member
 
ewildgoose's Avatar
 
Join Date: Mar 2003
Location: London
Posts: 164
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I can't say that I can really tell any difference between DACs in general to be honest...

I have the PAD card as well and it is a bit limited in terms of buffer sizes and latency (you have to use a fixed size). The 9632 is extremely good, but unneccessary if you just want digital out to the behringer.

The RME 9636 is their budget digital card. Why not look at that. I personally would have thought 8 pretty good outputs and an active system was likely to be better than a stereo excellent card... You could of course also just get the 9636 and the Behringer DCX 2496 in order to drive 6 seperate speakers individually (ie it has 6 DA stages in it as well as being a crossover system) The crossovers might not be quite as flexible as those created on a PC with a bunch of outputs, but it's really easy, cheap and you won't blow up your speakers if some funny app decides to stick a full range signal into your tweeters...

However, perhaps I misunderstood your goals. If it's for surround sound then although I know nothing about the Behringer 8 way DA kit, I would have thought it would be worth a look, yes. But I would probably take the 9636 card over the PAD.

Oh yeah, I don't think the PAD properly supports all 8 channels under linux? Better to get the HDSP range like the 9632 and 9636 so that you have a proper mixer setup. MUCH better.
ewildgoose is offline  
post #22 of 85 Old 10-21-2004, 07:18 AM
Member
 
ewildgoose's Avatar
 
Join Date: Mar 2003
Location: London
Posts: 164
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Oh, post your jack error messages about the extra channels. Also look in qjackctl to see what could be wrong. It might well be an alsa output problem in that you can't drive all the channels individually - check on the alsa list for problems with that card?
ewildgoose is offline  
post #23 of 85 Old 11-21-2004, 05:49 PM - Thread Starter
Senior Member
 
chrisbirkinshaw's Avatar
 
Join Date: Jul 2003
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Well it's been a while since I started out with my room correction project. I have been impressed by the results, however there a a couple of problems I can't iron out:

1. There are no errors in jack but it just doesn't pick up any more than two channels of recording or playback when it launches. I posted on the alsa list but no one replied, and googling doesn't turn up anything.

2. After about 15 mins of operation the sound starts to get progressively more and more distorted until it is unlistenable. This is the same whether I use jack or use the alsa in/out plugins. I have googled for this and it seems many people are having a similar problem with emu10k based cards.

So my solution to these problems is to get a new soundcard - either the RME DIGI 9636 and a behringer ADA8000 ADAT D-A/A-D interface, or the M-Audio Delta 1010 with rack mount breakout box. I think I'll go for the RME despite the higher cost, because if I ever decide to make the PC into a standalone audio processor I can still route the 5.1 output of my HTPC into it via the second ADAT port. Ed, I know you have some RME cards - does this sound sensible? Can I easily route round the different ADAT ports and SPDIF in/out etc?

Finally, I have been a bit cautious about turning up my levels too high when doing the sweeps, but am worried I might have it set too low for an accurate measurement. My multimeter is a cheap digital one and only has one setting for AC volts though Jones's guide says it needs to be set to a low setting. Also, my speakers are actively xovered and I would have imagined that the reading in AV volts would be the same accross the bass terminals (measured whilst the sweep was below 3kHz) as for the tweeters (measured above 3kHz), however the meter reads nothing for the tweeters despite the fact they hurt my ears??!!! Any ideas?

Many thanks,

Chris

Edit: ps. My speaker drivers are the IPL Aluminium Mid/Bass and the Legend Ribbon Tweeter from this page: http://www.iplacoustics.co.uk/ipl_drive_units_.htm however I presume the 100W rating for the tweeter is tested with a passive crossover present and therefore a huge overestimation for doing these sweeps?
chrisbirkinshaw is offline  
post #24 of 85 Old 11-21-2004, 11:05 PM
Member
 
ewildgoose's Avatar
 
Join Date: Mar 2003
Location: London
Posts: 164
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Erm... I think:

1) Might be an issue with this card and the fact that you can't access the individual channels by default. I think you might want to hunt around the alsa wiki and google, more on generating a new PCM device name (via asoundrc) that can access the individual channels, then use this as your device for Jack. Basically Jack is querying alsa and coming back with this being a two channel device - sort that part out first. This is a bit of a guess though

2) Easy one I think. Somehow the card does not seem to have the record and playback locked to the same freq generator. Sounds like after a long period of time the clocks drift sufficiently far apart that you are getting buffer underruns (does it get all clicky and start beeping, jumping, etc?)

The RME cards are excellent. However, the newer HDSP cards are the ones with all the clever routing and individual level controls. I don't think the 9636 as this, it's more like a very plain card that just gives you digital out. I'm not sure how much of a problem this will actually be (Brutefir author uses these), but just be aware that there is quite a lot of difference (and price) between a 9652 hammerfall and a 9652 hdsp...

Sweeps. Be very careful here. I would be cautious about those power ratings. 1-5W should be safe for a high end driver (although probably not for a cheap tweeter). Compression drivers in PA kit will easily do 100-300W. But ribbons are usually a lot less capable than that and you will stretch the alu foil if you are not careful.

Just get a cheap level meter, or worst case do a rough alignment in cooledit so that the mic is giving the same kind of level in the treble and bass.

The voltmeter presumably has an AC option and this works fine with a 60Hz signal (ie like the mains power), but it's probably not setup to work at 3Khz.

As a rule of thumb. Comfortably loud is probably more than enough. In most cases you would want the level meters set for medium to quiet listening and do the sweep at those levels.


Good luck
ewildgoose is offline  
post #25 of 85 Old 11-21-2004, 11:51 PM - Thread Starter
Senior Member
 
chrisbirkinshaw's Avatar
 
Join Date: Jul 2003
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Doh, the voltmeter thing seems painfully obvious now!

Would I be right in thinking that I won't need the hardward routing of the HDSP cards since I can do it all in Jack anyway?
chrisbirkinshaw is offline  
post #26 of 85 Old 11-22-2004, 12:39 AM
Member
 
ewildgoose's Avatar
 
Join Date: Mar 2003
Location: London
Posts: 164
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Only you can decide that... If you were going to be using Jack full time though then I would have thought not.

In my case I have the analogue RME9632 and a tiny advantage is that I can fiddle with levels dynamically and temporarily reroute stuff like analogue inputs to digital outputs, etc. However, I can do all this in Jack as well (or Brutefir).
ewildgoose is offline  
post #27 of 85 Old 11-22-2004, 11:11 AM - Thread Starter
Senior Member
 
chrisbirkinshaw's Avatar
 
Join Date: Jul 2003
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally posted by ewildgoose
If you were going to be using Jack full time though then I would have thought not.
Why is this?

Just as an aside, how do you tell if you have the input level right for recording the sweeps so as to avoid clipping but maximise S/N?

Chris
chrisbirkinshaw is offline  
post #28 of 85 Old 11-22-2004, 03:06 PM
Member
 
ewildgoose's Avatar
 
Join Date: Mar 2003
Location: London
Posts: 164
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
...Err because the peak levels don't clip?

You record at 16 bit accuracy right, so if you reach +- 32767 at any point then it went off the scale... Actually +/- 16384 is safer because some cards like my RME96/8 pad card seem to artificially clip at this point.

I wouldn't go mad though. Get it fairly high, but don't worry overly much about getting the last few dB - give yourself some headroom. If you use Cooledit then there is a properties menu which shows the peak levels of any track.
ewildgoose is offline  
post #29 of 85 Old 11-22-2004, 04:02 PM - Thread Starter
Senior Member
 
chrisbirkinshaw's Avatar
 
Join Date: Jul 2003
Posts: 200
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I was just wondering if you used some kind of meter bridge or something. I tried one linked from the jack page but it didn't seem very accurate.

As for Cool Edit, this is a windoze free zone ;-) though I have used MacTheScope to analyse some of the files on my mac.

ps. Glad you ignored my "Why is this?" question, I'm on night shifts at the moment and my brain is a bit sqewed!
chrisbirkinshaw is offline  
post #30 of 85 Old 11-23-2004, 01:23 AM
Member
 
ewildgoose's Avatar
 
Join Date: Mar 2003
Location: London
Posts: 164
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I wrote a nice program using RtAudio to capture impulse responses. I hope to add it to the DRC code base at some point soon. I think it should run on coreaudio as well if you recompile it. (The idea was that it was very multiplatform)

It prints out vital statistics on the record levels at the end, and in the future I wanted to add all kinds of visualisation and analysis. Drop me a private note if you want it immediately, bear in mind you probably need to be comfortable doing some debugging/coding to use it right now. Otherwise wait a few weeks/months for it to appear somewhere like my website or in the DRC code.
ewildgoose is offline  
Closed Thread HTPC - Linux Chat

User Tag List

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off