Permalink
Browse files

doc updates for require(), 0.1.0

  • Loading branch information...
1 parent a992351 commit cc07d94699e058d9c6d51b4517d12cba7a95e461 @substack committed Sep 22, 2012
Showing with 25 additions and 1 deletion.
  1. +1 −1 package.json
  2. +24 −0 readme.markdown
View
@@ -1,6 +1,6 @@
{
"name" : "baudio-party",
- "version" : "0.0.7",
+ "version" : "0.1.0",
"description" : "javascript music party http server",
"bin" : {
"baudio-party" : "server.js"
View
@@ -79,6 +79,30 @@ To adjust the offset of a channel, send a POST:
$ curl -X POST -d offset=120 http://localhost:5000/3
```
+# scripts
+
+Your script should return a `function (t, i) {}` that itself returns an
+amplitude float from `-1` to `1`, inclusive. Values outside this range are
+clipped to the maximum and minimum values by baudio.
+
+## Buffer
+
+Your scripts can use a frozen version of the core node buffer library. This is
+useful for sampling base64-encoded tracks.
+
+## require()
+
+You can `require()` modules in the server `process.cwd()` or higher.
+
+## require('baudio')
+
+When you `require('baudio')` you get the server parameters instead of the baudio
+module. The server parameters are:
+
+* rate
+* size
+* channels
+
# usage
```

0 comments on commit cc07d94

Please sign in to comment.