From b95aabcc7b3cb7b70c1bb7a4bc88a748a77eff12 Mon Sep 17 00:00:00 2001 From: Michael Deal Date: Fri, 25 Jan 2013 09:50:14 -0800 Subject: [PATCH] modify ramp value to 0.2/0.3 on recommendation of @Miranet & @0xfe --- js/MIDI/Plugin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/MIDI/Plugin.js b/js/MIDI/Plugin.js index 92b2c52..c1b034d 100644 --- a/js/MIDI/Plugin.js +++ b/js/MIDI/Plugin.js @@ -183,11 +183,11 @@ if (window.AudioContext || window.webkitAudioContext) (function () { if (delay < ctx.currentTime) delay += ctx.currentTime; var source = sources[channel + "" + note]; if (!source) return; - // @Miranet: "the values of 0.4 and 0.5 could ofcourse be used as + // @Miranet: "the values of 0.2 and 0.3 could ofcourse be used as // a 'release' parameter for ADSR like time settings." source.gain.linearRampToValueAtTime(1, delay); - source.gain.linearRampToValueAtTime(0, delay + 0.4); - source.noteOff(delay + 0.5); + source.gain.linearRampToValueAtTime(0, delay + 0.2); + source.noteOff(delay + 0.3); return source; };