MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / SetUpFromSaveData

Method SetUpFromSaveData

Source/VSTPlugin.cpp:1223–1248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1221}
1222
1223void VSTPlugin::SetUpFromSaveData()
1224{
1225 juce::PluginDescription pluginDesc;
1226
1227 if (mModuleSaveData.HasProperty("pluginId") && mModuleSaveData.GetString("pluginId") != "")
1228 {
1229 auto pluginId = juce::String(mModuleSaveData.GetString("pluginId"));
1230 if (VSTLookup::GetPluginDesc(pluginDesc, pluginId))
1231 {
1232 TheSynth->LogEvent("Plugin with " + pluginId.toStdString() + " id not found", kLogEventType_Error);
1233 }
1234 }
1235 else if (!mOldVstPath.empty())
1236 {
1237 GetVSTFileDesc(mOldVstPath, pluginDesc);
1238 }
1239
1240 SetVST(pluginDesc);
1241
1242 SetTarget(TheSynth->FindModule(mModuleSaveData.GetString("target")));
1243
1244 mChannel = mModuleSaveData.GetInt("channel");
1245 mUseVoiceAsChannel = mModuleSaveData.GetBool("usevoiceaschannel");
1246 mPitchBendRange = mModuleSaveData.GetFloat("pitchbendrange");
1247 mModwheelCC = mModuleSaveData.GetInt("modwheelcc(1or74)");
1248}
1249
1250void VSTPlugin::SaveState(FileStreamOut& out)
1251{

Callers

nothing calls this directly

Calls 10

StringClass · 0.85
GetPluginDescFunction · 0.85
HasPropertyMethod · 0.80
GetStringMethod · 0.80
LogEventMethod · 0.80
emptyMethod · 0.80
GetIntMethod · 0.80
GetBoolMethod · 0.80
GetFloatMethod · 0.80
FindModuleMethod · 0.45

Tested by

no test coverage detected