Skip to content

Commit

Permalink
Adds new built Pizzicato files which include fix for issue #91
Browse files Browse the repository at this point in the history
  • Loading branch information
alemangui committed Oct 28, 2018
1 parent 92f0c9e commit a752ed4
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
14 changes: 14 additions & 0 deletions distr/Pizzicato.js
Original file line number Diff line number Diff line change
Expand Up @@ -1977,8 +1977,22 @@
impulseR[i] = (Math.random() * 2 - 1) * Math.pow(1 - n / length, this.decay);
}

// https://github.com/alemangui/pizzicato/issues/91
// ConvolverNode can be associated with only one buffer.
// Not sure what's the best way, but we are recreating ConvolverNode
// when properties change to work it around.
if (this.reverbNode.buffer) {
this.inputNode.disconnect(this.reverbNode);
this.reverbNode.disconnect(this.wetGainNode);

this.reverbNode = Pizzicato.context.createConvolver();
this.inputNode.connect(this.reverbNode);
this.reverbNode.connect(this.wetGainNode);
}

this.reverbNode.buffer = impulse;
}

Pizzicato.Effects.Tremolo = function(options) {

// adapted from
Expand Down
Loading

0 comments on commit a752ed4

Please sign in to comment.