[linux-audio-dev] Re: chebychev

Steve Harris S.W.Harris at ecs.soton.ac.uk
Fri Nov 1 06:47:00 UTC 2002

On Fri, Nov 01, 2002 at 01:11:44AM +0100, Tim Goetze wrote:
> i'll try to work out some tables after checking for fundamental
> dependency. what kind of windowing would you recommend?

Blackman-Harris has the best sidelobe rejection, which is probably what we
care about here. An important thing is to catch all the components of the
harmonic, as some will slip into neighboring bins, I'm wondering if that
isn't one of the causes of the aparent amplitude variation of the
> i tend to like the idea of modelling the amp itself better than
> modelling its behaviour alone, but it seems i lack the resources
> and skills to work it out. oh well. if all else fails, there's
> always patience, trial and error. :)

Me too. I'm beginig to suspect that commercial amp models aren't really
modelling the behaviour though.

> >My guess is that we could get away with recalculating the cheby
> >polynomials every few samples (its pretty cheap anyway). The envelope
> >tracker needs to be pretty quick, but I still think it will be OK.
> a few ten samples/cycle for envelope & polynomial i expect, but
> let's see how it works out. chebpc() may prove costly if we call it 
> that often though, especially with a lot of harmonics.

Its not too bad. I hacked up a quick cheby that jumps between 4 harmonic
sets last night, recalcuating the cheby every sample. It didn't seem
that slow.

> >Blending between the polynomial coefficents will be pretty expensive and
> >may be like blending between filter coefficents. :(
> yep, best not to go there. however i fear the switched chebyshev
> output can produce nasty discontinuities. we'll find out.

It does. Well in my randomly picked test set it did, when the harmonic
amplitudes are real it may be smoother. I'l clean up the code later, make
it LERP between harmonic sets and send it to you, but I have sleave for
work now.  

> >My harmonic gen uses 10 (its a sweet spot for the PIII's cache IIRC), but
> >we could go up much higher if we have to. 10 is significantly cheaper than
> >a single valve.
> it's about 4-8% depending on cache effects here (64/44.1), about 1%
> less than the valve on avg. seeing that it replaces a whole slew of
> processing, i'm confident we can aim at a few more than 10 if
> necessary.

Interesting. It takes 1/2 as much as a single (optimised) valve here.
> >I have no real idea how many we would need. One possibility is a slight
> >valve effect before (or parralel to) the cheby to generate some low level
> >harmonics, just to make sure there are some there. It might sound wierd if
> >they abruptly stop.
> i'm a bit more worried about the correct operation of harmonic_gen.
> i've been testing it with a few sines and the harmonics it generates
> die away pretty quickly the higher they come. if i set only the first
> to come at 1.f, i'd expect it to have the amplitude of the original
> sine, but it's a few dB less. asking for only the third at 1.f
> amplitude generates the first at almost 1.f and a very weak third. 
> could this be to do with the 'magnitude normalization' it does?

It could be, I've zapped the normalisation in the ampy one, its also
possible that its buggy. The cheby maths came from num. rec. which
is famously full of errors.

- Steve

More information about the Linux-audio-dev mailing list