Dynamic pitch shift

Ola Fosheim Grøstad via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Feb 24 06:02:49 PST 2016


On Wednesday, 24 February 2016 at 10:33:56 UTC, Tanel Tagaväli 
wrote:
> Hello!
>
> I've been making some progress on the native D audio front:
> https://github.com/clinei/daud/tree/28ac042a16ae6785605a9a501b5f867c8f962055
>
> It's a continuous waveform generator, currently outputting a 
> saw wave that changes pitch every 1K frames.

Generating a saw waveform for an LFO is the same as generating 
the phase, which is easy to do with using D's modular integers. 
Just add the delta and let it wrap.

If you are generating it for a VCO then you need a bandlimited 
oscilator:

https://ccrma.stanford.edu/~juhan/vas.html

(Abrupt changes in pitch will cause a discontinuity in the second 
derived which is audible, so you might want to interpolate.)



More information about the Digitalmars-d-learn mailing list