...

View Full Version : Generated Melody TAB Lines with audio for firefox



rdspoons
02-29-2012, 01:08 PM
Generated Music in the browser.

This app creates melody lines on the fly, lists it in guitar TAB form, and plays the melody in firefox.

The app shows one way to offer different functionality based on the browsers capabilites. Specifically, the app targets proprietary firefox html5 audio for playback. Any browser that utilizes the mozSetup method of the audio object will have a chance to hear the audio as well.

The descriminatin test is:
if(typeof(Audio)=="undefined" || typeof(Float32Array)=="undefined" ||(new Audio())["mozSetup"]==undefined)

The app generates wild and almost jazz-worthy melody lines on the fly.

The app is self contained in one page including images and audio.



... code is in the attached zip file ...


tested in ie,ff,chrome,safari,opera

Almost forgot - there are data underflows in firefox audio on some runs. Just refresh the browser, or you can do the math and align the data to the array.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum