resonance 1.0.1
Loading...
Searching...
No Matches
scoretrackgraph.h
Go to the documentation of this file.
1#pragma once
2
3#include "app/application.h"
4#include "app/msgsink.h"
5#include "app/msgsource.h"
6#include "game/phraseplayer.h"
7#include "game/quantizer.h"
8#include "game/trackdata.h"
9#include "gs/mixer.h"
10#include "gs/musesynth.h"
11#include "gs/phrasemgr.h"
12
13class BarSequencer;
14class PhraseDatabase;
15class Player;
16
52public:
63 explicit ScoreTrackGraph(TrackData *pTrackData);
64
70
81
92 virtual void Start();
93
102 virtual void Stop();
103
115 virtual void
116 ConnectInputs(MsgSource *pPrimary, MsgSource *pOptional, MsgSource *pSecondary) = 0;
117
128 virtual void ConnectGamer(MsgSource *pSource);
129
139 virtual void SetMixerOutput(MsgSink *pOutput) = 0;
140
149 virtual void ConnectToTunnel(MsgSink *pSink) = 0;
150
160 virtual void SetNetSink(MsgSink *pSink) = 0;
161
174 virtual int HasNothingPending();
175
189 virtual void GivePhrases(int nTick, Player *pPlayer);
190
201 virtual int CanGivePhrases();
202
213 virtual void CreatePowerbarMgr();
214
225 int StartMF();
226
237 int StopMF();
238
248 static void Delete(ScoreTrackGraph *pGraph);
249
250protected:
251 int mTrack; // +0x00, the track's index, copied from TrackData::mIndex
252
253public:
261
262protected:
263 PhraseMgr *mPhraseMgr; // +0x08, 0x60 bytes, built at 0x001ba0d0
264 PhrasePlayer *mPhrasePlayer; // +0x0c, 0x30 bytes, built at 0x001c17d8
265 Quantizer *mQuantizer; // +0x10, four bytes, built at 0x001ce670
266 MuseSynth *mMuseSynth; // +0x14, 0x30 bytes, built at 0x001aa4d8
267 int mUnused; // +0x18, cleared by the constructor and never read
268 Mixer *mMixer; // +0x1c, 0x58 bytes, built at 0x001a7110
269 Application *mApplication; // +0x20, from Application::shared()
270 BarSequencer *mSequencer; // +0x24, built by Start() and deleted by Stop()
271};
272
273// NTSC-U/C: 0x001cf6b8, PAL: 0x001d5570
274// The out-of-line copy.
276 Start();
277 return 0;
278}
279
280// NTSC-U/C: 0x001cf6e8, PAL: 0x001d55a0
281// The out-of-line copy.
283 Stop();
284 return 0;
285}
286
287// NTSC-U/C: 0x001cf718, PAL: 0x001d55d0
288// The out-of-line copy.
290 delete pGraph;
291}
The FreQuency application.
Definition application.h:23
Task that sends one track's MIDI a bar at a time.
Definition barsequencer.h:29
Per-track MIDI mixer that sits between a track graph and the synthesiser.
Definition mixer.h:32
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 players that are sounding, and the sink that starts them.
Definition musesynth.h:36
Store of one phrase per step of a play map, and one jam effect mask per step.
Definition phrasedatabase.h:29
Owner of the gem phrases on one track, and the seam between the network and the gems.
Definition phrasemgr.h:51
Player of the phrases one track is divided into.
Definition phraseplayer.h:30
One participant in a session, local or remote.
Definition player.h:39
Holder of the track description the beat-quantising paths consult.
Definition quantizer.h:14
Mixer * mMixer
Definition scoretrackgraph.h:268
PhraseDatabase * GetPhraseDatabase()
Report the phrase database of this stage's phrase manager.
virtual void CreatePowerbarMgr()
Create the phrase manager's powerbar manager.
PhraseMgr * mPhraseMgr
Definition scoretrackgraph.h:263
virtual int CanGivePhrases()
Report whether GivePhrases() acts on this stage.
MuseSynth * mMuseSynth
Definition scoretrackgraph.h:266
virtual int HasNothingPending()
Report whether the stage has nothing outstanding.
ScoreTrackGraph(TrackData *pTrackData)
Build the stage's quantiser, phrase manager, phrase player, mixer, and synthesiser.
Quantizer * mQuantizer
Definition scoretrackgraph.h:265
virtual void SetMixerOutput(MsgSink *pOutput)=0
Attach the mixer to the synthesiser and give it its output sink.
BarSequencer * mSequencer
Definition scoretrackgraph.h:270
virtual void ConnectToTunnel(MsgSink *pSink)=0
Register one sink with every source the stage provides.
virtual void Stop()
Stop the stage.
Application * mApplication
Definition scoretrackgraph.h:269
static void Delete(ScoreTrackGraph *pGraph)
Delete a stage, which may be null.
Definition scoretrackgraph.h:289
virtual void Start()
Start the stage.
int mUnused
Definition scoretrackgraph.h:267
virtual void SetNetSink(MsgSink *pSink)=0
Install the sink the phrase manager reports phrase changes to.
int StartMF()
Run Start() and report zero.
Definition scoretrackgraph.h:275
TrackData * mTrackData
The track description, the constructor's argument.
Definition scoretrackgraph.h:260
virtual void ConnectInputs(MsgSource *pPrimary, MsgSource *pOptional, MsgSource *pSecondary)=0
Wire the stage's objects to the sources that drive it.
virtual void ConnectGamer(MsgSource *pSource)
Register the mixer with one source.
PhrasePlayer * mPhrasePlayer
Definition scoretrackgraph.h:264
int StopMF()
Run Stop() and report zero.
Definition scoretrackgraph.h:282
int mTrack
Definition scoretrackgraph.h:251
virtual ~ScoreTrackGraph()
virtual void GivePhrases(int nTick, Player *pPlayer)
Give every phrase of the track to one player.
Converted events of one track of a level.
Definition trackdata.h:52