lmccart/p5.js — pull request #283 by therewasaguy (2014-08-04 07:23:34+00:00)
Title: p5.sound updates

* updating documentation and inline examples for the website
* new examples, clean up existing examples
* tweaked soundFile currentTime(), rate(), isPlaying() and pause()
* setVolume() and amp() now also take fadeTime
* AudioIn.on/off --> AudioIn.start/stop() (same as Processing Sound)
* FFT.processFreq --> FFT.analyze() (same as Processing Sound).
* FFT.analyze() returns an Int array with values 0-255, same as FFT.waveform(). I had switched to Float array with values -140 to 0, which was more precise, but confusing to scale. Those ranges are easy to get via the Web Audio API. Ideally the range would be 0-1, but that would require scaling on every audio process, or writing my own FFT, which would probably just slow things down...
* add getLevel() to SoundFile