Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 27 lines (18 sloc) 0.745 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
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

To adjust the offset of a channel, send a POST:

    $ curl -X POST -d offset=120 http://localhost:5000/3
Something went wrong with that request. Please try again.