var fraction = parseInt(this.value) / parseInt(127);
var touchIdx = parseInt($(this).parent().data('touch'));
var now = self.audioCtx.currentTime;
- self.touchGainNodes[touchIdx].gain.exponentialRampToValueAtTime((fraction * fraction) || 0.0001, now + 0.015);
+ if (fraction == 0) {
+ self.touchGainNodes[touchIdx].gain.value = 0;
+ } else {
+ self.touchGainNodes[touchIdx].gain.exponentialRampToValueAtTime((fraction * fraction) || 0.0001, now + 0.015);
+ }
});
self.time_interval_id = setInterval(function() {