fixed envelope generator key-on/key-off bug