Beispiel #1
0
BasicDelay_::BasicDelay_() {
    delayTimeFrames_.resize(kSynthesisBlockSize, 1, 0);
    fbkFrames_.resize(kSynthesisBlockSize, 1, 0);
    delayTimeGen_ = FixedValue(0);
    fbkGen_ = FixedValue(0);
    setDryLevelGen(FixedValue(0.5));
    setWetLevelGen(FixedValue(0.5));
}
Beispiel #2
0
 StereoDelay_::StereoDelay_(){
   setIsStereoOutput(true);
   setIsStereoInput(true);
   delayTimeFrames_[TONIC_LEFT].resize(kSynthesisBlockSize, 1, 0);
   delayTimeFrames_[TONIC_RIGHT].resize(kSynthesisBlockSize, 1, 0);
   fbkFrames_.resize(kSynthesisBlockSize, 1, 0);
   setDryLevelGen(FixedValue(0.5));
   setWetLevelGen(FixedValue(0.5));
 }
 Reverb_::Reverb_(){
   
   setIsStereoOutput(true);
   
   // Default to 50% wet
   setDryLevelGen(FixedValue(0.5f));
   setWetLevelGen(FixedValue(0.5f));
   
   workspaceFrames_[0].resize(kSynthesisBlockSize, 1, 0);
   workspaceFrames_[1].resize(kSynthesisBlockSize, 1, 0);
   preOutputFrames_[0].resize(kSynthesisBlockSize, 1, 0);
   preOutputFrames_[1].resize(kSynthesisBlockSize, 1, 0);
   
   preDelayLine_.initialize(0.1f, 1);
   reflectDelayLine_.initialize(0.1f, 1);
   
   inputLPF_.setIsStereoInput(false);
   inputLPF_.setIsStereoInput(false);
   inputLPF_.Q(0.707);
   inputHPF_.Q(0.707);
 
   preDelayTimeCtrlGen_ = ControlValue(0.01f);
   inputFiltBypasCtrlGen_ = ControlValue(false);
   densityCtrlGen_ = ControlValue(0.5);
   roomShapeCtrlGen_ = ControlValue(0.5);
   roomSizeCtrlGen_ = ControlValue(0.5);
   decayTimeCtrlGen_ = ControlValue(1.0f);
   stereoWidthCtrlGen_ = ControlValue(0.5f);
   
   setInputLPFCutoffCtrlGen(ControlValue(10000.0f));
   setInputHPFCutoffCtrlGen(ControlValue(20.f));
   
   for (unsigned int i=0; i<TONIC_REVERB_N_COMBS; i++){
     
     ControlValue delayL = ControlValue(0.01f);
     ControlValue delayR = ControlValue(0.01f);
     ControlValue scaleL = ControlValue(0.5);
     ControlValue scaleR = ControlValue(0.5);
     combFilterDelayTimes_[TONIC_LEFT].push_back(delayL);
     combFilterDelayTimes_[TONIC_RIGHT].push_back(delayR);
     combFilterScaleFactors_[TONIC_LEFT].push_back(scaleL);
     combFilterScaleFactors_[TONIC_RIGHT].push_back(scaleR);
     combFilters_[TONIC_LEFT].push_back(FilteredFBCombFilter6(0.01f, 0.125f).delayTime(delayL).scaleFactor(scaleL));
     combFilters_[TONIC_RIGHT].push_back(FilteredFBCombFilter6(0.01f, 0.125f).delayTime(delayR).scaleFactor(scaleR));
   }
   
   for (unsigned int i=0; i<TONIC_REVERB_N_ALLPASS; i++){
     allpassFilters_[TONIC_LEFT].push_back(ImpulseDiffuserAllpass(allpassTimes_[i], TONIC_REVERB_ALLPASS_COEF));
     allpassFilters_[TONIC_RIGHT].push_back(ImpulseDiffuserAllpass(allpassTimes_[i] + TONIC_REVERB_STEREO_SPREAD, TONIC_REVERB_ALLPASS_COEF));
   }
   
   setDecayLPFCtrlGen(ControlValue(12000.f));
   setDecayHPFCtrlGen(ControlValue(60.f));
   
 }