Skip to content

Commit

Permalink
Fix Bonsai ParamMetaData to match the surge ranges (#7033)
Browse files Browse the repository at this point in the history
Closes #7031
  • Loading branch information
baconpaul authored May 24, 2023
1 parent 11c9bbd commit 75f6210
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion libs/sst/sst-effects
11 changes: 4 additions & 7 deletions src/common/dsp/effects/SurgeSSTFXAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,11 @@ template <typename T> struct SurgeSSTFXBase : T
}
this->fxdata->p[i].set_name(pmd.name.c_str());
this->fxdata->p[i].basicBlocksParamMetaData = pmd;
auto check = [&](auto a, auto b, auto msg) {
auto check = [&, i](auto a, auto b, auto msg) {
if (a != b)
std::cout << "Unable to match " << pmd.name << " " << a << " " << b << " "
<< msg << std::endl;
std::cout << "Metadata Mismatch (" << msg << "): param[" << i << "]='"
<< pmd.name << "'; paramValue=" << a << " expected=" << b
<< std::endl;
};
if (pmd.type == sst::basic_blocks::params::ParamMetaData::Type::FLOAT)
{
Expand All @@ -225,10 +226,6 @@ template <typename T> struct SurgeSSTFXBase : T
check((int)pmd.minVal, this->fxdata->p[i].val_min.i, "Minimum Values");
check((int)pmd.maxVal, this->fxdata->p[i].val_max.i, "Maximum Values");
}
if (!pmd.supportsStringConversion)
{
std::cout << "No support for string conversion on " << pmd.name << std::endl;
}
check(pmd.canTemposync, this->fxdata->p[i].can_temposync(), "Can Temposync");
check(pmd.canDeform, this->fxdata->p[i].has_deformoptions(), "Can Deform");
check(pmd.canAbsolute, this->fxdata->p[i].can_be_absolute(), "Can Be Absolute");
Expand Down

0 comments on commit 75f6210

Please sign in to comment.