JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
juce_AudioPluginInstance.h
Go to the documentation of this file.
1 /*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
12
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
15
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
18
19 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 DISCLAIMED.
22
23 ==============================================================================
24*/
25
26namespace juce
27{
28
29// MSVC does not like it if you override a deprecated method even if you
30// keep the deprecation attribute. Other compilers are more forgiving.
31JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996)
32
33//==============================================================================
49{
50public:
51 //==============================================================================
57 ~AudioPluginInstance() override = default;
58
59 //==============================================================================
61 virtual void fillInPluginDescription (PluginDescription&) const = 0;
62
66 PluginDescription getPluginDescription() const;
67
77 virtual void getExtensions (ExtensionsVisitor&) const;
78
80
85 void addHostedParameter (std::unique_ptr<HostedParameter>);
86
94 void addHostedParameterGroup (std::unique_ptr<AudioProcessorParameterGroup>);
95
103 void setHostedParameterTree (AudioProcessorParameterGroup);
104
110 HostedParameter* getHostedParameter (int index) const;
111
112 #ifndef DOXYGEN
119 [[deprecated ("Use the new typesafe visitor-based interface rather than this function.")]]
120 virtual void* getPlatformSpecificData();
121
122 // Rather than using these methods you should call the corresponding methods
123 // on the AudioProcessorParameter objects returned from getParameters().
124 // See the implementations of the methods below for some examples of how to
125 // do this.
126 //
127 // In addition to being marked as deprecated these methods will assert on
128 // the first call.
129 [[deprecated]] String getParameterID (int index) override;
130 [[deprecated]] float getParameter (int parameterIndex) override;
131 [[deprecated]] void setParameter (int parameterIndex, float newValue) override;
132 [[deprecated]] const String getParameterName (int parameterIndex) override;
133 [[deprecated]] String getParameterName (int parameterIndex, int maximumStringLength) override;
134 [[deprecated]] const String getParameterText (int parameterIndex) override;
135 [[deprecated]] String getParameterText (int parameterIndex, int maximumStringLength) override;
136 [[deprecated]] int getParameterNumSteps (int parameterIndex) override;
137 [[deprecated]] bool isParameterDiscrete (int parameterIndex) const override;
138 [[deprecated]] bool isParameterAutomatable (int parameterIndex) const override;
139 [[deprecated]] float getParameterDefaultValue (int parameterIndex) override;
140 [[deprecated]] String getParameterLabel (int parameterIndex) const override;
141 [[deprecated]] bool isParameterOrientationInverted (int parameterIndex) const override;
142 [[deprecated]] bool isMetaParameter (int parameterIndex) const override;
143 [[deprecated]] AudioProcessorParameter::Category getParameterCategory (int parameterIndex) const override;
144 #endif
145
146protected:
147 //==============================================================================
150 {
151 public:
152 Parameter();
153
154 String getText (float value, int maximumStringLength) const override;
155 float getValueForText (const String& text) const override;
156
157 private:
158 const StringArray onStrings, offStrings;
159 };
160
161 AudioPluginInstance() = default;
163 template <size_t numLayouts>
165
166private:
167 // It's not safe to add a plain AudioProcessorParameter to an AudioPluginInstance.
168 // Instead, all parameters must be HostedParameters.
172
173 void assertOnceOnDeprecatedMethodUse() const noexcept;
174
175 static bool deprecationAssertiontriggered;
176
178};
179
180JUCE_END_IGNORE_WARNINGS_MSVC
181
182} // namespace juce
Base class for an active instance of a plugin.
~AudioPluginInstance() override=default
Destructor.
virtual void fillInPluginDescription(PluginDescription &) const =0
Fills-in the appropriate parts of this plugin description object.
A class encapsulating a group of AudioProcessorParameters and nested AudioProcessorParameterGroups.
Base class for audio processing classes or plugins.
void setParameterTree(AudioProcessorParameterGroup &&newTree)
Sets the group of parameters managed by this AudioProcessor.
void addParameter(AudioProcessorParameter *)
Adds a parameter to the AudioProcessor.
void addParameterGroup(std::unique_ptr< AudioProcessorParameterGroup >)
Adds a group of parameters to the AudioProcessor.
A small class to represent some facts about a particular type of plug-in.
A special array for holding a list of strings.
The JUCE String class!
Definition juce_String.h:53
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
This is a shorthand way of writing both a JUCE_DECLARE_NON_COPYABLE and JUCE_LEAK_DETECTOR macro for ...
JUCE Namespace.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
Definition juce_Memory.h:88
Structure used to describe plugin parameters.
Structure used for AudioProcessor Callbacks.
Create a derived implementation of this class and pass it to AudioPluginInstance::getExtensions() to ...
A parameter with functions that are useful for plugin hosts.