[Fpga-synth] SVF Question

Theo Verelst theover at tiscali.nl
Mon Jan 5 03:27:12 CET 2009


On Fri, 2009-01-02 at 11:13 -0700, Scott Gravenhorst wrote:
> Happy New Year all,
> 
> Is there a web resource which explains why a digital SVF is best operated using low cutoff frequencies?  
> 
> I've read a small piece on Chamberlain who used a figure of 1/6 SR.  Other people suggest 1/8 or even 1/16 SR as an upper Fc limit, but the explanations I've read are sort of vague saying things like "certain features aren't apparent in the digital version as are available in the analog version when the digital version is used at higher cutoffs".
> 
> -- ScottG

A good New Year to you to Scott, who made the world of FPGA synthesis
almost a democratic success!

A few generalities apply to the subject, I'm sure most EEs have
somewhere in the back of their mind from at university before senior
years, presuming it's been a good one:

 1. Sampling theory, including:
 2. Reconstruction Theory
 3. Traditional Filter Theory
 4. Digital Filter Theory
 5. some practical Applications of these in Analog/digital Synthesizer
design
 5. Hacks

1.
Sampling theory states that if you have a (perfectly, mathematically
speaking) upper frequency limited signal, and a sampling frequency which
is at least twice the highest frequency component in that signal, that
from perfectly evenly spaced samples of that signal, regardless of phase
shift, and presuming a perfect sampling circuit one can:

2.
Perfectly (mathematically !) reconstruct the original signal from those
samples, provided one samples from - to + infinity, and provided there
has been no quantization (discretization of the amplitude) or such can
be neglected for the case at hand. For that, infinite Sinc (sin(x)/x)
function interpolation is needed to fulfill all theoretical mathematical
conditions.

3.
The theoretical link between traditional filter theory (I'm a EE Network
Theoreticist by education after all) is that a perfect analog filter,
which works pretty good with basic electrical network components in
practical electronics, has a linear behavior with allows a spectrum
limited signal being processed by it

4.
Theoretically it is possible to replace Fourier transformed network
theoretical element descriptions into Z transformed elements presuming
equidistant sampling and some acceptable quantization AND FREQUENCY
LIMITED SIGNALS AND CORRECT BACK-TRANSFORMATION TO THE ANALOG DOMAIN,
and of course it is possible and necessary to analyze the signal
processing accuracy and accuracy bottlenecks in the applied
algorithms/filters.

For combined FIR / non-feedback IIR filters this can be considered
straightforward, and because there are non non-linearities to be
considered (the Z transform is linear in certain senses) one can make
use of the equivalent digital filters from linear analog counter-parts.

That was the thinking behind the Open Source but not diligently
specified Simulated Analog Digital Synthesizer I made and publicly
demonstrated already years ago:

   http://www.theover.org/Synth

Of course this is for frequency limited,and NON-TIME-VARYING oscillators
and signals only! It is fairly easy to prove the a little frequency
modulation of the signal in theory already has an infinite spectrum, so
that the strict sampling theory fails to be solid theoretically
foundation. So in the above too, there are 'hacks' and approximations
for certain types of signals. In fact it is an interesting signal
sub-space which is perfectly spectrum limited, outside constant signals.
In most practical digital filtering systems, one has also to add the
limitation that the spectra must be pathetically simple in nature and
that the processing doesn't even TRY to be (sub sample) shift invariant
(which sampling theory really is), while the theory allows for any (only
maximum frequency limited) spectrum to work, also without any form of
harmonic relations (like in modems).

It's a little like with the well known FFT and its application:
theoretically the n samples used for it can be transformed to 2n
spectral components, even with some given accuracies and such, and then
back-transformed to the time domain, getting the exact signal back whcih
was put in, sample for sample. But don't ask if the obtained spectral
components have ANY CLEAR RELATION AT ALL to the normal interpretation
'spectrum' of the signal unless the FFT interval accurately matches a
multiple of the base frequency, and the signal has a normal repeating
spectrum. You may want to try this out here: 

   http://www.theover.org/Menu/jsmenu3.html 

(Click Waveform Lab, Theory, View applet and then some wave menu on the
left, and apply filtering using the boxes under the applet).

Of course for practical filters, one should be aware of the exact
behaviour of the applied signal blocks like derivative/integral,
quantization accuray, sample rounding, and wether harmonics are
introduced (normally also digital filters are linear) and of course what
the mapping of the parameters is, like above in my DSP Synth, the filter
cutoff formula has not been mapped by a correction function to some
linear or logarithmic standard (I believe it is digital lpf inttrinsic,
+ quadratic), and there may be sampling related behaviour causing a
delay based filter, especially in the case of immediate feedback in the
electronics filter equivalent to have different frequency related
behavior and stability.

Nonlinear, re-sampling, and FIR fitering all have their own resp.
primary distortion/spectral, group/phase delay/spectral (aliasing) and
non-linear (and thus spectral, especially during transients)
sideeffects/problems. FIR filtering cannot be directly comparable with
traditional analog (synthesizer) filters, unless they are extremely
long.

In some sense that holds also for the reconstruction filter in every DA
converter, chip or discrete.

5.
A good engineer should be able to specify the whole system and the
demonds on it he or she would have, quantize and limit the errors, and
preferably do all this ina mathematically founded way.

Practically that is often hard, since the involved mathematics are not
simple at all. So it is reasonable to presume a thing or two and use a
few known hacks or approximations, but this has led people to belief it
is decent practice to derive theories from their hacks, which very
undesirable, and I think it would be good that like it is in for
instance physics ad electronics that errors and approximations be
quantified and qualified or else we have to rely on the sources of
underspec-d designs and machines to have faith in their good
applicability in various practical situations.

Being a member of the Audio Engineering Society I've witnessed a whole
range of practical digital audio setups (in lectures / meetings) where a
whole myriad of assumptions and hacks have clearly been used to varying
degrees of success, and then I often think back about my own synthesizer
project back in high-school, based on digital electronics and analog
filtering (designed by YT) and the horrible signal processing ordeals
that were going on in the early digital delays (Ibanez, space echo, BBs
in organs, Poly 800) and successful digital sound synthesizers like the
DX-7 and derivatives (high sampling frequency for the time), detunable
drum computers and more complicated digital machines (I was very
accustomed to using a REV-7 in musical practice by then), and realize
the nightmare for new generations has only just begun, if it isn't for a
democratic approach to the design and marketing process of digital audio
equipment.

The combination of the generator spectrum limitation, the (often very
crude and simplified especially when using FFT, is it used shift
invariant?!) filtering being FIR/IIR and accurate (a multiply might
really need a doubling of the number of bits, and the intermediate
stated in the filter, too), the dealing with the spectrum of the
amplitude modulating (non-linear or non time-constant, possibly non
spectrum limited!) and frequency modulating components (a Bessel
spectrum for already a sinus frequency modulation is theoretically
infinite!) and of course the presence of and type and quality of the
reconstruction and analog anti-aliasing filtering of the Digital to
Analog converter create a lot of audio characteristics, most of which
are irreversible and clearly non-HiFi changes to the the Ideal Signal
Path!


Oh another interesting subject: I'm currently looking into Cuda for
audio processing after having made some small working other
applications:

   http://www.theover.org/Cuda

We can hope that FPGAs are added on good day as an option to tesla
cards, lets say just like Nallatec cards or so, that would be really
powerful, and I'd easy be able to continue to use my great Lexicon DA
converter box with the Linux kernel, and have great communication speed
with the FPGA(s) on top of it!.


   Theo Verelst
   theover at tiscali.nl

"Sir, yes sir!"
Shut up, dude.



More information about the Fpga-synth mailing list