resonance 1.0.1
Loading...
Searching...
No Matches
phraseplayer.h
Go to the documentation of this file.
1#pragma once
2
3#include "app/msgsink.h"
4#include "app/msgsource.h"
6#include "game/phrase.h"
7#include "game/quantizer.h"
8#include "game/trackdata.h"
9#include "mid/tick.h"
10#include "msg/message.h"
11
12class PhraseMgr;
13
30class PhrasePlayer : public MsgSource, public MsgSink {
31public:
39 PhrasePlayer(PhraseMgr *pPhraseMgr, Quantizer *pQuantizer, const TrackData *pTrackData);
40
51 virtual void DispatchPriv(Message *pMsg);
52
63 void PlayBar(int nBar);
64
77 void PlayBarAt(int nBar, int nOffset, int nElapsed);
78
88 void SetJamEffectsMgr(JamEffectsMgr *pJamEffects);
89
90private:
100 void PlayBarGems(Phrase *pPhrase, int nBar, Sch::Tick from, Sch::Tick elapsed);
101
111 void PlayPhraseGems(Phrase *pPhrase, int nBar, Sch::Tick from, Sch::Tick elapsed);
112
119 void PlayPhraseMuse(Phrase *pPhrase, int nBar);
120
121 PhraseMgr *mPhraseMgr; // +0x18
122 Quantizer *mQuantizer; // +0x1c, not read by any recovered routine
123 const TrackData *mTrackData; // +0x20
124 int mTrackKind; // +0x24, a TrackMode copied from TrackData::mKind
125 JamEffectsMgr *mJamEffects; // +0x28
126 int mLastBar; // +0x2c, the last bar played, -1 before the first
127};
Manager of the jam effects a track applies to its voices.
Definition jameffectsmgr.h:27
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:41
Receiver of engine messages.
Definition msgsink.h:37
Sender of engine messages, which stores the list of sinks that receive them.
Definition msgsource.h:26
Owner of the gem phrases on one track, and the seam between the network and the gems.
Definition phrasemgr.h:51
virtual void DispatchPriv(Message *pMsg)
Act on a message.
void SetJamEffectsMgr(JamEffectsMgr *pJamEffects)
Install the jam-effects manager the step values go to.
void PlayBar(int nBar)
Play the phrase of one bar.
void PlayBarAt(int nBar, int nOffset, int nElapsed)
Play a bar again from an offset, already some ticks under way.
PhrasePlayer(PhraseMgr *pPhraseMgr, Quantizer *pQuantizer, const TrackData *pTrackData)
One phrase of a track, with its gems, its player, and the messages and values scheduled across it.
Definition phrase.h:38
Holder of the track description the beat-quantising paths consult.
Definition quantizer.h:14
Song position in MIDI ticks, printed as measure, beat, and tick.
Definition tick.h:70
Converted events of one track of a level.
Definition trackdata.h:52