Pico.js: a JavaScript library for real-time audio processing

2013/01/02 00:19  Category: Web Dev  Tags: , ,

2012-12-15 16 34 01

What is Pico.js?

Pico.js is a JavaScript library for real-time audio processing that runs a browser and node.js.

USAGE

Tutorial
  1. Make an object implemented a function process(L, R)

    Arguments L and R are instanceof Float32Array

  2. Start processing: pico.play(gen);

    Write signal into L and R in gen.process(L, R)

  3. Stop processing: pico.pause();

    The silence come

Others features

  1. Change the samplerate

    pico.setup({samplerate:24000})

    You can choose some one [8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000]

  2. via Flash Player (Optional)

    Load a script

    <script src="libs/PicoFlashPlayer.js"></script>

    and

    pico.bind(pico.FlashPlayer,{src:"libs/PicoFlashPlayer.swf"})

     

  3. node.js support

    You can install with npm.

    $ npm install node-pico

    See: repository demo/node-demo.js

Download Pico.js (minified)

Pico.js source code on Github

× -