View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide

Pdict

Dictionary Patterns: Pdict.hqx [Pdict version 2 (old)],
access patterns within a Dictionary or Library
with a pattern ("whichName", like in Pswitch) returning Symbols
(the new version still works with old code)


includes Pdict and Penvir (stream from current environment)
part of the distribution in sc3

//_______Pdict test (SC2):

d = Dictionary[
        \a -> Pseq([1, 2, 3], 2),
        \v -> Pseq([3, 1, 2], 1),
        \x -> Prand([3, 1, 2], 1),
        \r -> Pbrown(-3, 3, 2, 3)
        ];
a = Pdict(d, Pseq([\a, \v, \v, \x], 1));
b = a.asStream;
32.do({ b.next.postln });

(
{
d = Dictionary[
        \a -> Pseq([1, 2, 3], 2),
        \v -> Pseq([3, 1, 2], 1),
        \x -> Prand([3, 1, 2], 1)
        ];

Pbind(
        \degree, Pdict(d, Prand([\x, \v, \a], inf)),
        \dur, 0.1
        ).ar(Event.protoEvent, 2);
}.play;
)
/*
authors so far:
jrh
*/


Links to this Page