Hallo, dafydd hughes hat gesagt: // dafydd hughes wrote:
It looks like a mismatch between envelope and sample reading. The clicks seem to happen because the amplitude envelope and the tabread4~ aren't synchronized. What happens is the tabread object gets its new starting position while the envelope is still in mid-grain. The solution is to make sure each voice is inactive before starting a new grain.
David Golightly made a great granular delay line patch (I think based on a paper by Ross Bencina) maybe a year and a bit ago which used a scheduler to send info to each voice. As I remember, the scheduler kept track of which voices were playing and sent the messages to the next available note. Another way is to let the voice pass the message to the next voice if it's already busy.
I changed the patch to do just that and introduced an abstraction for the voices, because I'm lazy. The blocking is in [pd block] in pd_voice.pd. However while this gets rid of the clicks, it brings another problem with the patch to daylight, which you will immediatly hear, if you try it: it doesn't sound like a cloud of grains, but very regular. I didn't understand what the [expr $f1; $f1/1; $f1/2 ...] is supposed to do. In the original patch, the numbers get send to a [del] object where they get translated to a simple bang.
I once did another granular patch that uses a [phasor~] instead of a [metro] to drive the grains. Basically the phasor~ output is used to drive a cosine envelope similar to the packets example in Miller's docs. It also is used to read out the table with [tabread4~] or a delay line with [vd~]. [samphold~]'s are used to get click-free operation. I attached this patch as well (phasorgrain~). It normally uses Memento to allow comfortable remote control of the settings, but I ripped this part out to not confuse those without Memento.
Frank Barknecht _ ______footils.org_ __goto10.org__