|
FreeJ scripting | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--Controller
|
+--OscController
The OscController holds a list of defined methods scripted to
execute actions when they are called from a OSC client across the
network.
osc = new OscController(9696); // open an OSC listener on port 9696
// create a /my_new_method call on OSC, taking one integer as argument, that
// will call the remote_called_function() defined in javascript:
osc.add_method("my_new_method","i","remote_called_function");
// define the function that will be called
function remote_called_function(i) {
echo("OSC remote call to my test function")
}
// starts the osc listener thread
osc.start();
// to stop it during execution use osc.stop();
// and don't forget to register the controller
register_controller(osc);
| Constructor Summary | |
OscController()
The OscController constructor creates a scriptable network listener for OSC protocol commands |
|
| Method Summary | |
Object
|
add_method(<string> osc_method, <string> prototype, <string> js_method)
Add a method that will be called from OSC |
| Methods inherited from class Controller |
activate, get_name
|
| Constructor Detail |
OscController()
| Method Detail |
Object add_method(<string> osc_method, <string> prototype, <string> js_method)
osc_method - The name of the OSC method to be served
prototype - A string listing the arguments accepted: i=int, f=float, s=string
js_method - The javascript function that will be called and passed the arguments
|
FreeJ scripting | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
FreeJ scripting documentation is Copyleft (C) 2000 - 2007 dyne.org foundation. Verbatim copying and distribution of this entire page is permitted in any medium, provided this notice is preserved.