| 365 | } |
| 366 | |
| 367 | void processTriggers() { |
| 368 | float normalledGateVoltage = 0.f; |
| 369 | for (int i = 0; i < NUM_CHANNELS; i++) { |
| 370 | const float gateVoltage = inputs[TRIG_INPUT + i].getNormalVoltage(normalledGateVoltage); |
| 371 | const bool triggered = trig[i].process(gateVoltage); |
| 372 | if (triggered) { |
| 373 | core.onTrigger(i); |
| 374 | } |
| 375 | |
| 376 | // set up normalling for other trigger inputs |
| 377 | normalledGateVoltage = |
| 378 | inputs[TRIG_INPUT + i].isConnected() ? inputs[TRIG_INPUT + i].getVoltage() : normalledGateVoltage; |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | void updateChannelLights() { |
| 383 | for (int i = 0; i < NUM_CHANNELS; i++) { |