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

Method DrawModule

Source/SingleOscillator.cpp:232–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232void SingleOscillator::DrawModule()
233{
234 if (Minimized() || IsVisible() == false)
235 return;
236
237 mSyncFreqSlider->SetShowing(mVoiceParams.mSyncMode == Oscillator::SyncMode::Frequency);
238 mSyncRatioSlider->SetShowing(mVoiceParams.mSyncMode == Oscillator::SyncMode::Ratio);
239
240 mVolSlider->Draw();
241 mPhaseOffsetSlider->Draw();
242 mPulseWidthSlider->Draw();
243 mSyncModeSelector->Draw();
244 mSyncFreqSlider->Draw();
245 mSyncRatioSlider->Draw();
246 mOscSelector->Draw();
247 mDetuneSlider->Draw();
248 mUnisonSlider->Draw();
249 mUnisonWidthSlider->Draw();
250 mShuffleSlider->Draw();
251 mVelToVolumeSlider->Draw();
252 mVelToEnvelopeSlider->Draw();
253 mFilterADSRDisplay->Draw();
254 mFilterCutoffMaxSlider->Draw();
255 mFilterCutoffMinSlider->Draw();
256 mFilterQSlider->Draw();
257 if (mVoiceParams.mFilterCutoffMax == SINGLEOSCILLATOR_NO_CUTOFF)
258 {
259 ofPushStyle();
260 ofSetColor(0, 0, 0, 100);
261 ofFill();
262 ofRect(mFilterADSRDisplay->GetRect(true).grow(1));
263 ofRect(mFilterCutoffMinSlider->GetRect(true));
264 ofRect(mFilterQSlider->GetRect(true));
265 ofPopStyle();
266 }
267 mADSRDisplay->Draw();
268 mMultSelector->Draw();
269 mSoftenSlider->Draw();
270 mLiteCPUModeCheckbox->Draw();
271
272 {
273 ofPushStyle();
274 int x = 3;
275 int y = 3;
276 int height = 36;
277 int width = kColumnWidth;
278
279 ofSetColor(100, 100, .8f * gModuleDrawAlpha);
280 ofSetLineWidth(.5f);
281 ofRect(x, y, width, height, 0);
282
283 ofSetColor(245, 58, 0, gModuleDrawAlpha);
284 ofSetLineWidth(1);
285
286 ofBeginShape();
287
288 for (float i = 0; i < width; i += (.25f / gDrawScale))
289 {

Callers

nothing calls this directly

Calls 15

ofPushStyleFunction · 0.85
ofSetColorFunction · 0.85
ofFillFunction · 0.85
ofRectFunction · 0.85
ofPopStyleFunction · 0.85
ofSetLineWidthFunction · 0.85
ofBeginShapeFunction · 0.85
FloatWrapFunction · 0.85
ofVertexFunction · 0.85
ofMapFunction · 0.85
ofEndShapeFunction · 0.85
DrawTextRightJustifyFunction · 0.85

Tested by

no test coverage detected