| 516 | } |
| 517 | |
| 518 | void setAlgorithmViaBank(int newBank) { |
| 519 | newBank = clamp(newBank, 0, numBanks - 1); |
| 520 | const int currentProgram = programSelector.getCurrent().getProgram(); |
| 521 | // the new bank may not have as many algorithms |
| 522 | const int currentProgramInNewBank = clamp(currentProgram, 0, getBankForIndex(newBank).getSize() - 1); |
| 523 | const std::string_view algorithmName = getBankForIndex(newBank).getProgramName(currentProgramInNewBank); |
| 524 | const int section = programSelector.getMode(); |
| 525 | |
| 526 | setAlgorithm(section, algorithmName); |
| 527 | } |
| 528 | |
| 529 | void setAlgorithm(int section, std::string_view algorithmName) { |
| 530 |
nothing calls this directly
no test coverage detected