Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 4059f9e162
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (16 sloc) 0.638 kB
Upload a javascript snippet to a track with PUT:
$ curl -sST example/baseline.js http://localhost:5000/3
created audio channel 3
Read the source for a track with a GET:
$ curl http://localhost:5000/3
function (t, i) {
var f = 800 * Math.pow(2, Math.floor(t * 4 % 4) / 6);
return Math.sin(t * f * Math.PI)
* Math.pow(Math.sin(t * 8 * Math.PI), 2)
;
}
To reset a track back to `return 0`, send a DELETE:
$ curl -X DELETE http://localhost:5000/3
deleted channel 3
To adjust the volume of a channel, send a POST:
$ curl -X POST -d volume=0.5 http://localhost:5000/3
Jump to Line
Something went wrong with that request. Please try again.