Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
Release 1.3.8 - 31.10.2022
Browse files Browse the repository at this point in the history
- Fixed radio buttons not to double propagate
- Fixed missing compiler settings
- Added access to ParameterMappings
  • Loading branch information
ffAudio committed Oct 31, 2022
2 parents e1b7c2c + 88ad3cc commit b1502b6
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 23 deletions.
13 changes: 7 additions & 6 deletions examples/EqualizerExample/Source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ std::unique_ptr<juce::AudioProcessorParameterGroup> createParametersForFilter (c
float quality = 1.0f,
bool active = true)
{
auto typeParameter = std::make_unique<juce::AudioParameterChoice> (prefix + IDs::paramType,
auto typeParameter = std::make_unique<juce::AudioParameterChoice> (juce::ParameterID (prefix + IDs::paramType, 1),
name + ": " + TRANS ("Filter Type"),
filterNames,
type);

auto actvParameter = std::make_unique<juce::AudioParameterBool> (prefix + IDs::paramActive,
auto actvParameter = std::make_unique<juce::AudioParameterBool> (juce::ParameterID (prefix + IDs::paramActive, 1),
name + ": " + TRANS ("Active"),
active,
juce::String(),
[](float value, int) {return value > 0.5f ? TRANS ("active") : TRANS ("bypassed");},
[](juce::String text) {return text == TRANS ("active");});

auto freqParameter = std::make_unique<juce::AudioParameterFloat> (prefix + IDs::paramFreq,
auto freqParameter = std::make_unique<juce::AudioParameterFloat> (juce::ParameterID (prefix + IDs::paramFreq, 1),
name + ": " + TRANS ("Frequency"),
foleys::Conversions::makeLogarithmicRange<float>(20.0f, 20000.0f),
frequency,
Expand All @@ -69,7 +69,7 @@ std::unique_ptr<juce::AudioProcessorParameterGroup> createParametersForFilter (c
text.getFloatValue() * 1000.0f :
text.getFloatValue(); });

auto qltyParameter = std::make_unique<juce::AudioParameterFloat> (prefix + IDs::paramQuality,
auto qltyParameter = std::make_unique<juce::AudioParameterFloat> (juce::ParameterID (prefix + IDs::paramQuality, 1),
name + ": " + TRANS ("Quality"),
juce::NormalisableRange<float> {0.1f, 10.0f, 0.1f, std::log (0.5f) / std::log (0.9f / 9.9f)},
quality,
Expand All @@ -78,7 +78,7 @@ std::unique_ptr<juce::AudioProcessorParameterGroup> createParametersForFilter (c
[](float value, int) { return juce::String (value, 1); },
[](const juce::String& text) { return text.getFloatValue(); });

auto gainParameter = std::make_unique<juce::AudioParameterFloat> (prefix + IDs::paramGain,
auto gainParameter = std::make_unique<juce::AudioParameterFloat> (juce::ParameterID (prefix + IDs::paramGain, 1),
name + ": " + TRANS ("Gain"),
juce::NormalisableRange<float> {-maxLevel, maxLevel, 0.1f},
gain,
Expand Down Expand Up @@ -108,7 +108,8 @@ juce::AudioProcessorValueTreeState::ParameterLayout createParameterLayout()
params.push_back (createParametersForFilter ("Q5", NEEDS_TRANS ("Q5"), EqualizerExampleAudioProcessor::HighShelf, 5000.0f));
params.push_back (createParametersForFilter ("Q6", NEEDS_TRANS ("Q6"), EqualizerExampleAudioProcessor::LowPass, 12000.0f));

auto param = std::make_unique<juce::AudioParameterFloat> (IDs::paramOutput, TRANS ("Output"),
auto param = std::make_unique<juce::AudioParameterFloat> (juce::ParameterID (IDs::paramOutput, 1),
TRANS ("Output"),
juce::NormalisableRange<float> (0.0f, 2.0f, 0.01f), 1.0f,
juce::String(),
juce::AudioProcessorParameter::genericParameter,
Expand Down
14 changes: 7 additions & 7 deletions examples/FoleysSynth/Source/FoleysSynth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ int FoleysSynth::numOscillators = 8;

void FoleysSynth::addADSRParameters (juce::AudioProcessorValueTreeState::ParameterLayout& layout)
{
auto attack = std::make_unique<juce::AudioParameterFloat>(IDs::paramAttack, "Attack", juce::NormalisableRange<float> (0.001f, 0.5f, 0.01f), 0.10f);
auto decay = std::make_unique<juce::AudioParameterFloat>(IDs::paramDecay, "Decay", juce::NormalisableRange<float> (0.001f, 0.5f, 0.01f), 0.10f);
auto sustain = std::make_unique<juce::AudioParameterFloat>(IDs::paramSustain, "Sustain", juce::NormalisableRange<float> (0.0f, 1.0f, 0.01f), 1.0f);
auto release = std::make_unique<juce::AudioParameterFloat>(IDs::paramRelease, "Release", juce::NormalisableRange<float> (0.001f, 0.5f, 0.01f), 0.10f);
auto attack = std::make_unique<juce::AudioParameterFloat>(juce::ParameterID (IDs::paramAttack, 1), "Attack", juce::NormalisableRange<float> (0.001f, 0.5f, 0.01f), 0.10f);
auto decay = std::make_unique<juce::AudioParameterFloat>(juce::ParameterID (IDs::paramDecay, 1), "Decay", juce::NormalisableRange<float> (0.001f, 0.5f, 0.01f), 0.10f);
auto sustain = std::make_unique<juce::AudioParameterFloat>(juce::ParameterID (IDs::paramSustain, 1), "Sustain", juce::NormalisableRange<float> (0.0f, 1.0f, 0.01f), 1.0f);
auto release = std::make_unique<juce::AudioParameterFloat>(juce::ParameterID (IDs::paramRelease, 1), "Release", juce::NormalisableRange<float> (0.001f, 0.5f, 0.01f), 0.10f);

auto group = std::make_unique<juce::AudioProcessorParameterGroup>("adsr", "ADRS", "|",
std::move (attack),
Expand All @@ -43,16 +43,16 @@ void FoleysSynth::addOvertoneParameters (juce::AudioProcessorValueTreeState::Par
auto group = std::make_unique<juce::AudioProcessorParameterGroup>("oscillators", "Oscillators", "|");
for (int i = 0; i < FoleysSynth::numOscillators; ++i)
{
group->addChild (std::make_unique<juce::AudioParameterFloat>("osc" + juce::String (i), "Oscillator " + juce::String (i), juce::NormalisableRange<float>(0.0f, 1.0f, 0.01f), 0.0f));
group->addChild (std::make_unique<juce::AudioParameterFloat>("detune" + juce::String (i), "Detune " + juce::String (i), juce::NormalisableRange<float>(-0.5f, 0.5f, 0.01f), 0.0f));
group->addChild (std::make_unique<juce::AudioParameterFloat>(juce::ParameterID ("osc" + juce::String (i), 1), "Oscillator " + juce::String (i), juce::NormalisableRange<float>(0.0f, 1.0f, 0.01f), 0.0f));
group->addChild (std::make_unique<juce::AudioParameterFloat>(juce::ParameterID ("detune" + juce::String (i), 1), "Detune " + juce::String (i), juce::NormalisableRange<float>(-0.5f, 0.5f, 0.01f), 0.0f));
}

layout.add (std::move (group));
}

void FoleysSynth::addGainParameters (juce::AudioProcessorValueTreeState::ParameterLayout& layout)
{
auto gain = std::make_unique<juce::AudioParameterFloat>(IDs::paramGain, "Gain", juce::NormalisableRange<float> (0.0f, 1.0f, 0.01f), 0.70f);
auto gain = std::make_unique<juce::AudioParameterFloat>(juce::ParameterID (IDs::paramGain, 1), "Gain", juce::NormalisableRange<float> (0.0f, 1.0f, 0.01f), 0.70f);

layout.add (std::make_unique<juce::AudioProcessorParameterGroup>("output", "Output", "|", std::move (gain)));
}
Expand Down
Binary file modified examples/SignalGenerator/Resources/magic.xml
Binary file not shown.
18 changes: 9 additions & 9 deletions examples/SignalGenerator/Source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ juce::AudioProcessorValueTreeState::ParameterLayout createParameterLayout()

juce::AudioProcessorValueTreeState::ParameterLayout layout;
auto generator = std::make_unique<juce::AudioProcessorParameterGroup>("Generator", TRANS ("Generator"), "|");
generator->addChild (std::make_unique<juce::AudioParameterChoice>(IDs::mainType, "Type", juce::StringArray ("None", "Sine", "Triangle", "Square"), 1),
std::make_unique<juce::AudioParameterFloat>(IDs::mainFreq, "Frequency", freqRange, 440.0f),
std::make_unique<juce::AudioParameterFloat>(IDs::mainLevel, "Level", juce::NormalisableRange<float>(-100.0f, 0.0f, 1.0f), -6.0f));
generator->addChild (std::make_unique<juce::AudioParameterChoice>(juce::ParameterID (IDs::mainType, 1), "Type", juce::StringArray ("None", "Sine", "Triangle", "Square"), 1),
std::make_unique<juce::AudioParameterFloat>(juce::ParameterID (IDs::mainFreq, 1), "Frequency", freqRange, 440.0f),
std::make_unique<juce::AudioParameterFloat>(juce::ParameterID (IDs::mainLevel, 1), "Level", juce::NormalisableRange<float>(-100.0f, 0.0f, 1.0f), -6.0f));

auto lfo = std::make_unique<juce::AudioProcessorParameterGroup>("lfo", TRANS ("LFO"), "|");
lfo->addChild (std::make_unique<juce::AudioParameterChoice>(IDs::lfoType, "LFO-Type", juce::StringArray ("None", "Sine", "Triangle", "Square"), 0),
std::make_unique<juce::AudioParameterFloat>(IDs::lfoFreq, "Frequency", juce::NormalisableRange<float>(0.25f, 10.0f), 2.0f),
std::make_unique<juce::AudioParameterFloat>(IDs::lfoLevel, "Level", juce::NormalisableRange<float>(0.0f, 1.0f), 0.0f));
lfo->addChild (std::make_unique<juce::AudioParameterChoice>(juce::ParameterID (IDs::lfoType, 1), "LFO-Type", juce::StringArray ("None", "Sine", "Triangle", "Square"), 0),
std::make_unique<juce::AudioParameterFloat>(juce::ParameterID (IDs::lfoFreq, 1), "Frequency", juce::NormalisableRange<float>(0.25f, 10.0f), 2.0f),
std::make_unique<juce::AudioParameterFloat>(juce::ParameterID (IDs::lfoLevel, 1), "Level", juce::NormalisableRange<float>(0.0f, 1.0f), 0.0f));

auto vfo = std::make_unique<juce::AudioProcessorParameterGroup>("vfo", TRANS ("VFO"), "|");
vfo->addChild (std::make_unique<juce::AudioParameterChoice>(IDs::vfoType, "VFO-Type", juce::StringArray ("None", "Sine", "Triangle", "Square"), 0),
std::make_unique<juce::AudioParameterFloat>(IDs::vfoFreq, "Frequency", juce::NormalisableRange<float>(0.5f, 10.0f), 2.0f),
std::make_unique<juce::AudioParameterFloat>(IDs::vfoLevel, "Level", juce::NormalisableRange<float>(0.0f, 1.0), 0.0f));
vfo->addChild (std::make_unique<juce::AudioParameterChoice>(juce::ParameterID (IDs::vfoType, 1), "VFO-Type", juce::StringArray ("None", "Sine", "Triangle", "Square"), 0),
std::make_unique<juce::AudioParameterFloat>(juce::ParameterID (IDs::vfoFreq, 1), "Frequency", juce::NormalisableRange<float>(0.5f, 10.0f), 2.0f),
std::make_unique<juce::AudioParameterFloat>(juce::ParameterID (IDs::vfoLevel, 1), "Level", juce::NormalisableRange<float>(0.0f, 1.0), 0.0f));

layout.add (std::move (generator),
std::move (lfo),
Expand Down

0 comments on commit b1502b6

Please sign in to comment.