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

Manager of the jam effects a track applies to its voices. More...

#include <jameffectsmgr.h>

Inheritance diagram for JamEffectsMgr:
Collaboration diagram for JamEffectsMgr:

Public Member Functions

 JamEffectsMgr (int nTrack, unsigned char nChannel, PlayMap *pPlayMap, PhraseMgr *pPhraseMgr, MsgSink *pSink)
 PitchingSTG's constructor at 0x001c46e8 supplies every argument.
virtual ~JamEffectsMgr ()
 Delete every effect.
virtual void DispatchPriv (Message *pMsg)
 Act on a message.
void Enable (long long nMask)
 Switch every effect on or off from one bit of a mask.
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

Manager of the jam effects a track applies to its voices.

Its RTTI descriptor is at 0x008f0490. It is built over MsgSink at offset 0 and MsgSource at offset 4. The primary table is at 0x007df298. The MsgSource subobject table at 0x007df270 adjusts this by -4. The tagged allocations in PitchingSTG and VoxingSTG both measure the object at 0x34 bytes. Both build one only when the game manager reports play mode 2, and both then hand it to the phrase player.

The constructor builds one Effector for every type configuration code 0x389 lists, each wired to the sink the stage supplies. A JamEffectMsg toggles one effect for one step of the phrase manager, and every bar the phrase player applies the step's mask to all of them.

Constructor & Destructor Documentation

◆ JamEffectsMgr()

JamEffectsMgr::JamEffectsMgr ( int nTrack,
unsigned char nChannel,
PlayMap * pPlayMap,
PhraseMgr * pPhraseMgr,
MsgSink * pSink )

PitchingSTG's constructor at 0x001c46e8 supplies every argument.

Parameters
nTrackThe track, the stage's first word.
nChannelThe MIDI channel of the track, from TrackData.
pPlayMapThe play map, from Globals::GetPlayMap().
pPhraseMgrThe phrase manager whose step values the effects follow.
pSinkThe sink every effect sends its MIDI to, the stage's synthesiser.
Ghidra address:
NTSC-U/C: 0x001a5020
Ghidra address:
PAL: 0x001aad88

◆ ~JamEffectsMgr()

virtual JamEffectsMgr::~JamEffectsMgr ( )
virtual

Delete every effect.

Ghidra address:
NTSC-U/C: 0x001a5378
Ghidra address:
PAL: 0x001ab0e0

Member Function Documentation

◆ DispatchPriv()

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

Act on a message.

Slot 3. A JamEffectMsg goes to PostRemixFxMsg(), and every other message is discarded.

Parameters
pMsgThe message.
Ghidra address:
NTSC-U/C: 0x001a63d0
Ghidra address:
PAL: 0x001ac138

Implements MsgSink.

◆ Enable()

void JamEffectsMgr::Enable ( long long nMask)

Switch every effect on or off from one bit of a mask.

PhrasePlayer::PlayBar() passes the step value of each bar. For each effect, the bit its Type() reports, taken modulo 64, decides the argument to its SetEnabled(). The bit test goes through a std::bitset reference built on the stack.

Parameters
nMaskThe step's mask, one bit per effect type.
Ghidra address:
NTSC-U/C: 0x001a56d8
Ghidra address:
PAL: 0x001ab440

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