ControlSwitcher_::ControlSwitcher_() :
   inputIndex_(ControlValue(0)),
   lastInputIndex_(-1),
   doesWrap_(ControlValue(0)),
   addAfterWrap_(ControlValue(0)),
   lastIndexOutputValue(-1)
   {}
Пример #2
0
 Filter_::Filter_() :
   cutoff_(FixedValue(20000)),
   Q_(FixedValue(0.7071)),
   bypass_(ControlValue(0)),
   bNormalizeGain_(true)
 {
   setIsAlwaysWet(true);
   workspace_.resize(kSynthesisBlockSize, 1, 0);
 }
 ControlSwitcher & ControlSwitcher::setFloatInputs(vector<float> inputs){
   
   vector<ControlGenerator> newInputs;
   
   for(vector<float>::iterator it = inputs.begin(); it != inputs.end(); it++){
     newInputs.push_back(ControlValue(*it));
   }
   
   gen()->setInputs(newInputs);
   
   return *this;
 }
Пример #4
0
 ControlRandom_::ControlRandom_(){
   trigger = ControlValue(0);
 }
 MonoToStereoPanner_::MonoToStereoPanner_(){
   setIsStereoOutput(true);
   panFrames.resize(kSynthesisBlockSize, 1);
   setPan(ControlValue(0));
 }
 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));
   
 }
Пример #7
0
 ControlRandomTrigger_::ControlRandomTrigger_(){
   trigger = ControlValue(0);
   chance = ControlValue(1);
 }
 ControlMetroDivider_::ControlMetroDivider_() : tickCounter_(0) {
   divisonsGen_ = ControlValue(1);
   offsetGen_ = ControlValue(0);
   output_.value = 1.f;
 }