TGrains:
Filter:
Classes | UGens > Buffer | UGens > Generators > Granular

TGrains : MultiOutUGen : UGen : AbstractFunction : Object

Buffer granulator.
Source: BufIO.sc

Description

Triggers generate grains from a buffer. Each grain has a Hanning envelope

and can be panned over multichannel output.

Class Methods

TGrains.ar(numChannels, trigger: 0, bufnum: 0, rate: 1, centerPos: 0, dur: 0.1, pan: 0, amp: 0.1, interp: 4)

Arguments:

numChannels

The number of output channels.

trigger

At each trigger, the following arguments are sampled and used as the arguments of a new grain. A trigger occurs when a signal changes from non-positive to a positive value.

If the trigger is audio rate then the grains will start with sample accuracy.

bufnum

The index of the buffer to use. It must be a one channel (mono) buffer.

rate

1.0 is normal, 2.0 is one octave up, 0.5 is one octave down -1.0 is backward normal rate… etc.

centerPos

The position in the buffer in seconds at which the grain envelope will reach maximum amplitude.

dur

Duration of the grain in seconds.

pan

determines where to pan the output.

  • If numChannels = 1, the pan argument is ignored.
  • If numChannels = 2, panning is similar to Pan2.
  • If numChannels > 2, panning is the same as PanAz.
amp

Amplitude of the grain.

interp

1, 2, or 4. Determines whether the grain uses (1) no interpolation, (2) linear interpolation, or (4) cubic interpolation.

Inherited class methods

Instance Methods

Inherited instance methods

Examples