-
Notifications
You must be signed in to change notification settings - Fork 5
/
PluginParameters.cpp
36 lines (29 loc) · 1.66 KB
/
PluginParameters.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "PluginParameters.h"
juce::AudioProcessorValueTreeState::ParameterLayout PluginParameters::createParameterLayout() {
std::vector<std::unique_ptr<juce::RangedAudioParameter>> params;
#if MODEL_TO_USE == 4 || MODEL_TO_USE == 5
params.push_back (std::make_unique<juce::AudioParameterFloat> (GAIN_ID,
GAIN_NAME,
gainRange,
1.0f,
db_attributes));
#endif
params.push_back (std::make_unique<juce::AudioParameterChoice> (BACKEND_TYPE_ID,
BACKEND_TYPE_NAME,
backendTypes,
backendTypes.indexOf(defaultBackend)));
params.push_back( std::make_unique<juce::AudioParameterFloat> (DRY_WET_ID,
DRY_WET_NAME,
dryWetRange,
1.0f,
percentage_attributes));
if (parameterList.isEmpty()) {
for (const auto & param : params) {
parameterList.add(param->getParameterID());
}
}
return { params.begin(), params.end() };
}
juce::StringArray PluginParameters::getPluginParameterList() {
return parameterList;
}