| 201 | } |
| 202 | |
| 203 | void DotSequencer::OnTransportAdvanced(float amount) |
| 204 | { |
| 205 | for (int i = 0; i < (int)mPlayingDots.size(); ++i) |
| 206 | { |
| 207 | if (mPlayingDots[i].mPitch != -1) |
| 208 | { |
| 209 | const DotGrid::DotData& data = mDotGrid->GetDataAt(mPlayingDots[i].mCol, mPlayingDots[i].mRow); |
| 210 | double noteOffTime = -1; |
| 211 | |
| 212 | if (data.mOn == false || mStepIdx < mPlayingDots[i].mCol) |
| 213 | { |
| 214 | noteOffTime = NextBufferTime(!K(includeLookahead)); |
| 215 | } |
| 216 | else |
| 217 | { |
| 218 | double noteEnd = mPlayingDots[i].mPlayedTime + TheTransport->GetDuration(mInterval) * std::max(.5f, data.mLength); |
| 219 | if (noteEnd < NextBufferTime(K(includeLookahead))) |
| 220 | noteOffTime = noteEnd; |
| 221 | } |
| 222 | |
| 223 | if (noteOffTime != -1) |
| 224 | { |
| 225 | mNoteOutput.PlayNote(noteOffTime, mPlayingDots[i].mPitch, 0); |
| 226 | mPlayingDots[i].mPitch = -1; |
| 227 | } |
| 228 | } |
| 229 | } |
| 230 | |
| 231 | if (mShouldStopAllNotes) |
| 232 | { |
| 233 | for (int i = 0; i < (int)mPlayingDots.size(); ++i) |
| 234 | { |
| 235 | if (mPlayingDots[i].mPitch != -1) |
| 236 | { |
| 237 | mNoteOutput.PlayNote(NextBufferTime(!K(includeLookahead)), mPlayingDots[i].mPitch, 0); |
| 238 | mPlayingDots[i].mPitch = -1; |
| 239 | } |
| 240 | } |
| 241 | mShouldStopAllNotes = false; |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | int DotSequencer::RowToPitch(int row) const |
| 246 | { |
nothing calls this directly
no test coverage detected