Skip to content

Commit

Permalink
bypass now refers to properties object first, defaults to false.
Browse files Browse the repository at this point in the history
  • Loading branch information
chris_coniglio committed Feb 28, 2013
1 parent fda3c87 commit 90b125f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tuna.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
this.Q = properties.resonance || this.defaults.Q.value; this.Q = properties.resonance || this.defaults.Q.value;
this.filterType = properties.filterType || this.defaults.filterType.value; this.filterType = properties.filterType || this.defaults.filterType.value;
this.gain = properties.gain || this.defaults.gain.value; this.gain = properties.gain || this.defaults.gain.value;
this.bypass = false; this.bypass = properties.bypass || false;
}; };
Tuna.prototype.Filter.prototype = Object.create(Super, { Tuna.prototype.Filter.prototype = Object.create(Super, {
name: { name: {
Expand Down Expand Up @@ -286,7 +286,7 @@
this.makeupNode.connect(this.output); this.makeupNode.connect(this.output);


this.makeupGain = properties.makeupGain || this.defaults.makeupGain; this.makeupGain = properties.makeupGain || this.defaults.makeupGain;
this.bypass = false; this.bypass = properties.bypass || false;
}; };
Tuna.prototype.Cabinet.prototype = Object.create(Super, { Tuna.prototype.Cabinet.prototype = Object.create(Super, {
name: { name: {
Expand Down Expand Up @@ -372,7 +372,7 @@
this.attenuator.gain.value = 0.6934; // 1 / (10 ^ (((20 * log10(3)) / 3) / 20)) this.attenuator.gain.value = 0.6934; // 1 / (10 ^ (((20 * log10(3)) / 3) / 20))
this.lfoL.activate(true); this.lfoL.activate(true);
this.lfoR.activate(true); this.lfoR.activate(true);
this.bypass = false; this.bypass = properties.bypass || false;
}; };
Tuna.prototype.Chorus.prototype = Object.create(Super, { Tuna.prototype.Chorus.prototype = Object.create(Super, {
name: { name: {
Expand Down Expand Up @@ -481,7 +481,7 @@
this.attack = properties.attack || this.defaults.attack.value; this.attack = properties.attack || this.defaults.attack.value;
this.ratio = properties.ratio || this.defaults.ratio.value; this.ratio = properties.ratio || this.defaults.ratio.value;
this.knee = properties.knee || this.defaults.knee.value; this.knee = properties.knee || this.defaults.knee.value;
this.bypass = false; this.bypass = properties.bypass || false;
}; };
Tuna.prototype.Compressor.prototype = Object.create(Super, { Tuna.prototype.Compressor.prototype = Object.create(Super, {
name: { name: {
Expand Down Expand Up @@ -649,7 +649,7 @@
this.level = properties.level || this.defaults.level.value; this.level = properties.level || this.defaults.level.value;
this.filterHigh.type = 0; this.filterHigh.type = 0;
this.filterLow.type = 1; this.filterLow.type = 1;
this.bypass = false; this.bypass = properties.bypass || false;
}; };
Tuna.prototype.Convolver.prototype = Object.create(Super, { Tuna.prototype.Convolver.prototype = Object.create(Super, {
name: { name: {
Expand Down Expand Up @@ -792,7 +792,7 @@
this.dryLevel = properties.dryLevel || this.defaults.dryLevel.value; this.dryLevel = properties.dryLevel || this.defaults.dryLevel.value;
this.cutoff = properties.cutoff || this.defaults.cutoff.value; this.cutoff = properties.cutoff || this.defaults.cutoff.value;
this.filter.type = 0; this.filter.type = 0;
this.bypass = false; this.bypass = properties.bypass || false;
}; };
Tuna.prototype.Delay.prototype = Object.create(Super, { Tuna.prototype.Delay.prototype = Object.create(Super, {
name: { name: {
Expand Down Expand Up @@ -905,7 +905,7 @@
this.outputGain = properties.outputGain || this.defaults.outputGain.value; this.outputGain = properties.outputGain || this.defaults.outputGain.value;
this.curveAmount = properties.curveAmount || this.defaults.curveAmount.value; this.curveAmount = properties.curveAmount || this.defaults.curveAmount.value;
this.algorithmIndex = properties.algorithmIndex || this.defaults.algorithmIndex.value; this.algorithmIndex = properties.algorithmIndex || this.defaults.algorithmIndex.value;
this.bypass = false; this.bypass = properties.bypass || false;
}; };
Tuna.prototype.Overdrive.prototype = Object.create(Super, { Tuna.prototype.Overdrive.prototype = Object.create(Super, {
name: { name: {
Expand Down Expand Up @@ -1098,7 +1098,7 @@


this.lfoL.activate(true); this.lfoL.activate(true);
this.lfoR.activate(true); this.lfoR.activate(true);
this.bypass = false; this.bypass = properties.bypass || false;
}; };
Tuna.prototype.Phaser.prototype = Object.create(Super, { Tuna.prototype.Phaser.prototype = Object.create(Super, {
name: { name: {
Expand Down Expand Up @@ -1240,7 +1240,7 @@


this.lfoL.activate(true); this.lfoL.activate(true);
this.lfoR.activate(true); this.lfoR.activate(true);
this.bypass = false; this.bypass = properties.bypass || false;
}; };
Tuna.prototype.Tremolo.prototype = Object.create(Super, { Tuna.prototype.Tremolo.prototype = Object.create(Super, {
name: { name: {
Expand Down Expand Up @@ -1341,7 +1341,7 @@


this.activateNode.gain.value = 2; this.activateNode.gain.value = 2;
this.envelopeFollower.activate(true); this.envelopeFollower.activate(true);
this.bypass = false; this.bypass = properties.bypass || false;
}; };
Tuna.prototype.WahWah.prototype = Object.create(Super, { Tuna.prototype.WahWah.prototype = Object.create(Super, {
name: { name: {
Expand Down Expand Up @@ -1631,7 +1631,7 @@
this.target = properties.target || {}; this.target = properties.target || {};
this.output.onaudioprocess = this.callback(properties.callback || this.output.onaudioprocess = this.callback(properties.callback ||
function () {}); function () {});
this.bypass = false; this.bypass = properties.bypass || false;
}; };
Tuna.prototype.LFO.prototype = Object.create(Super, { Tuna.prototype.LFO.prototype = Object.create(Super, {
name: { name: {
Expand Down

0 comments on commit 90b125f

Please sign in to comment.