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

Re: [Sc-devel] Call for Code Contributions !!!



Thanks for your explanation Julian! I just saw the (short) reference to it in the NodeProxy help file, too. I wonder how this would work with \set for Patterns though, would you mind just giving a little example?


~out[0] = { |freq, xyz| SinOsc.ar(SinOsc.ar(xyz.lag(1), 0, xyz, freq)) * 0.1.dup }; ~out[1] = \set -> Pbind(\freq, Pseq([456, 622, 244], inf), \xyz, Pshuf([355, 553, 335, 533], inf))

~out.play;


cheers,

k

On Dec 1, 2007 5:05 PM, Julian Rohrhuber <<mailto:rohrhuber@xxxxxxxxxxxxxx>rohrhuber@xxxxxxxxxxxxxx> wrote:

 >I was wondering.. could someone explain a bit more in detail what is
happening in this example? Just because I don't quite understand
this:

~out[1] = \filter -> #{ arg in; BPF.ar(in * 5, 700, 0.1) };

I'd be really good to have some pointers to  info/references in the source...

sure, we should add them.

here is a quick explanation:

Each node proxy (referenced by ~out) has any number of slots
(referenced by [n]) which may contain sound functions. Normally, if
you set such a slot to a function, it will create a synthdef and a
synth from it. In order to allow other ways of using functions as an
input to a node proxy, we can instead use an association (key ->
value), where the key denotes the way in which we want to use the
value (the function, in this case). If the key is \filter, we take
the bus of the proxy as an input to the function (as first argument)
so that one can easily filter within a single proxy. (You can define
your own usages by adding a function to a class variable)

This is very practical, although in future I'd like to have something
that is independent of buses altogether.
--






.
_______________________________________________
Sc-devel mailing list
<mailto:Sc-devel@xxxxxxxxxxxxxxx>Sc-devel@xxxxxxxxxxxxxxx
<http://www.create.ucsb.edu/mailman/listinfo/sc-devel> http://www.create.ucsb.edu/mailman/listinfo/sc-devel



_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-devel


--





.