mirror of
https://github.com/scratchfoundation/scratch-audio.git
synced 2024-12-31 10:22:21 -05:00
comments
This commit is contained in:
parent
cf80c9f9b8
commit
0c2548f6ba
1 changed files with 2 additions and 2 deletions
|
@ -103,7 +103,7 @@ Vocoder.prototype.initBandpassFilters = function () {
|
|||
modulatorFilter.connect(modulatorFilterPostGain);
|
||||
|
||||
// add a rectifier with a lowpass filter to turn the bandpass filtered signal
|
||||
// into a smoothed control signal to control the carrier filter
|
||||
// into a smoothed control signal for the carrier filter
|
||||
var rectifier = new Tone.WaveShaper([1,0,1]);
|
||||
modulatorFilterPostGain.connect(rectifier);
|
||||
var rectifierLowPass = new Tone.Filter(50, 'lowpass');
|
||||
|
@ -113,7 +113,6 @@ Vocoder.prototype.initBandpassFilters = function () {
|
|||
var carrierFilter = new Tone.Filter(this.vocoderBands[i].frequency, 'bandpass', -24);
|
||||
carrierFilter.Q.value = FILTER_QUALITY;
|
||||
this.carrierInput.connect(carrierFilter);
|
||||
|
||||
var carrierFilterPostGain = new Tone.Gain(10);
|
||||
carrierFilter.connect(carrierFilterPostGain);
|
||||
|
||||
|
@ -121,6 +120,7 @@ Vocoder.prototype.initBandpassFilters = function () {
|
|||
var bandGain = new Tone.Gain(0);
|
||||
carrierFilterPostGain.connect(bandGain);
|
||||
|
||||
// the modulator band filter output controls the gain of the carrier band
|
||||
rectifierLowPass.connect(bandGain.gain);
|
||||
|
||||
bandGain.connect(this.outputGain);
|
||||
|
|
Loading…
Reference in a new issue