MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / PlayNote

Method PlayNote

Source/StepSequencer.cpp:728–753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

726}
727
728void 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
755void StepSequencer::OnPulse(double time, float velocity, int flags)
756{

Callers 1

PlayStepNoteMethod · 0.45

Calls 1

StepClass · 0.85

Tested by

no test coverage detected