[py] fix note-off timings (closes #240, thanks to @chaoxinzheng)