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

Method initialiseNetworks

hi_scripting/scripting/ScriptProcessorModules.cpp:2128–2153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2126{ return new State(voiceIndex); }
2127
2128void ScriptnodeVoiceKiller::initialiseNetworks(ScriptnodeVoiceKiller& v)
2129{
2130 if (!v.initialised)
2131 {
2132 auto parentSynth = v.getParentProcessor(true, false);
2133 auto modParent = v.getParentProcessor(false, false);
2134
2135 if (parentSynth == nullptr)
2136 return;
2137
2138 auto modParentIsGain = parentSynth->getChildProcessor(ModulatorSynth::GainModulation) == modParent;
2139
2140 if (!modParentIsGain)
2141 {
2142 // nothing to do here...
2143 v.initialised = true;
2144 return;
2145 }
2146
2147 if (auto holder = dynamic_cast<DspNetwork::Holder*>(parentSynth))
2148 {
2149 holder->setVoiceKillerToUse(&v);
2150 v.initialised = true;
2151 }
2152 }
2153}
2154
2155float ScriptnodeVoiceKiller::startVoice(int voiceIndex)
2156{

Callers

nothing calls this directly

Calls 3

setVoiceKillerToUseMethod · 0.80
getParentProcessorMethod · 0.45
getChildProcessorMethod · 0.45

Tested by

no test coverage detected