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

Method createProcessor

hi_scripting/scripting/HardcodedScriptProcessor.cpp:197–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197Processor *HardcodedScriptFactoryType::createProcessor(int typeIndex, const String &id)
198{
199 MainController *m = getOwnerProcessor()->getMainController();
200 ModulatorSynth *ownerAsSynth = dynamic_cast<ModulatorSynth*>(getOwnerProcessor());
201 MidiProcessor *mp = nullptr;
202
203 switch(typeIndex)
204 {
205 case legatoWithRetrigger: mp = new LegatoProcessor(m, id, ownerAsSynth); break;
206 case ccSwapper: mp = new CCSwapper(m, id, ownerAsSynth); break;
207 case releaseTrigger: mp = new ReleaseTriggerScriptProcessor(m, id, ownerAsSynth); break;
208 case cc2Note: mp = new CCToNoteProcessor(m, id, ownerAsSynth); break;
209 case channelFilter: mp = new ChannelFilterScriptProcessor(m, id, ownerAsSynth); break;
210 case channelSetter: mp = new ChannelSetterScriptProcessor(m, id, ownerAsSynth); break;
211 case muteAll: mp = new MuteAllScriptProcessor(m, id, ownerAsSynth); break;
212 case arpeggiator: mp = new Arpeggiator(m, id, ownerAsSynth); break;
213 default: jassertfalse; break;
214 }
215
216 if(mp != nullptr)
217 {
218 mp->setOwnerSynth(ownerAsSynth);
219 }
220
221 return mp;
222}
223
224const Array<FactoryType::ProcessorEntry>& HardcodedScriptFactoryType::getTypeNames() const
225{

Callers 1

addModuleMethod · 0.45

Calls 2

setOwnerSynthMethod · 0.80
getMainControllerMethod · 0.45

Tested by

no test coverage detected