Actually just any multi-track music would be great. You could do something like this:
var track1 = "...";
var track2 = "...";
function note(ch) {
if (ch in pitches) {
var f = 4000*pitches[ch]/1500;
if (!w.running)
w.startOutput(B0, f);
else if (!w2.running)
w2.startOutput(B0, f);
else if (!w3.running)
w3.startOutput(B0, f);
else if (!w4.running)
w4.startOutput(B0, f);
}
}
function step() {
var ch1 = track1[pos];
var ch2 = track2[pos];
if (ch1 !== undefined) pos++; else pos=0;
note(ch1);
note(ch2);
}
As you might have guessed by now I'm not very musical :)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Actually just any multi-track music would be great. You could do something like this:
As you might have guessed by now I'm not very musical :)