MCPcopy Create free account
hub / github.com/christophhart/HISE / addGlobalModulator

Method addGlobalModulator

hi_scripting/scripting/api/ScriptingApiObjects.cpp:3013–3036  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3011}
3012
3013var 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
3038var ScriptingObjects::ScriptingModulator::addStaticGlobalModulator(var chainIndex, var timeVariantMod, String modName)
3039{

Callers

nothing calls this directly

Calls 6

varFunction · 0.85
getObjectMethod · 0.45
getChildProcessorMethod · 0.45
toStringMethod · 0.45
getModulatorMethod · 0.45

Tested by

no test coverage detected