25 Loop(
int nStartBar,
int nNumBars,
int nPlayBar)
26 : mStartBar(nStartBar), mNumBars(nNumBars), mPlayBar(nPlayBar) {
38 return mPlayBar < other.mPlayBar;
83 void AddLoop(
int nStartBar,
int nNumBars,
int nPlayBar);
121 int nTick,
int *pChangeTick,
int *pEnd,
int *pNextStart,
int *pNextLength,
int *pIsLast);
149 std::vector<Loop> mLoops;
int GetStartBar() const
Definition playmap.h:42
Loop(int nStartBar, int nNumBars, int nPlayBar)
Construct a stretch.
Definition playmap.h:25
int GetPlayBar() const
Definition playmap.h:47
int GetNumBars() const
Definition playmap.h:52
bool operator<(const Loop &other) const
Order loops by the bar they play from.
Definition playmap.h:37
void AddLoop(int nStartBar, int nNumBars, int nPlayBar)
Play a range of bars of the song as written from a bar on, repeating without end.
void GetSegment(int nTick, int *pChangeTick, int *pEnd, int *pNextStart, int *pNextLength, int *pIsLast)
Report the stretch of the song as written that plays at a tick, and the stretch after it.
int MapBar(int nBar) const
Map a bar the song plays to the bar of the song as written.
void ClearLoops()
Remove every loop, and play the song as written again.
PlayMap(int nTicksPerBar, int nEndBar)
Construct a map that plays the song as written, from bar 0 without end.
int GetEndBar() const
Report the bar the song ends at.
int GetLooping() const
Definition playmap.h:143
int MapTick(int nTick) const
Map a tick the song plays at to the tick of the song as written.