SCPlug
NPAPI based browser plugin.
The idea is to control scsynth (internal server) via javascript or even a language compiling to javascript, such as ocaml. existing and emerging web technologies may provide interesting applications for lightweight algorithmic sound generation.
We’re currently working on a port to the cross-platform Qt browser plugin API.
Issues
- callbacks currently the JS interpreter is not thread safe, incoming OSC packets must be polled from a timer
- security ugens accessing the system (disk) should be disabled in a browser plugin
- urls
/b_allocRead,/b_readand/d_loadcould be changed to load from urls instead of the disk (use NPAPI) - packaging
- plugins and other resources should be private to the browser plugin
- cross platform/browser installer anyone?
Scripting interface
- params
numBuffers: 1024maxNodes: 1024maxGraphDefs: 1024maxWireBufs: 64numAudioBusChannels: 128numControlBusChannels: 4096numInputBusChannels: 8numOutputBusChannels: 8bufLength: 64realTimeMemorySize: 8192numSharedControls: 0preferredSampleRate: 0preferredHardwareBufferFrameSize: 0numRGens: 64loadGraphDefs: true | falsedumpOSC: 0 | 1 | 2 | 3
- attributes
length: get number of shared controls
- methods
sendMsg(command ... args):null: send OSC messagesendBundle(timetag ... messages):null: send OSC bundlenextMsg():null | Array: get next response from servertime():Number: get current OSC time[](index):null | Number: get shared control[]=(index, value):null: set shared control
Documentation
- NPAPI
- prototype javascript library
- prototype tutorial
- jQuery javascript library
Source code
Links to other engines
- Jsyn by phil burk
- Pure Data plugin by mtg/barcelona
- contact me if you know more