Hacker News new | ask | show | jobs
by jastanton 4393 days ago
If play returned a reference to the play function you could chain them like

    .play('D#5', 1/4)('E5', 1/4)
Just a thought on cleaning up the syntax a bit.
1 comments

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);
I plan to do it! A 'toJSON()' method is only for that.