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

[sc-users] SendTrig in 2 or more SynthDefs



Hi,

first:
im not too much into OSC communication from server to language.

problems start if i want to have 2 or more synths
with their own SendTrig and OSCFunc...
maybe this is the cause of a general misunderstanding of OSC and
server to language communications ...(lala)

if anyone has experience with the issue..please help :D

flo.

//synth-side:

//SynthDef(\loop,
    {
        arg buf,bus,start,stop,ingain;
        var in,phase,record,respond;

        in = SoundIn.ar(bus)*ingain;

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

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

respond = SendTrig.kr(stop,100,phase); //<==like this...thought ID would help

        0
    }
).add;


//lang-side:


~loopResponder = OSCFunc({ arg msg, time;

    if(msg.at(2)==100,                    //again ID

        {~loopFrames=msg.at(3);},
        {nil;});


    ~loopFrames.postln;

    },'/tr', s.addr);

//(if-statement should be replaced with while or smth. :D)


worked at last for me...






_______________________________________________
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/