[sdiy] Re: linear FM
ASSI
Stromeko at compuserve.de
Thu Feb 6 21:50:41 CET 2003
On Thursday 06 February 2003 13:54, jhaible at debitel.net wrote:
> > Then I haven't grasped the content in Achim's emails fully.
>
> Or I haven't. I'm still not so sure. Achim ?
I'm glad we have finally agreed on some important definitions and find
some common ground for terminology, which should make the rest of the
discussion much easier. :-)
Side remark: I can't help it, but for me analog synthesizers are not
just musical instruments or electronic circuits, but direct descendants
from analog computers. Their field of application is different and
their operational parameters are optimized for frequency domain input
and output, but they are nevertheless some of the most complex analog
computers that have ever been built.
[I've tossed out the quotations as I'm trying to answer questions from
several mails at once. I'm sorry, but it is still somewhat long-winded,
I hope to make more sense this time around.]
As to the question of the model(s) being consistent: yes they are, both
mathematically and as proven by real life examples of digital
oscillators based on phase accumulation.
The idea of running an oscillator backwards in time to explain negative
frequencies is nice from the standpoint of intuiton and actually works
for most if not all of the math too as long as you're talking about
ideal(ized) systems. I know for sure it doesn't work with lossy systems
as they are non-reversible.
The proposed oscillator has precisely the advantage that a) the
complete (wrapped, but to an interval larger than 2pi) phase
information is explicitly in it's state, b) you can always tell the
sign of frequency except of course at zero by looking at the state and
it's derivative and c) the output is a direct mapping (aka function)
from that state, but it is never used to feed back to it. It is these
properties that make it practical to implement the linear-through-zero
operation (at the expense of some rather hard problems to solve in an
actual implementation - but these have nothing to do with negative
frequency as such).
The system idea is roughly sketched as follows: the frequency input is
integrated into phase state (lets for the moment assume unwrapped). You
can tell the sign of frequency by the first derivative of that state
(naturally), but you don't need too lok at that. You never need to use
the output or derivatives of the state to advance it and no matter how
wildly you modulate frequency, it is always continous.
Since a real integrator has a finite range, you must wrap the phase,
drawing on the property that phases spaced 2pi apart are
indistinguishable when looking at the output. That mucks up the first
derivative, but we don't use it anyway, so no problem. It is precisely
this operation that presents the largest difficulty in implementation,
as you need to make it transparent to the state->output mapping, but I
think it can be done.
Note that you can't just wrap to 2pi, as after each wrapping you end up
at the other border of your range and you'd need to decide whether to
wrap again using the sign of frequency. This is precisely where the
Schmitt-Trigger discussion stranded - you simply can't make that
decision at that very moment, besides you'd accumulate the wrapping
error very fast when you try to stop the oscillator at this point by
setting it's frequency to zero. So you got to go to some larger range
which ensures that you never need to wrap twice in some finite interval
of time and you never need to decide which direction to map to. A range
of n*4pi is mightily convenient, as you can always map to zero (which
solves quite some accuracy problems). I think that the other problems
can be solved by ganging two or more integrators and resetting only one
of them at a time while steering the integration current to the other
ones, but I get ahead of myself here.
Last but not least you need to fold the wrapped state space into the
output. This folder needs more accuracy than your ordinary waveshaper
as you must make sure that at least two equivalent representations of
any wrapped phase end up at the same output amplitude. The upshot is,
if you get it right, it's relatively easy to provide many harmonically
related frequencies from the same phase state simultaneously (sine
banks anyone?). Also, as an unexpected bonus (I almost fell off my
chair when I realized this) it is a piece of cake to add phase
modulation once the other puzzle pieces are in place - you just add the
(properly wrapped) PM input to the state space before the output
conversion (that needs extra range to accommodate the PM). There you
have it: an analog FM operator (which always was really a PM operator
as implemented by Yamaha).
I'm not sure if sine oscillators and oscillating filters can be
"reversed" in the above sense. I think not, as all the topologies I'm
familiar with use (part of) their state for the output and/or feedback.
More to the point they use the first and second derivatives of their
state and that's going to be discontinous as the frequency becomes
negative. I don't know of any way to handle that gracefully, I've toyed
with the idea of misusing a quadrature oscillator and phase modulation,
but drawn a blank.
Achim.
-- +<[ Q+ & WAVE#46 & microQkb Omega sonic heaven ]>+ --
ForumThree Q and microQ Soundset:
http://homepages.compuserve.de/Stromeko/ForumThree_Q.zip
http://homepages.compuserve.de/Stromeko/ForumThree_uQ.zip
More information about the Synth-diy
mailing list