[PD] Granular Synth
julien.breval at tremplin-utc.net
julien.breval at tremplin-utc.net
Thu Apr 28 14:43:19 CEST 2005
Selon Spencer Russell <Spencer.Russell at 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:
1. use a |table| that contains the amplitude envelope (as if it was an audio
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
2. use cos~ for making the envelope (adapted from an old example in pd-0.36):
[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
More information about the Pd-list
mailing list