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:xx
where 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:xx
where 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:props
and inspect the output log
- Updated to work with
purs 0.11.x
- Renamed the
WebAudio
effect toAUDIO
to conform with best practices - Renamed the
AudioNode
class asRawAudioNode
AudioNode
is now a sum type over all the raw nodes.- Renamed
wau
toaudio
- Moved several fns from
AudioContext.purs
toBaseAudiocontext
to match web audio spec - Created a
Connectable
class encompassingconnect
,disconnect
&connectParam
with AudioNode as an instance. This lives inTypes.purs
- Moved test/Test0X to
examples/
and renamed appropriately - Added
AudioParam.setTargetAtTime
- Updated
API.md
to reflectdecodeAudioData
error handling change - New type synomymns
Value
andSeconds
forAudioParam
methods - Eliminated
gulp
, putting new build test scripts inpackage.json
- Added
decodeAudioDataAsync
toBaseAudioContext
. 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
decodeAsync
to illustrate basic usage. devDependencies now includeAffjax
. - Added
test/props
to test some simple properties of the new Node types. - Added
BiquadFilterNode
. - Added
detune
property toOscillator
. - Added
DelayNode
. - Added
disconnect
to Types. - Experimented with shorthand setters for
AudioParam
properties on some nodes. - Added
AnalyserNode
plus buffer creation functions in Utils. This introduces a dependency onData.ArrayBuffer
. - Added
StereoPannerNode
. - Added
DynamicsCompressorNode
- Added
ConvolverNode
- Add further error handling options for
decodeAudioData
besides writing to console - Support for further nodes (e.g., ChannelSplitterNode), and interfaces
- Document the changes from merging my fork