| 5751 | } |
| 5752 | |
| 5753 | ScriptingObjects::ScriptingModulator *ScriptingApi::Synth::getModulator(const String &name) |
| 5754 | { |
| 5755 | if(getScriptProcessor()->objectsCanBeCreated()) |
| 5756 | { |
| 5757 | Processor::Iterator<Modulator> it(owner); |
| 5758 | |
| 5759 | Modulator *m; |
| 5760 | |
| 5761 | while((m = it.getNextProcessor()) != 0) |
| 5762 | { |
| 5763 | if(m->getId() == name) |
| 5764 | { |
| 5765 | return new ScriptingObjects::ScriptingModulator(getScriptProcessor(), m); |
| 5766 | } |
| 5767 | } |
| 5768 | |
| 5769 | reportScriptError(name + " was not found. "); |
| 5770 | RETURN_IF_NO_THROW(new ScriptingObjects::ScriptingModulator(getScriptProcessor(), nullptr)) |
| 5771 | } |
| 5772 | else |
| 5773 | { |
| 5774 | reportIllegalCall("getModulator()", "onInit"); |
| 5775 | RETURN_IF_NO_THROW(new ScriptingObjects::ScriptingModulator(getScriptProcessor(), nullptr)) |
| 5776 | } |
| 5777 | } |
| 5778 | |
| 5779 | |
| 5780 | ScriptingObjects::ScriptingMidiProcessor *ScriptingApi::Synth::getMidiProcessor(const String &name) |
no test coverage detected