| 1061 | } |
| 1062 | |
| 1063 | void NoteStepSequencer::OnMidiControl(MidiControl& control) |
| 1064 | { |
| 1065 | if (control.mControl >= 21 && control.mControl <= 28) |
| 1066 | { |
| 1067 | int step = control.mControl - 21; |
| 1068 | mTones[step] = MIN(control.mValue / 127.0f * mNoteRange, mNoteRange - 1); |
| 1069 | SyncGridToSeq(); |
| 1070 | } |
| 1071 | |
| 1072 | if (control.mControl >= 41 && control.mControl <= 48) |
| 1073 | { |
| 1074 | int step = control.mControl - 41; |
| 1075 | if (control.mValue >= 1) |
| 1076 | mVels[step] = control.mValue; |
| 1077 | SyncGridToSeq(); |
| 1078 | UpdateLights(); |
| 1079 | } |
| 1080 | |
| 1081 | if (control.mControl == 115) |
| 1082 | { |
| 1083 | mSetLength = control.mValue > 0; |
| 1084 | if (mController) |
| 1085 | mController->SendCC(0, 116, control.mValue); |
| 1086 | } |
| 1087 | } |
| 1088 | |
| 1089 | void NoteStepSequencer::PlayNote(double time, int pitch, int velocity, int voiceIdx, ModulationParameters modulation) |
| 1090 | { |