No description, website, or topics provided.
JavaScript CoffeeScript
Switch branches/tags
Nothing to show
Pull request Compare This branch is 2 commits ahead of fixplz:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
license
src.ogg
waveform-chrome.coffee
waveform-chrome.js small things Dec 5, 2011
waveform.html small things Dec 5, 2011

README.md

Browser-Waveform

From Gun.io

Client-side waveform rendering of an audio track in pure JavaScript.

Currently works in Chrome through the 'webkitAudioContext' object.

Firefox only has their own useless nonstandard sound API thing that makes Flash look good.

Coffee to JavaScript

  • npm install -g coffee-script
  • coffee --compile chrome-waveform.coffee

Notes

For local testing, remember to run Chrome locally with --allow-file-access-from-files.

  • OSX: open /Applications/Google\ Chrome.app --args --allow-file-access-from-files

Example

  • See waveform.html

Schema

Waveform :: ({file, canvas, onStatus, onReady}) -> {
  playback :: { moveCursor :: (Num) -> () }
  view :: {
    play     :: -> ()
    playAt   :: (Num) -> ()
    getTime  :: -> Num
    pause    :: -> ()
    isPaused :: -> Bool
  }
}