audio
v1.2.0
Published
Digital audio in JavaScript.
Downloads
275
Readme
Audio
Audio in JavaScript.
An object that enables you to store, read, and write PCM audio data more easily. You can use algorithmic functions for any type of audio manipulation, such as compression or conversion to and from different audio formats. This object works as the building block for audio in JavaScript, and Audio.js is a suite of common audio utilities based on top of it.
var test = new Audio({
sample: [34, 334, -23, 0, ...pulses], // Pulse data or buffer
sampleRate: 44100, // Sample rate
bitDepth: 16, // Bit depth
length: 44100 * 10, // 10s length
byteOrder: 'LE', // Either BE or LE
// ...
});
See more options and usage in the documentation.
Usage
$ npm install --save audio
For use in the browser use Browserify.
See the "docs" folder for more information on using Audio
.
Also See
- Audio.js: A suite of utilities based around this object.
- node-speaker: Write PCM data to the speakers in Node.js.
Credits
| | |:---:| | Jamen Marzonie |
License
MIT © Jamen Marzonie