Home of the Squeezebox™ & Transporter® network music players.

Go Back   Squeezebox : Community : Forums > User Forums > Linux / Unix
User Name
Password

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 2008-03-26, 07:15
Klaas Klaas is offline
Senior Member
 
Join Date: Oct 2006
Posts: 109
Klaas is on a distinguished road
Default Use Brutefir for DRC Plugin (7.0+)

IMPORTANT:
The Plugin has now a homepage: http://klaasprause.com/brutefirdrc/ get the actual files from there

EDITS:
some clarifications

The Plugin DOES NOT:
- help to measure your room (see the links below if you need help with this)
- create a fir-filter that is useable with brutefir (see the links below if you need help with this)
- create a valid brutefir configuration file (see the links below if you need help with this)

Here starts the old post:
I created a plugin to make it easier to use brutefir for digital room correction. The Plugin only works with the new SqueezeCenter and right now it supports Squeezebox3 or newer hardware (all files are streamed as flac). It only helps to change the file conversion to include a brutefir transformation. No Filter creation or recording of impulse response is included.

Features:
- enable/disable Brutefir DRC on a per client base (no need to edit custom-convert.conf yourself)
- choose the filter brutefir uses via the remote control (it adds a menu entry)
- flac, ogg and mp3 or tested, all other types should work but I am not perfectly sure
- Iso Octave EQ editable via remote control (if configured in brutefir config file, see attached template files how to do it)

I would like to put into the public for everyone to enjoy but I have no webspace available. Is it possible to put everything on the slimdevices wiki including the Plugin distributeable or is this strictly forbidden?

It puts together stuff from:
http://wiki.slimdevices.com/index.cgi?BrutefirFilter
http://www.duffroomcorrection.com/wiki/User:Hpyle
http://www.inguzaudio.com/EQ/

This is the essential software to get everything working:
http://drc-fir.sourceforge.net/
http://www.ludd.luth.se/~torger/brutefir.html

For anybody that would like to try it. I attached the current version to this Thread.


Preconditions:
- a got understanding about DRC filter creation and configuration of brutefir. The plugin does NOT HELP with filter creation, or measurement.
- working brutefir installation --> must be executeable via "brutefir" call on command line
- at least one filter file for testing that works with call "brutefir -quiet -nodefault [FILTER]"

Install guide:
- Extract the archive to your SqueezeCenter plugin dir.
- restart SqueezeCenter
- go to the setting page for plugins
- edit settings for 'BrutefirDRC' (I tried to document the settings as verbose as possible, so it should be self explanatory)
- go to Client settings --> menu
- add the plugin as a menu entry
- use your remote and go into the plugin menu
- enable it third option (it should have rewritten the custom-convert.conf file with brutefir specific stuff)
- enable a filter by selecting one via the remote control second option (a symlink to filter should exists in the configured link dir)
- restart the server to load the rewritten custom-convert.conf file
- play a song prefer a flac file if possible and check that brutefir is used via "ps xa|grep brutefir"

Attached Files:
- the Plugin
- differerent cleaned up brutefir configuration file i use. It includes two templates where the pcm-filter file paths must be inserted and one only_EQ filter that should work out of the box. It has no filter configured but includes an EQ setting that is changeable via the remote control.
Attached Files
File Type: gz BrutefirDrc_0.9.tar.gz (12.4 KB, 67 views)
File Type: gz filter_templates.tar.gz (1.5 KB, 84 views)

Last edited by Klaas; 2008-04-13 at 11:22. Reason: Homepage for Plugin created
Reply With Quote
  #2  
Old 2008-03-26, 12:35
lhquam lhquam is offline
Junior Member
 
Join Date: Sep 2006
Posts: 28
lhquam is on a distinguished road
Default Re: Use Brutefir for DRC Plugin (7.0+)

I am trying to use BrutefirDRC Plugin, under Fedora 5 with
SqueezeCenter 7.0.

I installed SqueezeCenter 7.0 today, without apparent problems.

My player is seeing the BrutefirDRC Plugin, but I do not
know where the testfilter (or other filters) should be installed.
I have not figured out where filters should be installed.

Should there be a filters subdirectory under ../Plugins/BrutefirDRC?
Reply With Quote
  #3  
Old 2008-03-26, 12:51
Klaas Klaas is offline
Senior Member
 
Join Date: Oct 2006
Posts: 109
Klaas is on a distinguished road
Default

Here the basics I cannot help with:
I would recommend that you check out the brutefir documentation. There you will find how to setup brutefir with some filter files. If you do not have any filters, you first need to do the hard part: measure your system.

I cannot help you if you need to measure your system, check out this great page, it got me started a year ago. Here you will find how to measure, some suggestions about hardware to buy (mic, soundcard, ...) and how to create a filter that is useable for brutefir out of your measurement.
http://www.duffroomcorrection.com

I am using the drc-2.6.2 software under linux to create the filters from a measurement. See my other post for links.


The plugin only helps if you have a valid brutefir config file (check out the plain textfile example I attached. NOTE this CONFIG is NOT working, it has paths that are specific to my system and references files that I have not attached!!). You can change this file to do no filtering but change the sound, to be sure the plugin is working, see:
http://wiki.slimdevices.com/index.cgi?BrutefirFilter


The answer to your question:
- If you have a brutefir config file that is working put it in a new directory you like "/etc/squeezecenter/filters" for example (this is Debian).
- Name it something like "testfilter.txt".
- Go to the Plugin config web page, enter:
"Filters directory:" the dir you created above
"Filter file extension:" "txt" see name of testfilter
"Brutefir filter link dir:" use the same dir as above and make sure it is writeable by SqueezeCenter process

You need to find out yourself what is the correct value for "Custom conversion file:". On Debian you can use "/etc/squeezecenter/custom-convert.conf"


The plugin has no filter subdirectory. It just puts together the informations you put into the preferences/setting page and works with them.
Reply With Quote
  #4  
Old 2008-03-26, 14:36
lhquam lhquam is offline
Junior Member
 
Join Date: Sep 2006
Posts: 28
lhquam is on a distinguished road
Default Re: Use Brutefir for DRC Plugin (7.0+)

I have managed to get BrutefirDRC working for .flac and .mp3 files,
but something is wrong with .ogg files.

There appears to be an error in template_custom_convert.conf.
squeezecenter complains :
/usr/share/squeezecenter/Bin/i386-linux/sox: Usage: [ gopts ] [ fopts ] ifile [ fopts ] ofile [ effect [ effopts ] ]
Failed: missing filename

The output filename for sox is missing. I believe that the entry in custom_convert.conf should be something like:

ogg flc * 00:04:20:06:51:c8
[sox] -t ogg $FILE$ -t raw -r 44100 -c 2 -w -s $-x$ - | brutefir -quiet -nodefault $FULL_FILTER_PATH$ | [flac] -cs -0 --totally-silent --endian=little --sign=signed --channels=2 --bps=24 --sample-rate=44100 -

With this entry, I get very loud "pseudo-white" noise. There is still something wrong with the args to sox.
Reply With Quote
  #5  
Old 2008-03-26, 14:55
lhquam lhquam is offline
Junior Member
 
Join Date: Sep 2006
Posts: 28
lhquam is on a distinguished road
Default Re: Use Brutefir for DRC Plugin (7.0+)

This is the default ogg to flac conversion taken from /etc/squeezecenter/convert.conf.

ogg flc * *
[sox] -t ogg $FILE$ -t raw -r 44100 -c 2 -w -s $-x$ - | [flac] -cs --compression-level-0 --totally-silent --endian big --channels 2 --bps 16 --sample-rate 44100 --sign signed -

Note "--endian big" for the flac input specification.
This suggests that sox is generating big-endian output rather
that little-endian. (I am running on an AMD64 machine).

I haven't figured out how to tell sox to convert ogg to little-endian raw.
Reply With Quote
  #6  
Old 2008-03-27, 02:46
Klaas Klaas is offline
Senior Member
 
Join Date: Oct 2006
Posts: 109
Klaas is on a distinguished road
Default

Quote:
Originally Posted by lhquam View Post
Note "--endian big" for the flac input specification.
This suggests that sox is generating big-endian output rather
that little-endian. (I am running on an AMD64 machine).

I haven't figured out how to tell sox to convert ogg to little-endian raw.
This was the problem, use the "-L" switch for sox output file. I played with the command line and came up with this command (already for the template_custom-convert.conf):
ogg flc * $CLIENT_MAC_ADDRESS$
[sox] -t ogg $FILE$ -t raw -L -r 44100 -c 2 -w -s - | brutefir -quiet -nodefault $FULL_FILTER_PATH$ | [flac] -cs -0 --totally-silent --endian=little --sign=signed --channels=2 --bps=24 --sample-rate=44100 -

Test it with:
sox -t ogg [TESTOGGFILEPATH] -t raw -L -r 44100 -c 2 -w -s - | brutefir -quiet -nodefault [BRUTEFIRCONFIGPATH] | flac -o [TESTFLAC_OUT_PATH] -0 --endian=little --sign=signed --channels=2 --bps=24 --sample-rate=44100 -

you can listen to the produced output flac file and check if it is okay.

Thank you pointing out the problem!
Reply With Quote
  #7  
Old 2008-03-27, 05:14
lhquam lhquam is offline
Junior Member
 
Join Date: Sep 2006
Posts: 28
lhquam is on a distinguished road
Default

/usr/bin/sox: Version 12.17.9 does not have a -L switch.

/usr/share/squeezecenter/Bin/i386-linux/sox: Version 12.17.7
does not have a -L switch.

I am running on Fedora Core 5, x86-64
Reply With Quote
  #8  
Old 2008-03-27, 05:21
Klaas Klaas is offline
Senior Member
 
Join Date: Oct 2006
Posts: 109
Klaas is on a distinguished road
Default

Quote:
Originally Posted by lhquam View Post
/usr/bin/sox: Version 12.17.9 does not have a -L switch.

/usr/share/squeezecenter/Bin/i386-linux/sox: Version 12.17.7
does not have a -L switch.

I am running on Fedora Core 5, x86-64
Hmm, I am running on Ubuntu, and using: SoX Version 13.0.0

I think the best possibility is to update to a new version of SOX. If this is not possible, all custom convert lines have to be changed to use "Big Endian" at least flac and brutefir support both formats. This would result in a change of the template and a change of all brutefir config files.
Reply With Quote
  #9  
Old 2008-03-27, 06:07
lhquam lhquam is offline
Junior Member
 
Join Date: Sep 2006
Posts: 28
lhquam is on a distinguished road
Default

I tried to install sox-13.0.0-1.

rpm -Uv ~/Desktop/sox-13.0.0-1.i386.rpm
error: Failed dependencies:
rtld(GNU_HASH) is needed by sox-13.0.0-1.i386

It appears that Fedora Core 9 or newer is needed by sox-13.xxx

Bummer.

Back to the original issue. Is it that case that my old sox-12.17.9
is generating big-endian output for the custom-convert.conf entry:

ogg flc * 00:04:20:06:51:c8
[sox] -t ogg $FILE$ -t raw -r 44100 -c 2 -w -s $-x$ - | brutefir -quiet -nodefault /usr/share/squeezecenter/Plugins/BrutefirDrc/ClientFilters/filter-00_04_20_06_51_c8 | [flac] -cs -0 --totally-silent --endian=little --sign=signed --channels=2 --bps=24 --sample-rate=44100 -
Reply With Quote
  #10  
Old 2008-03-27, 06:16
Klaas Klaas is offline
Senior Member
 
Join Date: Oct 2006
Posts: 109
Klaas is on a distinguished road
Default

Quote:
Originally Posted by lhquam View Post
Back to the original issue. Is it that case that my old sox-12.17.9
is generating big-endian output for the custom-convert.conf entry:
Yes this is the case. The output was not working for me as well. I had to add the "-L" switch.

Quote:
Originally Posted by lhquam View Post
ogg flc * 00:04:20:06:51:c8
[sox] -t ogg $FILE$ -t raw -r 44100 -c 2 -w -s $-x$ - | brutefir -quiet -nodefault /usr/share/squeezecenter/Plugins/BrutefirDrc/ClientFilters/filter-00_04_20_06_51_c8 | [flac] -cs -0 --totally-silent --endian=little --sign=signed --channels=2 --bps=24 --sample-rate=44100 -
I removed "$-x$" part from the conversion line. Don't know what this is for (see template above in my previous post). With this template it is working for me.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump


All times are GMT -7. The time now is 20:43.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.