Here are all the patches for this topic: 06-granular
1) this first patch demonstrates basic granular synthesis using the poly~ object and metro. “note” is prepended to the message sent to poly~ as it is typically used for polyphony.
the sine grain abstraction is a random pitch sine wave generation with a raised cosine envelope. to turn a cosine into an envelope/window, one must invert it, cut the amplitude by 1/2 and shift it up by 1/2 so that it starts at 0, goes up to 1, and ends at zero. this inverted and shifted cosine is known as a raised cosine window.
2) this example adds 2 operator FM synthesis to a granular framework. the external patch is almost identical to the previous example except that more parameters are packed together and sent to the poly~ object.
the “grain” abstraction is similar to the previous example except that for each grain a random ratio and index is generated and given to a small fm2op abstraction (below).
3) the third example is a granular harmonic oscillator in which each grain generates a random harmonic of the base pitch.
The abstraction is almost identical to the original sine example except that an additional random object is added to create the harmonic frequency multiplier.
4) The final example is a granular sound file player which randomizes the playback start position. A slider in the main patch is used to set the original start position. The sound needs to be loaded with the “replace” message before this patch will work.
The playback abstraction requires a little more logic to derive the playback start, end and time from the pitch and position parameters in the main patch.