[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 16:47 schrieb alln4tural-list@xxxxxxx:


i use PatternProxies for this: http://sccode.org/1-4Rs

no additional class required, just a little hack to get at the pattern inside a running EventStreamPlayer (also due to Jonathan :) btw, i would really like to unhackify that, make it part of the official EventStreamPlayer interface -- wd any dev care to work with me on that?


eddi
http://soundcloud.com/all-n4tural



Hi,

maybe this could also be done with Pbindef ?
A thing to ensure would be proper naming of
Pbindefs generated (e.g. symbol + index)
and using these names with replacements


(
~makePbindefs = { |name, num|
	num.collect { |i|
		Pbindef((name ++ i).asSymbol,
			\dur, 0.2 * (i+1),
			\midinote, rrand(60, 90)
		)
	}
};

~setPbindefs = { |name, num|
	num.do { |i|
		Pbindef((name ++ i).asSymbol, \midinote, rrand(60, 90))
	}
}
)


~makePbindefs.(\a, 4).do(_.play)

// try several times

~setPbindefs.(\a, 4)

	
Set functions could be generalized to set an
arbitrary key to an arbitrary Pattern	and / or
differentiate for the index.

	
Greetings

Daniel

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








At 15:53 29.12.2012 +0100, Jonatan Liljedahl wrote:
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


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


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