diff --git a/js/MIDI/Plugin.js b/js/MIDI/Plugin.js index 935b318..41c62ba 100644 --- a/js/MIDI/Plugin.js +++ b/js/MIDI/Plugin.js @@ -102,11 +102,14 @@ if (window.AudioContext || window.webkitAudioContext) (function () { }; // FIX: needs some way to fade out smoothly.. + // POSSIBLE FIX: fade out smoothly using gain and ramping to value root.noteOff = function (channel, note, delay) { -// var source = sources[channel+""+note]; -// if (!source) return; -// source.noteOff(delay || 0); -// return source; + var source = sources[channel+""+note]; + if (!source) return; + source.gain.linearRampToValueAtTime(1, delay); + source.gain.linearRampToValueAtTime(0, delay + 0.1); + source.noteOff(delay || 0); + return source; }; root.chordOff = function (channel, chord, delay) { diff --git a/soundfont-generator/sf2-piano.sh b/soundfont-generator/sf2-piano.sh index 7346a9c..7714055 100755 --- a/soundfont-generator/sf2-piano.sh +++ b/soundfont-generator/sf2-piano.sh @@ -4,7 +4,7 @@ # ------------------------------------ # nodejs - http://nodejs.org/ # gzip - http://www.gzip.org/ -# fluidsynth - http://www.audiosoftstore.com/downloads.html +# fluidsynth - http://sourceforge.net/apps/trac/fluidsynth/ # oggenc - http://www.rarewares.org/ogg-oggenc.php # lame - http://lame.sourceforge.net/