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

Method FloatSliderUpdated

Source/StepSequencer.cpp:818–839  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

816}
817
818void StepSequencer::FloatSliderUpdated(FloatSlider* slider, float oldVal, double time)
819{
820 if (slider == mStrengthSlider)
821 {
822 mGrid->SetStrength(mStrength);
823 for (auto iter : mHeldButtons)
824 mGrid->SetVal(iter.mCol, iter.mRow, mStrength);
825
826 if (mHeldButtons.size() > 0)
827 UpdateLights();
828 }
829 for (int i = 0; i < NUM_STEPSEQ_ROWS; ++i)
830 {
831 if (slider == mOffsetSlider[i])
832 {
833 float offset = -mOffsets[i] / 32; //up to 1/32nd late or early
834 mRows[i]->SetOffset(offset);
835 mNoteRepeats[i]->SetOffset(offset);
836 mGrid->SetDrawOffset(i, mOffsets[i] / 2);
837 }
838 }
839}
840
841void StepSequencer::RadioButtonUpdated(RadioButton* radio, int oldVal, double time)
842{

Callers

nothing calls this directly

Calls 5

SetStrengthMethod · 0.80
SetValMethod · 0.80
sizeMethod · 0.80
SetOffsetMethod · 0.45
SetDrawOffsetMethod · 0.45

Tested by

no test coverage detected