11namespace tracktion {
inline namespace engine
26 static const char* getPluginName() {
return NEEDS_TRANS(
"Volume and Pan"); }
29 bool isMasterVolAndPan() {
return isMasterVolume; }
30 bool canBeAddedToRack()
override {
return ! isMasterVolume; }
33 float getVolumeDb()
const;
34 float getSliderPos()
const {
return volParam->getCurrentValue(); }
35 void setVolumeDb (
float vol);
36 void setSliderPos (
float pos);
38 float getPan()
const {
return panParam->getCurrentValue(); }
39 void setPan (
float pan);
41 void setPanLaw (
PanLaw newPanLaw) { panLaw = (
int) newPanLaw; }
42 PanLaw getPanLaw()
const noexcept;
44 void setAppliedToMidiVolumes (
bool);
45 bool isAppliedToMidiVolumes()
const {
return applyToMidi; }
52 static const char* xmlTypeName;
55 juce::String getPluginType()
override {
return xmlTypeName; }
56 juce::String getShortName (
int)
override {
return "VolPan"; }
58 bool needsConstantBufferSize()
override {
return false; }
65 bool canBeMoved()
override {
return ! isMasterVolume; }
75 AutomatableParameter::Ptr volParam, panParam;
78 float lastGainL = 0.0f, lastGainR = 0.0f, lastGainS = 0.0f, lastVolumeBeforeMute = 0.0f;
82 const bool isMasterVolume =
false;
84 void refreshVCATrack();
The Tracktion Edit class!
The built-in Tracktion volume/pan plugin.
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
void deinitialise() override
Called after play stops to release resources.
int getNumOutputChannelsGivenInputs(int numInputs) override
This must return the number of output channels that the plugin will produce, given a number of input ...
bool shoulMeasureCpuUsage() const noexcept final
Plugins can return false if they want to avoid the overhead of measuring the CPU usage.
juce::String getName() const override
The name of the type, e.g.
void initialiseWithoutStopping(const PluginInitialisationInfo &) override
Tells the plugin that the audio graph has changed but the plugin isn't being re-initialised - i....
void applyToBuffer(const PluginRenderContext &) override
Process the next block of data.
A basic spin lock that uses an atomic_flag to store the locked state so should never result in a syst...
#define TRANS(stringLiteral)
#define NEEDS_TRANS(stringLiteral)
constexpr Type jmax(Type a, Type b)
PanLaw
All laws have been designed to be equal-power, excluding linear respectively.
Passed into Plugins when they are being initialised, to give them useful contextual information that ...
The context passed to plugin render methods to provide it with buffers to fill.