Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHange FX Processor Startup Path #7285

Merged
merged 1 commit into from
Nov 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions src/surge-fx/SurgeFXProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ SurgefxAudioProcessor::SurgefxAudioProcessor()
.withOutput("Output", juce::AudioChannelSet::stereo(), true)
.withInput("Sidechain", juce::AudioChannelSet::stereo(), true))
{
storage.reset(new SurgeStorage());
auto cfg = SurgeStorage::SurgeStorageConfig::fromDataPath("");
cfg.createUserDirectory = false;
cfg.scanWavetableAndPatches = false;

storage.reset(new SurgeStorage(cfg));
storage->userDefaultsProvider->addOverride(Surge::Storage::HighPrecisionReadouts, false);

nonLatentBlockMode = !juce::PluginHostType().isFruityLoops();
Expand All @@ -62,9 +66,9 @@ SurgefxAudioProcessor::SurgefxAudioProcessor()
lb = fmt::format("fx_parm_{:d}", i);
nm = fmt::format("FX Parameter {:d}", i);

addParameter(fxParams[i] =
new float_param_t(lb, nm, juce::NormalisableRange<float>(0.0, 1.0),
fxstorage->p[fx_param_remap[i]].get_value_f01()));
addParameter(fxParams[i] = new float_param_t(
juce::ParameterID(lb, 1), nm, juce::NormalisableRange<float>(0.0, 1.0),
fxstorage->p[fx_param_remap[i]].get_value_f01()));
fxParams[i]->getTextHandler = [this, i](float f, int len) -> juce::String {
return juce::String(getParamValueFor(i, f)).substring(0, len);
};
Expand All @@ -74,8 +78,8 @@ SurgefxAudioProcessor::SurgefxAudioProcessor()
fxBaseParams[i] = fxParams[i];
}

addParameter(fxType =
new int_param_t("fxtype", "FX Type", fxt_delay, n_fx_types - 1, effectNum));
addParameter(fxType = new int_param_t(juce::ParameterID("fxtype", 1), "FX Type", fxt_delay,
n_fx_types - 1, effectNum));
fxType->getTextHandler = [this](float f, int len) -> juce::String {
auto i = 1 + (int)round(f * (n_fx_types - 2));
if (i >= 1 && i < n_fx_types)
Expand Down