| 132 | } |
| 133 | |
| 134 | float 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 | |
| 151 | py::array_t<float> ProcessorBase::getAutomationNumpy( |
| 152 | const std::string& parameterName) { |
no test coverage detected