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

Method readPanelInput

src/Random8.cpp:277–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275 }
276
277 Random8Panel::Input readPanelInput(float dt) {
278 Random8Panel::Input panelInput;
279 panelInput.dt = dt;
280 for (int i = 0; i < NUM_CHANNELS; i++) {
281 panelInput.buttonDown[i] = params[pageButtonParams[i]].getValue() > 0.5f;
282 panelInput.loopModes[i] = loopModes[i];
283 panelInput.presetFilled[i] = presetSlots[i] != nullptr;
284 panelInput.divider[i] = params[DIVIDER_VALUE_PARAM + i].getValue();
285 panelInput.probability[i] = params[PROB_VALUE_PARAM + i].getValue();
286 panelInput.style[i] = params[STYLE_VALUE_PARAM + i].getValue();
287 panelInput.offset[i] = params[OFFSET_VALUE_PARAM + i].getValue();
288 panelInput.scaleValue[i] = params[SCALE_VALUE_PARAM + i].getValue();
289 panelInput.slide[i] = params[SLIDE_VALUE_PARAM + i].getValue();
290 panelInput.steps[i] = params[STEPS_VALUE_PARAM + i].getValue();
291 }
292 panelInput.activeChannel = clamp(lastTouchedMenuChannel, 0, NUM_CHANNELS - 1);
293 return panelInput;
294 }
295
296 void handlePanelActions(const Random8Panel::Output &panelOutput) {
297 for (int actionIndex = 0; actionIndex < panelOutput.actionCount; actionIndex++) {

Callers

nothing calls this directly

Calls 1

getValueMethod · 0.80

Tested by

no test coverage detected