Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Dzialocha committed Nov 10, 2017
1 parent 43d381f commit ffa141c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@
<a href="http://spdx.org/licenses/MIT">
<img src="https://img.shields.io/npm/l/osc-js.svg?style=flat-square">
</a>
<a href="https://doc.esdoc.org/github.com/adzialocha/osc-js/">
<img src="https://doc.esdoc.org/github.com/adzialocha/osc-js/badge.svg">
<a href="https://adzialocha.github.io/osc-js/">
<img src="https://adzialocha.github.io/osc-js/badge.svg">
</a>
</p>

<p></p>
<p>osc-js is an <a href="http://opensoundcontrol.org/">Open Sound Control</a> library for all your JavaScript applications (UMD module for Node, Browser etc.) with address pattern matching and timetag handling. Sends messages via <em>UDP</em>, <em>WebSocket</em> or both (bridge mode) and offers a highly customizable Plugin API for your own network solutions.</p>
<p><a href="https://github.com/adzialocha/osc-js/wiki">Wiki</a> | <a href="https://github.com/adzialocha/osc-js/wiki/Basic-Usage">Basic Usage</a> | <a href="https://doc.esdoc.org/github.com/adzialocha/osc-js/">ESDoc Documentation</a> | <a href="https://github.com/adzialocha/osc-js/wiki/Plugin-API">Plugin API</a></p>
<p><a href="https://github.com/adzialocha/osc-js/wiki">Wiki</a> | <a href="https://github.com/adzialocha/osc-js/wiki/Basic-Usage">Basic Usage</a> | <a href="https://adzialocha.github.io/osc-js/">ESDoc Documentation</a> | <a href="https://github.com/adzialocha/osc-js/wiki/Plugin-API">Plugin API</a></p>
<h2 id="features">Features</h2><ul>
<li>UMD Module running in Node.js, Electron, Chrome Apps, your browser or any other JS environment</li>
<li>can be used with Webpack and Browserify</li>
Expand Down Expand Up @@ -204,7 +204,7 @@ <h2 id="development">Development</h2><p>osc-js uses <a href="http://babeljs.io">
</code></pre><h3 id="testing">Testing</h3><p><code>npm run test</code> for running the test suites.
<code>npm run test:watch</code> for running specs during development. Check your style guide violations with <code>npm run lint</code>.</p>
<h3 id="deployment">Deployment</h3><p><code>npm run build</code> for creating a UMD module in <code>lib</code> folder and a browser distribution in <code>dist</code> folder.</p>
<h3 id="esdocs">ESDocs</h3><p><code>npm run docs</code> for generating a <code>docs</code> folder with HTML files documenting the library. Read them online here: <a href="https://doc.esdoc.org/github.com/adzialocha/osc-js/">https://doc.esdoc.org/github.com/adzialocha/osc-js/</a></p>
<h3 id="esdocs">ESDocs</h3><p><code>npm run docs</code> for generating a <code>docs</code> folder with HTML files documenting the library. Read them online here: <a href="https://adzialocha.github.io/osc-js/">https://adzialocha.github.io/osc-js/</a></p>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion docs/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -5935,7 +5935,7 @@
},
{
"kind": "index",
"content": "osc-js\n======\n\n<p>\n <a href=\"https://travis-ci.org/adzialocha/osc-js\">\n <img src=\"https://img.shields.io/travis/adzialocha/osc-js/master.svg?style=flat-square\" alt=\"Build status\">\n </a>\n <a href=\"https://www.npmjs.org/package/osc-js\">\n <img src=\"https://img.shields.io/npm/v/osc-js.svg?style=flat-square\" alt=\"npm version\">\n </a>\n <a href=\"http://spdx.org/licenses/MIT\">\n <img src=\"https://img.shields.io/npm/l/osc-js.svg?style=flat-square\" alt=\"npm licence\">\n </a>\n <a href=\"https://doc.esdoc.org/github.com/adzialocha/osc-js/\">\n <img src=\"https://doc.esdoc.org/github.com/adzialocha/osc-js/badge.svg\" alt=\"ESDoc status\">\n </a>\n</p>\n\nosc-js is an [Open Sound Control](http://opensoundcontrol.org/) library for all your JavaScript applications (UMD module for Node, Browser etc.) with address pattern matching and timetag handling. Sends messages via *UDP*, *WebSocket* or both (bridge mode) and offers a highly customizable Plugin API for your own network solutions.\n\n[Wiki](https://github.com/adzialocha/osc-js/wiki) | [Basic Usage](https://github.com/adzialocha/osc-js/wiki/Basic-Usage) | [ESDoc Documentation](https://doc.esdoc.org/github.com/adzialocha/osc-js/) | [Plugin API](https://github.com/adzialocha/osc-js/wiki/Plugin-API)\n\n## Features\n\n- UMD Module running in Node.js, Electron, Chrome Apps, your browser or any other JS environment\n- can be used with Webpack and Browserify\n- no dependencies (except of `ws` in Node.js or similar environments)\n- simple interface\n- built-in *UDP*, *WebSocket* networking support as plugins\n- special bridge plugin for easy communication between *UDP*- and *WebSocket* clients\n- Plugin API for your own custom networking solutions\n- featuring all [OSC 1.0 specifications](http://opensoundcontrol.org/spec-1_0)\n- OSC Address pattern matching\n- time-critical OSC Bundles with Timetags\n- osc-js is written in ES6 :-)\n\n## Documentation\n\nRead more about osc-js and how to use it in the [Wiki](https://github.com/adzialocha/osc-js/wiki).\n\n## Example\n\n```js\nconst osc = new OSC()\n\nosc.on('/param/density', (message) => {\n console.log(message.args)\n})\n\nosc.on(['param', 'volume'], (message) => {\n console.log(message.args)\n})\n\nosc.on('open', () => {\n const message = new OSC.Message('/test', 12.221, 'hello')\n osc.send(message)\n\n const bundle = new OSC.Bundle(Date.now() + 5000)\n bundle.add(message)\n osc.send(bundle, { host: '192.168.178.5' })\n})\n\nosc.open({ port: 9000 })\n```\n\n## Installation and Usage\n\nRecommended installation via bower `bower install osc-js --save` or npm `npm install osc-js --save`.\n\nImport the library `const OSC = require('osc-js')` or add the script `dist/osc.js` or `dist/osc.min.js` (minified version) for usage in a browser.\n\nTo build the library with Webpack or similar tools without errors, use the `alias` configuration and point the module to `node_modules/osc-js/lib/osc.browser.js`. Read more about bundling issues here: [Webpack Bundling](https://github.com/adzialocha/osc-js/wiki/Webpack-bundling).\n\n## Plugins\n\nosc-js offers a plugin architecture for extending it's networking capabilities. The library comes already with four built-in plugins. This is propably all you will ever need for your OSC applications:\n\n- `WebsocketClientPlugin` (default)\n- `WebsocketServerPlugin`\n- `DatagramPlugin` for UDP network messaging\n- `BridgePlugin` useful Bridge between WebSocket- and UDP Clients\n\nConfiguration and examples of every plugin can be read here: [Wiki](https://github.com/adzialocha/osc-js/wiki).\n\n### Example: WebSocket Server\n\nRegister the plugin when creating the OSC instance:\n\n```js\nconst osc = new OSC({ plugin: new OSC.WebsocketServerPlugin() })\nosc.open() // listening on 'ws://localhost:8080'\n```\n\n### Example: OSC between MaxMSP/PD/SC etc. and your browser\n\n1. Write a simple webpage. The library will use a WebSocket client\nby default.\n\n ```html\n <button id=\"send\">Send Message</button>\n <script type=\"text/javascript\" src=\"dist/osc.min.js\"></script>\n <script type=\"text/javascript\">\n var osc = new OSC();\n osc.open(); // connect by default to ws://localhost:8080\n\n document.getElementById('send').addEventListener('click', function() {\n var message = new OSC.Message('/test/random', Math.random());\n osc.send(message);\n });\n </script>\n ```\n\n2. Write a Node app (the \"bridge\" between your UDP and WebSocket clients).\n\n ```js\n const OSC = require('osc-js')\n\n const config = { udpClient: { port: 9129 } }\n const osc = new OSC({ plugin: new OSC.BridgePlugin(config) })\n\n osc.open() // start a WebSocket server on port 8080\n ```\n\n3. Create your Max/MSP patch (or PD, or SuperCollider or whatever you need).\n\n ```\n [udpreceive 9129] // incoming '/test/random' messages with random number\n ```\n\n### Custom solutions with Plugin API\n\nIt is possible to write even more sophisticated solutions for your OSC application without loosing the simple osc-js interface (including it's nice message handling etc.). Read the [Plugin API documentation](https://github.com/adzialocha/osc-js/wiki/Plugin-API) for further information.\n\n```js\nclass MyCustomPlugin {\n // ... read docs for implementation details\n}\n\nconst osc = new OSC({ plugin: MyCustomPlugin() })\nosc.open()\n\nosc.on('/test', (message) => {\n // use event listener with your plugin\n})\n```\n\n### Usage without plugins\n\nThe library can also be used without the mentioned features in case you need to write and read binary OSC data. See this example below for using the [Low-Level API](https://github.com/adzialocha/osc-js/wiki/Low-Level-API) (even though the library already has a solution for handling UDP like in this example):\n\n```js\nconst dgram = require('dgram')\nconst OSC = require('osc-js')\n\nconst socket = dgram.createSocket('udp4')\n\n// send a messsage via udp\nconst message = new OSC.Message('/some/path', 21)\nconst binary = message.pack()\nsocket.send(new Buffer(binary), 0, binary.byteLength, 41234, 'localhost')\n\n// receive a message via UDP\nsocket.on('message', (data) => {\n const msg = new OSC.Message()\n msg.unpack(data)\n console.log(msg.args)\n})\n```\n\n## Development\n\nosc-js uses [Babel](http://babeljs.io) for ES6 support, [ESDoc](https://esdoc.org) for documentation, [Mocha](https://mochajs.org/) + [Chai](http://chaijs.com/) for testing and [Rollup](https://rollupjs.org) for generating the UMD module.\n\nClone the repository and install all dependencies:\n\n```\ngit clone git@github.com:adzialocha/osc-js.git\ncd osc-js\nnpm install\n```\n\n### Testing\n\n`npm run test` for running the test suites.\n`npm run test:watch` for running specs during development. Check your style guide violations with `npm run lint`.\n\n### Deployment\n\n`npm run build` for creating a UMD module in `lib` folder and a browser distribution in `dist` folder.\n\n### ESDocs\n\n`npm run docs` for generating a `docs` folder with HTML files documenting the library. Read them online here: [https://doc.esdoc.org/github.com/adzialocha/osc-js/](https://doc.esdoc.org/github.com/adzialocha/osc-js/)\n",
"content": "osc-js\n======\n\n<p>\n <a href=\"https://travis-ci.org/adzialocha/osc-js\">\n <img src=\"https://img.shields.io/travis/adzialocha/osc-js/master.svg?style=flat-square\" alt=\"Build status\">\n </a>\n <a href=\"https://www.npmjs.org/package/osc-js\">\n <img src=\"https://img.shields.io/npm/v/osc-js.svg?style=flat-square\" alt=\"npm version\">\n </a>\n <a href=\"http://spdx.org/licenses/MIT\">\n <img src=\"https://img.shields.io/npm/l/osc-js.svg?style=flat-square\" alt=\"npm licence\">\n </a>\n <a href=\"https://adzialocha.github.io/osc-js/\">\n <img src=\"https://adzialocha.github.io/osc-js/badge.svg\" alt=\"ESDoc status\">\n </a>\n</p>\n\nosc-js is an [Open Sound Control](http://opensoundcontrol.org/) library for all your JavaScript applications (UMD module for Node, Browser etc.) with address pattern matching and timetag handling. Sends messages via *UDP*, *WebSocket* or both (bridge mode) and offers a highly customizable Plugin API for your own network solutions.\n\n[Wiki](https://github.com/adzialocha/osc-js/wiki) | [Basic Usage](https://github.com/adzialocha/osc-js/wiki/Basic-Usage) | [ESDoc Documentation](https://adzialocha.github.io/osc-js/) | [Plugin API](https://github.com/adzialocha/osc-js/wiki/Plugin-API)\n\n## Features\n\n- UMD Module running in Node.js, Electron, Chrome Apps, your browser or any other JS environment\n- can be used with Webpack and Browserify\n- no dependencies (except of `ws` in Node.js or similar environments)\n- simple interface\n- built-in *UDP*, *WebSocket* networking support as plugins\n- special bridge plugin for easy communication between *UDP*- and *WebSocket* clients\n- Plugin API for your own custom networking solutions\n- featuring all [OSC 1.0 specifications](http://opensoundcontrol.org/spec-1_0)\n- OSC Address pattern matching\n- time-critical OSC Bundles with Timetags\n- osc-js is written in ES6 :-)\n\n## Documentation\n\nRead more about osc-js and how to use it in the [Wiki](https://github.com/adzialocha/osc-js/wiki).\n\n## Example\n\n```js\nconst osc = new OSC()\n\nosc.on('/param/density', (message) => {\n console.log(message.args)\n})\n\nosc.on(['param', 'volume'], (message) => {\n console.log(message.args)\n})\n\nosc.on('open', () => {\n const message = new OSC.Message('/test', 12.221, 'hello')\n osc.send(message)\n\n const bundle = new OSC.Bundle(Date.now() + 5000)\n bundle.add(message)\n osc.send(bundle, { host: '192.168.178.5' })\n})\n\nosc.open({ port: 9000 })\n```\n\n## Installation and Usage\n\nRecommended installation via bower `bower install osc-js --save` or npm `npm install osc-js --save`.\n\nImport the library `const OSC = require('osc-js')` or add the script `dist/osc.js` or `dist/osc.min.js` (minified version) for usage in a browser.\n\nTo build the library with Webpack or similar tools without errors, use the `alias` configuration and point the module to `node_modules/osc-js/lib/osc.browser.js`. Read more about bundling issues here: [Webpack Bundling](https://github.com/adzialocha/osc-js/wiki/Webpack-bundling).\n\n## Plugins\n\nosc-js offers a plugin architecture for extending it's networking capabilities. The library comes already with four built-in plugins. This is propably all you will ever need for your OSC applications:\n\n- `WebsocketClientPlugin` (default)\n- `WebsocketServerPlugin`\n- `DatagramPlugin` for UDP network messaging\n- `BridgePlugin` useful Bridge between WebSocket- and UDP Clients\n\nConfiguration and examples of every plugin can be read here: [Wiki](https://github.com/adzialocha/osc-js/wiki).\n\n### Example: WebSocket Server\n\nRegister the plugin when creating the OSC instance:\n\n```js\nconst osc = new OSC({ plugin: new OSC.WebsocketServerPlugin() })\nosc.open() // listening on 'ws://localhost:8080'\n```\n\n### Example: OSC between MaxMSP/PD/SC etc. and your browser\n\n1. Write a simple webpage. The library will use a WebSocket client\nby default.\n\n ```html\n <button id=\"send\">Send Message</button>\n <script type=\"text/javascript\" src=\"dist/osc.min.js\"></script>\n <script type=\"text/javascript\">\n var osc = new OSC();\n osc.open(); // connect by default to ws://localhost:8080\n\n document.getElementById('send').addEventListener('click', function() {\n var message = new OSC.Message('/test/random', Math.random());\n osc.send(message);\n });\n </script>\n ```\n\n2. Write a Node app (the \"bridge\" between your UDP and WebSocket clients).\n\n ```js\n const OSC = require('osc-js')\n\n const config = { udpClient: { port: 9129 } }\n const osc = new OSC({ plugin: new OSC.BridgePlugin(config) })\n\n osc.open() // start a WebSocket server on port 8080\n ```\n\n3. Create your Max/MSP patch (or PD, or SuperCollider or whatever you need).\n\n ```\n [udpreceive 9129] // incoming '/test/random' messages with random number\n ```\n\n### Custom solutions with Plugin API\n\nIt is possible to write even more sophisticated solutions for your OSC application without loosing the simple osc-js interface (including it's nice message handling etc.). Read the [Plugin API documentation](https://github.com/adzialocha/osc-js/wiki/Plugin-API) for further information.\n\n```js\nclass MyCustomPlugin {\n // ... read docs for implementation details\n}\n\nconst osc = new OSC({ plugin: MyCustomPlugin() })\nosc.open()\n\nosc.on('/test', (message) => {\n // use event listener with your plugin\n})\n```\n\n### Usage without plugins\n\nThe library can also be used without the mentioned features in case you need to write and read binary OSC data. See this example below for using the [Low-Level API](https://github.com/adzialocha/osc-js/wiki/Low-Level-API) (even though the library already has a solution for handling UDP like in this example):\n\n```js\nconst dgram = require('dgram')\nconst OSC = require('osc-js')\n\nconst socket = dgram.createSocket('udp4')\n\n// send a messsage via udp\nconst message = new OSC.Message('/some/path', 21)\nconst binary = message.pack()\nsocket.send(new Buffer(binary), 0, binary.byteLength, 41234, 'localhost')\n\n// receive a message via UDP\nsocket.on('message', (data) => {\n const msg = new OSC.Message()\n msg.unpack(data)\n console.log(msg.args)\n})\n```\n\n## Development\n\nosc-js uses [Babel](http://babeljs.io) for ES6 support, [ESDoc](https://esdoc.org) for documentation, [Mocha](https://mochajs.org/) + [Chai](http://chaijs.com/) for testing and [Rollup](https://rollupjs.org) for generating the UMD module.\n\nClone the repository and install all dependencies:\n\n```\ngit clone git@github.com:adzialocha/osc-js.git\ncd osc-js\nnpm install\n```\n\n### Testing\n\n`npm run test` for running the test suites.\n`npm run test:watch` for running specs during development. Check your style guide violations with `npm run lint`.\n\n### Deployment\n\n`npm run build` for creating a UMD module in `lib` folder and a browser distribution in `dist` folder.\n\n### ESDocs\n\n`npm run docs` for generating a `docs` folder with HTML files documenting the library. Read them online here: [https://adzialocha.github.io/osc-js/](https://adzialocha.github.io/osc-js/)\n",
"longname": "/Users/adz/dev/osc-js/README.md",
"name": "./README.md",
"static": true,
Expand Down

0 comments on commit ffa141c

Please sign in to comment.