Javascript Music Sequencer

This is a simple yet powerful JavaScript music sequencer. What you are hearing is several two bar mp3 loops controlled and played in succession using JavaScript code.

NOW PLAYING: JavaScript mix - by Dopaminex

Only works for IE browsers as Firefox does not support playing embeddded MP3 files.

The total size for this 6 minute audio track at 128k is a tiny 399k! Ideal as an alternative to those annoying one bar loops that you often find on flash games.

I found that using For loops caused significant delays so instead I have defined each individual segment of the track using a setimeout event. e.g:

setTimeout(Chan1 + loop1 + volume1 + "'-1';", 0); var i = looptime;x++;

INSTRUCTIONS:

1. View Source and copy/paste the javascript in the head of your page.
2. Create Music and chop each bar equally into seperate files - e.g 1 bar loops or 2 bars loops.
3. Place the loops a directory: eg. 'loops/loop1.mp3'
4. Customise the "millitime" variable (this defines the total number of milliseconds for each bar)

GLU - Copyright 2004 Dopaminex - JavaScript by M Shah. If you wish to use this script on your site please keep credits intact. :-) All rights reserved.