[music-dsp] BLIT using second order sine oscillators

shifty at sidehack.sat.gweep.net shifty at sidehack.sat.gweep.net
Thu Apr 5 10:50:31 EDT 2001


> > >         if( _osc1._sin > 0. && _osc1._sin < .001 )
> 
> Just a curiosity question--
> 
> Is there any chance that _osc1._sin might be < 0.0 on one interation, but
> _osc1._sin will have "skipped up" > 0.001 at the next iteration?
> 
> In other words, is it possible that the hi oscillator might occasionally
> miss getting synced at the start of every lo oscillator wave period?

Totally, it's possible.  The hope is the value is picked such that
it only takes a few cycles and therefore doesn't go far astray before
re-sycning....but now that you mention it.....at higher frequencies.....
there will be less and less probably of hitting the re-sync period!! 
oops...


> Or do you want it to only re-sync when _osc1._sin is a very small value, and
> you want it to free-run otherwise?
> 
> If you want it to hard-sync at each wave period, you could trigger with
> something like this?--
> 
> if(( _osc1._sin >= 0.0) && (_osc1.last_sin < 0.0))

And now that's more like it!



dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/




More information about the music-dsp mailing list