Skip to content

Commit

Permalink
plugin: Obtain param default value on initParameter()
Browse files Browse the repository at this point in the history
During plugin initialization, we can directly invoke CCetoneSynth::getParameter() to get  default parameter value, as at that time only the default program is loaded.
  • Loading branch information
AnClark authored Apr 17, 2024
1 parent f3daf87 commit 262d597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CetoneSynthDPF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ void CCetoneSynth::initParameter(uint32_t index, Parameter& parameter)
// Fallback to classic VST 2.4 param range (0.0 ~ 1.0), to fit with Cetone's own param handlers.
parameter.ranges.min = 0.0f;
parameter.ranges.max = 1.0f;
parameter.ranges.def = 0.5f;
parameter.ranges.def = getParameter(index);

// Must set parameter.symbol, this is the unique ID of each parameter.
// If not set, you can neither save presets nor reset to factory default, in VST3 and CLAP!
Expand Down

0 comments on commit 262d597

Please sign in to comment.