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

Re: [sc-users] sending synth parameters with patterns




Am 16.11.2013 um 19:58 schrieb James Mckernon:

Say I have an collection of parameters to send to a synth...

a = [\cutoff, 440, \modulation, 0.3];

But my question is whether there's any way to use an array like this when working with patterns. I can't see any way to send such an array as part of a Pbind, for example.



Hi,

from what you're saying I dont't get
what the resulting Pbind should do.

The array carries some info, ok,
but how should it be used ?
E.g. it can be used for one single event,
for a number of events,
in addition to other data,
it might be used on the fly -
all possible and in combinations ...


(
a = [\pan, -1, \amp, 0.05];
b = [\pan, 1, \amp, 0.15];

// Conversions that might be useful

p = Pbind(*a);
e = a.as(Event);
f = b.as(Event);
)


// direct usage (dur defaults to 1)

q = p.play;

q.stop;


// as protoEvent arg

(
x = Pbind(
	\dur, Prand([0.1, 0.2, 0.2], inf),
	\midinote, Pwhite(60, 80)
).play(protoEvent: f)
)

x.stop;


// use of Pchain (<>) plus on the fly replacement

(
u = f;

x = (Pbind(
	\dur, Prand([0.1, 0.2, 0.2], inf),
	\midinote, Pwhite(60, 80)
) <> Pfunc { u }).play
)

// replace while playing

u = e;

u = f;

x.stop;


// sequence templates

(
x = (Pbind(
	\dur, Prand([0.1, 0.2, 0.2], inf),
	\midinote, Pwhite(60, 80)
) <> Pswitch1([e,f], Pseq([0,0,1], inf))
).trace.play
)

x.stop;


Greetings

Daniel

-----------------------------
http://daniel-mayer.at
-----------------------------



_______________________________________________
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/