| 364 | } |
| 365 | |
| 366 | void processFilters(float deltaTime) { |
| 367 | uint8_t wheelChannels = getWheelChannels(); |
| 368 | for (uint8_t c = 0; c < wheelChannels; c++) { |
| 369 | float pw = pws[c] / 8191.f; |
| 370 | pw = math::clamp(pw, -1.f, 1.f); |
| 371 | if (smooth) |
| 372 | pw = pwFilters[c].process(deltaTime, pw); |
| 373 | else |
| 374 | pwFilters[c].out = pw; |
| 375 | |
| 376 | float mod = mods[c] / 127.f; |
| 377 | mod = math::clamp(mod, 0.f, 1.f); |
| 378 | if (smooth) |
| 379 | mod = modFilters[c].process(deltaTime, mod); |
| 380 | else |
| 381 | modFilters[c].out = mod; |
| 382 | } |
| 383 | } |
| 384 | |
| 385 | void processPulses(float deltaTime) { |
| 386 | clockPulse.process(deltaTime); |