csounddart 0.0.1
csounddart: ^0.0.1 copied to clipboard
Dart interface to Csound API for Web and Desktop.
csounddart #
An Dart interface to Csound API. It is currently under development. It has been tested on Linux and Web, but should work easily on Windows and MacOS (with a few path resolution work).
On desktop, it assumes Csound is already installed on your computer.
Getting Started #
Csound _cs = Csound();
_cs.compileCsdText(_myCsdText);
// threaded performance
_cs.perform();
// set a channel value
_cs.setControlChannel("channelName", (double)value);
// set a callback
_cs.setControlChannelCallback("channelName",
(double v) {
// do something with callback
});
## Reference
Csound()
: ConstructorcompileCsdText(String text)
: compile a CSD stringsetControlChannel(String name, double value)
: sets a control channel value at k-rateperform()
: starts threaded performance in a separate isolatesetControlChannelCallback(String name, Function(double) callback)
: sets a callback to be called at k-rate for specified channel.
Platform specific : #
setAudioChannelCallback(String name, Function(ConcurrentBuffer buffer) callback
: only works for desktop. Same as control channel callback with audio buffers.evalCode(String value)
: only for desktop. Evaluates a string of Csound code and returns the value at the end of global space if succeeds.