This is an experimental library for dealing with the HTML5 Web Audio API.
Module documentation is available here.
To build the examples to run in your browser, perform the following scripts in order:
npm run build:example:xxwhere xx is the example (siren, gain, decode, decodeAsync)
To run the examples in your browser, perform the following scripts in order:
npm run exec:example:xxwhere xx is the example (siren, gain, decode, decodeAsync)
To build the test suite
npm run build:test:props
To run the test suite
npm run exec:test:propsand inspect the output log
- Updated to work with
purs 0.11.x - Renamed the
WebAudioeffect toAUDIOto conform with best practices - Renamed the
AudioNodeclass asRawAudioNode AudioNodeis now a sum type over all the raw nodes.- Renamed
wautoaudio - Moved several fns from
AudioContext.purstoBaseAudiocontextto match web audio spec - Created a
Connectableclass encompassingconnect,disconnect&connectParamwith AudioNode as an instance. This lives inTypes.purs
- Moved test/Test0X to
examples/and renamed appropriately - Added
AudioParam.setTargetAtTime - Updated
API.mdto reflectdecodeAudioDataerror handling change - New type synomymns
ValueandSecondsforAudioParammethods - Eliminated
gulp, putting new build test scripts inpackage.json - Added
decodeAudioDataAsynctoBaseAudioContext. This runs in Aff not Eff but has the advantage that audio buffers can be returned directly. This, of course, introduces a dependency on Aff 4.0.0 and requires users to lift the original Eff functions into Aff if they wish to use it. I hope that this overhead should not be too restrictive given that a natural way to load sound resources is via Aff anyway. - Added
decodeAsyncto illustrate basic usage. devDependencies now includeAffjax. - Added
test/propsto test some simple properties of the new Node types. - Added
BiquadFilterNode. - Added
detuneproperty toOscillator. - Added
DelayNode. - Added
disconnectto Types. - Experimented with shorthand setters for
AudioParamproperties on some nodes. - Added
AnalyserNodeplus buffer creation functions in Utils. This introduces a dependency onData.ArrayBuffer. - Added
StereoPannerNode. - Added
DynamicsCompressorNode - Added
ConvolverNode
- Add further error handling options for
decodeAudioDatabesides writing to console - Support for further nodes (e.g., ChannelSplitterNode), and interfaces
- Document the changes from merging my fork