I have a class named PatternController that does exactly that:
p = PatternController {|f=200, a=0.5|
Pbind(
\freq, f,
\amp, a,
\dur, Pseq([0.25,0.25,0.5],inf)
)
};
)
p.play
p.set(\f, Pseq([200,300,400,500],inf))
p.set(\f, 300)
p.set(\a, Pwhite(0.3,0.7,inf))
p.set(\f, Pwhite(100,700,inf))
p.inputs // returns [\f, \a]
On Sat, Dec 29, 2012 at 2:50 PM, Marinus Klaassen
<marinus_klaassen@xxxxxxxxxxx> wrote:
> 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));
>
>
>
> // I tried it with Pdef but then I am bonded to also use name slots with
> pdef wich preferably I want to avoid.
>
> (
> a = Pdef(\testa,
> Pbind(\freq, Pexprand(Pkey(\freqLo),Pkey(\freqHi)),\dur,0.1)).play
> )
>
> a.set(\freqLo, 100, \freqHi, 10000);
>
> // but then with durations it becomes a bit unhandy. since there are not
> default values for it.
> (
> a = Pdef(\testb,
> Pbind(
> \freq, Pexprand(Pkey(\freqLo),Pkey(\freqHi)),
> \dur, Pexprand(Pkey(\durLo),Pkey(\durHi))));
> a.play
> )
>
> a.set(\freqLo, 100, \freqHi, 10000, \durLo, 0.1, \durHi, 0.7);
>
>
> with kind regards,marinus
>
>
>
> -----
> http://soundcloud.com/marinus-klaassen
> --
> View this message in context:
http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Pattern-question-How-to-set-parameters-of-generators-inside-a-local-pattern-scope-during-runtime-and-tp7591518.html
> Sent from the SuperCollider Users
New (Use this!!!!) mailing list archive at Nabble.com.
>
> _______________________________________________
> 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/
--
/Jonatan
http://kymatica.com
Content-Type: application/octet-stream; name="PatternController.sc"
Content-Disposition: attachment; filename="PatternController.sc"
X-Attachment-Id: f_hbavdpdp0