Re: [linux-audio-dev] Re: Cheby amp code

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

Subject: Re: [linux-audio-dev] Re: Cheby amp code
From: Steve Harris (S.W.Harris_AT_ecs.soton.ac.uk)
Date: Mon Nov 04 2002 - 18:01:06 EET


On Mon, Nov 04, 2002 at 02:42:49 +0000, Steve Harris wrote:
> I think its probably worth a try with saws, at least it will make
> extracting the transfer function simpler. I will try playing with
> extracting a transfer function from a known nonlinear process and see how
> much the phase shift messes it up.

This is actualy looking quite promising, you have to discard the transient
zero crossing of the saw wave and a few dB either side (the filtering
messes it up too much), but that is not a problem, you just overshoot the
desired input amplitude by a few dB.

I've attached some example code that generates a saw wave (p), applies a
nonlinear function (x, p^2 * 0.3 + p^3 * 0.73 - p^5 * 0.1), a highpass
filter and a delay (about 16.1 samples), then puts the transfer function
into a table (ignoring the delay). It can guess the correct input/output
alignment by looking at the shape of the out-of-sync transfer function.

There is an example here: http://plugin.org.uk/tmp/foo.png

The red line is the derived transfer function and the green line is the
actual function. They only really differ by amplitude (due to the filter)
and a bit of noise (cos of small input set, ~100ms at 44.1).

The code is in http://plugin.org.uk/tmp/foo.c but its not pretty.

- Steve


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

This archive was generated by hypermail 2b28 : Mon Nov 04 2002 - 18:07:07 EET