MCPcopy Create free account
hub / github.com/DBraun/DawDreamer / setAutomationValByStr

Method setAutomationValByStr

Source/ProcessorBase.cpp:43–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43bool ProcessorBase::setAutomationValByStr(std::string& parameterName,
44 float val) {
45 for (auto& uncastedParameter : this->getParameters()) {
46 if (uncastedParameter->getName(DAW_PARAMETER_MAX_NAME_LENGTH)
47 .toStdString() == parameterName) {
48 auto parameter = (AutomateParameterFloat*)uncastedParameter;
49 parameter->setAutomation(val);
50 return true;
51 }
52 }
53
54 throw std::runtime_error("Failed to set parameter: " + parameterName);
55 return false;
56}
57
58bool ProcessorBase::setAutomationValByIndex(int index, float val) {
59 auto parameters = this->getParameters();

Callers 1

setParamWithIndexMethod · 0.80

Calls 4

getParametersMethod · 0.80
toStdStringMethod · 0.80
getNameMethod · 0.65
setAutomationMethod · 0.45

Tested by

no test coverage detected