A granular synthesis UGen taking sound stored in a buffer. Another buffer can be used to provide an amplitude envelope. The input sound buffer must be monophonic, but output may be multi-channel, using a panorama control.
All arguments except numChannels
and maxGrain
are polled at grain creation
(trigger) time.
- Value Params
- buf
buffer holding a mono audio signal portions of which are read as grains
- dur
grain duration in seconds
- envBuf
identifier of a buffer containing a signal to use for the grain envelope. The default value of
-1
means that a built-in Hann envelope is used.- interp
interpolation type when using pitch-shifting via
speed
.1
for no interpolation (nearest sample),2
for linear interpolation, and4
for cubic interpolation.- maxGrains
maximum number of overlapping grains that can be used at a given time. This value is set at the UGens init time and cannot be modified later. Lower value mean that less memory is used.
- numChannels
the number of channels to output. If
1
, a monophonic signal is returned and thepan
argument is ignored.- pan
panning position when
numChannels
is greater than one. Equivalent to the pan position ofPan2
(for stereo output) orPanAz
(for more than two channels)- pos
grain start position, where
0
is beginning and1
is the end of the input buffer- speed
playback speed of the grain, where
1.0
is original rate,0.5
is half speed etc.- trig
a control- or audio-rate trigger to start a new grain. For audio-rate, timing is sample frame accurate.
- See also
- Companion
- object