SuperCollider CLASSES (extension)

MonoGrainBF
ExtensionExtension

Granulates real-time input with Ambisonic panning
 

Description

Class Methods

*ar (in, winsize: 0.1, grainrate: 10, winrandpct: 0, azimuth: 0, azrand: 0, elevation: 0, elrand: 0, rho: 1, mul: 1, add: 0)

Arguments:

in

A mono input.

winsize

The window size in seconds.

grainrate

The rate at which new grains are created (in Hz).

winrandpct

A randomness factor for window size (as a percentage of the winsize).

azimuth

In radians, -pi to pi.

azrand

Percentage of deviation from the azimuth.

elevation

In radians, -0.5pi to 0.5pi.

elrand

Percentage of deviation from the eleveation.

rho

The speaker radius. (1 places around at the radius, <1 within the radius, >1 is outside the radius.) Beyond the radius, this mostly acts as an amplitude scaler (no filtering is done).

mul
add

Inherited class methods

Instance Methods

-init ( ... theInputs)

Inherited instance methods

Examples

s.boot;

(
s.sendMsg(\b_allocRead, 0, Platform.resourceDir +/+ "sounds/a11wlk01-44_1.aiff", 0, -1);

SynthDef(\monograinbf, {arg buffer = 0;
    var w, x, y, z, out, winsize, grainrate, azimuth, azrand;
    winsize = 0.04;
    grainrate = 100;
    azimuth = MouseX.kr(-pi, pi); // move around the radius
    azrand = MouseY.kr(0, 1); // 0 = no randomness, 1 = totally random
    #w, x, y, z = MonoGrainBF.ar(PlayBuf.ar(1, buffer, loop: 1), winsize, grainrate, 0, azimuth,         azrand);
    out = DecodeB2.ar(2, w, x, y, 0.5);
    Out.ar(0, out);
}).add;
)

s.sendMsg(\s_new, \monograinbf, 1000, 0, 0, \buffer, 0);

s.sendMsg(\n_free, 1000);
s.sendMsg(\b_free, 0);