aha! i can live without the elegance in this case
Post by Fredrik Olofssonaha, i see. yes, Pswitch1 and Pif are similar.
but then Pswitch1 with a Pfunc maybe...
Pbind(
\dur, Pseries(0.1, 0.05, 20),
\amp, Pswitch1([
0.5,
Pbrown(0.25, 0.8, 0.05), //between 0.3 and 0.5
Pbrown(0.1, 0.3, 0.1) //over 0.5
], Pfunc({|ev|
case
{ev.dur<=0.3} {0}
{ev.dur>0.3 and:{ev.dur<=0.5}} {1}
{ev.dur>0.5} {2};
})).trace
).play;
or shorter...
Pbind(
\dur, Pseries(0.1, 0.05, 20),
\amp, Pswitch1([
0.5,
Pbrown(0.25, 0.8, 0.05), //between 0.3 and 0.5
Pbrown(0.1, 0.3, 0.1) //over 0.5
], Pfunc({|ev| (ev.dur>0.3
and:{ev.dur<=0.5}).binaryValue+((ev.dur>0.5).binaryValue*2)})).trace
).play;
there's probably a more elegant way though...
_f
Post by Rocnot quite what i was after, cause i think that's equivalent to what i
already had.
Post by Rocif \dur > 0.3 -----> Pbrown(0.25, 0.8, 0.05)
if \dur < 0.3 -----> 0.5
if \dur > 0.5 -----> Pbrown(0.1, 0.3, 0.1)
cheers, Fredrik
Roc Jiménez de Cisneros
http://vivapunani.org
@_roc
On Tue, Oct 21, 2014 at 12:57 PM, Fredrik Olofsson <
not 100% sure but do you mean like this?
Pbind(\dur, Pseries(0.1, 0.1, 10), \amp, Pswitch1([Pbrown(0.25, 0.8,
0.05), Pseq([0.1, 0.2, 0.3], inf)], Pkey(\dur)>0.5).trace).play;
Post by Rocwhen dur is less than 0.5, then use Pbrown for amp. when dur is above
0.5 use the Pseq.
Post by RocPswitch1 is very a useful class.
_f
Post by Roci have a Pif controlling a parameter of a synth based on duration, so
Pif(Pbinop('>', Pkey(\dur), 0.3), Pbrown(0.25, 0.8, 0.05), 0.5);
but i'd like to make that more specific, so that whenever \dur is
above say 0.5 it runs another pattern instead of the Pbrown above.
#|
fredrikolofsson.com musicalfieldsforever.com
|#
_______________________________________________
sc-users mailing list
http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/