| 193 | } |
| 194 | |
| 195 | void NoteStepSequencer::DrawModule() |
| 196 | { |
| 197 | if (Minimized() || IsVisible() == false) |
| 198 | return; |
| 199 | |
| 200 | ofSetColor(255, 255, 255, gModuleDrawAlpha); |
| 201 | |
| 202 | mLoopResetPointSlider->SetShowing(mHasExternalPulseSource); |
| 203 | mGridControlOffsetXSlider->SetShowing((mGridControlTarget->GetGridController() != nullptr && mLength > mGridControlTarget->GetGridController()->NumCols()) || mPush2GridDisplayMode == Push2GridDisplayMode::GridView); |
| 204 | mGridControlOffsetYSlider->SetShowing((mGridControlTarget->GetGridController() != nullptr && mNoteRange > mGridControlTarget->GetGridController()->NumRows()) || mPush2GridDisplayMode == Push2GridDisplayMode::GridView); |
| 205 | |
| 206 | mIntervalSelector->Draw(); |
| 207 | mLengthSlider->Draw(); |
| 208 | mOctaveSlider->Draw(); |
| 209 | mNoteModeSelector->Draw(); |
| 210 | mShiftBackButton->Draw(); |
| 211 | mShiftForwardButton->Draw(); |
| 212 | mClearButton->Draw(); |
| 213 | mRandomizeAllButton->Draw(); |
| 214 | mRandomizePitchButton->Draw(); |
| 215 | mRandomizeLengthButton->Draw(); |
| 216 | mRandomizeVelocityButton->Draw(); |
| 217 | mLoopResetPointSlider->Draw(); |
| 218 | mGridControlTarget->Draw(); |
| 219 | mGridControlOffsetXSlider->Draw(); |
| 220 | mGridControlOffsetYSlider->Draw(); |
| 221 | mRandomizePitchChanceSlider->Draw(); |
| 222 | mRandomizePitchVarietySlider->Draw(); |
| 223 | mRandomizeLengthChanceSlider->Draw(); |
| 224 | mRandomizeLengthRangeSlider->Draw(); |
| 225 | mRandomizeVelocityChanceSlider->Draw(); |
| 226 | mRandomizeVelocityDensitySlider->Draw(); |
| 227 | |
| 228 | int majorColSize = Transport::IsTripletInterval(mInterval) ? 3 : 4; |
| 229 | if (majorColSize < mLength) |
| 230 | mGrid->SetMajorColSize(majorColSize); |
| 231 | else |
| 232 | mGrid->SetMajorColSize(-1); |
| 233 | |
| 234 | mGrid->Draw(); |
| 235 | mVelocityGrid->Draw(); |
| 236 | |
| 237 | ofPushStyle(); |
| 238 | ofSetColor(128, 128, 128, gModuleDrawAlpha * .8f); |
| 239 | for (int i = 0; i < mGrid->GetRows(); ++i) |
| 240 | { |
| 241 | ofVec2f pos = mGrid->GetCellPosition(0, i - 1) + mGrid->GetPosition(true); |
| 242 | float scale = MIN(mGrid->IClickable::GetDimensions().y / mGrid->GetRows() - 2, 18); |
| 243 | DrawTextNormal(NoteName(RowToPitch(i), false, true) + "(" + ofToString(RowToPitch(i)) + ")", pos.x + 1, pos.y - (scale / 8), scale); |
| 244 | } |
| 245 | ofPopStyle(); |
| 246 | |
| 247 | if (mGridControlTarget->GetGridController() || mPush2GridDisplayMode == Push2GridDisplayMode::GridView) |
| 248 | { |
| 249 | int controllerCols = 8; |
| 250 | int controllerRows = 8; |
| 251 | if (mGridControlTarget->GetGridController() != nullptr) |
| 252 | { |
nothing calls this directly
no test coverage detected