Audacity 3.2.0
ChangeTempoBase.h
Go to the documentation of this file.
1#pragma once
2
3#include "SettingsVisitor.h"
4#include "SoundTouchBase.h"
5
6class BUILTIN_EFFECTS_API ChangeTempoBase : public SoundTouchBase
7{
8public:
9 static inline ChangeTempoBase*
11 {
12 return &e;
13 }
15
17 virtual ~ChangeTempoBase();
18
19 // ComponentInterface implementation
20
21 ComponentInterfaceSymbol GetSymbol() const override;
22 TranslatableString GetDescription() const override;
23 ManualPageID ManualPage() const override;
24
25 // EffectDefinitionInterface implementation
26
27 EffectType GetType() const override;
28 bool SupportsAutomation() const override;
29
30 // Effect implementation
31
32 bool Init() override;
33 bool CheckWhetherSkipEffect(const EffectSettings& settings) const override;
34 bool Process(EffectInstance& instance, EffectSettings& settings) override;
35 double CalcPreviewInputLength(
36 const EffectSettings& settings, double previewLength) const override;
37
38protected:
39 const EffectParameterMethods& Parameters() const override;
40
42 double m_PercentChange; // percent change to apply to tempo
43 // -100% is meaningless, but sky's the upper limit
44 double m_FromBPM; // user-set beats-per-minute. Zero means not yet set.
45 double m_ToBPM; // Zero value means not yet set.
46 double m_FromLength; // starting length of selection
47 double m_ToLength; // target length of selection
48
50
51 static constexpr EffectParameter Percentage {
52 &ChangeTempoBase::m_PercentChange, L"Percentage", 0.0, -95.0, 3000.0, 1
53 };
54 static constexpr EffectParameter UseSBSMS {
55 &ChangeTempoBase::mUseSBSMS, L"SBSMS", false, false, true, 1
56 };
57};
EffectType
static Settings & settings()
Definition: TrackInfo.cpp:51
static const ComponentInterfaceSymbol Symbol
static ChangeTempoBase * FetchParameters(ChangeTempoBase &e, EffectSettings &)
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Performs effect computation.
Interface for manipulations of an Effect's settings.
Holds a msgid for the translation catalog; may also bind format arguments.
Externalized state of a plug-in.