Steve Harris wrote:
On Thu, Oct 24, 2002 at 01:50:29 +0200, Tim Goetze
wrote:
ah, now i dig it. maybe you could make a note
about the intended
use in the valve doc?
Yeah, I should probably do that. Documentation (well english in general!)
is not my strong point.
yeah, i guess we'd all be writing poems instead of code if
we did better in this field. ;)
good. do you
think the 44100/12 oscillation is a speaker
or output transformer effect?
I'm 90% sure its from the crossover between the two halves of the class B
amp (thats the power amp IIRC).
drat. i wish i was better at understanding electronics.
the amp guy pointed in this direction too.
afraid it
still aliases a little, but it does look
like it's basically doing the right thing iiutc.
I didn't think the aliasing would be audible. It uses a linear interp to
go from the bulk of the sub lobe to the true zero corssing, but that should
be OK. You do have smoothing set to 1.0 right? Otherwise it does something
crazy (fix for that later).
the aliasing is not that strong, you're right. maybe i'm
over-sensitive.
the problem
with both the valve and the xover i think
is that the further you drive them, the edgier the
discontinuity gets. it would have to be computed at
There definatly shouldn't be a discontinuity. If there is then its a bug.
Also, the crossover effect is not amplitude dependent, maybe it should be,
but the way it was described to me it isn't. Another thing to mention here
is that many people claim the crossover effect isn't a desirable feature of
amps.
I think the valve needs to be applied gently (looking at the scope traces
from yesterday its a fairly mild effect), and then some harder clipping
needs to kick in.
what i gather from the scope shots and the analog distortion
guy's pages is that we want a range of clipping from none to
square. if we're going implement 'square' clipping -- which
we'll need for the real rough tone -- we'll have to come up
with a bandlimited solution. the current valve clipping is
real soft compared to those scope shots, isn't it? if we
stack the valve to get to hard clipping, the net result will
carry the sum of all aliasing i'm afraid.
my reasoning
is that the problem we are facing here
is the same as in the generation of band-limited
square (or sawtooth, if you will) oscillation.
Yes, but if the aliasing isn't too bad though it can probably just be
solved with a bit of oversampling, 4x or 8x should be enough, though the
CPU use wil go up 4x or 8x. The basic valve should be optimised.
my feeling is that oversampling alone will not do, although
you're probably right in that it will get rid of most of
the aliasing.
i've been working a little on a square oscillator recently
that integrates 32-sample windowed sincs centered at the
wave discontinuities. the results are very promising, although
not perfect, because the straight parts of the wave are
simply that, and integrating the sinc actually is a crude
approximation. cpu usage is fairly low though.
i'm thinking about how to apply the technique to produce
square clipping, or better a [0 .. 1] range of clipping,
but the integration approach is awkward.
tim