joesh
2014-09-18 20:54:15 UTC
Hi
I'd like a little help to understand why you can't (or I can't) change
values in an argument when creating a SynthDef. I'm sure there's a very
simple answer that I just haven' thought of since I'm a beginner. Here's a
simple bit of code to demonstrate what I mean.
(
SynthDef("SH",
{
arg riffA =[60,62,64,67].midicps;
var = out;
out = SinOsc.ar(
Select.kr(
Stepper.kr(Impulse.kr(4), max:riffA.size-1),
riffA),
mul:0.5);
Out.ar(0,out)
}).load
)
a = Synth("SH");
a = Synth("SH", [\riffA,[63,66,68,72].midicps]);
As you can see I thought it would be possible to change the array from
outside of the SynthDef...but what have I missed, or misunderstood.
Big thanks in advance - Joe
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/arg-and-synthDefs-tp7613457.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: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
I'd like a little help to understand why you can't (or I can't) change
values in an argument when creating a SynthDef. I'm sure there's a very
simple answer that I just haven' thought of since I'm a beginner. Here's a
simple bit of code to demonstrate what I mean.
(
SynthDef("SH",
{
arg riffA =[60,62,64,67].midicps;
var = out;
out = SinOsc.ar(
Select.kr(
Stepper.kr(Impulse.kr(4), max:riffA.size-1),
riffA),
mul:0.5);
Out.ar(0,out)
}).load
)
a = Synth("SH");
a = Synth("SH", [\riffA,[63,66,68,72].midicps]);
As you can see I thought it would be possible to change the array from
outside of the SynthDef...but what have I missed, or misunderstood.
Big thanks in advance - Joe
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/arg-and-synthDefs-tp7613457.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: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/