| 726 | } |
| 727 | |
| 728 | void StepSequencer::PlayNote(double time, int pitch, int velocity, int voiceIdx, ModulationParameters modulation) |
| 729 | { |
| 730 | if (mNoteInputMode == NoteInputMode::PlayStepIndex) |
| 731 | { |
| 732 | if (velocity > 0) |
| 733 | { |
| 734 | if (!mHasExternalPulseSource) |
| 735 | { |
| 736 | mHasExternalPulseSource = true; |
| 737 | mAdjustOffsets = false; |
| 738 | for (int i = 0; i < NUM_STEPSEQ_ROWS; ++i) |
| 739 | mOffsets[i] = 0; |
| 740 | } |
| 741 | |
| 742 | mCurrentColumn = pitch % GetNumSteps(mStepInterval, mNumMeasures); |
| 743 | Step(time, velocity / 127.0f, kPulseFlag_Repeat); |
| 744 | } |
| 745 | } |
| 746 | else |
| 747 | { |
| 748 | if (mRepeatRate == kInterval_None) |
| 749 | PlayNoteOutput(time, pitch, velocity, voiceIdx, modulation); |
| 750 | else |
| 751 | mPadPressures[pitch] = velocity; |
| 752 | } |
| 753 | } |
| 754 | |
| 755 | void StepSequencer::OnPulse(double time, float velocity, int flags) |
| 756 | { |