Audacity 3.2.0
SBSMSEffect.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 SBSMSEffect.h
6
7 ClaytonOtey
8
9 This abstract class contains all of the common code for an
10 effect that uses SBSMS to do its processing (TimeScale)
11
12**********************************************************************/
13
14#ifndef __AUDACITY_EFFECT_SBSMS__
15#define __AUDACITY_EFFECT_SBSMS__
16
17
18
19#if USE_SBSMS
20
21#include "StatefulEffect.h"
22#include <sbsms.h>
23
24using namespace _sbsms_;
25
26class LabelTrack;
27class TimeWarper;
28
29class EffectSBSMS /* not final */ : public StatefulEffect
30{
31public:
32 bool Process(EffectInstance &instance, EffectSettings &settings) override;
33 void setParameters(double rateStart, double rateEnd, double pitchStart, double pitchEnd,
34 SlideType rateSlideType, SlideType pitchSlideType,
36 void setParameters(double tempoRatio, double pitchRatio); // Constant ratio (tempoRatio, pitchRatio)
37 static double getInvertedStretchedTime(double rateStart, double rateEnd, SlideType slideType, double outputTime);
38 static double getRate(double rateStart, double rateEnd, SlideType slideType, double t);
39
40protected:
41 TranslatableString mProxyEffectName { XO("SBSMS Time / Pitch Stretch") };
42 // This supplies the abstract virtual function, but in fact this symbol
43 // does not get used: this class is either a temporary helper, or else
44 // GetSymbol() is overridden further in derived classes.
46
47private:
48 EffectType GetType() const override;
49
50 bool ProcessLabelTrack(LabelTrack *track);
56 void Finalize(
57 WaveTrack &orig, const WaveTrack &out, const TimeWarper &warper);
58
61 SlideType rateSlideType;
62 SlideType pitchSlideType;
65
66 friend class EffectChangeTempo;
67 friend class EffectChangePitch;
68};
69
70#endif
71
72#endif
EffectType
XO("Cut/Copy/Paste")
static Settings & settings()
Definition: TrackInfo.cpp:69
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
An EffectSoundTouch provides speeding up or slowing down tempo without changing pitch.
Performs effect computation.
SlideType rateSlideType
Definition: SBSMSEffect.h:61
bool bLinkRatePitch
Definition: SBSMSEffect.h:60
void setParameters(double rateStart, double rateEnd, double pitchStart, double pitchEnd, SlideType rateSlideType, SlideType pitchSlideType, bool bLinkRatePitch, bool bRateReferenceInput, bool bPitchReferenceInput)
double pitchStart
Definition: SBSMSEffect.h:59
bool ProcessLabelTrack(LabelTrack *track)
friend class EffectChangePitch
Definition: SBSMSEffect.h:67
int mCurTrackNum
Definition: SBSMSEffect.h:63
bool bPitchReferenceInput
Definition: SBSMSEffect.h:60
float mTotalStretch
Definition: SBSMSEffect.h:64
ComponentInterfaceSymbol GetSymbol() const override
Definition: SBSMSEffect.h:45
static double getInvertedStretchedTime(double rateStart, double rateEnd, SlideType slideType, double outputTime)
EffectType GetType() const override
Type determines how it behaves.
double rateStart
Definition: SBSMSEffect.h:59
SlideType pitchSlideType
Definition: SBSMSEffect.h:62
double pitchEnd
Definition: SBSMSEffect.h:59
bool bRateReferenceInput
Definition: SBSMSEffect.h:60
double rateEnd
Definition: SBSMSEffect.h:59
bool Process(EffectInstance &instance, EffectSettings &settings) override
void Finalize(WaveTrack &orig, const WaveTrack &out, const TimeWarper &warper)
TranslatableString mProxyEffectName
Definition: SBSMSEffect.h:41
static double getRate(double rateStart, double rateEnd, SlideType slideType, double t)
A LabelTrack is a Track that holds labels (LabelStruct).
Definition: LabelTrack.h:87
Transforms one point in time to another point. For example, a time stretching effect might use one to...
Definition: TimeWarper.h:62
Holds a msgid for the translation catalog; may also bind format arguments.
A Track that contains audio waveform data.
Definition: WaveTrack.h:227
Externalized state of a plug-in.