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

Method getAutomationAtZero

Source/ProcessorBase.cpp:134–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134float ProcessorBase::getAutomationAtZero(const std::string& parameterName) {
135 auto parameters = this->getParameters();
136 for (auto& uncastedParameter : parameters) {
137 if (uncastedParameter->getName(DAW_PARAMETER_MAX_NAME_LENGTH)
138 .toStdString() == parameterName) {
139 auto parameter = (AutomateParameterFloat*)uncastedParameter;
140 AudioPlayHead::PositionInfo posInfo;
141 posInfo.setTimeInSamples(0.);
142 posInfo.setTimeInSeconds(0.);
143 return parameter->sample(posInfo);
144 }
145 }
146
147 throw std::runtime_error("Failed to get automation value for parameter: " +
148 parameterName);
149}
150
151py::array_t<float> ProcessorBase::getAutomationNumpy(
152 const std::string& parameterName) {

Callers 3

getParamWithIndexMethod · 0.80
getParamWithPathMethod · 0.80

Calls 6

getParametersMethod · 0.80
toStdStringMethod · 0.80
setTimeInSamplesMethod · 0.80
setTimeInSecondsMethod · 0.80
sampleMethod · 0.80
getNameMethod · 0.65

Tested by

no test coverage detected