DISTRHO Plugin Framework
DistrhoPlugin.hpp
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DISTRHO_PLUGIN_HPP_INCLUDED
18 #define DISTRHO_PLUGIN_HPP_INCLUDED
19 
20 #include "extra/String.hpp"
21 #include "extra/LeakDetector.hpp"
22 #include "src/DistrhoPluginChecks.h"
23 
24 START_NAMESPACE_DISTRHO
25 
26 /* ------------------------------------------------------------------------------------------------------------
27  * Audio Port Hints */
28 
29 /**
30  @defgroup AudioPortHints Audio Port Hints
31 
32  Various audio port hints.
33  @see AudioPort::hints
34  @{
35  */
36 
37 /**
38  Audio port can be used as control voltage (LV2 only).
39  */
40 static const uint32_t kAudioPortIsCV = 0x1;
41 
42 /**
43  Audio port should be used as sidechan (LV2 only).
44  */
45 static const uint32_t kAudioPortIsSidechain = 0x2;
46 
47 /** @} */
48 
49 /* ------------------------------------------------------------------------------------------------------------
50  * Parameter Hints */
51 
52 /**
53  @defgroup ParameterHints Parameter Hints
54 
55  Various parameter hints.
56  @see Parameter::hints
57  @{
58  */
59 
60 /**
61  Parameter is automable (real-time safe).
62  @see Plugin::setParameterValue(uint32_t, float)
63  */
64 static const uint32_t kParameterIsAutomable = 0x01;
65 
66 /**
67  Parameter value is boolean.@n
68  It's always at either minimum or maximum value.
69  */
70 static const uint32_t kParameterIsBoolean = 0x02;
71 
72 /**
73  Parameter value is integer.
74  */
75 static const uint32_t kParameterIsInteger = 0x04;
76 
77 /**
78  Parameter value is logarithmic.
79  */
80 static const uint32_t kParameterIsLogarithmic = 0x08;
81 
82 /**
83  Parameter is of output type.@n
84  When unset, parameter is assumed to be of input type.
85 
86  Parameter inputs are changed by the host and must not be changed by the plugin.@n
87  The only exception being when changing programs, see Plugin::loadProgram().@n
88  Outputs are changed by the plugin and never modified by the host.
89  */
90 static const uint32_t kParameterIsOutput = 0x10;
91 
92 /** @} */
93 
94 /* ------------------------------------------------------------------------------------------------------------
95  * Base Plugin structs */
96 
97 /**
98  @defgroup BasePluginStructs Base Plugin Structs
99  @{
100  */
101 
102 /**
103  Audio Port.
104  */
105 struct AudioPort {
106  /**
107  Hints describing this audio port.
108  @see AudioPortHints
109  */
110  uint32_t hints;
111 
112  /**
113  The name of this audio port.@n
114  An audio port name can contain any character, but hosts might have a hard time with non-ascii ones.@n
115  The name doesn't have to be unique within a plugin instance, but it's recommended.
116  */
118 
119  /**
120  The symbol of this audio port.@n
121  An audio port symbol is a short restricted name used as a machine and human readable identifier.@n
122  The first character must be one of _, a-z or A-Z and subsequent characters can be from _, a-z, A-Z and 0-9.
123  @note Audio port and parameter symbols MUST be unique within a plugin instance.
124  */
126 
127  /**
128  Default constructor for a regular audio port.
129  */
130  AudioPort() noexcept
131  : hints(0x0),
132  name(),
133  symbol() {}
134 };
135 
136 /**
137  Parameter ranges.@n
138  This is used to set the default, minimum and maximum values of a parameter.
139 
140  By default a parameter has 0.0 as minimum, 1.0 as maximum and 0.0 as default.@n
141  When changing this struct values you must ensure maximum > minimum and default is within range.
142  */
144  /**
145  Default value.
146  */
147  float def;
148 
149  /**
150  Minimum value.
151  */
152  float min;
153 
154  /**
155  Maximum value.
156  */
157  float max;
158 
159  /**
160  Default constructor, using 0.0 as minimum, 1.0 as maximum and 0.0 as default.
161  */
162  ParameterRanges() noexcept
163  : def(0.0f),
164  min(0.0f),
165  max(1.0f) {}
166 
167  /**
168  Constructor using custom values.
169  */
170  ParameterRanges(float df, float mn, float mx) noexcept
171  : def(df),
172  min(mn),
173  max(mx) {}
174 
175  /**
176  Fix the default value within range.
177  */
178  void fixDefault() noexcept
179  {
180  fixValue(def);
181  }
182 
183  /**
184  Fix a value within range.
185  */
186  void fixValue(float& value) const noexcept
187  {
188  if (value < min)
189  value = min;
190  else if (value > max)
191  value = max;
192  }
193 
194  /**
195  Get a fixed value within range.
196  */
197  const float& getFixedValue(const float& value) const noexcept
198  {
199  if (value <= min)
200  return min;
201  if (value >= max)
202  return max;
203  return value;
204  }
205 
206  /**
207  Get a value normalized to 0.0<->1.0.
208  */
209  float getNormalizedValue(const float& value) const noexcept
210  {
211  const float normValue((value - min) / (max - min));
212 
213  if (normValue <= 0.0f)
214  return 0.0f;
215  if (normValue >= 1.0f)
216  return 1.0f;
217  return normValue;
218  }
219 
220  /**
221  Get a value normalized to 0.0<->1.0, fixed within range.
222  */
223  float getFixedAndNormalizedValue(const float& value) const noexcept
224  {
225  if (value <= min)
226  return 0.0f;
227  if (value >= max)
228  return 1.0f;
229 
230  const float normValue((value - min) / (max - min));
231 
232  if (normValue <= 0.0f)
233  return 0.0f;
234  if (normValue >= 1.0f)
235  return 1.0f;
236 
237  return normValue;
238  }
239 
240  /**
241  Get a proper value previously normalized to 0.0<->1.0.
242  */
243  float getUnnormalizedValue(const float& value) const noexcept
244  {
245  if (value <= 0.0f)
246  return min;
247  if (value >= 1.0f)
248  return max;
249 
250  return value * (max - min) + min;
251  }
252 };
253 
254 /**
255  Parameter.
256  */
257 struct Parameter {
258  /**
259  Hints describing this parameter.
260  @see ParameterHints
261  */
262  uint32_t hints;
263 
264  /**
265  The name of this parameter.@n
266  A parameter name can contain any character, but hosts might have a hard time with non-ascii ones.@n
267  The name doesn't have to be unique within a plugin instance, but it's recommended.
268  */
270 
271  /**
272  The symbol of this parameter.@n
273  A parameter symbol is a short restricted name used as a machine and human readable identifier.@n
274  The first character must be one of _, a-z or A-Z and subsequent characters can be from _, a-z, A-Z and 0-9.
275  @note Parameter symbols MUST be unique within a plugin instance.
276  */
278 
279  /**
280  The unit of this parameter.@n
281  This means something like "dB", "kHz" and "ms".@n
282  Can be left blank if a unit does not apply to this parameter.
283  */
285 
286  /**
287  Ranges of this parameter.@n
288  The ranges describe the default, minimum and maximum values.
289  */
291 
292  /**
293  Default constructor for a null parameter.
294  */
295  Parameter() noexcept
296  : hints(0x0),
297  name(),
298  symbol(),
299  unit(),
300  ranges() {}
301 
302  /**
303  Constructor using custom values.
304  */
305  Parameter(uint32_t h, const char* n, const char* s, const char* u, float def, float min, float max) noexcept
306  : hints(h),
307  name(n),
308  symbol(s),
309  unit(u),
310  ranges(def, min, max) {}
311 };
312 
313 /**
314  MIDI event.
315  */
316 struct MidiEvent {
317  /**
318  Size of internal data.
319  */
320  static const uint32_t kDataSize = 4;
321 
322  /**
323  Time offset in frames.
324  */
325  uint32_t frame;
326 
327  /**
328  Number of bytes used.
329  */
330  uint32_t size;
331 
332  /**
333  MIDI data.@n
334  If size > kDataSize, dataExt is used (otherwise null).
335  */
336  uint8_t data[kDataSize];
337  const uint8_t* dataExt;
338 };
339 
340 /**
341  Time position.@n
342  The @a playing and @a frame values are always valid.@n
343  BBT values are only valid when @a bbt.valid is true.
344 
345  This struct is inspired by the JACK Transport API.
346  */
347 struct TimePosition {
348  /**
349  Wherever the host transport is playing/rolling.
350  */
351  bool playing;
352 
353  /**
354  Current host transport position in frames.
355  */
356  uint64_t frame;
357 
358  /**
359  Bar-Beat-Tick time position.
360  */
361  struct BarBeatTick {
362  /**
363  Wherever the host transport is using BBT.@n
364  If false you must not read from this struct.
365  */
366  bool valid;
367 
368  /**
369  Current bar.@n
370  Should always be > 0.@n
371  The first bar is bar '1'.
372  */
373  int32_t bar;
374 
375  /**
376  Current beat within bar.@n
377  Should always be > 0 and <= @a beatsPerBar.@n
378  The first beat is beat '1'.
379  */
380  int32_t beat;
381 
382  /**
383  Current tick within beat.@n
384  Should always be > 0 and <= @a ticksPerBeat.@n
385  The first tick is tick '0'.
386  */
387  int32_t tick;
388 
389  /**
390  Number of ticks that have elapsed between frame 0 and the first beat of the current measure.
391  */
392  double barStartTick;
393 
394  /**
395  Time signature "numerator".
396  */
397  float beatsPerBar;
398 
399  /**
400  Time signature "denominator".
401  */
402  float beatType;
403 
404  /**
405  Number of ticks within a bar.@n
406  Usually a moderately large integer with many denominators, such as 1920.0.
407  */
408  double ticksPerBeat;
409 
410  /**
411  Number of beats per minute.
412  */
414 
415  /**
416  Default constructor for a null BBT time position.
417  */
418  BarBeatTick() noexcept
419  : valid(false),
420  bar(0),
421  beat(0),
422  tick(0),
423  barStartTick(0.0),
424  beatsPerBar(0.0f),
425  beatType(0.0f),
426  ticksPerBeat(0.0),
427  beatsPerMinute(0.0) {}
428  } bbt;
429 
430  /**
431  Default constructor for a time position.
432  */
433  TimePosition() noexcept
434  : playing(false),
435  frame(0),
436  bbt() {}
437 };
438 
439 /** @} */
440 
441 /* ------------------------------------------------------------------------------------------------------------
442  * DPF Plugin */
443 
444 /**
445  @defgroup MainClasses Main Classes
446  @{
447  */
448 
449 /**
450  DPF Plugin class from where plugin instances are created.
451 
452  The public methods (Host state) are called from the plugin to get or set host information.@n
453  They can be called from a plugin instance at anytime unless stated otherwise.@n
454  All other methods are to be implemented by the plugin and will be called by the host.
455 
456  Shortly after a plugin instance is created, the various init* functions will be called by the host.@n
457  Host will call activate() before run(), and deactivate() before the plugin instance is destroyed.@n
458  The host may call deactivate right after activate and vice-versa, but never activate/deactivate consecutively.@n
459  There is no limit on how many times run() is called, only that activate/deactivate will be called in between.
460 
461  The buffer size and sample rate values will remain constant between activate and deactivate.@n
462  Buffer size is only a hint though, the host might call run() with a higher or lower number of frames.
463 
464  Some of this class functions are only available according to some macros.
465 
466  DISTRHO_PLUGIN_WANT_PROGRAMS activates program related features.@n
467  When enabled you need to implement initProgramName() and loadProgram().
468 
469  DISTRHO_PLUGIN_WANT_STATE activates internal state features.@n
470  When enabled you need to implement initStateKey() and setState().
471 
472  The process function run() changes wherever DISTRHO_PLUGIN_WANT_MIDI_INPUT is enabled or not.@n
473  When enabled it provides midi input events.
474  */
475 class Plugin
476 {
477 public:
478  /**
479  Plugin class constructor.@n
480  You must set all parameter values to their defaults, matching ParameterRanges::def.
481  */
482  Plugin(uint32_t parameterCount, uint32_t programCount, uint32_t stateCount);
483 
484  /**
485  Destructor.
486  */
487  virtual ~Plugin();
488 
489  /* --------------------------------------------------------------------------------------------------------
490  * Host state */
491 
492  /**
493  Get the current buffer size that will probably be used during processing, in frames.@n
494  This value will remain constant between activate and deactivate.
495  @note This value is only a hint!@n
496  Hosts might call run() with a higher or lower number of frames.
497  @see bufferSizeChanged(uint32_t)
498  */
499  uint32_t getBufferSize() const noexcept;
500 
501  /**
502  Get the current sample rate that will be used during processing.@n
503  This value will remain constant between activate and deactivate.
504  @see sampleRateChanged(double)
505  */
506  double getSampleRate() const noexcept;
507 
508 #if DISTRHO_PLUGIN_WANT_TIMEPOS
509  /**
510  Get the current host transport time position.@n
511  This function should only be called during run().@n
512  You can call this during other times, but the returned position is not guaranteed to be in sync.
513  @note TimePosition is not supported in LADSPA and DSSI plugin formats.
514  */
515  const TimePosition& getTimePosition() const noexcept;
516 #endif
517 
518 #if DISTRHO_PLUGIN_WANT_LATENCY
519  /**
520  Change the plugin audio output latency to @a frames.@n
521  This function should only be called in the constructor, activate() and run().
522  @note This function is only available if DISTRHO_PLUGIN_WANT_LATENCY is enabled.
523  */
524  void setLatency(uint32_t frames) noexcept;
525 #endif
526 
527 #if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
528  /**
529  Write a MIDI output event.@n
530  This function must only be called during run().@n
531  Returns false when the host buffer is full, in which case do not call this again until the next run().
532  @note This function is not implemented yet!@n
533  It's here so that developers can prepare MIDI plugins in advance.@n
534  If you plan to use this, please report to DPF authos so it can be implemented.
535  */
536  bool writeMidiEvent(const MidiEvent& midiEvent) noexcept;
537 #endif
538 
539 protected:
540  /* --------------------------------------------------------------------------------------------------------
541  * Information */
542 
543  /**
544  Get the plugin name.@n
545  Returns DISTRHO_PLUGIN_NAME by default.
546  */
547  virtual const char* getName() const { return DISTRHO_PLUGIN_NAME; }
548 
549  /**
550  Get the plugin label.@n
551  This label is a short restricted name consisting of only _, a-z, A-Z and 0-9 characters.
552  */
553  virtual const char* getLabel() const = 0;
554 
555  /**
556  Get an extensive comment/description about the plugin.@n
557  Optional, returns nothing by default.
558  */
559  virtual const char* getDescription() const { return ""; }
560 
561  /**
562  Get the plugin author/maker.
563  */
564  virtual const char* getMaker() const = 0;
565 
566  /**
567  Get the plugin homepage.@n
568  Optional, returns nothing by default.
569  */
570  virtual const char* getHomePage() const { return ""; }
571 
572  /**
573  Get the plugin license (a single line of text or a URL).@n
574  For commercial plugins this should return some short copyright information.
575  */
576  virtual const char* getLicense() const = 0;
577 
578  /**
579  Get the plugin version, in hexadecimal.
580  @see d_version()
581  */
582  virtual uint32_t getVersion() const = 0;
583 
584  /**
585  Get the plugin unique Id.@n
586  This value is used by LADSPA, DSSI and VST plugin formats.
587  @see d_cconst()
588  */
589  virtual int64_t getUniqueId() const = 0;
590 
591  /* --------------------------------------------------------------------------------------------------------
592  * Init */
593 
594  /**
595  Initialize the audio port @a index.@n
596  This function will be called once, shortly after the plugin is created.
597  */
598  virtual void initAudioPort(bool input, uint32_t index, AudioPort& port);
599 
600  /**
601  Initialize the parameter @a index.@n
602  This function will be called once, shortly after the plugin is created.
603  */
604  virtual void initParameter(uint32_t index, Parameter& parameter) = 0;
605 
606 #if DISTRHO_PLUGIN_WANT_PROGRAMS
607  /**
608  Set the name of the program @a index.@n
609  This function will be called once, shortly after the plugin is created.@n
610  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_PROGRAMS is enabled.
611  */
612  virtual void initProgramName(uint32_t index, String& programName) = 0;
613 #endif
614 
615 #if DISTRHO_PLUGIN_WANT_STATE
616  /**
617  Set the state key and default value of @a index.@n
618  This function will be called once, shortly after the plugin is created.@n
619  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is enabled.
620  */
621  virtual void initState(uint32_t index, String& stateKey, String& defaultStateValue) = 0;
622 #endif
623 
624  /* --------------------------------------------------------------------------------------------------------
625  * Internal data */
626 
627  /**
628  Get the current value of a parameter.@n
629  The host may call this function from any context, including realtime processing.
630  */
631  virtual float getParameterValue(uint32_t index) const = 0;
632 
633  /**
634  Change a parameter value.@n
635  The host may call this function from any context, including realtime processing.@n
636  When a parameter is marked as automable, you must ensure no non-realtime operations are performed.
637  @note This function will only be called for parameter inputs.
638  */
639  virtual void setParameterValue(uint32_t index, float value) = 0;
640 
641 #if DISTRHO_PLUGIN_WANT_PROGRAMS
642  /**
643  Load a program.@n
644  The host may call this function from any context, including realtime processing.@n
645  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_PROGRAMS is enabled.
646  */
647  virtual void loadProgram(uint32_t index) = 0;
648 #endif
649 
650 #if DISTRHO_PLUGIN_WANT_FULL_STATE
651  /**
652  Get the value of an internal state.@n
653  The host may call this function from any non-realtime context.@n
654  Must be implemented by your plugin class if DISTRHO_PLUGIN_WANT_PROGRAMS or DISTRHO_PLUGIN_WANT_FULL_STATE is enabled.
655  @note The use of this function breaks compatibility with the DSSI format.
656  */
657  virtual String getState(const char* key) const = 0;
658 #endif
659 
660 #if DISTRHO_PLUGIN_WANT_STATE
661  /**
662  Change an internal state @a key to @a value.@n
663  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is enabled.
664  */
665  virtual void setState(const char* key, const char* value) = 0;
666 #endif
667 
668  /* --------------------------------------------------------------------------------------------------------
669  * Audio/MIDI Processing */
670 
671  /**
672  Activate this plugin.
673  */
674  virtual void activate() {}
675 
676  /**
677  Deactivate this plugin.
678  */
679  virtual void deactivate() {}
680 
681 #if DISTRHO_PLUGIN_WANT_MIDI_INPUT
682  /**
683  Run/process function for plugins with MIDI input.
684  @note Some parameters might be null if there are no audio inputs/outputs or MIDI events.
685  */
686  virtual void run(const float** inputs, float** outputs, uint32_t frames,
687  const MidiEvent* midiEvents, uint32_t midiEventCount) = 0;
688 #else
689  /**
690  Run/process function for plugins without MIDI input.
691  @note Some parameters might be null if there are no audio inputs or outputs.
692  */
693  virtual void run(const float** inputs, float** outputs, uint32_t frames) = 0;
694 #endif
695 
696  /* --------------------------------------------------------------------------------------------------------
697  * Callbacks (optional) */
698 
699  /**
700  Optional callback to inform the plugin about a buffer size change.@n
701  This function will only be called when the plugin is deactivated.
702  @note This value is only a hint!@n
703  Hosts might call run() with a higher or lower number of frames.
704  @see getBufferSize()
705  */
706  virtual void bufferSizeChanged(uint32_t newBufferSize);
707 
708  /**
709  Optional callback to inform the plugin about a sample rate change.@n
710  This function will only be called when the plugin is deactivated.
711  @see getSampleRate()
712  */
713  virtual void sampleRateChanged(double newSampleRate);
714 
715  // -------------------------------------------------------------------------------------------------------
716 
717 private:
718  struct PrivateData;
719  PrivateData* const pData;
720  friend class PluginExporter;
721 
722  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Plugin)
723 };
724 
725 /** @} */
726 
727 /* ------------------------------------------------------------------------------------------------------------
728  * Create plugin, entry point */
729 
730 /**
731  @defgroup EntryPoints Entry Points
732  @{
733  */
734 
735 /**
736  TODO.
737  */
738 extern Plugin* createPlugin();
739 
740 /** @} */
741 
742 // -----------------------------------------------------------------------------------------------------------
743 
744 END_NAMESPACE_DISTRHO
745 
746 #endif // DISTRHO_PLUGIN_HPP_INCLUDED
float min
Definition: DistrhoPlugin.hpp:152
Definition: DistrhoPlugin.hpp:105
virtual void activate()
Definition: DistrhoPlugin.hpp:674
Parameter() noexcept
Definition: DistrhoPlugin.hpp:295
Plugin * createPlugin()
uint32_t frame
Definition: DistrhoPlugin.hpp:325
uint32_t size
Definition: DistrhoPlugin.hpp:330
String name
Definition: DistrhoPlugin.hpp:117
String symbol
Definition: DistrhoPlugin.hpp:277
String symbol
Definition: DistrhoPlugin.hpp:125
void fixValue(float &value) const noexcept
Definition: DistrhoPlugin.hpp:186
virtual void deactivate()
Definition: DistrhoPlugin.hpp:679
double ticksPerBeat
Definition: DistrhoPlugin.hpp:408
Definition: DistrhoPlugin.hpp:316
int32_t bar
Definition: DistrhoPlugin.hpp:373
Definition: String.hpp:29
#define DISTRHO_PLUGIN_NAME
Definition: DistrhoInfo.hpp:466
static const uint32_t kAudioPortIsSidechain
Definition: DistrhoPlugin.hpp:45
ParameterRanges() noexcept
Definition: DistrhoPlugin.hpp:162
double beatsPerMinute
Definition: DistrhoPlugin.hpp:413
uint32_t hints
Definition: DistrhoPlugin.hpp:262
Definition: DistrhoPlugin.hpp:475
float getUnnormalizedValue(const float &value) const noexcept
Definition: DistrhoPlugin.hpp:243
bool playing
Definition: DistrhoPlugin.hpp:351
int32_t tick
Definition: DistrhoPlugin.hpp:387
float beatsPerBar
Definition: DistrhoPlugin.hpp:397
uint32_t hints
Definition: DistrhoPlugin.hpp:110
TimePosition() noexcept
Definition: DistrhoPlugin.hpp:433
uint64_t frame
Definition: DistrhoPlugin.hpp:356
BarBeatTick() noexcept
Definition: DistrhoPlugin.hpp:418
static const uint32_t kParameterIsAutomable
Definition: DistrhoPlugin.hpp:64
float beatType
Definition: DistrhoPlugin.hpp:402
float getNormalizedValue(const float &value) const noexcept
Definition: DistrhoPlugin.hpp:209
virtual const char * getDescription() const
Definition: DistrhoPlugin.hpp:559
float def
Definition: DistrhoPlugin.hpp:147
ParameterRanges(float df, float mn, float mx) noexcept
Definition: DistrhoPlugin.hpp:170
double barStartTick
Definition: DistrhoPlugin.hpp:392
Parameter(uint32_t h, const char *n, const char *s, const char *u, float def, float min, float max) noexcept
Definition: DistrhoPlugin.hpp:305
ParameterRanges ranges
Definition: DistrhoPlugin.hpp:290
AudioPort() noexcept
Definition: DistrhoPlugin.hpp:130
int32_t beat
Definition: DistrhoPlugin.hpp:380
const float & getFixedValue(const float &value) const noexcept
Definition: DistrhoPlugin.hpp:197
static const uint32_t kParameterIsBoolean
Definition: DistrhoPlugin.hpp:70
float max
Definition: DistrhoPlugin.hpp:157
Definition: DistrhoPlugin.hpp:143
String unit
Definition: DistrhoPlugin.hpp:284
static const uint32_t kParameterIsInteger
Definition: DistrhoPlugin.hpp:75
Definition: DistrhoPlugin.hpp:257
static const uint32_t kAudioPortIsCV
Definition: DistrhoPlugin.hpp:40
bool valid
Definition: DistrhoPlugin.hpp:366
virtual const char * getName() const
Definition: DistrhoPlugin.hpp:547
void fixDefault() noexcept
Definition: DistrhoPlugin.hpp:178
float getFixedAndNormalizedValue(const float &value) const noexcept
Definition: DistrhoPlugin.hpp:223
static const uint32_t kParameterIsOutput
Definition: DistrhoPlugin.hpp:90
Definition: DistrhoPlugin.hpp:361
Definition: DistrhoPlugin.hpp:347
String name
Definition: DistrhoPlugin.hpp:269
virtual const char * getHomePage() const
Definition: DistrhoPlugin.hpp:570
static const uint32_t kParameterIsLogarithmic
Definition: DistrhoPlugin.hpp:80