bool EffectTruncSilence::SetAutomationParameters(EffectAutomationParameters & parms) { wxArrayString actions(kNumActions, kActionStrings); actions.Insert(wxT("0"), 0); // Compatible with 2.1.0 and before actions.Insert(wxT("1"), 1); // Compatible with 2.1.0 and before ReadAndVerifyDouble(Minimum); ReadAndVerifyDouble(Truncate); ReadAndVerifyDouble(Compress); ReadAndVerifyEnum(DbIndex, mDbChoices); ReadAndVerifyEnum(ActIndex, actions); ReadAndVerifyBool(Independent); mInitialAllowedSilence = Minimum; mTruncLongestAllowedSilence = Truncate; mSilenceCompressPercent = Compress; mTruncDbChoiceIndex = DbIndex; mActionIndex = ActIndex; mbIndependent = Independent; // Readjust for 2.1.0 or before if (mActionIndex >= kNumActions) { mActionIndex -= kNumActions; } return true; }
bool EffectPhaser::SetAutomationParameters(EffectAutomationParameters & parms) { ReadAndVerifyInt(Stages); ReadAndVerifyInt(DryWet); ReadAndVerifyDouble(Freq); ReadAndVerifyDouble(Phase); ReadAndVerifyInt(Depth); ReadAndVerifyInt(Feedback); ReadAndVerifyDouble(OutGain); if (Stages & 1) // must be even, but don't complain about it { Stages &= ~1; } mFreq = Freq; mFeedback = Feedback; mStages = Stages; mDryWet = DryWet; mDepth = Depth; mPhase = Phase; mOutGain = OutGain; return true; }
bool EffectDtmf::SetAutomationParameters(CommandParameters & parms) { ReadAndVerifyDouble(DutyCycle); ReadAndVerifyDouble(Amplitude); ReadAndVerifyString(Sequence); wxString symbols; for (unsigned int i = 0; i < WXSIZEOF(kSymbols); i++) { symbols += kSymbols[i]; } if (Sequence.find_first_not_of(symbols) != wxString::npos) { return false; } dtmfDutyCycle = DutyCycle; dtmfAmplitude = Amplitude; dtmfSequence = Sequence; Recalculate(); return true; }
bool EffectTruncSilence::SetAutomationParameters(CommandParameters & parms) { ReadAndVerifyDouble(Minimum); ReadAndVerifyDouble(Truncate); ReadAndVerifyDouble(Compress); // This control migrated from a choice to a text box in version 2.3.0 double myThreshold {}; bool newParams = [&] { ReadAndVerifyDouble(Threshold); // macro may return false myThreshold = Threshold; return true; } (); if ( !newParams ) { // Use legacy param: ReadAndVerifyEnum(DbIndex, Enums::DbChoices, Enums::NumDbChoices); myThreshold = enumToDB( DbIndex ); } ReadAndVerifyEnumWithObsoletes(ActIndex, kActionStrings, nActions, kObsoleteActions, nObsoleteActions); ReadAndVerifyBool(Independent); mInitialAllowedSilence = Minimum; mTruncLongestAllowedSilence = Truncate; mSilenceCompressPercent = Compress; mThresholdDB = myThreshold; mActionIndex = ActIndex; mbIndependent = Independent; return true; }
bool EffectReverb::SetAutomationParameters(EffectAutomationParameters & parms) { ReadAndVerifyDouble(RoomSize); ReadAndVerifyDouble(PreDelay); ReadAndVerifyDouble(Reverberance); ReadAndVerifyDouble(HfDamping); ReadAndVerifyDouble(ToneLow); ReadAndVerifyDouble(ToneHigh); ReadAndVerifyDouble(WetGain); ReadAndVerifyDouble(DryGain); ReadAndVerifyDouble(StereoWidth); ReadAndVerifyBool(WetOnly); mParams.mRoomSize = RoomSize; mParams.mPreDelay = PreDelay; mParams.mReverberance = Reverberance; mParams.mHfDamping = HfDamping; mParams.mToneLow = ToneLow; mParams.mToneHigh = ToneHigh; mParams.mWetGain = WetGain; mParams.mDryGain = DryGain; mParams.mStereoWidth = StereoWidth; mParams.mWetOnly = WetOnly; return true; }
bool EffectBassTreble::SetAutomationParameters(CommandParameters & parms) { ReadAndVerifyDouble(Bass); ReadAndVerifyDouble(Treble); ReadAndVerifyDouble(Gain); ReadAndVerifyBool(Link); mBass = Bass; mTreble = Treble; mGain = Gain; mLink = Link; return true; }
bool EffectChangeSpeed::SetAutomationParameters(EffectAutomationParameters & parms) { ReadAndVerifyDouble(Percentage); m_PercentChange = Percentage; return true; }
bool EffectWahwah::SetAutomationParameters(CommandParameters & parms) { ReadAndVerifyDouble(Freq); ReadAndVerifyDouble(Phase); ReadAndVerifyInt(Depth); ReadAndVerifyDouble(Res); ReadAndVerifyInt(FreqOfs); ReadAndVerifyDouble(OutGain); mFreq = Freq; mPhase = Phase; mDepth = Depth; mRes = Res; mFreqOfs = FreqOfs; mOutGain = OutGain; return true; }
bool EffectChangePitch::SetAutomationParameters(EffectAutomationParameters & parms) { // Vaughan, 2013-06: Long lost to history, I don't see why m_dPercentChange was chosen to be shuttled. // Only m_dSemitonesChange is used in Process(). ReadAndVerifyDouble(Percentage); m_dPercentChange = Percentage; return true; }
bool EffectNoise::SetAutomationParameters(CommandParameters & parms) { ReadAndVerifyEnum(Type, kTypeStrings, nTypes); ReadAndVerifyDouble(Amp); mType = Type; mAmp = Amp; return true; }
bool EffectNoise::SetAutomationParameters(EffectAutomationParameters & parms) { ReadAndVerifyEnum(Type, wxArrayString(kNumTypes, kTypeStrings)); ReadAndVerifyDouble(Amp); mType = Type; mAmp = Amp; return true; }
bool EffectCompressor::SetAutomationParameters(EffectAutomationParameters & parms) { ReadAndVerifyDouble(Threshold); ReadAndVerifyDouble(NoiseFloor); ReadAndVerifyDouble(Ratio); ReadAndVerifyDouble(AttackTime); ReadAndVerifyDouble(ReleaseTime); ReadAndVerifyBool(Normalize); ReadAndVerifyBool(UsePeak); mThresholdDB = Threshold; mNoiseFloorDB = NoiseFloor; mRatio = Ratio; mAttackTime = AttackTime; mDecayTime = ReleaseTime; mNormalize = Normalize; mUsePeak = UsePeak; return true; }
bool EffectDistortion::SetAutomationParameters(EffectAutomationParameters & parms) { ReadAndVerifyEnum(TableTypeIndx, wxArrayString(kNumTableTypes, kTableTypeStrings)); ReadAndVerifyBool(DCBlock); ReadAndVerifyDouble(Threshold_dB); ReadAndVerifyDouble(NoiseFloor); ReadAndVerifyDouble(Param1); ReadAndVerifyDouble(Param2); ReadAndVerifyInt(Repeats); mParams.mTableChoiceIndx = TableTypeIndx; mParams.mDCBlock = DCBlock; mParams.mThreshold_dB = Threshold_dB; mParams.mNoiseFloor = NoiseFloor; mParams.mParam1 = Param1; mParams.mParam2 = Param2; mParams.mRepeats = Repeats; return true; }
bool EffectToneGen::SetAutomationParameters(EffectAutomationParameters & parms) { ReadAndVerifyEnum(Waveform, mWaveforms); ReadAndVerifyEnum(Interp, mInterpolations); if (mChirp) { ReadAndVerifyDouble(StartFreq); ReadAndVerifyDouble(EndFreq); ReadAndVerifyDouble(StartAmp); ReadAndVerifyDouble(EndAmp); mFrequency[0] = StartFreq; mFrequency[1] = EndFreq; mAmplitude[0] = StartAmp; mAmplitude[1] = EndAmp; } else { ReadAndVerifyDouble(Frequency); ReadAndVerifyDouble(Amplitude); mFrequency[0] = Frequency; mFrequency[1] = Frequency; mAmplitude[0] = Amplitude; mAmplitude[1] = Amplitude; } mWaveform = Waveform; mInterpolation = Interp; double freqMax = (GetActiveProject() ? GetActiveProject()->GetRate() : 44100.0) / 2.0; mFrequency[1] = TrapDouble(mFrequency[1], MIN_EndFreq, freqMax); return true; }
bool EffectChangePitch::SetAutomationParameters(CommandParameters & parms) { // Vaughan, 2013-06: Long lost to history, I don't see why m_dPercentChange was chosen to be shuttled. // Only m_dSemitonesChange is used in Process(). ReadAndVerifyDouble(Percentage); m_dPercentChange = Percentage; Calc_SemitonesChange_fromPercentChange(); #if USE_SBSMS ReadAndVerifyBool(UseSBSMS); mUseSBSMS = UseSBSMS; #else mUseSBSMS = false; #endif return true; }
bool EffectAutoDuck::SetAutomationParameters(EffectAutomationParameters & parms) { ReadAndVerifyDouble(DuckAmountDb); ReadAndVerifyDouble(InnerFadeDownLen); ReadAndVerifyDouble(InnerFadeUpLen); ReadAndVerifyDouble(OuterFadeDownLen); ReadAndVerifyDouble(OuterFadeUpLen); ReadAndVerifyDouble(ThresholdDb); ReadAndVerifyDouble(MaximumPause); mDuckAmountDb = DuckAmountDb; mInnerFadeDownLen = InnerFadeDownLen; mInnerFadeUpLen = InnerFadeUpLen; mOuterFadeDownLen = OuterFadeDownLen; mOuterFadeUpLen = OuterFadeUpLen; mThresholdDb = ThresholdDb; mMaximumPause = MaximumPause; return true; }