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

Method DrawModule

Source/FollowingSong.cpp:110–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110void FollowingSong::DrawModule()
111{
112 if (Minimized() || IsVisible() == false)
113 return;
114
115 mMuteCheckbox->Draw();
116
117 ofPushMatrix();
118 ofTranslate(10, 20);
119 DrawTextNormal(mSample.Name(), 100, -10);
120 DrawAudioBuffer(540, 100, mSample.Data(), 0, mSample.LengthInSamples() / mSample.GetSampleRateRatio(), mSample.GetPlayPosition());
121 ofPopMatrix();
122
123 ofPushStyle();
124 float w, h;
125 GetDimensions(w, h);
126 ofFill();
127 ofSetColor(255, 255, 255, 50);
128 float beatWidth = w / 4;
129 ofRect(int(TheTransport->GetMeasurePos(gTime) * 4) * beatWidth, 0, beatWidth, h);
130 ofPopStyle();
131}
132
133void FollowingSong::DropdownUpdated(DropdownList* list, int oldVal, double time)
134{

Callers

nothing calls this directly

Calls 15

ofPushMatrixFunction · 0.85
ofTranslateFunction · 0.85
DrawTextNormalFunction · 0.85
DrawAudioBufferFunction · 0.85
ofPopMatrixFunction · 0.85
ofPushStyleFunction · 0.85
ofFillFunction · 0.85
ofSetColorFunction · 0.85
ofRectFunction · 0.85
ofPopStyleFunction · 0.85
DataMethod · 0.80
LengthInSamplesMethod · 0.80

Tested by

no test coverage detected