SuperCollider CLASSES

# Place

interlaced embedding of subarrays
Source: /usr/local/share/SuperCollider/SCClassLibrary/Common/Streams/ListPatterns.sc

## Description

Returns elements in the list. If an element is an array itself, it embeds the first element when it comes by first time, the second element when it comes by the second time... The nth when it comes by the nth time.

## Examples

(
var a, b;
a = Place(#[1, [2,5], [3, 6]], inf);
x = a.asStream;
8.do({ x.next.postln; });
)

1
2
3
1
5
6
1
2

//Place used as a sequence of pitches

(
SynthDef("help-sinegrain",
{ arg out=0, freq=440, sustain=0.05;
var env;
env = EnvGen.kr(Env.perc(0.01, sustain, 0.2), doneAction:2);
Out.ar(out, SinOsc.ar(freq, 0, env))
)

(
c = Place(#[0, 0, [0, 4, 7], [1, 5, 8], [2, 6, 9]], inf) + 67;
x = c.asStream;
Routine({
loop({
Synth("help-sinegrain", [\freq, x.next.midicps]);
0.17.wait;
})
}).play;
)