pd-andy/elm-web-audio/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 (cache, verified). The original is gone. This copy comes from a Lamdera package cache made before it went. The Lamdera package server serves a copy recovered from a Lamdera package cache from 2021-02-13.

What we checked: Rebuilt from the unpacked sources in a Lamdera package cache (5 copies agree), which Elm only writes after the published SHA-1 checked out; elm.json is byte-identical to package.elm-lang.org's; the exposed modules match docs.json; the zip is our own, so its SHA-1 is not the published one.

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.3.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.