MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / setMidiChannel

Method setMidiChannel

Source/Core/CtrlrPanel/CtrlrPanel.cpp:1152–1189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1150}
1151
1152void CtrlrPanel::setMidiChannel(const CtrlrPanelMidiChannel optionToSet, const uint8 value)
1153{
1154 switch (optionToSet)
1155 {
1156 case panelMidiInputChannelDevice:
1157 deviceInputChannel.set(value);
1158 break;
1159
1160 case panelMidiOutputChannelDevice:
1161 deviceOutputChannel.set(value);
1162 setMidiChannelToAllModulators(jlimit<uint8>(1,16,value));
1163 break;
1164
1165 case panelMidiInputChannelHost:
1166 hostInputChannel.set(value);
1167 break;
1168
1169 case panelMidiOutputChannelHost:
1170 hostOutputChannel.set(value);
1171 break;
1172
1173 case panelMidiControllerChannel:
1174 controllerInputChannel.set(value);
1175 break;
1176 }
1177
1178 processor.midiChannelChaned(optionToSet);
1179 midiInputThread.midiChannelChaned(optionToSet);
1180 midiControllerInputThread.midiChannelChaned(optionToSet);
1181
1182 if (luaPanelMidiChannelChangedCbk && !luaPanelMidiChannelChangedCbk.wasObjectDeleted())
1183 {
1184 if (luaPanelMidiChannelChangedCbk->isValid())
1185 {
1186 getCtrlrLuaManager().getMethodManager().call (luaPanelMidiChannelChangedCbk, (int)optionToSet, (int)value);
1187 }
1188 }
1189}
1190
1191CtrlrPanelMidiChannel CtrlrPanel::midiChannelFromString(const Identifier &i)
1192{

Callers

nothing calls this directly

Calls 4

setMethod · 0.45
midiChannelChanedMethod · 0.45
isValidMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected