News for hackers. Stuff that matters.
Re:HTML5 Piano by moron4hire on Saturday August 24, 2013 @10:24PM (#6270626)
are you generatimg the samples on each key press or when the piano loads? audio api or base65 url encoded wave files? I had made a synthesizer a while ago, but could never figure out how to keep the audio from clicking

http://wedusc.com/synth/index.html

Re:HTML5 Piano by kmf on Sunday August 25, 2013 @12:14AM (#6270890)
According to the repo (https://github.com/mrcoles/javascript-piano):

> This is an HTML5 synth piano that generates all of its audio files on the fly using data URIs.

The audio.js shows this process in a bit more detail:

https://github.com/mrcoles/javascript-piano/blob/master/audi...

Re:HTML5 Piano by mrcoles on Sunday August 25, 2013 @12:52AM (#6270953)
hrm… maybe my wording wasn’t as clear as I had hoped. It generates the audio ahead of time (as base64 dataURI wave files)—the on-the-fly part is that it’s generated in JavaScript each time you make changes to the settings, like wave-form and volume response (click on the square in the top right or type "?" to see changeable options).

I assume the audio APIs would make less click-y sounds (and don't suggest manually created wave files as a solid way to create perfect sounds), but I also sort of like the clicks. When I presented this at Hack and Tell NYC, I claimed that you had to play it in Firefox 12 to get hear the exact clicks that were originally intended in the product ;?j