| 574 | } |
| 575 | |
| 576 | bool StepSequencer::OnPush2Control(Push2Control* push2, MidiMessageType type, int controlIndex, float midiValue) |
| 577 | { |
| 578 | mPush2Connected = true; |
| 579 | |
| 580 | if (type == kMidiMessage_Note) |
| 581 | { |
| 582 | if (controlIndex >= 36 && controlIndex <= 99) |
| 583 | { |
| 584 | int gridIndex = controlIndex - 36; |
| 585 | int gridX = gridIndex % 8; |
| 586 | int gridY = 7 - gridIndex / 8; |
| 587 | OnGridButton(gridX, gridY, midiValue / 127, mGridControlTarget->GetGridController()); |
| 588 | return true; |
| 589 | } |
| 590 | } |
| 591 | |
| 592 | if (type == kMidiMessage_PitchBend) |
| 593 | { |
| 594 | float val = midiValue / MidiDevice::kPitchBendMax; |
| 595 | mGridYOffDropdown->SetFromMidiCC(val, gTime, true); |
| 596 | |
| 597 | return true; |
| 598 | } |
| 599 | |
| 600 | return false; |
| 601 | } |
| 602 | |
| 603 | void StepSequencer::UpdatePush2Leds(Push2Control* push2) |
| 604 | { |
nothing calls this directly
no test coverage detected