HOWTO: SRC Best Sinc Resampler Ubuntu 9.10 (noob friendly)
Mar 24, 2010 at 4:51 PM Thread Starter Post #1 of 9

pulsar08

New Head-Fier
Joined
Mar 19, 2010
Posts
26
Likes
0
Almost every digital source these days uses a dac chip which will employ hardware resampling to convert a 44.1khz signal to native 48/96/192khz. This interpolation cause signal degradation to some degree. Foobar2000 has a built in resampler dsp (PPHS) which is optimized for low cpu usage. There are also a few others which supposedly run on older versions of foobar (SOX, SSRC,and an old version or SRC). Of these 3 I only ever managed to get SOX to work. The SRC (Secret Rabbit Code) resampler aka libsamplerate is another option widely considered to have the best quality. If you have basic linux skills enough to install ubuntu from a live cd and quickly switch a couple of values in a config file you can get this working. Here goes:

Edit the pulseaudio config by typing the following into a terminal window: Quote:

gksudo gedit /etc/pulse/daemon.conf


Enter your root password and edit these lines in the config file: Quote:

resample-method = src-sinc-best-quality


Quote:

default-sample-format = s24le


s16le = 16bit, s24le = 24bit Quote:

default-sample-rate = 96000


You will want to pick whatever value your card outputs natively. Entering higher values than native will cause hardware resampling to continue (I put in 384000 just to see if it would work and sound still played although an error message did show in the terminal when I went to switch it back to 96000) Click save and reboot your computer.



I believe most of the music players in linux use the pulseaudio sound daemon. Rhythmbox, songbird, audacious, xmms2 are a few good ones.

I have used this on an old pentium 4 and it still doesn't consume much cpu. Rhythmbox stayed about 5-6% and pulseaudio 1-3%. Under heavy multitasking it did skip a few times. I haven't tried it on my overclocked i7 to check for skipping yet cuz the bootloader got corrupted and I need to restore it.

I might be crazy but this change really sounds good, very clear/clean/analog sounding with loads of detail. In the least you have peace of mind knowing you are degrading the signal as little as possible. I'm pretty sure I'll never use foobar again after trying this. Enjoy
o2smile.gif
 
Mar 24, 2010 at 8:46 PM Post #3 of 9
I'm playing with Ubuntu 9.10. Any music player recommendations based on sound quality and playlist robustness?

I'm coming from the venerable Foobar 0.8.3/Win XP configuration. I do have SRC but prefer SQ without upsampling.
 
Mar 25, 2010 at 12:12 AM Post #4 of 9
Quote:

Originally Posted by Jon L /img/forum/go_quote.gif
I'm playing with Ubuntu 9.10. Any music player recommendations based on sound quality and playlist robustness?

I'm coming from the venerable Foobar 0.8.3/Win XP configuration. I do have SRC but prefer SQ without upsampling.



What soundcard/dac are you using? Chances are you are being upsampled in hardware without knowing it. This fix replaces the low quality hardware algorithm with a better one.

For players I like songbird because it looks nice without having to tweak it.

https://launchpad.net/~lazka/+archive/ppa I found this repository which has a player called Quodlibet. It's for designed stability with large music collections.

The author of that repository also has a crossfeed plugin package called gstreamer0.10-bs2b in this repo:https://launchpad.net/~lazka/+archive/dumpingplace I haven't found anyway to enable it though.
 
Mar 28, 2010 at 4:37 AM Post #6 of 9
Will some other people try out the resampler and post they're opinions on the sound quality.




Also I found how to enable the cross feed plugin so here's a simple how to:

Assuming once more a functional ubuntu 9.10 setup open terminal and type the following commands.

Quote:

sudo add-apt-repository ppa:lazka/dumpingplace

sudo apt-get update

sudo apt-get install gstreamer0.10-bs2b

gconftool --type string --set /system/gstreamer/0.10/default/musicaudiosink "crossfeed ! autoaudiosink"


Now just restart Rhythmbox, Banshee, or Quod Libet and it will be enabled.

To deavtivate the plugin use:
Quote:

gconftool --type string --set /system/gstreamer/0.10/default/musicaudiosink "autoaudiosink"


Although I think the sinc resampler sounds incredible, I found the cross feed plugin to reduce the quality significantly so I disabled it.
 
Apr 7, 2010 at 2:32 AM Post #7 of 9
If you want to take this to the next level, compile a real-time kernel, install jack sound server and jack-rack. Or do what I did and install ubuntu studio.
Home | Ubuntu Studio

Info on setting up jack:
Follow from the top but ignore the jack plumbing deal, it didn't work for me and I found the native jack control panel's "patch bay" to work better and be more flexible.
How to: Use Jack for GStreamer output (so you can EQ banshee/rhythmbox w/Jack-Rack!) - Ubuntu Forums

Do this deal but memlock at a value, I believe 60-90MB is plenty... on my box jack would at times utilize its free reign on my RAM :wink:
JACK FAQ | JACK

In the jack settings force your sound card's max freq/bitrate and it will send the signal straight through unadulterated.

For apps:
- I use the rhythmbox plugin, but make sure to enable crossfading and set the xfade length to 0 otherwise the rhythmbox sink keeps changing PIDs and will drive you nuts (I have talked with the developer and they're now working on this)
- VLC also has a totally kick ass jack plugin, so you're fully covered on video etc
- I also perform headphone equalization through jack-rack, which uses a very sophisticated ?FFT? algorithm, CPU load on a 3GHz box is negligible

Enjoy!
 
Dec 12, 2013 at 9:41 AM Post #8 of 9
Almost every digital source these days uses a dac chip which will employ hardware resampling to convert a 44.1khz signal to native 48/96/192khz. This interpolation cause signal degradation to some degree. Foobar2000 has a built in resampler dsp (PPHS) which is optimized for low cpu usage. There are also a few others which supposedly run on older versions of foobar (SOX, SSRC,and an old version or SRC). Of these 3 I only ever managed to get SOX to work. 

 
You can now installing and use SSRC (from Shibatch) as easy any other tool if you're using Debian or Ubuntu, see Shibatch SSRC Packages available for Debian and Ubuntu.
 
Regards,
Ronald
 

Users who are viewing this thread

Back
Top