PencilCode/musical.js — pull request #6 by bwl21 (2014-07-10 17:05:19+00:00)
Title: also pass an object to tone() in order to support visual feedback

This change allows to pass an object to tone(). This can be used to provide visual feedback while playing.

Application:

inst = new Instrument();

inst.on('noteon', function(e){
e.origin.highlight();
})
inst.on('noteoff', function(e){
e.origin.unhighlight();
})

inst.tone(note.pitch, note.velocity, note.duration, note.delay, note.timbre, note.origin);