[sdiy] BLIT/BLEP virtual analogue synthesis
Tom Wiltshire
tom at electricdruid.net
Wed Aug 4 15:40:01 CEST 2010
Ok, I think I've got a specific question about implementation of BLEP synthesis:
When one is using a typical digital oscillator, you have a phase accumulator that is storing the phase. At each sample interval, a frequency increment is added to that phase, and the phase wraps around when it goes off the top of the accumulator. This generates a naive ramp wave. Since the wraparound is rounded to the nearest whole-sample position, there's a lot of jitter and nasty aliasing, but it's dead simple to do.
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?
With reference to my earlier email, I wasn't really suggesting listing to 8KHz square waves (bandlimited or not) - it's just that I couldn't really grasp how such an algorithm would manage to degrade correctly and only generate a couple of harmonics in an extreme case. Anyway, it isn't that outrageous - 8KHz is only MIDI note 120, half an octave from the top. An oscillator that covers the full MIDI note range seems like a reasonable request.
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 the part of the spectrum it's best at - it's an interesting idea. Of course, there's extra complications in using two algorithms, and perhaps that outweighs the benefits on specific hardware.
Thanks,
Tom
On 3 Aug 2010, at 15:25, Tom Wiltshire wrote:
> Hi All,
>
> Has anyone on the list played with either of the above techniques?
>
> https://ccrma.stanford.edu/~stilti/papers/blit.pdf
> http://www.cs.cmu.edu/~eli/papers/icmc01-hardsync.pdf
>
> I've been reading the papers (the two classics above amongst others) and doing some experiments, and it seems to me that getting decent results at low sample rates (like 44.1KHz) is still really difficult. For example, a 8KHz tone is going to have about 5.5 samples per period at 44.1KHz. This doesn't seem like enough to represent anything much, nyquist theory notwithstanding.
>
> If you've some experience to share, I'd be interested to discuss this, either on or off-list.
>
> Thanks,
> Tom
>
>
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
More information about the Synth-diy
mailing list