Amplitude send problem


I am trying to cross modulate the positions of 2 audio samples.

So channel 1 is sending to an Amplitude and when it goes beyond a certain threshold it changes the position of channel 2 (and retriggers of course). Channel 2 does the same, when it goes beyond a certain peak it changes the sample position of channel 1.
I can easily get one channel to work. The left channel changes the position of the right channel.
But I am having a difficult time figuring out how to do this for both channels. I tried creating 2 synthdefs and sending them to each other. No luck.

Any help is appreciated. Here is the working version of the file in the left speaker changing the file position of the right speaker.

I stopped using max msp years ago but strangely this is something that is done easier in max…first thing I have encountered.,),)



var sig, amp, gate, trig,sig2;


amp =, attackTime:0, releaseTime:0.0002,mul:2);

gate = amp > 0.13;

trig =,0.001).poll;

sig2 =,~br3,*1,trig[0],,~br3.numFrames,trig[0]),1);




The second buffer’s trigger depends on the first buffer player, and the first buffer’s trigger depends on the second buffer player.

That means: in the signal domain, you need feedback. See LocalIn / LocalOut. At the top of the SynthDef, you would read the signal supplying the trigger for the first player (using LocalIn); at the end, send that signal back using LocalOut.

Max can send control messages back to an earlier object arbitrarily but if you try to do feedback with signals, it will need special handling just as it does in SC. You might be assuming that signals in a SynthDef behave like Max control messages. They don’t. In a SynthDef, everything is like a ~ object in Max.

(Edit: Method calls in the language can be recursive, as control messages in Max can be. One difference between SC and Max is that Max signal objects can send control messages, while SC UGens can’t [not directly anyway]. If you’re taking a control domain trigger from a signal object and sending that back to the other player, that’s idiomatic in Max but in SC, it needs to be done entirely in the signal domain. That requires feedback.)


I got this working.
Let me know if you something worth improving or fixing!
var sig, amp, gate, trig,sig2,twoIn,amp2,gate2,trig2,a;;

amp2 =, attackTime:0, releaseTime:0.02,mul:2);
gate2 = amp2 > 0.2;
trig2 =,0.001);

amp =, attackTime:0, releaseTime:0.02,mul:2);
gate = amp > 0.4;
trig =,0.001);
sig2 =,~br3,*1,trig[0],,~br3.numFrames,trig[0]).poll(label:\buf_2),1);;