[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] Pattern question: How to set parameters of generators inside a local pattern scope during runtime and similar like the usage of the class Synth args and .set?
Am 29.12.2012 um 14:50 schrieb Marinus Klaassen:
Hola list,
I have a question about setting parameters of Patterns during
realtime.
Normally I have a fixed set of patterns assigned to several slots of a
dictionary wich I can call up again to assign to more pattern
processing or
to play and stop. I want to extend this by also to be able to change
some
parameters in realtime when I play live with patterns. But still
have the
advantage of calling up an unit with a set of default arguments and
so, just
like: b = Synth(\stuff); a.set(\par, 2) to load an unit and to
change the
parameters afterwards.
Is this also possible with patterns in an easy way?
// something like this:
a = Pstuf({ arg freq = 100, amp = 0.1
Pbind(\freq,freq,\amp, amp)
}).play;
a.set(\freq, 1000);
a.set(\freq, Pexprand(100,1000));
Pbindef ?
Pbindef(\x,
\freq, 100,
\dur, 0.2
).play
// replace
Pbindef(\x, \freq, 1000);
Pbindef(\x, \freq, Pexprand(100,1000));
Pbindef(\x).stop;
You might also have a look at miSCellaneous lib's PLx patterns
based on dynamic scope, values are
taken from variables in Environments
where Patterns are made to streams.
So instead of passing different args as default values
you would just play the pattern (make the EventStreamPlayers)
in different environments.
PLx list patterns allow replacements of lists
or list elements with immediate effect.
There is also a general placeholder PL.
(
~fLo = 100;
~fHi = 100;
x = Pbind(
\freq, PLexprand(\fLo, \fHi),
\dur, 0.2,
\amp, 0.1
).play;
)
~fHi = 1000;
x.stop
Greetings
Daniel
----------------------------------------------------
miSCellaneous lib:
http://daniel-mayer.at/software_en.htm
----------------------------------------------------
_______________________________________________
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/