2
// This is a skeleton file for use in creating your own plugin
3
// libraries. Replace MyPlugin and myPlugin throughout with the name
4
// of your first plugin class, and fill in the gaps as appropriate.
10
MyPlugin::MyPlugin(float inputSampleRate) :
11
Plugin(inputSampleRate)
20
MyPlugin::getIdentifier() const
26
MyPlugin::getName() const
32
MyPlugin::getDescription() const
34
// Return something helpful here!
39
MyPlugin::getMaker() const
46
MyPlugin::getPluginVersion() const
48
// Increment this each time you release a version that behaves
49
// differently from the previous one
54
MyPlugin::getCopyright() const
56
// This function is not ideally named. It does not necessarily
57
// need to say who made the plugin -- getMaker does that -- but it
58
// should indicate the terms under which it is distributed. For
59
// example, "Copyright (year). All Rights Reserved", or "GPL"
64
MyPlugin::getInputDomain() const
70
MyPlugin::getPreferredBlockSize() const
72
return 0; // 0 means "I can handle any block size"
76
MyPlugin::getPreferredStepSize() const
78
return 0; // 0 means "anything sensible"; in practice this
79
// means the same as the block size for TimeDomain
80
// plugins, or half of it for FrequencyDomain plugins
84
MyPlugin::getMinChannelCount() const
90
MyPlugin::getMaxChannelCount() const
95
MyPlugin::ParameterList
96
MyPlugin::getParameterDescriptors() const
100
// If the plugin has no adjustable parameters, return an empty
101
// list here (and there's no need to provide implementations of
102
// getParameter and setParameter in that case either).
104
ParameterDescriptor d;
105
d.identifier = "parameter";
106
d.name = "Some Parameter";
112
d.isQuantized = false;
119
MyPlugin::getParameter(string identifier) const
121
if (identifier == "parameter") {
122
return 5; // return the ACTUAL current value of your parameter here!
128
MyPlugin::setParameter(string identifier, float value)
130
if (identifier == "parameter") {
131
// set the actual value of your parameter
135
MyPlugin::ProgramList
136
MyPlugin::getPrograms() const
140
// If you have no programs, return an empty list (or simply don't
141
// implement this function or getCurrentProgram/selectProgram)
147
MyPlugin::getCurrentProgram() const
149
return ""; // no programs
153
MyPlugin::selectProgram(string name)
158
MyPlugin::getOutputDescriptors() const
162
// See OutputDescriptor documentation for the possibilities here.
163
// Every plugin must have at least one output.
166
d.identifier = "output";
167
d.name = "My Output";
170
d.hasFixedBinCount = true;
172
d.hasKnownExtents = false;
173
d.isQuantized = false;
174
d.sampleType = OutputDescriptor::OneSamplePerStep;
175
d.hasDuration = false;
182
MyPlugin::initialise(size_t channels, size_t stepSize, size_t blockSize)
184
if (channels < getMinChannelCount() ||
185
channels > getMaxChannelCount()) return false;
187
// Real initialisation work goes here!
195
// Clear buffers, reset stored values, etc
199
MyPlugin::process(const float *const *inputBuffers, Vamp::RealTime timestamp)
206
MyPlugin::getRemainingFeatures()