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

Method getChildSynth

hi_scripting/scripting/api/ScriptingApi.cpp:5815–5841  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5813
5814
5815ScriptingObjects::ScriptingSynth *ScriptingApi::Synth::getChildSynth(const String &name)
5816{
5817 if(getScriptProcessor()->objectsCanBeCreated())
5818 {
5819 Processor::Iterator<ModulatorSynth> it(owner);
5820
5821 ModulatorSynth *m;
5822
5823
5824 while((m = it.getNextProcessor()) != 0)
5825 {
5826 if(m->getId() == name)
5827 {
5828 return new ScriptingObjects::ScriptingSynth(getScriptProcessor(), m);
5829 }
5830 }
5831
5832 reportScriptError(name + " was not found. ");
5833 RETURN_IF_NO_THROW(new ScriptingObjects::ScriptingSynth(getScriptProcessor(), nullptr))
5834 }
5835 else
5836 {
5837 reportIllegalCall("getChildSynth()", "onInit");
5838 RETURN_IF_NO_THROW(new ScriptingObjects::ScriptingSynth(getScriptProcessor(), nullptr))
5839
5840 }
5841}
5842
5843ScriptingApi::Synth::ScriptSynth* ScriptingApi::Synth::getChildSynthByIndex(int index)
5844{

Callers

nothing calls this directly

Calls 3

objectsCanBeCreatedMethod · 0.80
getNextProcessorMethod · 0.80
getIdMethod · 0.45

Tested by

no test coverage detected