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

Method getEffect

hi_scripting/scripting/api/ScriptingApi.cpp:5890–5917  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5888}
5889
5890ScriptingObjects::ScriptingEffect *ScriptingApi::Synth::getEffect(const String &name)
5891{
5892 WARN_IF_AUDIO_THREAD(true, ScriptGuard::ObjectCreation);
5893
5894 if(getScriptProcessor()->objectsCanBeCreated())
5895 {
5896 Processor::Iterator<EffectProcessor> it(owner);
5897
5898 EffectProcessor *fx;
5899
5900
5901 while((fx = it.getNextProcessor()) != nullptr)
5902 {
5903 if(fx->getId() == name)
5904 {
5905 return new ScriptEffect(getScriptProcessor(), fx);
5906 }
5907 }
5908
5909 reportScriptError(name + " was not found. ");
5910 RETURN_IF_NO_THROW(new ScriptEffect(getScriptProcessor(), nullptr))
5911 }
5912 else
5913 {
5914 reportIllegalCall("getEffect()", "onInit");
5915 RETURN_IF_NO_THROW(new ScriptEffect(getScriptProcessor(), nullptr))
5916 }
5917}
5918
5919
5920var ScriptingApi::Synth::getAllEffects(String regex)

Callers 3

isSuspendedMethod · 0.45
removeEffectMethod · 0.45
MainInterface.jsFile · 0.45

Calls 3

objectsCanBeCreatedMethod · 0.80
getNextProcessorMethod · 0.80
getIdMethod · 0.45

Tested by

no test coverage detected