ditty.bpm = 120; loop(() => { // "Happy Birthday to you" sine.play(g4, { duration: 0.5 }); sleep(0.5); sine.play(g4, { duration: 0.25 }); sleep(0.25); sine.play(a4, { duration: 0.5 }); sleep(0.5); sine.play(g4, { duration: 0.5 }); sleep(0.5); sine.play(c5, { duration: 0.5 }); sleep(0.5); sine.play(b4, { duration: 1 }); sleep(1); // "Happy Birthday dear Moe Shari" sine.play(g4, { duration: 0.5 }); sleep(0.5); sine.play(g4, { duration: 0.25 }); sleep(0.25); sine.play(a4, { duration: 0.5 }); sleep(0.5); sine.play(g4, { duration: 0.5 }); sleep(0.5); sine.play(d5, { duration: 0.5 }); sleep(0.5); sine.play(c5, { duration: 1 }); sleep(1); // "May your day be filled with joy" sine.play(g4, { duration: 0.5 }); sleep(0.5); sine.play(g4, { duration: 0.25 }); sleep(0.25); sine.play(g5, { duration: 0.5 }); sleep(0.5); sine.play(e5, { duration: 0.5 }); sleep(0.5); sine.play(c5, { duration: 0.5 }); sleep(0.5); sine.play(b4, { duration: 0.5 }); sleep(0.5); sine.play(a4, { duration: 1 }); sleep(1); // "Happy Birthday to you!" sine.play(f5, { duration: 0.5 }); sleep(0.5); sine.play(f5, { duration: 0.25 }); sleep(0.25); sine.play(e5, { duration: 0.5 }); sleep(0.5); sine.play(c5, { duration: 0.5 }); sleep(0.5); sine.play(d5, { duration: 0.5 }); sleep(0.5); sine.play(c5, { duration: 1 }); sleep(1); }, { name: 'Happy Birthday Song' });