[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-users] Pindex help
- To: "SuperCollider users mailing list" <sc-users@xxxxxxxxxxxxxxxx>
- Subject: [sc-users] Pindex help
- From: "Dan Stowell" <danstowell@xxxxxxxxx>
- Date: Mon, 1 Dec 2008 11:12:15 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=UKGVAIACoxQXGPChd0XWUKrLsJc63RBNVYr5H582cjs=; b=Vo/mmV5a5llZSfDwR80pUisiogHWpRNqOSRlLq2lc4P4+kWYiIyWbp6xftx8Tm0GNa RKnFRRUJ9h/mPujSL8Oa87Rp5E7+Jnwf/UgCtLUy2OpJSRrVsrVjhyIkaVB9WHI1LDw1 CBWvginW2m467EsusioKLI+feP85XfMFsdwQ4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=O+MBeLJwWJ0l6gyFZaM9ur5BjG6c+MhLeCttKH8XMbQPEn5FZ+SIl/AorOqZkVe0Op ZpKOnP294IZCZpaYzj8GIMifjdamaCrYROzXwsHzNsYvoS72KMhstmZ2dwWGoPOtTdFP wVKgXtpKiR406v8L4swkIxA7+wF7/EhOv0pps=
- List-id: SuperCollider users mailing list <sc-users.create.ucsb.edu>
- Reply-to: sc-users@xxxxxxxxxxxxxxxx
- Sender: owner-sc-users@xxxxxxxxxxxxxxxx
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/