[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] Pindex help



Hi -

Pindex has no helpfile, and I'm trying to work out how to use it. Is
this a good code example for it? If so I'll start making a helpfile.
(I was hoping Pindex would react to the array updating but it doesn't
seem to. I suppose I'll use a Pfunc for that.) I wonder what people
have used Pindex for.

s.boot;

(
SynthDef(\help_pindex, { | out, amp=0.1, freq=440, gate=1 |
	var son = Saw.ar(freq * [0.99, 1, 1.01]).mean;
	son = son * EnvGen.ar(Env.adsr, gate: gate, doneAction:2);
	Out.ar(out, son.dup * amp);
}).memStore;
)

~data = [7, 13, 12, 2, 2, 2, 5];

(
p = Pbind(
	\instrument, \help_pindex,
	\choice, Prand(Array.series(~data.size, 0, 1), inf),
	\degree, Pindex(~data, Pkey(\choice), inf)
).play
)


Dan

-- 
http://www.mcld.co.uk

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/