Skip to content

Commit c49bb17

Browse files
committed
fix unit test and update compressor init params
1 parent 12ae799 commit c49bb17

File tree

6 files changed

+20
-6
lines changed

6 files changed

+20
-6
lines changed

Source/PluginProcessor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,8 +1422,8 @@ juce::AudioProcessorValueTreeState::ParameterLayout FireAudioProcessor::createPa
14221422
parameters.push_back(std::make_unique<PFloat>(ParameterIDAndName::getID(DRIVE_ID, i), DRIVE_NAME, juce::NormalisableRange<float>(0.0f, 100.0f, 0.01f), 0.0f));
14231423
parameters.push_back(std::make_unique<PFloat>(ParameterIDAndName::getID(COMP_RATIO_ID, i), COMP_RATIO_NAME, juce::NormalisableRange<float>(1.0f, 20.0f, 0.1f), 1.0f));
14241424
parameters.push_back(std::make_unique<PFloat>(ParameterIDAndName::getID(COMP_THRESH_ID, i), COMP_THRESH_NAME, juce::NormalisableRange<float>(-48.0f, 0.0f, 0.1f), 0.0f));
1425-
parameters.push_back(std::make_unique<PFloat>(ParameterIDAndName::getID(COMP_ATTACK_ID, i), COMP_ATTACK_NAME, juce::NormalisableRange<float>(0.1f, 200.0f, 0.01f, 0.3f), 80.0f));
1426-
parameters.push_back(std::make_unique<PFloat>(ParameterIDAndName::getID(COMP_RELEASE_ID, i), COMP_RELEASE_NAME, juce::NormalisableRange<float>(10.0f, 2000.0f, 1.f, 0.3f), 200.0f));
1425+
parameters.push_back(std::make_unique<PFloat>(ParameterIDAndName::getID(COMP_ATTACK_ID, i), COMP_ATTACK_NAME, juce::NormalisableRange<float>(0.1f, 200.0f, 0.01f, 0.3f), 10.0f));
1426+
parameters.push_back(std::make_unique<PFloat>(ParameterIDAndName::getID(COMP_RELEASE_ID, i), COMP_RELEASE_NAME, juce::NormalisableRange<float>(10.0f, 2000.0f, 1.f, 0.3f), 100.0f));
14271427
parameters.push_back(std::make_unique<PFloat>(ParameterIDAndName::getID(COMP_MIX_ID, i), COMP_MIX_NAME, juce::NormalisableRange<float>(0.0f, 1.0f, 0.01f), 1.0f));
14281428
parameters.push_back(std::make_unique<PFloat>(ParameterIDAndName::getID(WIDTH_ID, i), WIDTH_NAME, juce::NormalisableRange<float>(0.0f, 1.0f, 0.01f), 0.5f));
14291429
parameters.push_back(std::make_unique<PFloat>(ParameterIDAndName::getID(PAN_ID, i), PAN_NAME, juce::NormalisableRange<float>(-1.0f, 1.0f, 0.01f), 0.0f));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:91672f8f06cb8892e06b8fee4e763f58ae0c3de105437333166f598346f09055
2+
oid sha256:d585340620629dd6390278d0380df13df5e658ca7d0c1c4676791e9abf998a02
33
size 576104
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:d0719c96104928e4bcad48c6e2dddd61a7b60d724a8a94d9a26b007412dc0393
2+
oid sha256:1232c2814920e6feec9c77a8ffd952d00a6482a461992ea1eb8d263e951a3e26
33
size 3176
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:e604f295733e16c03c541732510fe0b078671d3089fcc1a3ac76b7d62f6c354c
2+
oid sha256:fd87b10d099ea593adc2f67ab6943660353aeb416d17be3ca33019ee4732221f
33
size 576104
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:0a508d3a02a11cc8eef94519c9771e17cf00038e3fb93f8edeeafcdc119c6b42
2+
oid sha256:3c79ff8527ee31e60bbbc7d3cdfa431fe59203a3a4c794e49b149391ab33819a
33
size 3176

tests/RegressionTests.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,20 @@ namespace TestHelpers
183183
parameter->setValueNotifyingHost(attributeValue.getFloatValue());
184184
}
185185

186+
// After loading the preset, manually enable the Shape module for all bands.
187+
// This is necessary because older presets won't have this new parameter,
188+
// and it defaults to 'off' (bypassed), causing a mismatch with the golden masters.
189+
for (int i = 0; i < 4; ++i)
190+
{
191+
// The parameter ID is constructed like "shapeBypass0", "shapeBypass1", etc.
192+
juce::String shapeBypassParamID = "shapeBypass" + juce::String(i);
193+
if (auto* shapeBypassParam = processor.treeState.getParameter(shapeBypassParamID))
194+
{
195+
// Set to 1.0f to ensure the shape module is ON.
196+
shapeBypassParam->setValueNotifyingHost(1.0f);
197+
}
198+
}
199+
186200
const int blockSize = 512;
187201
processor.prepareToPlay(sampleRate, blockSize);
188202

0 commit comments

Comments
 (0)