68 void *
operator new(
size_t nSize) {
79 void operator delete(
void *pBlock) {
122 std::vector<TickObj<MuseMsg *> >
mMidi;
199 void AddMidiMsg(
int nTick,
unsigned char nStatus,
unsigned char nData1,
unsigned char nData2);
216 unsigned char nVelocity,
218 unsigned char nChannel);
465 const std::vector<TickObj<MuseMsg *> > *
GetMidi(
int nBar)
const;
473 const std::vector<TickObj<int> > *
GetGems(
int nBar)
const;
538 static int ScoreGems(
const std::vector<
TickObj<int> > &gems);
546 static void InitScoreTables();
550 std::vector<Bar> mBars;
554 int mCurrentRiffTick;
555 std::vector<RiffSet *> mRiffSetsOwned;
556 std::vector<Harmony *> mHarmoniesOwned;
One participant's view of a session, driven by messages.
Definition gamer.h:47
The notes of one harmony a track plays from one song position onward.
Definition harmony.h:24
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Abstract base shared by a family of messages.
Definition musemsg.h:28
Store of one phrase per step of a play map, and one jam effect mask per step.
Definition phrasedatabase.h:29
Traversal order over one playable sequence.
Definition playmap.h:47
One participant in a session, local or remote.
Definition player.h:39
The riffs of one phrase, one per difficulty level.
Definition riffset.h:23
One riff of a track at one difficulty level, as a sequence of MIDI messages.
Definition riff.h:25
Song position in MIDI ticks, printed as measure, beat, and tick.
Definition tick.h:70
One bar of a track, with its scoring values and the sorted lists of what starts in it.
Definition trackdata.h:90
std::vector< TickObj< int > > mGems
Definition trackdata.h:123
void Print(std::ostream &stream)
Write every member Print() labels to a diagnostic stream.
int mCatchPoints
Definition trackdata.h:119
~Bar()
Delete every MIDI message the bar holds and free the four lists.
std::vector< TickObj< RiffSet * > > mRiffSets
Definition trackdata.h:121
int mQuant
Definition trackdata.h:117
std::vector< TickObj< Harmony * > > mHarmonies
Definition trackdata.h:120
Bar()
Construct an empty bar quantised to 120 ticks.
std::vector< TickObj< MuseMsg * > > mMidi
Definition trackdata.h:122
int mPoints
Definition trackdata.h:118
TrackData(int nIndex, PlayMap *pMap)
Construct an empty track over a play map.
void LocateMapped(int nTick, const Bar *&pBar, Sch::Tick &offset) const
Split a song position into its bar, mapped through PlayMap::MapBar(), and the offset.
void SetOwner(Player *pPlayer, int nBar) const
Report a player for a bar to the gamer, with this track's index.
friend class LevelBuilder
Definition trackdata.h:56
const std::vector< TickObj< int > > * GetGemsInBar(int nBar) const
int FindGemAtOrBefore(int nTick, int *pTick, int *pGem) const
Find the last gem at or before a song position, looking back into the previous bar when the position'...
void AddRiff(int nTick, Riff *pRiff)
Give a riff a place in the riff set at a song position.
int FollowingStepBar(int nBar) const
~TrackData()
Delete every riff set and harmony the track created, then the bars.
Riff * GetRiffInMappedBar(int nBar, int nOffset, int nLevel) const
void SetActive(int nTick, int bActive)
Do nothing.
void AddHarmony(int nTick, const Harmony &harmony)
Start a harmony at a song position.
int GetPoints(int nBar) const
unsigned char mChannel
Definition trackdata.h:515
int mKind
Definition trackdata.h:518
void Locate(int nTick, Bar *&pBar)
Find the bar of a song position, discarding the offset.
int NextStepBar(int nBar) const
Harmony * GetHarmony(int nTick) const
int FindStepIndex(int nBar) const
void SetQuant(int nTick, int nQuant)
Set the quantisation of the bar at a song position.
Riff * GetRiffInBar(int nBar, int nOffset, int nLevel) const
unsigned short mPaddingHalf
Definition trackdata.h:517
int IsStepStart(int nBar) const
void Locate(int nTick, Bar *&pBar, Sch::Tick &offset)
Split a song position into its bar and the offset within the bar.
int StepStartBar(int nBar) const
const std::vector< TickObj< MuseMsg * > > * GetMidi(int nBar) const
int GetQuant(int nBar) const
void Print(std::ostream &stream)
Write the track and every bar to a diagnostic stream.
void AddNoteMsg(int nTick, unsigned char nNote, unsigned char nVelocity, int nLength, unsigned char nChannel)
Add a NoteMsg built from four values to the bar at a song position.
void AddMidiMsg(int nTick, unsigned char nStatus, unsigned char nData1, unsigned char nData2)
Add a StdMidiMsg built from three bytes to the bar at a song position.
Gamer * mGamer
Definition trackdata.h:513
int GetGemAt(int nTick) const
int QueryBar(int nBar) const
Ask the gamer about a bar, with this track's index.
void AddGem(int nTick, int nGem, Riff *pRiff)
Add a gem at a song position, with a riff set of its own when a riff is given.
int mIndex
Definition trackdata.h:514
unsigned char mPaddingByte
Definition trackdata.h:516
const std::vector< TickObj< MuseMsg * > > * GetMidiInBar(int nBar) const
int mInstrument
Instrument index from 0 to 5.
Definition trackdata.h:526
void ScoreBars()
Give every bar its point value and its configured word.
int FindGemAtOrAfter(int nTick, int *pTick, int *pGem) const
Find the first gem at or after a song position within mGemSearchBars bars.
int GetJuice(int nBar) const
Riff * GetRiff(int nTick, int nLevel) const
const std::vector< TickObj< int > > * GetGems(int nBar) const
void LocateMapped(int nTick, const Bar *&pBar) const
Find the mapped bar of a song position, discarding the offset.
void AddPhrases(PhraseDatabase *pDatabase)
Add every gem of every phrase of a database, one phrase per step, and score each bar.
friend class Catcher
Definition trackdata.h:54
void GetBar(int nBar, const Bar *&pBar) const
Find a bar by its bar number, mapped through PlayMap::MapBar().
void OperatorDeleteOverride(void *pBlock, const char *pszClass)
Release a block that AllocateTaggedMemory() handed out.
void * AllocateTaggedMemory(size_t nSize, const char *pszClass)
Allocate a block for one object of a named class.
One value at one song position.
Definition tickobj.h:20
TrackMode
The play modes of a track, as TrackData::Print() writes them.
Definition trackdata.h:22
@ kTrackModeRiff
Definition trackdata.h:24
@ kTrackModeAxe
Definition trackdata.h:23
@ kTrackModeVocal
Definition trackdata.h:26
@ kTrackModeScratch
Definition trackdata.h:25
@ kTrackModeCatch
Definition trackdata.h:27