Skip to content

Instantly share code, notes, and snippets.

@crucialfelix
Created January 6, 2016 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crucialfelix/41f4fe4d9e144c1bf56c to your computer and use it in GitHub Desktop.
Save crucialfelix/41f4fe4d9e144c1bf56c to your computer and use it in GitHub Desktop.
// sc.msg.status() returns this object:
// {
// call: [‘/status’],
// response: [‘/status.reply’]
// }
sc.server.boot().then(function(server) {
// initiate a call and response using that object:
server.callAndResponse(sc.msg.status())
.then(function(reply) { // returns a Promise
console.log(reply);
/*
[ 1,
0,
0,
1,
14,
0.7234667539596558,
4.205343723297119,
48000,
47999.99999683723 ]
*/
});
server.callAndResponse(sc.msg.defLoad(‘/path/to/aSynthDef.synthdef’))
.then(function() {
console.log(‘synthdef loaded’);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment