[sc-users] NodeProxy docu

Julian Rohrhuber rohrhuber at uni-hamburg.de
Sun Mar 4 20:38:19 PST 2007


>hi (julian),
>
>is there a document somewhere describing in plain words how to make 
>a custom SC class be useable as a source for NodeProxy? i know i 
>should be providing methods like playToBundle etc., but i wish there 
>was some help file regarding all the implications and so on ...

not yet.

I can only give you some quick steps.

(1) Does your class respond like a class that is already supported?
	is it like
	- a stream (i.e. client side)
	- something that creates a ugen graph (i.e. server side)
	- both..

(2) Maybe you can use one of the control classes that exist.
	then you only have to implement:

	proxyControlClass { ^some subclass of AbstractPlayControl }

	implement :

	prepareForProxySynthDef { arg proxy; ... }

	if it creates a ugen graph, return something that
	is a synth def function.
	also here, you can initialise the proxy (for automatic numChannels
	and rate detection)

	if it is a stream like thing, return something that behaves
	like a PauseStream

(3) If the above don't work, because it is some new combination,
	you can implement your own subclass of AbstractPlayControl
	that you return on proxyControlClass, and that implement at least:

	playToBundle { arg bundle, args;
		// start synths and tasks here.
		return either nil or a nodeID that can be used to set
		arguments on the server.
	}

	stopToBundle { arg bundle;
		// stop tasks and synths here
	}

	freeToBundle {
		// free resources here
	}

	loadToBundle { arg bundle, server;
		// load resources here
	}

	Have a look at MixedBundle, this is where it is described how to
	pack different kind of actions and osc messages
	in the bundle that is evaluated later.

	onSend(func) // starts e.g. streams
	add(msg)	// add to the bundle
	addPrepare(msg)	// add a resource to the bundle (e.g. a synth def)



hope that helps
-- 





.


More information about the sc-users mailing list