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

Method getModulationData

hi_scripting/scripting/api/ScriptModulationMatrix.cpp:843–883  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

841}
842
843hise::MacroControlledObject::ModulationPopupData::Ptr ScriptModulationMatrix::TargetDataBase::getModulationData()
844{
845 MacroControlledObject::ModulationPopupData::Ptr newData = new MacroControlledObject::ModulationPopupData();
846
847 newData->modulationId = modId;
848
849 for (auto s : parent->sourceData)
850 newData->sources.add(s->mod->getId());
851
852 WeakReference<ScriptModulationMatrix> safeParent(parent.get());
853 WeakReference<TargetDataBase> safeThis(this);
854
855 if (parent->editCallback)
856 {
857 newData->editCallback = [safeParent](String name)
858 {
859 if (safeParent != nullptr)
860 safeParent->editCallback.call1(name);
861 };
862 }
863
864 newData->queryFunction = [safeThis](int index, bool checkTicked)
865 {
866 if (safeThis != nullptr)
867 return safeThis->queryFunction(index, checkTicked);
868
869 return false;
870 };
871
872 newData->toggleFunction = [safeThis](int index, bool value)
873 {
874 if (safeThis != nullptr)
875 {
876 auto source = safeThis->parent->sourceData[index]->mod->getId();
877
878 safeThis->parent->connect(source, safeThis->modId, value);
879 }
880 };
881
882 return newData;
883}
884
885void ScriptModulationMatrix::TargetDataBase::verifyProperty(const var& json, const Identifier& id)
886{

Callers 2

controlCallbackMethod · 0.45
initAllPropertiesMethod · 0.45

Calls 8

queryFunctionMethod · 0.80
addMethod · 0.45
getIdMethod · 0.45
getMethod · 0.45
call1Method · 0.45
connectMethod · 0.45
updateValueMethod · 0.45
convertTo0to1Method · 0.45

Tested by

no test coverage detected