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

Method UpdateVisibleControls

Source/FloatSliderLFOControl.cpp:346–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344}
345
346void FloatSliderLFOControl::UpdateVisibleControls()
347{
348 bool isPerlin = mLFO.GetOsc()->GetType() == kOsc_Perlin;
349 bool isDrunk = mLFO.GetOsc()->GetType() == kOsc_Drunk;
350 bool isRandom = mLFO.GetOsc()->GetType() == kOsc_Random;
351 bool showFreeRate = mLFOSettings.mInterval == kInterval_Free || isPerlin;
352 mOffsetSlider->SetShowing(!showFreeRate && !isDrunk && !isRandom);
353 mFreeRateSlider->SetShowing(showFreeRate);
354 mIntervalSelector->SetShowing(!isPerlin);
355 mShuffleSlider->SetShowing(!isPerlin && !isDrunk && !isRandom);
356 mSoftenSlider->SetShowing(mLFO.GetOsc()->GetType() == kOsc_Saw || mLFO.GetOsc()->GetType() == kOsc_Square || mLFO.GetOsc()->GetType() == kOsc_NegSaw || isRandom);
357 mSpreadSlider->SetShowing(mLFO.GetOsc()->GetType() != kOsc_Square);
358 mLengthSlider->SetShowing(!isPerlin && !isDrunk && !isRandom);
359}
360
361void FloatSliderLFOControl::SetRate(NoteInterval rate)
362{

Callers

nothing calls this directly

Calls 3

GetOscMethod · 0.80
GetTypeMethod · 0.45
SetShowingMethod · 0.45

Tested by

no test coverage detected