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

Method DrawModule

Source/AudioToCV.cpp:57–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57void AudioToCV::DrawModule()
58{
59 if (Minimized() || IsVisible() == false)
60 return;
61
62 mGainSlider->Draw();
63 mMinSlider->Draw();
64 mMaxSlider->Draw();
65
66 ofPushStyle();
67 ofSetColor(0, 255, 0, gModuleDrawAlpha);
68 ofBeginShape();
69 float x, y;
70 float w, h;
71 mGainSlider->GetPosition(x, y, K(local));
72 mGainSlider->GetDimensions(w, h);
73 for (int i = 0; i < gBufferSize; ++i)
74 {
75 ofVertex(ofMap(mModulationBuffer[i], -1, 1, x, x + w, K(clamp)), ofMap(i, 0, gBufferSize, y, y + h), K(clamp));
76 }
77 ofEndShape();
78 ofPopStyle();
79}
80
81void AudioToCV::Process(double time)
82{

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