Accueil › Forums › Créer avec IanniX › supercollider help › Re: supercollider help
@Guest wrote:
Hey thanks dick for everything but i still got some problems
when i change my sawbass arg note to freq to have iannix’s triggerIndex control it’s pitch it just clips and crashes…
hmm don’t get much on how Iannix messages works and the one you wrote either
or perhaps it is just some stupid mistalkes i’ve made
it will be great if i could get some explanations for newbies like me!: )
thanks a lot ; )
(
SynthDef(
« sawbass »,
{
|note = 35, amp=1.2, cutoff=350, decay=1|
var env, audio;
env = EnvGen.kr(Env.new([0,1,0],[0.001,2],[3,-50]),doneAction:2);
audio = RLPF.ar(Saw.ar(note.midicps,amp),cutoff)*env;
audio = CombC.ar(audio,1,0.125,decay);
Out.ar([0,1],audio);
}
).send(s);
)
(
g = OSCresponderNode(nil, ‘/trigger’,
{ |time, responder, msg|
var pitch, octave, triggerIndex = msg[1];
var scale = [ 28, 29, 31, 33, 35, 36, 38 ].midicps;
var note = [ triggerIndex % 7 ];
octave = (triggerIndex / 7).floor;
Synth(« sawbass »/*, [ freq, note*(2**octave), amp, 1.5]*/);
}
).add(s);
)
NetAddr.langPort
well…
I tried your program out, found it made a few low grumbly noises and then quit on a memory allocation fail.
I’m probably not the guy to diagnose your SC troubles, just a beginner myself. A glance at your code above suggests you might be generating a lot of Synths that aren’t being removed fast enough. That would cause the memory fault. The pitch selection logic seems a bit odd. I tried your code with the sawbass decay a bit shorter, and pitch selection tweaked as follows, and it worked for me:
(
SynthDef(
« sawbass »,
{
|note = 35, amp=1.2, cutoff=350, decay=1|
var env, audio;
env = EnvGen.kr(Env.new([0,1,0],[0.001,0.4],[3,-5]),doneAction:2);
audio = RLPF.ar(Saw.ar(note.midicps,amp),cutoff)*env;
audio = CombC.ar(audio,1,0.125,decay);
Out.ar([0,1],audio);
}
).send(s);
)
(
g = OSCresponderNode(nil, ‘/trigger’,
{ |time, responder, msg|
var pitch, triggerIndex = msg[1];
var scale = [ 40, 41, 43, 45, 47, 48, 50 ];
var note = scale[ triggerIndex % 7 ];
Synth(« sawbass », [ note, note, amp, 1.5] );
}
).add(s);
)
© IanniX Association
Qu'est-ce que IanniX ? | Téléchargement | Showcase | Forum | Recherche | À propos
Cookie | Durée | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |