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

Method DrawModule

Source/AudioLevelToCV.cpp:67–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void AudioLevelToCV::DrawModule()
68{
69 if (Minimized() || IsVisible() == false)
70 return;
71
72 mGainSlider->Draw();
73 mAttackSlider->Draw();
74 mReleaseSlider->Draw();
75 mMinSlider->Draw();
76 mMaxSlider->Draw();
77
78 ofPushStyle();
79 ofSetColor(0, 255, 0, gModuleDrawAlpha);
80 ofBeginShape();
81 float x, y;
82 float w, h;
83 mGainSlider->GetPosition(x, y, K(local));
84 mGainSlider->GetDimensions(w, h);
85 for (int i = 0; i < gBufferSize; ++i)
86 {
87 ofVertex(ofMap(mModulationBuffer[i], 0, 1, x, x + w, K(clamp)), ofMap(i, 0, gBufferSize, y, y + h), K(clamp));
88 }
89 ofEndShape();
90 ofPopStyle();
91}
92
93void AudioLevelToCV::Process(double time)
94{

Callers

nothing calls this directly

Calls 10

ofPushStyleFunction · 0.85
ofSetColorFunction · 0.85
ofBeginShapeFunction · 0.85
ofVertexFunction · 0.85
ofMapFunction · 0.85
ofEndShapeFunction · 0.85
ofPopStyleFunction · 0.85
DrawMethod · 0.45
GetPositionMethod · 0.45
GetDimensionsMethod · 0.45

Tested by

no test coverage detected