pd-andy/elm-web-audio/2.1.0

NOTE: the latest version is 2.3.0

Renamed to hayleigh-dot-dev/elm-web-audio. It is published under that name, and new versions come out there.

Versions published as pd-andy/elm-web-audio still install under that name. 5 versions of 5 come from the new location (see their notes).

Rerouted (fork, verified). The original repository is gone. This copy comes from a fork that still has the tag. The Lamdera package server serves a copy recovered from https://github.com/munozu/elm-web-audio (a fork).

What we checked: Rebuilt with git archive from commit e4c0557680fd of https://github.com/munozu/elm-web-audio (a fork) (zip prefix pd-andy-elm-web-audio-88bf9ee/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 966a66f1942519921d3e1a64b142a35a02668981.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/pd-andy/elm-web-audio/zipball/2.1.0/

Elm-Web-Audio

An elm/html-like library for the Web Audio API.

About

This library aims to provide a simple way of creating Web Audio processing graphs in Elm. It was motivated by the desire to keep as much of my audio code as possible inside Elm before resorting to ports.

To that end I present an elm/html-like library for constructing virtual audio graphs that can be sent through a port to be constructed in javascript. This means entire audio processing graphs can be described in a powerful, declarative fashion just like the DOM is:

-- elm/html
div : List Attribute -> List (Html a) -> Html a

-- elm-web-audio
osc : List Property -> List Node -> Node

This means we can naturally represent chains of audio nodes, and easily visualise their connections:

audio : Model -> Graph
audio model =
  [ oscillator [ frequency model.freq ]
    [ audioDestination ]
  ]

Notice how we're using our application's Model to set the frequency of the oscillator. If we hook our application up right, we get all the benefits of The Elm Architecture for our audio graph just as we do for our view!

Checkout the example to see how everything gets hooked up.