MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / FindMidiController

Method FindMidiController

Source/ModularSynth.cpp:2661–2684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2659}
2660
2661MidiController* ModularSynth::FindMidiController(std::string name, bool fail)
2662{
2663 if (name == "")
2664 return nullptr;
2665
2666 MidiController* m = nullptr;
2667
2668 try
2669 {
2670 m = dynamic_cast<MidiController*>(FindModule(name, fail));
2671 if (m == nullptr && fail)
2672 throw WrongModuleTypeException();
2673 }
2674 catch (UnknownModuleException& e)
2675 {
2676 LogEvent("Couldn't find referenced midi controller \"" + name + "\"", kLogEventType_Error);
2677 }
2678 catch (WrongModuleTypeException& e)
2679 {
2680 LogEvent("\"" + name + "\" is not a midicontroller", kLogEventType_Error);
2681 }
2682
2683 return m;
2684}
2685
2686IUIControl* ModularSynth::FindUIControl(std::string path)
2687{

Callers 4

SetMidiControllerMethod · 0.80
InitControllerMethod · 0.80
SetMidiControllerMethod · 0.80
SetUpFromSaveDataMethod · 0.80

Calls 1

Tested by 1

SetMidiControllerMethod · 0.64