Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    trolooppublic

    troloop

    An html5 Web Audio bufferSource Node, for testing purposes. The node will play a 17 second track converted from a base64 encoded wav file (included). You can connect it to any other web audio node, including webaudio nodes

    This module is for use with Browserify

    usage

    var audioContext = new webkitAudioContext();
    var troloop = require('troloop');
     
    audioSourceBuffer = troloop(context)
     
    audioSourceBuffer.start(0)

    or use it with webaudio

    var webaudio = require('webaudio');
    var audioContext = new webkitAudioContext();
    var troloop = require('./');
    var amod = require('amod');
    var audioSourceBuffer = troloop(audioContext)
     
    function wubwub(time, i, sample){
        return sample * amod(.5, .4, time, .5)
    }
     
    var wubNode = webaudio(audioContext, wubwub);
     
    audioSourceBuffer.connect(wubNode)
     
    wubNode.connect(audioContext.destination)
     
    audioSourceBuffer.start(0)

    Keywords

    none

    install

    npm i troloop

    Downloadsweekly downloads

    7

    version

    2.0.0

    license

    none

    last publish

    collaborators

    • avatar