MCPcopy Create free account
hub / github.com/GuitarML/NeuralPi / getModelIndex

Method getModelIndex

Source/PluginProcessor.cpp:306–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304}
305
306int 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
318int NeuralPiAudioProcessor::getIrIndex(float ir_param)
319{

Callers 1

sliderValueChangedMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected