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

Re: [sc-users] sending synth parameters with patterns



>But my question is whether there's any way to use an array like this when working with patterns. I can't see any way to send such an array as part of a Pbind, for example.

I don't see the reason why not:
(
Pdef(\test, {|n=0.5|
var a = (1..10);
var b = (10..20);
var c = (20..40);
    Pbind(
        \instrument, \default,
        \dur, 0.25,
       \degree, Prand([a, b, c], inf)*n
    )
}).play;
)

Unless you mean something else.

Best
K.


On Sat, Nov 16, 2013 at 6:58 PM, James Mckernon <jmckernon@xxxxxxxxx> wrote:
Hi all,

Say I have an collection of parameters to send to a synth...

a = [\cutoff, 440, \modulation, 0.3];

This works nicely when dealing with Synth...

x = Synth(\mySynthDef, a);

But my question is whether there's any way to use an array like this when working with patterns. I can't see any way to send such an array as part of a Pbind, for example.

An obvious solution might seem to be to add entries to the Pbind for the contents of the array -- \cutoff, \modulation and so forth -- but I have a use case in mind where it won't be known in advance what those entries will be, hence wondering if I can get anywhere with the collection.

Any thoughts? Thanks a lot.
J



--
Best
K.

SC: 3.6.5
OS: 10.8.5