On Wed, May 18, 2005 at 11:29:47AM +0200, Mario Lang wrote: > I will try to illustrate, but I dont use SCUM, so its untested, > but I am pretty sure you'll get the idea: > > SynthDef("onetwoonetwo",{ arg out=0, freq=440; > Out.ar(out, > SinOsc.ar(freq, 0, 0.5) > ) > }).send(s); > > n=Synth(\onetwoonetwo); > > w = SCUMWindow.new; > w.title = "Slider example"; > w.initialSize = Size(20, 300); > c = SCUMVBox( w ); > v = SCUMSlider(c, { |v| > v.expand = 1; > v.fill = 1; > v.bgColor = Color.white; > v.fgColor = Color.black; > v.action = { > n.set(\freq, (v.value * 100)+400); > }; > v.doAction; > }); > w.show;
AFAICS (don't have SC here in the office) this should work. In this example Mario uses n.set() where n is the client side representation of the server node that holds the SynthDef. There is also a more general mechanism to send OSC commands to the server - IIRC it's s.sendMesg() or some such. You can use this to set parameters on a single node or on an entire group. Yet another way is to write the synths so they use control busses instead of parameters, and then send messages to set the control bus values. This can be used even for 'anonynmous' synths that are created, do their thing and disappear, i.e. for grains. -- FA