tracktion-engine
3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications
« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_engine
plugins
effects
tracktion_PitchShift.h
Go to the documentation of this file.
1
/*
2
,--. ,--. ,--. ,--.
3
,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2024
4
'-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
5
| | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
6
`---' `--' `--`--'`---'`--'`--' `---' `--' `---' `--''--' www.tracktion.com
7
8
Tracktion Engine uses a GPL/commercial licence - see LICENCE.md for details.
9
*/
10
11
namespace
tracktion
{
inline
namespace
engine
12
{
13
14
class
PitchShiftPlugin
:
public
Plugin
15
{
16
public
:
17
PitchShiftPlugin
(
Edit
&,
const
juce::ValueTree
&);
18
PitchShiftPlugin
(
PluginCreationInfo
);
19
~PitchShiftPlugin
()
override
;
20
21
static
const
char
* getPluginName() {
return
NEEDS_TRANS
(
"Pitch Shifter"
); }
22
static
juce::ValueTree
create();
23
24
//==============================================================================
25
static
const
char
* xmlTypeName;
26
27
juce::String
getName
()
const override
{
return
TRANS
(
"Pitch Shifter"
); }
28
juce::String
getPluginType()
override
{
return
xmlTypeName; }
29
juce::String
getShortName (
int
)
override
{
return
TRANS
(
"Pitch"
); }
30
bool
needsConstantBufferSize()
override
{
return
false
; }
31
32
void
initialise
(
const
PluginInitialisationInfo&)
override
;
33
void
deinitialise
()
override
;
34
double
getLatencySeconds()
override
;
35
int
getNumOutputChannelsGivenInputs
(
int
numInputChannels)
override
{
return
juce::jmin
(numInputChannels, 2); }
36
void
applyToBuffer
(
const
PluginRenderContext
&)
override
;
37
juce::String
getSelectableDescription
()
override
;
38
void
restorePluginStateFromValueTree (
const
juce::ValueTree
&)
override
;
39
40
juce::CachedValue<float>
semitonesValue;
41
juce::CachedValue<int>
mode;
42
juce::CachedValue<TimeStretcher::ElastiqueProOptions>
elastiqueOptions;
43
AutomatableParameter::Ptr
semitones;
44
45
static
float
getMaximumSemitones() {
return
2.0f * 12.0f; }
46
47
private
:
48
struct
Pimpl;
49
std::unique_ptr<Pimpl>
pimpl;
50
51
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR
(
PitchShiftPlugin
)
52
};
53
54
}}
// namespace tracktion { inline namespace engine
juce::CachedValue
juce::ReferenceCountedObjectPtr< AutomatableParameter >
juce::String
tracktion::engine::Edit
The Tracktion Edit class!
Definition
tracktion_Edit.h:65
tracktion::engine::PitchShiftPlugin
Definition
tracktion_PitchShift.h:15
tracktion::engine::PitchShiftPlugin::getNumOutputChannelsGivenInputs
int getNumOutputChannelsGivenInputs(int numInputChannels) override
This must return the number of output channels that the plugin will produce, given a number of input ...
Definition
tracktion_PitchShift.h:35
tracktion::engine::PitchShiftPlugin::initialise
void initialise(const PluginInitialisationInfo &) override
Gives the plugin a chance to set itself up before being played.
Definition
tracktion_PitchShift.cpp:165
tracktion::engine::PitchShiftPlugin::applyToBuffer
void applyToBuffer(const PluginRenderContext &) override
Process the next block of data.
Definition
tracktion_PitchShift.cpp:175
tracktion::engine::PitchShiftPlugin::getSelectableDescription
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
Definition
tracktion_PitchShift.cpp:187
tracktion::engine::PitchShiftPlugin::getName
juce::String getName() const override
The name of the type, e.g.
Definition
tracktion_PitchShift.h:27
tracktion::engine::PitchShiftPlugin::deinitialise
void deinitialise() override
Called after play stops to release resources.
Definition
tracktion_PitchShift.cpp:171
tracktion::engine::Plugin
Definition
tracktion_Plugin.h:114
TRANS
#define TRANS(stringLiteral)
NEEDS_TRANS
#define NEEDS_TRANS(stringLiteral)
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
juce::jmin
constexpr Type jmin(Type a, Type b)
tracktion
Definition
tracktion_AudioReader.h:23
juce::ValueTree
tracktion::engine::PluginCreationInfo
Definition
tracktion_Plugin.h:15
tracktion::engine::PluginRenderContext
The context passed to plugin render methods to provide it with buffers to fill.
Definition
tracktion_Plugin.h:48
std::unique_ptr
« « « Anklang Documentation