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

Re: [sc-users] Re: Ryoji Ikeda glitches



When you use the play{} syntax, it actually creates a temporary synthdef, even if you don't explicitly tell sclang to do so. A good rule of thumb to go by is that if you're using .ar or .kr, you're writing code for the server and need to treat it as such. The biggest sticking point for me in learning Supercollider was learning the difference between sclang and the server; there are a few tutorials, and once you grok those, you'll be well on yr way to where you want to be. In the meantime, using the select.kr is exactly what you want to do :)

On Dec 26, 2015 12:06, "chanof" <chanof@xxxxxxxxxxx> wrote:
Actually i'm not in a synthdef, this is my case, do you think i need select
or is possible something like this?
The two sin are not one per time, like i want, it don't work, when
envTrig[2] is playing envTrig[1] should be mute..

(play{
        var env, osc, env2, osc2;
        var trig = Impulse.ar(8);
        var trig2 = Impulse.ar(0.5);
        var vincr =Dseq((31) ,inf)!4;
        var v = Demand.ar(trig2, 0, vincr);
        var envTrig = BinaryDigits.ar(trig, v, 5);
        if(envTrig[2]==1){envTrig[1]=0}{envTrig[1]=envTrig[1]};
        if(envTrig[2]==1){envTrig[0]=0}{envTrig[0]=envTrig[0]};

env =  EnvGen.ar(Env.perc(0, 0.125),envTrig[2]* trig);
        osc = SinOsc.ar(380)*env;

env2 =  EnvGen.ar(Env.perc(0, 0.125),envTrig[1]* trig);
        osc2 = SinOsc.ar(440)*env2;
osc+osc2
})

Thanks
Gianmaria




--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Ryoji-Ikeda-glitches-tp3419427p7622324.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/