Re: [linux-audio-user] Green's Function in Audio --- Demo Song

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-user] Green's Function in Audio --- Demo Song
From: davidrclark_AT_earthlink.net
Date: Sat Aug 14 2004 - 22:28:36 EEST


Hi Erik,

> I'm curious, is there anything that your downsampler does that couldn't
> be done with SecretRabbitCode..."

It's actually a resampler, not merely a downsampler. I haven't read
your code, nor have I used it other than in programs written by others
which utilize your library, so I don't know. (And I **THANK YOU** for
writing that library --- many use it.) It was easier for me to write
my own than to try and determine whether or not your resampler was
suitable for my particular situation. However:

>From your web page, it *appears* that you are using the sinc method
developed by Julius Smith of Stanford. Smith's method is very
fast, but not as accurate as FFT/overlap with large windows. Without
Kaiser windowing, it wouldn't have seen the light of day due to the
truncation effects. I need something that preserves the phase and
other information as accurately as possible between the channels,
not a small-windows approximation. I need a guarantee of accuracy,
and I simply didn't have the time to fully investigate the sinc
method with Kaiser and other windows. I should also say that the
FFT-overlap method is entirely *inappropriate* for other situations,
especially where the sample rate changes a lot and/or very quickly.
Here the sinc method is *very good* to *excellent*. (Actually I have my
own variant of that too, which is why I chose not to use it for
my own straightforward, fixed 24/96 to 16/44.1 conversions.)

Why I wrote my *own* FFT-overlap resampler:

A feature of all programs I write using my own class libraries is that
they automatically understand stdin/out, sockets, FIFO's, and files.
One program can accept data with a WAV-style header from any/all of
these IPC methods, and the same program (all programs) can put out WAV
data using any of these methods. So all these programs are scriptable
rather than part of a library. That is, the resampler can be put
into any script (bash, ksh, Python, PERL, awk) that uses those IPC
mechanisms, connecting it easily with any other program that was written
in the same manner or with standard UNIX utilities including the "lowly"
head, tail, grep, etc. I developed this technique to allow me to rapidly
create prototype programs, the downsampler script being but one of many
such scripts that utilize programs that communicate via these IPC
mechanisms. This technique also allows me to execute "pipelines" from the
command line, which is the origin of many of my scripts.

That was probably a longer answer than you anticipated, but I hope
I answered your question. Again, I thank you for writing that library.
I'm sure many programmers would have had a tough time without it. Again,
the sinc method is really the only way to go for many (most?) programs that
require resampling.

Best regards,
Dave.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sat Aug 14 2004 - 22:32:42 EEST