{"_id":"audiobuffer","_rev":"10-1af2d55028eaa985dc9db6c9f7ca119e","name":"audiobuffer","description":"An implementation of Web Audio API's AudioBuffer for node.js and the browser.","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"audiobuffer","version":"0.1.0","author":{"name":"Sébastien Piquemal","email":"sebpiq@gmail.com"},"description":"An implementation of Web Audio API's AudioBuffer for node.js and the browser.","repository":{"type":"git","url":"https://github.com/sebpiq/AudioBuffer.git"},"keywords":["audio","sound","music","web audio","web audio api","dsp"],"dependencies":{"underscore":"1.4.x"},"analyze":false,"devDependencies":{"mocha":"1.12.x"},"license":"MIT","engines":{"node":">=0.10"},"readme":"AudioBuffer\n=============\n\nAn implementation of [Web Audio API's AudioBuffer](https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBuffer) for node.js.\n\n\nGetting started \n=================\n\nInstall `AudioBuffer` with `npm` :\n\n```\nnpm install AudioBuffer\n```\n\nThen import it in your code, and do your stuff :\n\n```javascript\nvar AudioBuffer = require('AudioBuffer')\nvar audioBuffer = new AudioBuffer(1, 100000, 44100)\n```\n\n\nAPI\n=====\n\n###AudioBuffer(numberOfChannels, length, sampleRate)\n\nCreates an empty `AudioBuffer` with `numberOfChannels` channels and `length` frames.\n\n\n####getChannelData(channel)\n\nReturns a `channel`.\n\n\n####slice(start, end)\n\nReturns a slice of the calling `AudioBuffer`.\nThe arguments have the same meaning as a standard `Array.slice`.\nThe slice happens in the length, therefore the returned buffer has the same number of channels and the same sample rate as the calling `AudioBuffer`.\n\n\n####concat(audioBuffer)\n\nReturns a new `AudioBuffer`, result of the concatenation of the calling instance with `audioBuffer`.\n`audioBuffer` must have the same number of channels and the same sample rate as the calling instance, or an error will be thrown.\nThis method behaves similarly to `Array.concat`.\nThe concatenation happens in the length, therefore the returned buffer has the same number of channels and the same sample rate than the calling `AudioBuffer`.\n\n\n###Class methods\n\n####filledWithVal(val, numberOfChannels, length, sampleRate)\n\nReturns an `AudioBuffer`, each sample filled with `val`.\n\n\n####fromArray(array, sampleRate)\n\nReturns an `AudioBuffer`, with data taken from `array`. Example :\n\n```javascript\n// Creates a stereo AudioBuffer of length 5 and sample rate 22050.\nvar audioBuffer = AudioBuffer.fromArray([\n  [1, 0.5, 0.2, 1, 0.5],\n  [-1, -0.8, -0.7, -0.6, 0.3],\n], 22050)\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/sebpiq/AudioBuffer/issues"},"_id":"audiobuffer@0.1.0","dist":{"shasum":"d729b8080028296093e99537d30575b10514b7b5","tarball":"https://registry.npmjs.org/audiobuffer/-/audiobuffer-0.1.0.tgz","integrity":"sha512-6Cvv7uUwRt6NnwlGj7UVVwKwv3C8KY13SnKcvfN9BV4JiyPGvXNi2WjU8gW6NjzwniJSs+javOqnQ4yuiGtvXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFxTSzEM587ukkkNiQPx1Y4DcIm1w21x0O8EME6Fzj6gAiEAzaGGsnuFO++Hyi5Ck0CypVimnmH+KQqImKbCWUX4Ggs="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"sebpiq","email":"sebpiq@gmail.com"},"maintainers":[{"name":"sebpiq","email":"sebpiq@gmail.com"}]},"0.2.0":{"name":"audiobuffer","version":"0.2.0","author":{"name":"Sébastien Piquemal","email":"sebpiq@gmail.com"},"description":"An implementation of Web Audio API's AudioBuffer for node.js and the browser.","repository":{"type":"git","url":"https://github.com/sebpiq/AudioBuffer.git"},"keywords":["audio","sound","music","web audio","web audio api","dsp"],"dependencies":{"underscore":"1.4.x"},"analyze":false,"devDependencies":{"mocha":"1.12.x"},"license":"MIT","engines":{"node":">=0.10"},"readme":"AudioBuffer\n=============\n\nAn implementation of [Web Audio API's AudioBuffer](https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBuffer) for node.js.\nWith extra-sugar for slicing, concatenating, creating, ... audiobuffers.\n\nGetting started \n=================\n\nInstall `AudioBuffer` with `npm` :\n\n```\nnpm install audiobuffer\n```\n\nThen import it in your code, and do your stuff :\n\n```javascript\nvar AudioBuffer = require('audiobuffer')\nvar audioBuffer = new AudioBuffer(1, 100000, 44100)\n```\n\n\nAPI\n=====\n\n###AudioBuffer(numberOfChannels, length, sampleRate)\n\nCreates an empty `AudioBuffer` with `numberOfChannels` channels and `length` frames.\n\n\n####getChannelData(channel)\n\nReturns a `channel`.\n\n\n####slice(start, end)\n\nReturns a slice of the calling `AudioBuffer`.\nThe arguments have the same meaning as a standard `Array.slice`.\nThe slice happens in the length, therefore the returned buffer has the same number of channels and the same sample rate as the calling `AudioBuffer`.\n\n\n####concat(audioBuffer)\n\nReturns a new `AudioBuffer`, result of the concatenation of the calling instance with `audioBuffer`.\n`audioBuffer` must have the same number of channels and the same sample rate as the calling instance, or an error will be thrown.\nThis method behaves similarly to `Array.concat`.\nThe concatenation happens in the length, therefore the returned buffer has the same number of channels and the same sample rate than the calling `AudioBuffer`.\n\n\n####set(audioBuffer, offset)\n\nSets the calling audio buffer channels with the values from `audioBuffer`, starting at `offset`\n\n\n###Class methods\n\n####filledWithVal(val, numberOfChannels, length, sampleRate)\n\nReturns an `AudioBuffer`, each sample filled with `val`.\n\n\n####fromArray(array, sampleRate)\n\nReturns an `AudioBuffer`, with data taken from `array`. Example :\n\n```javascript\n// Creates a stereo AudioBuffer of length 5 and sample rate 22050.\nvar audioBuffer = AudioBuffer.fromArray([\n  [1, 0.5, 0.2, 1, 0.5],\n  [-1, -0.8, -0.7, -0.6, 0.3],\n], 22050)\n```\n\n\nChangelog\n===========\n\n0.2.0\n\n- AudioBuffer.set\n\n0.1.0\n\n- first release\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/sebpiq/AudioBuffer/issues"},"_id":"audiobuffer@0.2.0","dist":{"shasum":"7cf2df30701aac184333eaf9e8ee3b01830c861a","tarball":"https://registry.npmjs.org/audiobuffer/-/audiobuffer-0.2.0.tgz","integrity":"sha512-wEZ3iAOK1yNCy1PNcSe2V1pzzCV5rezYg0r/TRwojZBIVupQF56ioI0x5PGgatmWxJ4t8sWXymg8AFfopPXfrg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfIvVms0OMb3TpD6jMVF//2wQwX5gx7mgWZJO9xzjd3wIhAMZE8z2yGce6A/RMEDkE/X7uqDpQozbFtojejvziw+23"}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"sebpiq","email":"sebpiq@gmail.com"},"maintainers":[{"name":"sebpiq","email":"sebpiq@gmail.com"}]}},"readme":"AudioBuffer\n=============\n\nAn implementation of [Web Audio API's AudioBuffer](https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBuffer) for node.js.\n\n\nGetting started \n=================\n\nInstall `AudioBuffer` with `npm` :\n\n```\nnpm install AudioBuffer\n```\n\nThen import it in your code, and do your stuff :\n\n```javascript\nvar AudioBuffer = require('AudioBuffer')\nvar audioBuffer = new AudioBuffer(1, 100000, 44100)\n```\n\n\nAPI\n=====\n\n###AudioBuffer(numberOfChannels, length, sampleRate)\n\nCreates an empty `AudioBuffer` with `numberOfChannels` channels and `length` frames.\n\n\n####getChannelData(channel)\n\nReturns a `channel`.\n\n\n####slice(start, end)\n\nReturns a slice of the calling `AudioBuffer`.\nThe arguments have the same meaning as a standard `Array.slice`.\nThe slice happens in the length, therefore the returned buffer has the same number of channels and the same sample rate as the calling `AudioBuffer`.\n\n\n####concat(audioBuffer)\n\nReturns a new `AudioBuffer`, result of the concatenation of the calling instance with `audioBuffer`.\n`audioBuffer` must have the same number of channels and the same sample rate as the calling instance, or an error will be thrown.\nThis method behaves similarly to `Array.concat`.\nThe concatenation happens in the length, therefore the returned buffer has the same number of channels and the same sample rate than the calling `AudioBuffer`.\n\n\n###Class methods\n\n####filledWithVal(val, numberOfChannels, length, sampleRate)\n\nReturns an `AudioBuffer`, each sample filled with `val`.\n\n\n####fromArray(array, sampleRate)\n\nReturns an `AudioBuffer`, with data taken from `array`. Example :\n\n```javascript\n// Creates a stereo AudioBuffer of length 5 and sample rate 22050.\nvar audioBuffer = AudioBuffer.fromArray([\n  [1, 0.5, 0.2, 1, 0.5],\n  [-1, -0.8, -0.7, -0.6, 0.3],\n], 22050)\n```\n","maintainers":[{"name":"sebpiq","email":"sebpiq@gmail.com"}],"time":{"modified":"2022-06-13T03:43:56.618Z","created":"2013-07-18T12:27:10.327Z","0.1.0":"2013-07-18T12:27:14.202Z","0.2.0":"2013-07-31T13:36:21.867Z"},"author":{"name":"Sébastien Piquemal","email":"sebpiq@gmail.com"},"repository":{"type":"git","url":"https://github.com/sebpiq/AudioBuffer.git"},"users":{"rchk":true,"hq":true,"juangotama":true}}