Selon Spencer Russell Spencer.Russell@oberlin.edu:
OK, so using a samphold~, phasor~, and vd~, I've got the envelope-less granulator going, but how do I trigger the envelope with sub-block accuracy? I can use vline~ create the envelope itself, but getting it started is the problem.
For synchronous granular synthesis, the most straightforward way to set up the envelope is to use the scheduling |phasor~|. The phasor outputs signal ramps for 0 to 1, that can be used two different ways for playing an envelope:
sample). You can fill it manually or by a mathematical function (see how the analysis windows are done in the fft examples, it's the same). Then, if the duration of the buffer is N, just |*~ N| the output of the |phasor~| and use tabread4~ for reading the table
[r~ phase] <--- sent by the scheduling phasor | [-~ 0.5] | [wrap~] | [-~ 0.5] | | [r~ sharpness] <-- 0 for silence, float >= 1 for getting the envelope | | [*~ ] | [clip~ -0.5 0.5] | [cos~] | [-~ 1] | [*~ -0.5] | [outlet~] <--- output of the envelope (multiply your signal by it)
(sharpness: if you use 1, the envelope has a cosine shape, and becomes more stiff if you increase this parameter)
The iem_t3_lib works very well but you will only need it for below 1.5 ms time precision. It's only useful if you use [line~]- and [del]-based enveloppes (multisegment envelopes, like AD, AHD, ADSR, etc) for your granulator (in this case, you can have different durations for each granular particle). Check the CPU too.
regards, -j