Giter Club home page Giter Club logo

purescript-webaudio's Introduction

purescript-webaudio

About

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:

  1. 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:

  1. npm run exec:example:xx where xx is the example (siren, gain, decode, decodeAsync)

To build the test suite

  1. npm run build:test:props

To run the test suite

  1. npm run exec:test:props and inspect the output log

Breaking Changes

  • Updated to work with purs 0.11.x
  • Renamed the WebAudio effect to AUDIO to conform with best practices
  • Renamed the AudioNode class as RawAudioNode
  • AudioNode is now a sum type over all the raw nodes.
  • Renamed wau to audio
  • Moved several fns from AudioContext.purs to BaseAudiocontext to match web audio spec
  • Created a Connectable class encompassing connect, disconnect & connectParam with AudioNode as an instance. This lives in Types.purs

Improvements

  • Moved test/Test0X to examples/ and renamed appropriately
  • Added AudioParam.setTargetAtTime
  • Updated API.md to reflect decodeAudioData error handling change
  • New type synomymns Value and Seconds for AudioParam methods
  • Eliminated gulp, putting new build test scripts in package.json
  • Added decodeAudioDataAsync to BaseAudioContext. 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 include Affjax.
  • Added test/props to test some simple properties of the new Node types.
  • Added BiquadFilterNode.
  • Added detune property to Oscillator.
  • 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 on Data.ArrayBuffer.
  • Added StereoPannerNode.
  • Added DynamicsCompressorNode
  • Added ConvolverNode

adkelley ToDo:

  • Add further error handling options for decodeAudioData besides writing to console
  • Support for further nodes (e.g., ChannelSplitterNode), and interfaces

newlandsvalley ToDo:

  • Document the changes from merging my fork

purescript-webaudio's People

Contributors

adkelley avatar newlandsvalley avatar unmanbearpig avatar waterson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

purescript-webaudio's Issues

Transferring to adkelley/purescript-webaudio

Hi Chris. As you suspected, it's simpler and more straightforward to update, maintain, and submit this repository to purescript-contrib directly from my fork. Especially now that I've added Travis integration. Within the next couple week, I would like to submit my fork to purescript-contrib, so that users can begin installing it directly via Bower. If you agree with this approach, then please respond to this issue with your confirmation. Thanks!

Outdated dependencies

I'm getting version conflicts when trying to install purescript-webaudio trough bower, and build with pulp.

Steps to reproduce:

$ pulp init

$ bower install --save purescript-webaudio
bower  ENOTFOUND Package purescript-webaudio not found

$ bower install --save https://github.com/waterson/purescript-webaudio.git#master
Unable to find a suitable version for purescript-eff, please choose one by typing one of the numbers below:
...

$ bower install --force-latest --save https://github.com/waterson/purescript-webaudio.git#master

$ pulp build

Error 1 of 35:

  at bower_components/purescript-nullable/src/Data/Nullable.purs line 19, column 35 - line 19, column 35

    Unable to parse module:
    The `*` symbol is no longer used for the kind of types.
  The new equivalent is the named kind `Type`.


  See https://github.com/purescript/documentation/blob/master/errors/ErrorParsingModule.md for more information,
  or to contribute content related to this error.

Error 2 of 35:
    ...

Probably, the dependencies in bower.json should have a version defined other than "*"
https://github.com/waterson/purescript-webaudio/blob/master/bower.json#L18

Make a bower lib

Hi,

Would it be possible for you to publish your project as a bower lib ? I'd love to use it for some personnal projects :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.