Fix stuck notes on panic or all-notes-off.
Merge pull request #1084 from caoliver/stable-1.1

Fix stuck notes on panic or all-notes-off.