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"
23#include <sbsms.h>
24
25using namespace _sbsms_;
26
27class LabelTrack;
28class TimeWarper;
29
30class EffectSBSMS /* not final */ :
31 public StatefulEffect,
33{
34public:
35 bool Process(EffectInstance &instance, EffectSettings &settings) override;
36 void setParameters(double rateStart, double rateEnd, double pitchStart, double pitchEnd,
37 SlideType rateSlideType, SlideType pitchSlideType,
39 void setParameters(double tempoRatio, double pitchRatio); // Constant ratio (tempoRatio, pitchRatio)
40 static double getInvertedStretchedTime(double rateStart, double rateEnd, SlideType slideType, double outputTime);
41 static double getRate(double rateStart, double rateEnd, SlideType slideType, double t);
42
43protected:
44 TranslatableString mProxyEffectName { XO("SBSMS Time / Pitch Stretch") };
45 // This supplies the abstract virtual function, but in fact this symbol
46 // does not get used: this class is either a temporary helper, or else
47 // GetSymbol() is overridden further in derived classes.
49
50private:
51 EffectType GetType() const override;
52
53 bool ProcessLabelTrack(LabelTrack *track);
57 void Finalize(
58 WaveTrack &orig, const WaveTrack &out, const TimeWarper &warper);
59
62 SlideType rateSlideType;
63 SlideType pitchSlideType;
66
67 friend class EffectChangeTempo;
68 friend class EffectChangePitch;
69};
70
71#endif
72
73#endif
EffectType
XO("Cut/Copy/Paste")
static Settings & settings()
Definition: TrackInfo.cpp:51
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:62
bool bLinkRatePitch
Definition: SBSMSEffect.h:61
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:60
bool ProcessLabelTrack(LabelTrack *track)
friend class EffectChangePitch
Definition: SBSMSEffect.h:68
int mCurTrackNum
Definition: SBSMSEffect.h:64
bool bPitchReferenceInput
Definition: SBSMSEffect.h:61
float mTotalStretch
Definition: SBSMSEffect.h:65
ComponentInterfaceSymbol GetSymbol() const override
Definition: SBSMSEffect.h:48
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:60
SlideType pitchSlideType
Definition: SBSMSEffect.h:63
double pitchEnd
Definition: SBSMSEffect.h:60
bool bRateReferenceInput
Definition: SBSMSEffect.h:61
double rateEnd
Definition: SBSMSEffect.h:60
bool Process(EffectInstance &instance, EffectSettings &settings) override
void Finalize(WaveTrack &orig, const WaveTrack &out, const TimeWarper &warper)
TranslatableString mProxyEffectName
Definition: SBSMSEffect.h:44
static double getRate(double rateStart, double rateEnd, SlideType slideType, double t)
A LabelTrack is a Track that holds labels (LabelStruct).
Definition: LabelTrack.h:98
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:203
Externalized state of a plug-in.