[linux-audio-dev] Re: chebychev

Tim Goetze tim at quitte.de
Thu Oct 31 19:17:00 UTC 2002


Steve Harris wrote:

>> http://quitte.de/spectral-evolution.gif
>
>Excellent. Can you either stick the data somewhere, or build a
>signal-amplitude x harmonic-amplitude table from it?
>
>What windowing function did you use? Do you know if the shape varies with
>the frequency of the fundamental? It would be a pain if it did.

i took rect windows of 16 cycles of the sine for the FT, averaged 
with an overlapping 16-cycle FT 8 cycles later. should be clean 
enough to work out the basic shape.

i'll try to work out some tables after checking for fundamental
dependency. what kind of windowing would you recommend?

>> looking at the above plot, i more and more think that the chebyshev
>> may well be the way to go. i don't think any combination of filtering,
>> exp()- and sine()-based shaping will produce anything like this; if
>> this can be modeled without employing the chebyshev, my feeling is
>> that a suitable shaper would need to be based on a more accurate
>> model of what's happening inside the amp. 
>
>I think its certainly worth a go, the way the harmonics come and go
>through the amplitude stages is very interesting.

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. :)

>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.

>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.

>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.

>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?

>> FT'ing some high guitar notes shows that note attacks briefly contain
>> frequency content higher than 10 kHz, but the 'body' usually is far
>> below; the root of the highest note on the guitar is about 2.5 kHz. 
>
>OK, well we can worry about that when we come to it. 

the > 10 kHz stuff is really only during attack, where aliasing is 
less of a problem -- attack is supposed to be noisy with loads of
distortion applied.

tim




More information about the Linux-audio-dev mailing list