Skip to content

Commit

Permalink
Correctly handle VST String -> Value for DAW typeins (#5176)
Browse files Browse the repository at this point in the history
Once @mkruselj reminded me how to do this in BWS it took
only a minute to find my bug (I was not normalizing a conversion)

Closes #4405
  • Loading branch information
baconpaul authored Sep 30, 2021
1 parent 8a9bbc8 commit 0f536bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/surge-xt/SurgeSynthProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ struct SurgeParamToJuceParamAdapter : juce::RangedAudioParameter
if (p->set_value_from_string_onto(text.toStdString(), onto))
{
if (p->valtype == vt_float)
return onto.f;
return p->value_to_normalized(onto.f);
if (p->valtype == vt_int)
return onto.i;
return p->value_to_normalized((float)onto.i);
if (p->valtype == vt_bool)
return onto.b;
return p->value_to_normalized((float)onto.b);
}
return 0;
}
Expand Down

0 comments on commit 0f536bf

Please sign in to comment.