[sdiy] New to list - and DSP development
Paul Maddox
P.Maddox at signal.QinetiQ.com
Mon Nov 29 11:55:24 CET 2004
Ken/Terry,
> >3) If anybody has any soft synth programming experience, what is the
normal
> >way to keep a softsynth generating data at 44.1KHz. Since Mac's and PC's
> >usually only have 1ms clocks it's not like I can sync up to a 44.1KHz
clock.
> >Do you simply wait for the current sound buffer to finish playing and
that
> >acts as your limit? Or do you set up some kind of 44.1KHz interrupt? Or
is
> >there some other better way?
>
> Now that you ask I'd be interested to know myself. This is beyond my
> experience.
well, thats the hard part, thats what aliasing in softsynths/VAs is all
about.
You can write the data to an output buffer at whatever speed you want, but
if theres too much in there you get harmonic frequency inversion, or
aliasing..
Think of it like a wheel on television, with 25 frames per second. The
wheel can turn at upto 25 times a second and it will look like its going
forwards, once you go beyond that speed, the wheel appears to go backwards.
So the trick with VA/DSP synths is to limit the maximum frequency in your
output wave for half that of the sample rate. and *THAT* is one of the
hardest parts to get right.
> >4) Also I assume I generate sound in one buffer while another plays. On
> >the Mac it's possible to jump to a call back routine when the buffer
> >finishes playing. Is that the method used to switch to the 2nd buffer to
> >start playing and is that fast enough so no glitches occur?
not a clue here either I'm afraid.
My only expereinces are with programming DSP chips in things like the
Chameleon.
But in theory, as long as you can get back and begin filling the buffere
again, yes its possible.
But most CPUs can do more than one thing in 22uS (1/44.1Khz), so it
shouldn't be a problem.
Paul
----------------------------------------------------------------------------
Modulus Electronics - Innovation from imagination
Http://Www.Modulus-Music.com
More information about the Synth-diy
mailing list