| 304 | } |
| 305 | |
| 306 | int NeuralPiAudioProcessor::getModelIndex(float model_param) |
| 307 | { |
| 308 | int a = static_cast<int>(round(model_param * (num_models - 1.0))); |
| 309 | if (a > num_models - 1) { |
| 310 | a = num_models - 1; |
| 311 | } |
| 312 | else if (a < 0) { |
| 313 | a = 0; |
| 314 | } |
| 315 | return a; |
| 316 | } |
| 317 | |
| 318 | int NeuralPiAudioProcessor::getIrIndex(float ir_param) |
| 319 | { |