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

[sc-users] Crossfade between buffers in Audio-visuals



Hi All,

I'm a novice supercollider user currently working on an audio-visual prototype. I established an OSC connection between processing and supercollider in which I assigned a number of images to an array of specified audio buffers. The images are triggered by keyboard. The only problem is, I'm having a hard time to manage the duration of the buffers triggered by the subtle image changes (when the assigned image changes, so should the related buffer fade out) and sounds jumble into each other. I tried using Ndef outside the OSC but that did not work either. I'd appreciate very much if any of you could give me an idea, a relatively easy idea for a beginner supercollider user.
Thanks in advance,
Best.

Asli


Here's a part from my OSCdef:

(
OSCdef(\keyPressedListener, {|msg|
msg.postln;
if(msg[1] == 'kitchen'){
Synth.new(\playbuf_test, [\buf, d.buf0, \rate, -1.midiratio, \amp, 0.8]);

};
if(msg[1] == 'island'){ //make symbol ' '  not string ""
Synth.new(\playbuf_test, [\buf, d.buf1, \rate, -1.midiratio, \amp, 0.4]);
};
if(msg[1] == 'aurora'){
Synth.new(\playbuf_test, [\buf, d.buf2, \rate, -1.midiratio, \amp, 1]);
};
if(msg[1] == 'night_sky'){
Ndef(\playbuf_test).fadeTime = 2;
Synth.new(\playbuf_test, [\buf, d.buf7, \rate, -2.midiratio, \amp, 1]);

};

if(msg[1] == 'stars'){
Synth.new(\playbuf_test, [\buf, d.buf8, \amp, 0.4]);
};
if(msg[1] == 'volcano+kitchen'){
Synth.new(\playbuf_test, [\buf, d.buf9, \rate, -2.midiratio, \amp, 1]);
}
}, 'keyPressed'))

Ndef(\playbuf_test).fadeTime = 2;