| 1221 | } |
| 1222 | |
| 1223 | void 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 | |
| 1250 | void VSTPlugin::SaveState(FileStreamOut& out) |
| 1251 | { |
nothing calls this directly
no test coverage detected