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

Repeating post that re-queues itself one period ahead each time it runs. More...

#include <gsperiodical.h>

Public Member Functions

 GsPeriodical (Sch::TickClock *pClock, PhraseMaker *pPhraseMaker, int nPeriod)
void Post ()
 Queue the first run, one period after the origin.
void Withdraw ()
 Withdraw the queued run.
void Run (int nTick)
 Report the period that has elapsed at a song position and queue the next run.

Detailed Description

Repeating post that re-queues itself one period ahead each time it runs.

The class emits no RTTI, because it is not polymorphic. Its title comes from the anonymous-namespace marker Q235_GLOBAL_$N$GsPeriodical.cppdKuhgb13PeriodicalCmd, which records the translation unit as GsPeriodical.cpp and a file-local command class as PeriodicalCmd. The class title is therefore inferred from the file name rather than attested by a descriptor.

The object is 0x14 bytes and AxingSTG builds one with the global operator new(0x14). The constructor writes kTickInfinity to mOrigin, then overwrites it with the origin PhraseMaker::GetPeriodOrigin() reports. AxePhraseMaker reports the constant 6.

Every song position the class computes is clamped to the finite range and passed through the discarded finiteness test, which is the expansion of an inline position type rather than arithmetic the class performs itself.

Every member is private. Only this class and its file-local command address them.

Constructor & Destructor Documentation

◆ GsPeriodical()

GsPeriodical::GsPeriodical ( Sch::TickClock * pClock,
PhraseMaker * pPhraseMaker,
int nPeriod )
Parameters
pClockThe clock the post runs on.
pPhraseMakerThe phrase maker the post drives.
nPeriodThe period in MIDI ticks. AxingSTG passes 0x780, one bar at 480 per quarter note.
Ghidra address:
NTSC-U/C: 0x001b4738
Ghidra address:
PAL: 0x001ba510

Member Function Documentation

◆ Post()

void GsPeriodical::Post ( )

Queue the first run, one period after the origin.

Ghidra address:
NTSC-U/C: 0x001b4870
Ghidra address:
PAL: 0x001ba648

◆ Withdraw()

void GsPeriodical::Withdraw ( )

Withdraw the queued run.

Ghidra address:
NTSC-U/C: 0x001b48f8
Ghidra address:
PAL: 0x001ba6d0

◆ Run()

void GsPeriodical::Run ( int nTick)

Report the period that has elapsed at a song position and queue the next run.

PhraseMaker::OnPeriod() receives the distance from the origin divided by the period. PeriodicalCmd::Execute() is the one caller.

Parameters
nTickThe song position the run was queued for, in MIDI ticks.
Ghidra address:
NTSC-U/C: 0x001b45d0
Ghidra address:
PAL: 0x001ba3a8

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