MCPcopy Create free account
hub / github.com/asb2m10/dexed / setCurrentProgram

Method setCurrentProgram

Source/PluginParam.cpp:735–760  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

733}
734
735void DexedAudioProcessor::setCurrentProgram(int index) {
736 TRACE("setting program %d state", index);
737
738 if ( lastStateSave + 2 > time(NULL) ) {
739 TRACE("skipping save, storage recall to close");
740 return;
741 }
742
743 panic();
744
745 index = index > 31 ? 31 : index;
746 currentCart.unpackProgram(data, index);
747 unpackOpSwitch(0x3F);
748 lfo.reset(data + 137);
749 currentProgram = index;
750 triggerAsyncUpdate();
751
752 // reset parameter display
753 DexedAudioProcessorEditor *editor = (DexedAudioProcessorEditor *) getActiveEditor();
754 if ( editor == NULL ) {
755 return;
756 }
757 editor->global.setParamMessage("");
758
759 panic();
760}
761
762const String DexedAudioProcessor::getProgramName(int index) {
763 if (index >= 32)

Callers 4

programSelectedMethod · 0.80
loadCartMethod · 0.80
comboBoxChangedMethod · 0.80
storeProgramMethod · 0.80

Calls 3

unpackProgramMethod · 0.80
resetMethod · 0.80
setParamMessageMethod · 0.80

Tested by

no test coverage detected