From CCRMA Wiki
Revision as of 18:10, 10 December 2007 by Baeksan (Talk | contribs)

Jump to: navigation, search


Implementation of real time, time granulation synthesis in Chuck, with the ability to be used in live performance. The synthesis parameters (grain length, position, position randomness, pitch, and pitch randomness) can be tweaked in real time.


SndBuf stores a sound file into a buffer, which is then chucked to a linear envelope for the grains. The envelope used in the sound files below has a rise time that is randomly chosen from 0.45 to 0.5 ms. This can be altered to change achieve a more varying asynchronous envelope for each grain. For granular synthesis, grain length is usually from 1 - 100 ms. The grain length, position in the sound file, the randomness of the position, pitch transposition, and randomness of pitch are the parameters that can be controlled in this patch. All the parameters were mapped to a midi controller, allowing for real time control of each parameter simultaneously.


Original sound file

Varying randomness of position - Changing the parameter which controls how far from the starting position the patch should play grains. This essentially chops up the sound file into desired grain lengths and orders them randomly one after another. A grain length of 80 ms was used.

Transposing pitch - The pitch of the grains is transposed. The randomness of the pitch of each grain can be controlled as well.

Time stretching - Time stretching of the sound file can be achieved by changing the grain position in the buffer. Granular synthesis allows to time stretch the sound file, without altering the pitch. In this example, the grain length is 80 ms and the position randomness is set to 0. This was done in real time with a knob on a midi controller.

Time stretching with transposition Time stretching another example - These examples show time stretching and pitch transposition of the sound file.

Everything all together with reverb control on top - All the parameters are tweaked simultaneously in real time. The dry wet mix of the reverb is also controllable

Granular Chuck code

Multiple Grain Instances