cylon-audio

Cylon module for Audio

Cylon.js For Audio

Cylon.js (http://cylonjs.com) is a JavaScript framework for robotics and physical computing using Node.js

This repository contains the Cylon adaptor for Audio reproduction capabilities.

For more information about Cylon, check out the repo at https://github.com/hybridgroup/cylon

Install the module with:

$ npm install cylon cylon-audio

Using the cylon-audio module is pretty easy, pretty much just install the npm module and you are good to go, use it as you would any other device passing along the audio you wish to reproduce. To play audio, pass a full or relative path to the play function. See the example below for further details.

var Cylon = require('cylon');
 
Cylon.robot({
  connections: {
    audio: { adaptor: 'audio' }
  },
 
  devices: {
    audio: { driver: 'audio' }
  },
 
  workfunction(my) {
    my.audio.on('playing', function(song){
      console.log('Playing this nice tune: "' + song + '"');
    });
 
    // You can pass a string with a full or relative path here, 
    my.audio.play('./audio_samples/audio-sample.mp3');
  }
}).start();

We're busy adding documentation to our web site at http://cylonjs.com/ please check there as we continue to work on Cylon.js

Thank you!

For our contribution guidelines, please go to https://github.com/hybridgroup/cylon/blob/master/CONTRIBUTING.md.

For the release history, please go to https://github.com/hybridgroup/cylon-audio/blob/master/RELEASES.md.

Copyright (c) 2014 The Hybrid Group. Licensed under the Apache 2.0 license.