GrainBuf

final case
class GrainBuf(numChannels: Int, trig: GE, dur: GE, buf: GE, speed: GE, pos: GE, interp: GE, pan: GE, envBuf: GE, maxGrains: GE) extends MultiOut with AudioRated with IsIndividual

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, and 4 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 the pan argument is ignored.

pan

panning position when numChannels is greater than one. Equivalent to the pan position of Pan2 (for stereo output) or PanAz (for more than two channels)

pos

grain start position, where 0 is beginning and 1 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
trait Serializable
trait IsIndividual
trait AudioRated
class MultiOut
class SomeOut
trait Lazy
trait GE
class UGenSource[UGenInLike]
trait Expander[UGenInLike]
trait Lazy
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Inherited methods

final
def name: String
Inherited from
UGenSource
def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product
final
def rate: Rate
Inherited from
AudioRated

Inherited fields

lazy override
val hashCode: Int
Inherited from
UGenSource