Dynamic pitch shift

Tanel Tagaväli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Feb 24 02:33:56 PST 2016


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.

I have a slight problem, however.
Due to the frequency changing in the middle of a wave, I have to 
patch the new waveform together with the last, which I've done 
with `countUntil` at daud/gen.d:211 (I don't need to call 
popFrontN because the range is a reference type).

However, when calling `RepeatingGenerator.frequency`, the value 
of `_repeat.front` is not the value of the last frame.
app.d:61 is a temporary hack.


How could I get the value currently passed through `cont` from 
`_repeat`?


More information about the Digitalmars-d-learn mailing list