| 197 | } |
| 198 | |
| 199 | void ChaosEngine::DrawModule() |
| 200 | { |
| 201 | ofSetColor(255, 255, 255); |
| 202 | |
| 203 | ofPushStyle(); |
| 204 | |
| 205 | float fBeat = TheTransport->GetMeasurePos(gTime) * TheTransport->GetTimeSigTop() + 1; |
| 206 | int beat = int(fBeat); |
| 207 | if (!mHideBeat) |
| 208 | { |
| 209 | float w, h; |
| 210 | GetDimensions(w, h); |
| 211 | ofFill(); |
| 212 | float beatLeft = 1 - (fBeat - beat); |
| 213 | ofSetColor(255, 255, 255, 100 * beatLeft); |
| 214 | float beatWidth = w / TheTransport->GetTimeSigTop(); |
| 215 | ofRect((beat - 1) * beatWidth, 0, beatWidth, h); |
| 216 | ofPopStyle(); |
| 217 | } |
| 218 | |
| 219 | if (Minimized() || IsVisible() == false) |
| 220 | return; |
| 221 | |
| 222 | mChaosButton->Draw(); |
| 223 | mTotalChaosCheckbox->Draw(); |
| 224 | mSectionDropdown->Draw(); |
| 225 | mSongDropdown->Draw(); |
| 226 | mReadSongsButton->Draw(); |
| 227 | mPlayChordCheckbox->Draw(); |
| 228 | mProgressCheckbox->Draw(); |
| 229 | mDegreeSlider->Draw(); |
| 230 | mRootNoteList->Draw(); |
| 231 | mChordTypeList->Draw(); |
| 232 | mAddChordButton->Draw(); |
| 233 | mRemoveChordButton->Draw(); |
| 234 | mSetProgressionButton->Draw(); |
| 235 | mChordProgressionSlider->Draw(); |
| 236 | mRandomProgressionButton->Draw(); |
| 237 | mInversionSlider->Draw(); |
| 238 | mHideBeatCheckbox->Draw(); |
| 239 | |
| 240 | DrawTextNormal(mInputChord.Name(true, true), 400, 51); |
| 241 | |
| 242 | for (int i = 0; i < mInputChords.size(); ++i) |
| 243 | { |
| 244 | int degree; |
| 245 | std::vector<Accidental> accidentals; |
| 246 | TheScale->GetChordDegreeAndAccidentals(mInputChords[i], degree, accidentals); |
| 247 | std::string accidentalList; |
| 248 | for (int j = 0; j < accidentals.size(); ++j) |
| 249 | accidentalList += ofToString(accidentals[j].mPitch) + (accidentals[j].mDirection == 1 ? "#" : "b") + " "; |
| 250 | DrawTextNormal(mInputChords[i].Name(true, true), 400, 75 + i * 15); |
| 251 | } |
| 252 | |
| 253 | if (!mHideBeat) |
| 254 | gFont.DrawString(ofToString(beat), 42, 10, 50); |
| 255 | gFont.DrawString(ofToString(TheTransport->GetTimeSigTop()) + "/" + ofToString(TheTransport->GetTimeSigBottom()), 40, 90, 50); |
| 256 | gFont.DrawString(ofToString(TheTransport->GetTempo(), 0) + "bpm", 420, 230, 50); |
nothing calls this directly
no test coverage detected