[sdiy] BLIT/BLEP virtual analogue synthesis

Antti Huovilainen ajhuovil at cc.hut.fi
Wed Aug 4 18:54:31 CEST 2010


On Wed, 4 Aug 2010, Tom Wiltshire wrote:

> However, for the BLEP, I need to know the sub-sample position of the 
> ramp discontinuity. If the sub-sample position is designated "a", then 
> the accumulator value after a wraparound is (1-a) * increment. I can 
> detect the wraparound and divide the accumulator value by the increment 
> to find the sub-sample position, but this is a division by (probably) a 
> 32-bit number.
> Is there a way to do it that avoids the big ugly division?

No, but you don't need particularly good accuracy for the result. 12 bits 
or so should produce good enough results. At very low frequencies you 
require even less accuracy as the relative error _compared to the period_ 
is less.

Combining all this, you could probably get by with 32/16 bit division. 
After rollover, the phase accumulator is never higher than the phase 
increment, and thus the division result is less than phase increment. This 
allows using relatively simple pseudo-floating point to improve the 
accuracy.

> I thought Olivier's suggestion of using BLEP for low frequencies and 
> something else for highs was insightful. BLIT/BLEP algorithms have a 
> computational cost that increases with frequency. This would make it a 
> good match for something like additive synthesis, which has a 
> computation cost that *decreases* with frequency. So use each for the

Problem is the transition points. Also you lose ability to do audio rate 
modulation.

Antti

"No boom today. Boom tomorrow. There's always a boom tomorrow"
   -- Lt. Cmdr. Ivanova



More information about the Synth-diy mailing list