Re:Beeplay.js: Write a song in JavaScript
by jastanton on Sunday June 08, 2014 @04:27PM
(#7865789)
If play returned a reference to the play function you could chain them like
Just a thought on cleaning up the syntax a bit.
[ Parent
| on HN ]
A cleaner way may be to allow the play() method to accept a plain JS array of notes:
var notes = ['D#5', 1/4, 'E5', 1/4];
or
var notes = [['D#5', 1/4], ['E5', 1/4]];
beeplay().play(notes);