resonance 1.0.1
Loading...
Searching...
No Matches
AxePhraseMaker Class Reference

Phrase maker for a guitar track. More...

#include <axephrasemaker.h>

Inheritance diagram for AxePhraseMaker:
Collaboration diagram for AxePhraseMaker:

Classes

struct  HeldNote
 A note-on the maker holds until its note-off. More...

Public Member Functions

 AxePhraseMaker (PhraseMgr *pPhraseMgr, Quantizer *pQuantizer, const TrackData *pTrackData, Sch::TickClock *pClock)
virtual void DispatchPriv (Message *pMsg)
 Act on a message.
virtual void OnPeriod (int nBar)
 Act on the start of a bar.
virtual int GetPeriodOrigin ()
 Report the song position periods are counted from.
int IsBarPlayable (int nBar)
 Report whether a bar can be played.
void Erase (Player *pPlayer, int nTick, int bWholeStep)
 Erase a player's phrase at a song position.
Public Member Functions inherited from MsgSink
void * operator new (size_t nSize)
 Allocate a sink from the tagged heap under the tag "MsgSink".
void operator delete (void *pBlock)
 Release a sink to the tagged heap.
virtual ~MsgSink ()
virtual void Dispatch (Message *pMsg)
 Accept a message.
Public Member Functions inherited from MsgSource
virtual ~MsgSource ()
virtual void AddSink (MsgSink *pSink)
 Register a sink, ignoring a sink that is already registered.
virtual void RemoveSink (MsgSink *pSink)
 Unregister the first occurrence of a sink.
void Send (Message *pMsg) const
 Deliver a message to every registered sink, in registration order.
void ClearSinks ()
 Unregister every sink.

Additional Inherited Members

Public Attributes inherited from MsgSource
int mGraphBuilt
 A word no member of this class reads.

Detailed Description

Phrase maker for a guitar track.

Its RTTI descriptor is at 0x008f2a50. It has PhraseMaker as its only base at offset 0. Its primary table is at 0x007ddc50 with six entries and its MsgSource subobject table at 0x007ddc28 with four. The class introduces two virtuals. The object is 0x50 bytes, measured by AxingSTG's tagged allocation.

Slot 0 of the table at 0x007ddc50 addresses the accessor at 0x0019d390. The accessor guards on the descriptor at 0x008f2a50, and the descriptor settles the class name.

The maker records what the player plays over a bar into a fresh Phrase and installs it in the phrase manager when the bar ends. A note-on is held until its note-off (or the end of the bar) gives it a length, and every recorded message also records the current axis value.

The destructor at 0x0019b7f0 is implicitly declared. It destroys mHeldNotes and MsgSource's vector and releases the object under MsgSink's tag.

Constructor & Destructor Documentation

◆ AxePhraseMaker()

AxePhraseMaker::AxePhraseMaker ( PhraseMgr * pPhraseMgr,
Quantizer * pQuantizer,
const TrackData * pTrackData,
Sch::TickClock * pClock )
Parameters
pPhraseMgrThe phrase manager for the track.
pQuantizerThe quantiser for the track.
pTrackDataThe track description. The constructor copies its track and channel.
pClockNot read.
Ghidra address:
NTSC-U/C: 0x0019b5d0
Ghidra address:
PAL: 0x001a1338

Member Function Documentation

◆ DispatchPriv()

virtual void AxePhraseMaker::DispatchPriv ( Message * pMsg)
virtual

Act on a message.

Slot 3. An AxisRegisterMsg for this track and player stores its value in mValue. A StdMidiMsg goes to OnStdMidi(), a SustainNoteMsg to the branch OnSustainNote() copies, a TrackSelectMsg to the branch OnTrackSelect() copies, and an InvalidateSeekerMsg to the branch OnInvalidateSeeker() copies.

Parameters
pMsgThe message.
Ghidra address:
NTSC-U/C: 0x0019c408
Ghidra address:
PAL: 0x001a2170

Implements MsgSink.

◆ OnPeriod()

virtual void AxePhraseMaker::OnPeriod ( int nBar)
virtual

Act on the start of a bar.

Slot 4.

A bar right after mPhraseBar finishes the phrase in progress, and the seeker is cleared. With mSwitchBanks set, a bar that starts a step selects the synthesiser bank of that step for mChannel.

Parameters
nBarThe bar.
Ghidra address:
NTSC-U/C: 0x0019d990
Ghidra address:
PAL: 0x001a36f8

Implements PhraseMaker.

◆ GetPeriodOrigin()

virtual int AxePhraseMaker::GetPeriodOrigin ( )
virtual

Report the song position periods are counted from.

Slot 5.

Returns
6 always, after a discarded finiteness test on the same value.
Ghidra address:
NTSC-U/C: 0x0019d438
Ghidra address:
PAL: 0x001a31a0

Reimplemented from PhraseMaker.

◆ IsBarPlayable()

int AxePhraseMaker::IsBarPlayable ( int nBar)

Report whether a bar can be played.

AutoRiffer is the recovered caller.

Parameters
nBarThe bar.
Returns
Non-zero when TrackData::QueryBar() accepts the bar and Player::IsFreestyleBar() reports non-zero for it.
Ghidra address:
NTSC-U/C: 0x0019da58
Ghidra address:
PAL: 0x001a37c0

◆ Erase()

void AxePhraseMaker::Erase ( Player * pPlayer,
int nTick,
int bWholeStep )

Erase a player's phrase at a song position.

The bar of the position, or with bWholeStep set every bar of its step, is cleared through PhraseMgr::ClearPhrase() wherever pPlayer owns it. When anything was cleared, or a phrase is in progress, one of two sounds plays and a ShowEraseEffectMsg goes out. The phrase in progress is discarded either way. The sound is SND_ERASE_SECTION for a whole step and SND_ERASE otherwise, and the message names mPlayer rather than pPlayer. AutoRiffer::OnErase() is the recovered caller.

Parameters
pPlayerThe player the erase is for.
nTickThe song position, in MIDI ticks.
bWholeStepNon-zero to erase the whole step around the position.
Ghidra address:
NTSC-U/C: 0x0019bf80
Ghidra address:
PAL: 0x001a1ce8

The documentation for this class was generated from the following file: