17 #ifndef DISTRHO_DETAILS_HPP_INCLUDED
18 #define DISTRHO_DETAILS_HPP_INCLUDED
20 #include "extra/String.hpp"
99 DISTRHO_DEPRECATED_BY(
"kParameterIsAutomatable")
234 static constexpr
const char bypass[] =
"dpf_bypass";
371 else if (value >
max)
392 const float normValue = (value -
min) / (
max -
min);
394 if (normValue <= 0.0f)
396 if (normValue >= 1.0f)
407 const double normValue = (value -
min) / (
max -
min);
409 if (normValue <= 0.0)
411 if (normValue >= 1.0)
426 const float normValue = (value -
min) / (
max -
min);
428 if (normValue <= 0.0f)
430 if (normValue >= 1.0f)
447 const double normValue = (value -
min) / (
max -
min);
449 if (normValue <= 0.0)
451 if (normValue >= 1.0)
515 #if __cplusplus >= 201703L
684 Parameter(uint32_t h,
const char* n,
const char* s,
const char* u,
float def,
float min,
float max) noexcept
697 #ifdef DISTRHO_PROPER_CPP11_SUPPORT
702 Parameter(uint32_t h,
const char* n,
const char* s,
const char* u,
float def,
float min,
float max,
717 #if __cplusplus >= 201703L
722 const std::string_view& n,
723 const std::string_view& sn,
724 const std::string_view& sym,
725 const std::string_view& u,
726 const std::string_view& desc) noexcept
767 #if __cplusplus >= 202001L
771 static constexpr
const Parameter kParameterBypass = {
856 #ifdef __MOD_DEVICES__
915 const uint8_t* dataExt;
Definition: String.hpp:35
static constexpr const uint32_t kCVPortIsOptional
Definition: DistrhoDetails.hpp:77
static constexpr const uint32_t kCVPortHasPositiveUnipolarRange
Definition: DistrhoDetails.hpp:63
static constexpr const uint32_t kCVPortHasBipolarRange
Definition: DistrhoDetails.hpp:51
static constexpr const uint32_t kCVPortHasScaledRange
Definition: DistrhoDetails.hpp:71
static constexpr const uint32_t kAudioPortIsSidechain
Definition: DistrhoDetails.hpp:45
static constexpr const uint32_t kCVPortHasNegativeUnipolarRange
Definition: DistrhoDetails.hpp:57
static constexpr const uint32_t kAudioPortIsCV
Definition: DistrhoDetails.hpp:38
PredefinedPortGroupsIds
Definition: DistrhoDetails.hpp:251
ParameterDesignation
Definition: DistrhoDetails.hpp:213
@ kPortGroupMono
Definition: DistrhoDetails.hpp:260
@ kPortGroupNone
Definition: DistrhoDetails.hpp:255
@ kPortGroupStereo
Definition: DistrhoDetails.hpp:266
@ kParameterDesignationBypass
Definition: DistrhoDetails.hpp:223
@ kParameterDesignationNull
Definition: DistrhoDetails.hpp:217
#define END_NAMESPACE_DISTRHO
Definition: DistrhoInfo.hpp:949
#define START_NAMESPACE_DISTRHO
Definition: DistrhoInfo.hpp:943
static constexpr const uint32_t kParameterIsOutput
Definition: DistrhoDetails.hpp:129
static constexpr const uint32_t kParameterIsHidden
Definition: DistrhoDetails.hpp:145
static constexpr const uint32_t kParameterIsAutomable
Definition: DistrhoDetails.hpp:100
static constexpr const uint32_t kParameterIsInteger
Definition: DistrhoDetails.hpp:111
static constexpr const uint32_t kParameterIsTrigger
Definition: DistrhoDetails.hpp:138
static constexpr const uint32_t kParameterIsLogarithmic
Definition: DistrhoDetails.hpp:116
static constexpr const uint32_t kParameterIsBoolean
Definition: DistrhoDetails.hpp:106
static constexpr const uint32_t kParameterIsAutomatable
Definition: DistrhoDetails.hpp:96
static constexpr const uint32_t kStateIsOnlyForDSP
Definition: DistrhoDetails.hpp:185
static constexpr const uint32_t kStateIsOnlyForUI
Definition: DistrhoDetails.hpp:191
static constexpr const uint32_t kStateIsHostReadable
Definition: DistrhoDetails.hpp:163
static constexpr const uint32_t kStateIsFilenamePath
Definition: DistrhoDetails.hpp:175
static constexpr const uint32_t kStateIsBase64Blob
Definition: DistrhoDetails.hpp:180
static constexpr const uint32_t kStateIsHostWritable
Definition: DistrhoDetails.hpp:169
Definition: DistrhoDetails.hpp:230
static constexpr const char bypass[]
Definition: DistrhoDetails.hpp:234
static constexpr const char bypass_lv2[]
Definition: DistrhoDetails.hpp:239
Definition: DistrhoDetails.hpp:275
uint32_t groupId
Definition: DistrhoDetails.hpp:305
AudioPort() noexcept
Definition: DistrhoDetails.hpp:310
String name
Definition: DistrhoDetails.hpp:287
String symbol
Definition: DistrhoDetails.hpp:295
uint32_t hints
Definition: DistrhoDetails.hpp:280
Definition: DistrhoDetails.hpp:891
uint32_t size
Definition: DistrhoDetails.hpp:905
static constexpr const uint32_t kDataSize
Definition: DistrhoDetails.hpp:895
uint8_t data[kDataSize]
Definition: DistrhoDetails.hpp:914
uint32_t frame
Definition: DistrhoDetails.hpp:900
Definition: DistrhoDetails.hpp:490
ParameterEnumerationValue() noexcept
Definition: DistrhoDetails.hpp:504
float value
Definition: DistrhoDetails.hpp:494
ParameterEnumerationValue(float v, const char *l) noexcept
Definition: DistrhoDetails.hpp:511
String label
Definition: DistrhoDetails.hpp:499
Definition: DistrhoDetails.hpp:529
bool restrictedMode
Definition: DistrhoDetails.hpp:540
constexpr ParameterEnumerationValues(uint8_t c, bool r, ParameterEnumerationValue *v) noexcept
Definition: DistrhoDetails.hpp:569
constexpr ParameterEnumerationValues() noexcept
Definition: DistrhoDetails.hpp:558
bool deleteLater
Definition: DistrhoDetails.hpp:553
ParameterEnumerationValue * values
Definition: DistrhoDetails.hpp:547
uint8_t count
Definition: DistrhoDetails.hpp:533
Definition: DistrhoDetails.hpp:324
float getUnnormalizedValue(const float value) const noexcept
Definition: DistrhoDetails.hpp:460
float getFixedAndNormalizedValue(const float value) const noexcept
Definition: DistrhoDetails.hpp:419
void fixDefault() noexcept
Definition: DistrhoDetails.hpp:359
float max
Definition: DistrhoDetails.hpp:338
void fixValue(float &value) const noexcept
Definition: DistrhoDetails.hpp:367
float getNormalizedValue(const float value) const noexcept
Definition: DistrhoDetails.hpp:390
float min
Definition: DistrhoDetails.hpp:333
constexpr ParameterRanges(const float df, const float mn, const float mx) noexcept
Definition: DistrhoDetails.hpp:351
double getFixedAndNormalizedValue(const double value) const noexcept
Definition: DistrhoDetails.hpp:440
float getFixedValue(const float value) const noexcept
Definition: DistrhoDetails.hpp:378
constexpr ParameterRanges() noexcept
Definition: DistrhoDetails.hpp:343
float def
Definition: DistrhoDetails.hpp:328
double getNormalizedValue(const double &value) const noexcept
Definition: DistrhoDetails.hpp:405
double getUnnormalizedValue(const double value) const noexcept
Definition: DistrhoDetails.hpp:474
Definition: DistrhoDetails.hpp:588
Parameter() noexcept
Definition: DistrhoDetails.hpp:668
String shortName
Definition: DistrhoDetails.hpp:607
ParameterRanges ranges
Definition: DistrhoDetails.hpp:634
String unit
Definition: DistrhoDetails.hpp:622
uint32_t hints
Definition: DistrhoDetails.hpp:593
ParameterDesignation designation
Definition: DistrhoDetails.hpp:645
String symbol
Definition: DistrhoDetails.hpp:615
uint8_t midiCC
Definition: DistrhoDetails.hpp:653
String description
Definition: DistrhoDetails.hpp:628
uint32_t groupId
Definition: DistrhoDetails.hpp:663
ParameterEnumerationValues enumValues
Definition: DistrhoDetails.hpp:640
void initDesignation(ParameterDesignation d) noexcept
Definition: DistrhoDetails.hpp:743
String name
Definition: DistrhoDetails.hpp:600
Parameter(uint32_t h, const char *n, const char *s, const char *u, float def, float min, float max) noexcept
Definition: DistrhoDetails.hpp:684
Definition: DistrhoDetails.hpp:797
String symbol
Definition: DistrhoDetails.hpp:811
String name
Definition: DistrhoDetails.hpp:803
Definition: DistrhoDetails.hpp:823
String key
Definition: DistrhoDetails.hpp:837
State() noexcept
Definition: DistrhoDetails.hpp:880
String label
Definition: DistrhoDetails.hpp:848
uint32_t hints
Definition: DistrhoDetails.hpp:829
String defaultValue
Definition: DistrhoDetails.hpp:843
String description
Definition: DistrhoDetails.hpp:854
Definition: DistrhoDetails.hpp:941
float beatType
Definition: DistrhoDetails.hpp:983
bool valid
Definition: DistrhoDetails.hpp:946
float beatsPerBar
Definition: DistrhoDetails.hpp:978
double barStartTick
Definition: DistrhoDetails.hpp:973
double ticksPerBeat
Definition: DistrhoDetails.hpp:989
BarBeatTick() noexcept
Definition: DistrhoDetails.hpp:999
int32_t bar
Definition: DistrhoDetails.hpp:953
void clear() noexcept
Definition: DistrhoDetails.hpp:1013
double tick
Definition: DistrhoDetails.hpp:968
int32_t beat
Definition: DistrhoDetails.hpp:960
double beatsPerMinute
Definition: DistrhoDetails.hpp:994
Definition: DistrhoDetails.hpp:925
bool playing
Definition: DistrhoDetails.hpp:929
uint64_t frame
Definition: DistrhoDetails.hpp:936
void clear() noexcept
Definition: DistrhoDetails.hpp:1038
TimePosition() noexcept
Definition: DistrhoDetails.hpp:1030