Linux Audio the way to go!?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
@ mafro

as mentioned earlier in the thread:

Brutefir I use as a sound engine and crossover.
And of course digital volume control.
I wrote my own little player, a wrapper script, which uses brutefir
as an engine.


@ peufeu

Good to see you over here again. How are you doing with your
ethernet-dac-project?

Firewire:
Perhaps I should try FW under Linux. I could start on the cheap side. There is quite a nice FW interface from Mackie. Onyx. It's sold for approx. 150€ all over the place. For original 400-500$ it was said to be a real bargain. Parameters are not super high-end.
The good thing though, It'll most probably run under Linux. With the Mackie you'd have a nice multichannel interface.

An alternative could be a Terratec Phase X24 FW.

Both of them seems to have real nice MIC pre-amps.

Good to see that my 48kHz story makes somewhat sense to
somebody. ;) I need to try it again with my Ecdesigns reclocker.
Unfortunately it's not that easy to change the frequency with this module.

Could you shed a bit more light on the frequency sinx/x story.

If that's what you're saying is a case, we're back to the question, what's the less of two evils: A slightly shifted frequency response or heavy jitter?

Cheers
 
Hello,

I've tried moc and it is indeed a bit spartan from a visual point of view :) . I couldn't point out differences between moc and audacious however I don't have a high resolution sistem. It's like puting a V8 on a bike.

I am trying to learn FPGA and general dsp coding in the hope I'll be able to put together something in the line with what peufeu is doing. With a proper digital crossover I'll maybe finish my speakers. (It seems really weird to buy high quality passive crossover components costing as much as DIY'ing an amplifier)

Soundcheck, when do you estimate putting together the updated wiki page?
 
soundcheck said:

@ peufeu

Good to see you over here again. How are you doing with your
ethernet-dac-project?

Good to see that my 48kHz story makes somewhat sense to
somebody. ;) I need to try it again with my Ecdesigns reclocker.
Unfortunately it's not that easy to change the frequency with this module.

Could you shed a bit more light on the frequency sinx/x story.

If that's what you're saying is a case, we're back to the question, what's the less of two evils: A slightly shifted frequency response or heavy jitter?

Cheers

DigiKey shipped the parts yesterday so finally there is going to be some action, lol.

And, you are using a DDDac, right ? This is non-oversampling if I remember.

So, with any sample & hold DAC, which means any actual DAC, the frequency response of the thing is sin(x)/x with x = 2Pi F/Fs, with Fs the sample frequency. So, at F = Fs/2, frequency response is 0.

This is why non-oversampling DACs have a bad high-frequency response (lots of rolloff at high freqs), see the curve :

An externally hosted image should be here but it was not working when we last tested it.


Oversampling avoids this by shifting the sampling frequency of the DAC very high so the audible part of the spectrum ends up on the flat top part of the curve.

And I plotted the 44.1k (red), 48k (green), 88.2 (blue), 176.4 (cyan) sampling frequencies. As you can see there will be a small difference in the high frequency response between 44.1k and 48k, about 1-1.5 dB between 10K and 15K. So, it is natural that it sounds differently, just like using a different pair of tweeters. You are having no hallucinations :D

(Note that I did not include the response of the oversampling filter which normally limits the bandwidth to 20k, this is just the response of the DAC, you can multiply that with the response of the oversampling filter of your choice, which is usually, but not always, a brick wall filter).

Switching to 88.2K sample frequency or more (with SRC in the computer) would also sound different, probably much more different and not subtle at all.
 
@ peufeu

Maximum respect for Nyquist :)

A sampled system with Fs can reconstruct signal only with F < Fs/2 above this we have aliasing. A NOS DAC is a zero-order hold system and for this sin(x)/x is the envelope of the frequency responce (not the freq. resp. itself) with x = Pi*F/Fs.
This can be seen also experimentally measuring the freq. resp. of a NOS DAC with Fs=44100 obtaining near -3db at 20KHz.

ciao
andrea
 
Hi folks.

To follow up on the last post:

As you might have seen by following above links, the Secret Rabbit Code SRC in version 1.3. is performing much better then before.
I thought it's worth to tell the less experienced folks over here how to get it installed via sources.

Below a brief HowTo about updating libsamplerate.
libsamplerate is used by quite some applications and can affect the soundquality heavily . Unfortunately the Ubuntu guys don't really keep it up2date. My Ubuntu-Studio still had 0.1.1 installed.

Below "Quick and Dirty" instructions assuming that you had it running before, so check with:

$ ls -l /usr/lib | grep libsample

if it's there.

You'll get an output showing beside other lines :

/usr/lib/libsamplerate.so.0.1.1


Now we start:

Download the tar.gz file from here:

http://www.mega-nerd.com/SRC/download.html

$ cd <downloaddir>
$ sudo cp libsamplerate-0.1.3.tar.gz /usr/src
$ cd /usr/src
$ sudo tar xvvf libsamp*gz
$ cd libsample*

Below steps must run error-free so please check the outputs

$ sudo ./configure --prefix /usr
$ sudo make
$ sudo make install

Check:

$ ls -l /usr/lib | grep libsample

should now output:

-rw-r--r-- 1 root root 1517714 2008-04-18 18:31 /usr/lib/libsamplerate.a
-rwxr-xr-x 1 root root 855 2008-04-18 18:31 /usr/lib/libsamplerate.la
lrwxrwxrwx 1 root root 22 2008-04-18 18:31 /usr/lib/libsamplerate.so -> libsamplerate.so.0.1.3
lrwxrwxrwx 1 root root 22 2008-04-18 18:31 /usr/lib/libsamplerate.so.0 -> libsamplerate.so.0.1.3
-rw-r--r-- 1 root root 112196 2007-05-24 14:49 /usr/lib/libsamplerate.so.0.1.1
-rwxr-xr-x 1 root root 1505875 2008-04-18 18:31 /usr/lib/libsamplerate.so.0.1.3


You can see that the .so is now linked to the new 0.1.3 version the old 0.1.1 is sitting idle

if you type:

$sndfile-resample

it'll print out that it uses the 0.1.3. version

Good luck.

Cheers
 
better to build an updated .deb

well, it is way better to NOT screw up your distro by manually installing something over the files provided by a package...
the more proper way of doing such an upgrade is to build an updated deb package yourself, and install that (replacing the old) one using dpkg.

It's not hard at all.

First of all, check if there is already an updated version in the latest or the "next" (i.e. development) version of your distribution. If not, also check Debian "unstable" (AKA Sid) and Debian "experimental" repository.

Chance are you'll find it there. E.g., in the case of libsamplerate, an up to date package is in Debian Sid (I use Debian proper, not Ubuntu):

$ apt-cache search samplerate
libmp3info-ruby1.8 - a pure ruby library for access to mp3 files
lamip-dsp-secretrabbitcode - lamip resample dsp plugin
libgavl-dev - Gmerlin Audio Video Library
libgavl0 - Gmerlin Audio Video Library
libsamplerate0 - audio rate conversion library
libsamplerate0-dev - development files for audio rate conversion (libsamplerate)
samplerate-programs - Sample programs that use libsamplerate

$ apt-cache policy libsamplerate0 samplerate-programs
libsamplerate0:
Installed: 0.1.2-2
Candidate: 0.1.2-2
Version table:
0.1.3-1 0
90 ftp://debian.fastweb.it unstable/main Packages
*** 0.1.2-2 0
900 http://ftp.debian.org etch/main Packages
100 /var/lib/dpkg/status
samplerate-programs:
Installed: (none)
Candidate: 0.1.2-2
Version table:
0.1.3-1 0
90 ftp://debian.fastweb.it unstable/main Packages
0.1.2-2 0
900 http://ftp.debian.org etch/main Packages


Of course, you can not use those package(s) directly in your distro, as they will surely have loads of unsatisfied dependencies. BUT, you can use the source package(s) and rebuild that one(s) on your machine!

It's easy:

add the source repository of the latest (and/or developenent) version(s) of your distribution to your /etc/apt/sources.list file, e.g. add something like this:

Code:
### Debian sid
deb-src [url]ftp://debian.fastweb.it/debian/[/url] unstable main non-free contrib

### The official debian experimental branch
deb-src [url]ftp://ftp.debian.org/debian/[/url] experimental main contrib non-free

(if you need to use Debian Sid repositories 'cause Ubuntu does not have what you need, you can use the previous lines as-is also on Ubuntu).

Then as root (using sudo on Ubuntu) type:

$ sudo apt-get update

to actually add your new repositories. Next you have to make sure you have installed at least these two packages with all their dependencies (including recommends):

dpkg-dev
fakeroot

Install them with whatever package manager you prefer, or just type:

$ sudo aptitude install --with-recommends dpkg-dev fakeroot

and let it go.

Then (e.g. for libsamplerate):

$ sudo apt-get build-dep libsamplerate0

this will automatically install on your system all the packages which are required to build the requested package(s).

In my case I've got this:

The following NEW packages will be installed:
dpatch fftw3 fftw3-dev libflac-dev libsndfile1-dev
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 3092kB of archives.
After unpacking 9490kB of additional disk space will be used.
Do you want to continue [Y/n]?

answer yes and let it go... when it's done, you are ready for the next step.

Go (cd) to a file system where you have enough free space. Create a directory where you'll build your packages, e.g. "debs" and cd into it. Then (as normal user, no sudo) type:

$ apt-get source libsamplerate

this will download the sources, extract them and apply the required patches. Now you are ready to build the package(s): cd into the build tree top dir, e.g.:

$ cd libsamplerate-0.1.3/

and give the command:

$ dpkg-buildpackage -rfakeroot

Here we go. You'll see the messages of the build process... at the end you'll get your brand new deb packages in the parent dir (..), ready to install:

$ cd ..
$ ls -s1h
total 6.8M
1.3M libsamplerate0_0.1.3-1_i386.deb
4.0K libsamplerate-0.1.3
8.0K libsamplerate_0.1.3-1.diff.gz
4.0K libsamplerate_0.1.3-1.dsc
4.0K libsamplerate_0.1.3-1_i386.changes
4.1M libsamplerate_0.1.3.orig.tar.gz
1.4M libsamplerate0-dev_0.1.3-1_i386.deb
20K samplerate-programs_0.1.3-1_i386.deb

$ sudo dpkg -i libsamplerate0_0.1.3-1_i386.deb samplerate-programs_0.1.3-1_i386.deb

That's it, done. Enjoy. :cool:

(this process is named "backport"... you've just made one on your own! ;) )



Oh, what if the package for the latest version you're looking for is nowhere?

No problem... it's a bit more work, but no rocket science here, either. :D

Get the sources for the latest available version by following the previous steps up to the "apt-get source" step. Then, download the original sources .tar.gz for the version you want, and rename it in the same way as the sources from the package, e.g.:

libsamplerate_0.1.3.orig.tar.gz

next, unzip the diffs file, e.g.:

$ gunzip libsamplerate_0.1.3-1.diff.gz

open this file in your favorite text editor and check whether there are patches against the actual source files... you'd likely have to remove them for the new version. Of course instead you have to leave there the patches used to create the Debian specific stuff, configure the package, set the install paths, etc. (though you may need to change a bit something).

Now extract the sources:

$ tar xvzf libsamplerate_0.1.3.orig.tar.gz

that should extract into a subdir (build tree). Make sure that dir is named similarly (same scheme) as the one created when you've got the old version of the package, then cd into the sources build tree and apply the patches:

$ patch -p0 < ../libsamplerate_0.1.3-1.diff

check the output... if there are no errors, you can go now run

$ dpkg-buildpackage -rfakeroot

exactly as before... if everything goes well, you've just created your own new updated packages, ready to install! :cool:

In case of problems, check the "debian/" subdir, and in particular the files:

control
rules

you may need to change them a bit at times.
 
Hi Paolo.

You're scaring Linux Newbies off. ;)

But THX for that comprehensive explanation how to do it right.
It's of course best to do it the way you explained it, since you consider
all dependencies and you're able to handle the package with the package-management.
I'll use this approach in the future. We should add this to the Wiki.

The way I did it is really quick and dirty.

Cheers
Klaus
 
Hi folks.

The release candidate ( which is supposed to be quite stable) of Ubuntu Studio Hardy is available for download:

http://cdimage.ubuntu.com/ubuntustudio/releases/8.04/rc/

It comes with a new kernel and a lot of bugfixes of course.
I read that the upgrade from Gutsy to Hardy is still not 100% reliable.

If you can wait two more weeks, save your time in listen to music instead of hacking the system. :D

Cheers
 
Hi Soundcheck,
I downloaded Hardy Heron, Ubuntu to check it out & the sound is much better than through windows on my Dell Inspiron 6000 laptop analog outs from the built-in soundcard (forget its name).

This has me interested in going further with it & using Ubuntu (modded as per your wiki) to build a SPDIF interface from my USB soundcard (AW-D3 kit - PCM2707 based) to my Panasonic equibit digital amp.

I can avoid the volume control issues as it's done in the amp! I can avoid the DAC issues as it's done in the amp! My main concern then is low jitter dig signal to the amp. Unfortunately I2S is not easy to tap into on the amp or I would go that route from the USB soundcard.

Have you checked out Hardy yet? What changes are implemented that effect sound?
 
Just for information:

Apparently, part of the Ubuntu-studio features can be had without changing the 'look and feel' of the normal Ubuntu distributon. Use a packagemanager and look for 'ubuntustudio'. I have installed 'ubuntustudio-audio' after upgrade to Hardy for the audio packages and a realtime kernel, without installing things I do not need (i.e. video editing, 3D apps). Seems to work great!
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.