GithubHelp home page GithubHelp logo

imclab / pico.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mohayonao/pico.js

1.0 1.0 0.0 214 KB

Simple interface for a real-time audio processing

Home Page: http://mohayonao.github.com/pico.js/

License: MIT License

pico.js's Introduction

pico.js

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

Reference and Demo

English | 日本語

Installation

browser

<script src="pico.js"></script>

node.js

$ npm install node-pico

Example

var pico = require("node-pico");

function sinetone(freq) {
    var phase = 0,
        phaseStep = freq / pico.samplerate;
    return {
        process: function(L, R) {
            for (var i = 0; i < L.length; i++) {
                L[i] = R[i] = Math.sin(6.28318 * phase) * 0.25;
                phase += phaseStep;
            }
        }
    };
}

pico.play(sinetone(880));

Change log

2013 02 13 - 0.0.8

  • Performance improvement
  • Fixed: a better? Float32Array (for IE9)

2013 01 15 - 0.0.7

  • Bugfix

2013 01 15 - 0.0.6

  • Fixed: stream size for WindowsXP (8192->4096)

2013 01 15 - 0.0.5

  • Fixed: stream size for WindowsXP/Linux (1024->8192)
  • Fixed: interval of processing for Firefox (using mozCurrentSampleOffset)

2012 12 11 - 0.0.4

  • Added fake Float32Array (for IE9)
  • Fixed: default samplerate (webkit=auto, moz,node.js=44.1KHz, flash=22.05KHz)

2012 12 08 - 0.0.3

  • Fixed issue #2, added support cross-platform node.js

2012 12 07 - 0.0.2

  • Fixed issue #1, the sound does not stop when switching browser tabs (Firefox)

2012 12 05 - 0.0.1

  • First release

pico.js's People

Contributors

mohayonao avatar

Stargazers

JT5D avatar

Watchers

JT5D avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.