MCPcopy Create free account
hub / github.com/VCVRack/Befaco / setAlgorithmViaBank

Method setAlgorithmViaBank

src/NoisePlethora.cpp:518–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

getProgramMethod · 0.80
getProgramNameMethod · 0.80
getModeMethod · 0.80
getSizeMethod · 0.45

Tested by

no test coverage detected