Skip to content
Utility functions for Web Audio API
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.eslintrc
.gitignore
.travis.yml
GCGuard.js
README.md
activateCustomAudioNode.js
activateMobileAutoPlay.js
activateWebAudioAPI.js
createAudioBufferFromArray.js
createPeriodicWave.js
enableCustomAudioNode.js
enableMobileAutoPlay.js
fetchAudioBuffer.js
getAudioContext.js
index.js
package.json
splitAudioBuffer.js

README.md

WEB AUDIO UTILS

Build Status NPM Version License

Utility functions for Web Audio API

Installation

Node.js

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.
  • fetchAudioBuffer(path: string, [ audioContext ]): Promise<AudioBuffer>
    • fetch && decode
  • getAudioContext(): AudioContext
    • return an AudioContext as singleton
  • splitAudioBuffer(audioBuffer: AudioBuffer, n: number): AudioBuffer[]

License

MIT

You can’t perform that action at this time.