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

[sc-users] Volume in synths



Hi, I am creating a patch at the minute and i want to control the volume of a
fileplayer using a slider. this is my synth def:


SynthDef("fileplayer", { arg rate=1, mono, vol=0, buffer, pan, loop;
var file, files, filem;
files = PlayBuf.ar(2, buffer, rate, loop:1);
filem = Pan2.ar(PlayBuf.ar(1, buffer, rate, loop:1), pan);
files = Balance2.ar(files[0], files[1], pan:0);
file = Select.ar(mono, [files, filem]);
Out.ar(0, file);
}).writeDefFile;

What do i need to do so that i can control the volume using a slider?

Also, is there any way of giving a slider a default value?
--
View this message in context: http://www.nabble.com/Volume-in-synths-t1630544.html#a4416897
Sent from the Supercollider - User forum at Nabble.com.