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

Re: [sc-users] SendTrig in 2 or more SynthDefs



hi,

sorry for the late reply...

thanks for the hint with switch :D
its really helpfull.

i also had a look into the t_trig argument form.
its a trap i allways run into :D

you mean just like this?

SynthDef(\loop,
    {
        arg buf,bus,start,t_stop,ingain; //<==like this
        var in,phase,record,respond;

        in = SoundIn.ar(bus)*ingain;

phase = Phasor.ar(start,BufRateScale.kr(buf),0,BufFrames.kr(buf),0);

        record = BufWr.ar(in,buf,phase);

        respond = SendTrig.kr(t_stop,100,phase); //<==like this

        0
    }
).add;

the strange thing was that it allways returned the correct position of "phase".
so it somehow worked. i just used the output of a button.


greetings+thxalot!

flo.




On 16.12.2014 23:19, Daniel Mayer wrote:
Am 16.12.2014 um 16:09 schrieb Huth Florian <flo.huth@xxxxxxxx>:

one question:

why is stop no trigger? when i set it to 1 with:

Synth(\rec,[\stop,1]); //or smth.

shouldnt that trigger the output of

SendTrig.kr(stop,1,1);

inside my synth?


Only once and only if it wasn't > 0 before - in general you need a trigger arg.
See SynthDef help, "UGen Graph Functions and Special Argument Forms"

BTW in your OSCFunc you can use a switch statement:

...
switch(msg.at(2),
	1, { ... },
	2, { ... },
	3, { ... }
	...
)
...


Greetings

Daniel

-----------------------------
www.daniel-mayer.at
-----------------------------

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/