mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-26 00:03:52 +02:00
Pass name of proxy effect to EffectSBSMS
Allows progress bar to show meaningful title when using SBSMS time stretching in Change Pitch/Tempo.
This commit is contained in:
@@ -185,6 +185,7 @@ bool EffectChangePitch::Process()
|
|||||||
double pitchRatio = 1.0 + m_dPercentChange / 100.0;
|
double pitchRatio = 1.0 + m_dPercentChange / 100.0;
|
||||||
SelectedRegion region(mT0, mT1);
|
SelectedRegion region(mT0, mT1);
|
||||||
EffectSBSMS proxy;
|
EffectSBSMS proxy;
|
||||||
|
proxy.mProxyEffectName = XO("High Quality Pitch Change");
|
||||||
proxy.setParameters(1.0, pitchRatio);
|
proxy.setParameters(1.0, pitchRatio);
|
||||||
|
|
||||||
return proxy.DoEffect(mUIParent, mProjectRate, mTracks, mFactory, ®ion, false);
|
return proxy.DoEffect(mUIParent, mProjectRate, mTracks, mFactory, ®ion, false);
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ bool EffectChangeTempo::Process()
|
|||||||
double tempoRatio = 1.0 + m_PercentChange / 100.0;
|
double tempoRatio = 1.0 + m_PercentChange / 100.0;
|
||||||
SelectedRegion region(mT0, mT1);
|
SelectedRegion region(mT0, mT1);
|
||||||
EffectSBSMS proxy;
|
EffectSBSMS proxy;
|
||||||
|
proxy.mProxyEffectName = XO("High Quality Tempo Change");
|
||||||
proxy.setParameters(tempoRatio, 1.0);
|
proxy.setParameters(tempoRatio, 1.0);
|
||||||
success = proxy.DoEffect(mUIParent, mProjectRate, mTracks, mFactory, ®ion, false);
|
success = proxy.DoEffect(mUIParent, mProjectRate, mTracks, mFactory, ®ion, false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,11 @@ public:
|
|||||||
void setParameters(double tempoRatio, double pitchRatio); // Constant ratio (tempoRatio, pitchRatio)
|
void setParameters(double tempoRatio, double pitchRatio); // Constant ratio (tempoRatio, pitchRatio)
|
||||||
static double getInvertedStretchedTime(double rateStart, double rateEnd, SlideType slideType, double outputTime);
|
static double getInvertedStretchedTime(double rateStart, double rateEnd, SlideType slideType, double outputTime);
|
||||||
static double getRate(double rateStart, double rateEnd, SlideType slideType, double t);
|
static double getRate(double rateStart, double rateEnd, SlideType slideType, double t);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxString mProxyEffectName { XO("SBSMS Time / Pitch Stretch") };
|
||||||
|
wxString GetName() override { return mProxyEffectName; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool ProcessLabelTrack(Track *track);
|
bool ProcessLabelTrack(Track *track);
|
||||||
double rateStart, rateEnd, pitchStart, pitchEnd;
|
double rateStart, rateEnd, pitchStart, pitchEnd;
|
||||||
@@ -41,6 +46,9 @@ private:
|
|||||||
double mCurT0;
|
double mCurT0;
|
||||||
double mCurT1;
|
double mCurT1;
|
||||||
float mTotalStretch;
|
float mTotalStretch;
|
||||||
|
|
||||||
|
friend class EffectChangeTempo;
|
||||||
|
friend class EffectChangePitch;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user