Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mohayonao/web-audio-utils
Utility functions for Web Audio API
https://github.com/mohayonao/web-audio-utils
Last synced: 3 months ago
JSON representation
Utility functions for Web Audio API
- Host: GitHub
- URL: https://github.com/mohayonao/web-audio-utils
- Owner: mohayonao
- Created: 2015-08-28T07:52:18.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-10T04:12:53.000Z (about 9 years ago)
- Last Synced: 2024-07-05T17:37:22.540Z (4 months ago)
- Language: JavaScript
- Size: 254 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-webaudio - web-audio-utils - Commonly needed utility functions for Web Audio API. (Obsolete / Community)
README
# WEB AUDIO UTILS
[![Build Status](http://img.shields.io/travis/mohayonao/web-audio-utils.svg?style=flat-square)](https://travis-ci.org/mohayonao/web-audio-utils)
[![NPM Version](http://img.shields.io/npm/v/@mohayonao/web-audio-utils.svg?style=flat-square)](https://www.npmjs.org/package/@mohayonao/web-audio-utils)
[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](http://mohayonao.mit-license.org/)> Utility functions for Web Audio API
## Installation
Node.js
```sh
npm install @mohayonao/web-audio-utils
```## API
- `activateCustomAudioNode(): void`
- `activateMobileAutoPlay([ audioContext, callback ]): AudioContext`
- `activateWebAudioAPI([ AudioContext, callback ]): AudioContext`
- `createAudioBufferFromArray(array: Float32Array[], [ audioContext ]): AudioBuffer`
- `createPeriodicWave(wave: object, [ audioContext ]): PeriodicWave`
- `wave: { real: Float32Array, imag: Float32Array}`
- this function is for [wave-tables](https://github.com/mohayonao/wave-tables).
- `fetchAudioBuffer(path: string, [ audioContext ]): Promise`
- fetch && decode
- `getAudioContext(): AudioContext`
- return an AudioContext as singleton
- `splitAudioBuffer(audioBuffer: AudioBuffer, n: number): AudioBuffer[]`## License
MIT