| 3011 | } |
| 3012 | |
| 3013 | var ScriptingObjects::ScriptingModulator::addGlobalModulator(var chainIndex, var globalMod, String modName) |
| 3014 | { |
| 3015 | if (checkValidObject()) |
| 3016 | { |
| 3017 | if (auto gm = dynamic_cast<ScriptingModulator*>(globalMod.getObject())) |
| 3018 | { |
| 3019 | ModulatorChain *c = dynamic_cast<ModulatorChain*>(mod->getChildProcessor(chainIndex)); |
| 3020 | |
| 3021 | if (c == nullptr) |
| 3022 | reportScriptError("Modulator Chain with index " + chainIndex.toString() + " does not exist"); |
| 3023 | |
| 3024 | auto p = moduleHandler.addAndConnectToGlobalModulator(c, gm->getModulator(), modName); |
| 3025 | |
| 3026 | if (p != nullptr) |
| 3027 | { |
| 3028 | auto newMod = new ScriptingObjects::ScriptingModulator(getScriptProcessor(), p); |
| 3029 | return var(newMod); |
| 3030 | } |
| 3031 | |
| 3032 | } |
| 3033 | } |
| 3034 | |
| 3035 | return var(); |
| 3036 | } |
| 3037 | |
| 3038 | var ScriptingObjects::ScriptingModulator::addStaticGlobalModulator(var chainIndex, var timeVariantMod, String modName) |
| 3039 | { |
nothing calls this directly
no test coverage detected