EffectToneGen::EffectToneGen(bool isChirp) { wxASSERT(kNumWaveforms == WXSIZEOF(kWaveStrings)); wxASSERT(kNumInterpolations == WXSIZEOF(kInterStrings)); mChirp = isChirp; mWaveform = DEF_Waveform; mFrequency[0] = DEF_StartFreq; mFrequency[1] = DEF_EndFreq; mAmplitude[0] = DEF_StartAmp; mAmplitude[1] = DEF_EndAmp; mInterpolation = DEF_Interp; for (int i = 0; i < kNumWaveforms; i++) { mWaveforms.Add(wxGetTranslation(kWaveStrings[i])); } for (int i = 0; i < kNumInterpolations; i++) { mInterpolations.Add(wxGetTranslation(kInterStrings[i])); } // Chirp varies over time so must use selected duration. // TODO: When previewing, calculate only the first 'preview length'. if (isChirp) SetLinearEffectFlag(false); else SetLinearEffectFlag(true); }
EffectEcho::EffectEcho() { delay = DEF_Delay; decay = DEF_Decay; SetLinearEffectFlag(true); }
EffectChangePitch::EffectChangePitch() { m_dPercentChange = DEF_Percentage; m_dSemitonesChange = 0.0; m_dStartFrequency = 0.0; // 0.0 => uninitialized m_bLoopDetect = false; // NULL out these control members because there are some cases where the // event table handlers get called during this method, and those handlers that // can cause trouble check for NULL. m_pChoice_FromPitch = NULL; m_pSpin_FromOctave = NULL; m_pChoice_ToPitch = NULL; m_pSpin_ToOctave = NULL; m_pTextCtrl_SemitonesChange = NULL; m_pTextCtrl_FromFrequency = NULL; m_pTextCtrl_ToFrequency = NULL; m_pTextCtrl_PercentChange = NULL; m_pSlider_PercentChange = NULL; SetLinearEffectFlag(true); }
EffectPaulstretch::EffectPaulstretch() { mAmount = DEF_Amount; mTime_resolution = DEF_Time; SetLinearEffectFlag(true); }
EffectScienFilter::EffectScienFilter() { mOrder = DEF_Order; mFilterType = DEF_Type; mFilterSubtype = DEF_Subtype; mCutoff = DEF_Cutoff; mRipple = DEF_Passband; mStopbandRipple = DEF_Stopband; SetLinearEffectFlag(true); mOrderIndex = mOrder - 1; mdBMin = -30.0; mdBMax = 30.0; mLoFreq = 20; // Lowest frequency to display in response graph mNyquist = 44100.0 / 2.0; // only used during initialization, updated when effect is used mpBiquad = new BiquadStruct[MAX_Order / 2]; memset(mpBiquad, 0, sizeof(BiquadStruct) * MAX_Order / 2); for (int i = 0; i < MAX_Order / 2; i++) { mpBiquad[i].fNumerCoeffs[0] = 1.0; // straight-through } }
EffectBassTreble::EffectBassTreble() { mBass = DEF_Bass; mTreble = DEF_Treble; mGain = DEF_Gain; mLink = DEF_Link; SetLinearEffectFlag(true); }
EffectNoise::EffectNoise() { mType = DEF_Type; mAmp = DEF_Amp; SetLinearEffectFlag(true); y = z = buf0 = buf1 = buf2 = buf3 = buf4 = buf5 = buf6 = 0; }
EffectAmplify::EffectAmplify() { mAmp = DEF_Amp; mRatio = DB_TO_LINEAR(mAmp); mRatioClip = 0.0; mCanClip = false; mPeak = 0.0; SetLinearEffectFlag(true); }
EffectPhaser::EffectPhaser() { mStages = DEF_Stages; mDryWet = DEF_DryWet; mFreq = DEF_Freq; mPhase = DEF_Phase; mDepth = DEF_Depth; mFeedback = DEF_Feedback; SetLinearEffectFlag(true); }
EffectWahwah::EffectWahwah() { mFreq = DEF_Freq; mPhase = DEF_Phase; mDepth = DEF_Depth; mRes = DEF_Res; mFreqOfs = DEF_FreqOfs; mOutGain = DEF_OutGain; SetLinearEffectFlag(true); }
EffectChangeTempo::EffectChangeTempo() { m_PercentChange = DEF_Percentage; m_FromBPM = 0.0; // indicates not yet set m_ToBPM = 0.0; // indicates not yet set m_FromLength = 0.0; m_ToLength = 0.0; m_bLoopDetect = false; SetLinearEffectFlag(true); }
EffectChangeSpeed::EffectChangeSpeed() { // effect parameters m_PercentChange = DEF_Percentage; mFromVinyl = kVinyl_33AndAThird; mToVinyl = kVinyl_33AndAThird; mFromLength = 0.0; mToLength = 0.0; mFormat = _("hh:mm:ss + milliseconds"); mbLoopDetect = false; SetLinearEffectFlag(true); }
EffectAutoDuck::EffectAutoDuck() { mDuckAmountDb = DEF_DuckAmountDb; mInnerFadeDownLen = DEF_InnerFadeDownLen; mInnerFadeUpLen = DEF_InnerFadeUpLen; mOuterFadeDownLen = DEF_OuterFadeDownLen; mOuterFadeUpLen = DEF_OuterFadeUpLen; mThresholdDb = DEF_ThresholdDb; mMaximumPause = DEF_MaximumPause; SetLinearEffectFlag(true); mControlTrack = NULL; mPanel = NULL; }
EffectCompressor::EffectCompressor() { mThresholdDB = DEF_Threshold; mNoiseFloorDB = DEF_NoiseFloor; mAttackTime = DEF_AttackTime; // seconds mDecayTime = DEF_ReleaseTime; // seconds mRatio = DEF_Ratio; // positive number > 1.0 mNormalize = DEF_Normalize; mUsePeak = DEF_UsePeak; mThreshold = 0.25; mNoiseFloor = 0.01; mCompression = 0.5; mFollowLen = 0; SetLinearEffectFlag(false); }
EffectReverb::EffectReverb() { mParams.mRoomSize = DEF_RoomSize; mParams.mPreDelay = DEF_PreDelay; mParams.mReverberance = DEF_Reverberance; mParams.mHfDamping = DEF_HfDamping; mParams.mToneLow = DEF_ToneLow; mParams.mToneHigh = DEF_ToneHigh; mParams.mWetGain = DEF_WetGain; mParams.mDryGain = DEF_DryGain; mParams.mStereoWidth = DEF_StereoWidth; mParams.mWetOnly = DEF_WetOnly; mProcessingEvent = false; SetLinearEffectFlag(true); }
EffectScienFilter::EffectScienFilter() : mpBiquad{ size_t( MAX_Order / 2 ), true } { mOrder = DEF_Order; mFilterType = DEF_Type; mFilterSubtype = DEF_Subtype; mCutoff = DEF_Cutoff; mRipple = DEF_Passband; mStopbandRipple = DEF_Stopband; SetLinearEffectFlag(true); mOrderIndex = mOrder - 1; mdBMin = -30.0; mdBMax = 30.0; mLoFreq = 20; // Lowest frequency to display in response graph mNyquist = 44100.0 / 2.0; // only used during initialization, updated when effect is used }
EffectTruncSilence::EffectTruncSilence() { mInitialAllowedSilence = DEF_Minimum; mTruncLongestAllowedSilence = DEF_Truncate; mSilenceCompressPercent = DEF_Compress; mThresholdDB = DEF_Threshold; mActionIndex = DEF_ActIndex; mbIndependent = DEF_Independent; SetLinearEffectFlag(false); // This used to be changeable via the audacity.cfg/registery. Doubtful that was // ever done. // // Original comment: // // mBlendFrameCount only retrieved from prefs ... not using dialog // Only way to change (for windows) is thru registry // The values should be figured dynamically ... too many frames could be invalid mBlendFrameCount = DEF_BlendFrameCount; }
EffectDistortion::EffectDistortion() { wxASSERT(kNumTableTypes == WXSIZEOF(kTableTypeStrings)); mParams.mTableChoiceIndx = DEF_TableTypeIndx; mParams.mDCBlock = DEF_DCBlock; mParams.mThreshold_dB = DEF_Threshold_dB; mThreshold = DB_TO_LINEAR(mParams.mThreshold_dB); mParams.mNoiseFloor = DEF_NoiseFloor; mParams.mParam1 = DEF_Param1; mParams.mParam2 = DEF_Param2; mParams.mRepeats = DEF_Repeats; mMakeupGain = 1.0; mbSavedFilterState = DEF_DCBlock; for (int i = 0; i < kNumTableTypes; i++) { mTableTypes.Add(wxGetTranslation(kTableTypeStrings[i])); } SetLinearEffectFlag(false); }
EffectRepeat::EffectRepeat() { repeatCount = DEF_Count; SetLinearEffectFlag(true); }
EffectSilence::EffectSilence() { SetLinearEffectFlag(true); }