Created
January 6, 2016 13:57
-
-
Save crucialfelix/41f4fe4d9e144c1bf56c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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