[microsound] supercollider question

mileece milalea at gmail.com
Wed Sep 8 20:04:34 EDT 2010


you are probably going to hate this- but since i have been using
CCresponders AND freeing them everything i command., i have reset the pram
and even reinstalled SC, i just can't think of what the issue is - my only
thought is that it might be a node problem? please see below- and thanks in
advance for your help and patience! this is driving my nutty!! hi scott,

thanks so much for getting back to me...

it's quite a complicated (or rather lengthy) patch so i have been trying to
simplify it so i can get the whole issue across...
but briefly (or not so briefly) i am using messaging style (for pan as an
example) like this from my routines:


var pos1Spec, pos1=0;

~cc1 = CCResponder({|src, chan, num, val|
pos1 = pos1Spec.map(val/127.0);
}, nil, 0, 1);

~chord_rout1 = Routine({
var chordNotesArray = (#[ 34, 46, 53, 64]), nv2;nv2 = [~adsr,~adsr];

inf.do({|i|
var index;
index = 2.rand;
s.sendBundle(0.02,
["/s_new", "OneDeepOnce", chordNode1ID=s.nextNodeID, 0, tone_grpID, \outDry,
0, \outWet,44, \i_freq, (4 + (chordNotesArray @@ i)).midicps, \pos, pos1]
,[\n_setn,  chordNode1ID, \env, nv2[index].size]++nv2[index]
).yield; }); });


as well as a direct MIDIControl from inside my synth for other parameters:

(
SynthDef("OneDeepOnce", { arg outDry=0, outWet=42, i_freq=500, pos=0,
chord_allBuf=40000;
var klank, harm, amp, ring, env2, env2_cntrl, wetMix, dryMix, offSet, noise,
output, gate, tone, winde;

harm = Control.names([\harm]).ir([2, 6, 8]);
amp = Control.names([\amp]).ir([0.7, 0.6, 0.5]);
ring = Control.names([\ring]).ir(Array.fill(3,6));
env2 = Env.newClear(10);
env2_cntrl = Control.names([\env]).kr(env2.asArray);

offSet = MIDIControl.kr(0, 1, \lin, lag: 0.02, channel:0, control:7,
id:~port);
output = MIDIControl.kr(0.1, 1,  \lin, lag: 0.02, channel:0, control:8,
id:~port);
gate = MIDIControl.kr(0, 1,  \lin, lag: 0.02, channel:0, control:9,
id:~port);

noise = {GrayNoise.ar(Crackle.ar(1.5, 0.01))};

klank = DynKlank.ar(`[harm,amp,ring], Decay.ar(noise, 1, 0.001).dup, i_freq,
offSet, output);

klank = Pan2.ar(klank,pos) * EnvGen.kr(env2_cntrl, gate, doneAction:2);

Out.ar(outWet, klank*output);

}).load(s);
)

Now, this:
gate = MIDIControl.kr(0, 1,  \lin, lag: 0.02, channel:0, control:9,
id:~port);

is controlling ALL my synths (even one which doesn't have an env) !

this:
output = MIDIControl.kr(0.1, 1,  \lin, lag: 0.02, channel:0, control:8,
id:~port);

is controlling a couple of synths (it's not mapped to), but not all- ON
CHANNEL 1 AND 8

I have been using cc.remove in this patch since i wrote it, but it isn't
working!

i just reset the pram... that hasn't helped either- i have even reinstalled
SC...

Do you think it might be my Node allocations?

The synth that cuts off from the gate which doesn't have an env is in the
first group and the two which are both responding to the the output change
on CC1 are in the second and third respectively...

tone_grp = s.sendMsg("/g_new", tone_grpID=s.nextNodeID, 0, 0); //head of
node 0

popp_grp = s.sendMsg("/g_new", popp_grpID=s.nextNodeID, 3, tone_grpID);
//after pieces_grpI

drone_grp = s.sendMsg("/g_new", drone_grpID=s.nextNodeID, 3, popp_grpID);
//afterpopp_grppieces_grpID


the other thing is that i am triggering my routines with a CCresponder so i
the synthdef with all the triggers assigned as so:

s.sendMsg("/s_new", "trig2", trig2_ID=s.nextNodeID, 0, 0, \id, 100);

s.sendMsg("/s_new", "trigger", trigger_ID=s.nextNodeID, 3, trig2_ID, \id,
120);

here is the CCresponder:

OSCresponder(s.addr, '/tr', {|time, responder, msg|

switch(msg[2]

, 120, {space_rout.next}

, 4, {chord_rout1.next}

, 5, {drone_rout.next}


and the trigger sythdef:

(

SynthDef("trigger", {|id=120|

var midi, midi1, midi4, midi5;

midi1 = MIDIControl.kr(0, 127, \lin, channel:0, control:1, id:~port);

midi4 = MIDIControl.kr(0, 127, \lin, channel:0, control:4, id:~port);

midi5 = MIDIControl.kr(0, 100, \lin, channel:0, control:5, id:~port);

SendTrig.kr(HPZ1.kr(midi1), id); //space

SendTrig.kr((midi4>50), 4);//drone

SendTrig.kr((midi5>50), 5);//chord

}).load(s);

)

So there it is- if there is a culprit, it's gotta be here somewhere!!!

On Wed, Sep 8, 2010 at 11:16 AM, isjtar <list at isjtar.org> wrote:

> are you instantiating a lot of new ccresponders without freeing them?
> how is the code structured? are your variables in environments, classes??
> without code it's very difficult to tell.
>
>
> On Sep 8, 2010, at 8:02 PM, mileece wrote:
>
>  hello!
>>
>> i'm working on an sc patch that has gone weird...
>>
>> i have discovered that there are several cc's controlling parameters in
>> several synths they are not mapped to!
>>
>> i have created new synths on new nodes in new groups. this has not helped.
>> i
>> have even tried a new controller source and reprogrammed the cc's on my
>> MIDI
>> keyboard to see if it was coming from there.
>>
>> Nope!
>>
>> anyone have any ideas what could cause cc's to override all the code i can
>> see on my patches?
>>
>> thanks... i'm stuck and it sucks :/
>> _______________________________________________
>> microsound mailing list
>> microsound at microsound.org
>> http://or8.net/mailman/listinfo/microsound
>>
>
> _______________________________________________
> microsound mailing list
> microsound at microsound.org
> http://or8.net/mailman/listinfo/microsound
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://or8.net/pipermail/microsound/attachments/20100908/47a42961/attachment-0001.html>


More information about the microsound mailing list