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

Task that sends one track's MIDI a bar at a time. More...

#include <barsequencer.h>

Inheritance diagram for BarSequencer:
Collaboration diagram for BarSequencer:

Public Member Functions

 BarSequencer (Sch::TickClock *pClock, TrackData *pTrack, MsgSink *pSink, int nUnmapped)
 Prepare the task with no sequencer.
virtual ~BarSequencer ()
 Delete the sequencer and release the task.
virtual void Print (std::ostream &stream)
 Write {BarSequencer}.
virtual int Tick (int nTick)
 Start sending the MIDI of the bar a position falls in.
Public Member Functions inherited from TickTask
 TickTask (Sch::TickClock *pClock, int nPeriod, int bAligned)
virtual ~TickTask ()
 Withdraw the queued command.
void Start (int nEpochOffset)
 Post the task on its clock.
void Run ()
 Run Tick() for the run now due and post the next one.
void Stop ()
 Withdraw the queued command and forget its handle.
Public Member Functions inherited from Attachment
 Attachment ()
virtual ~Attachment ()
int Release ()
 Give back one reference and destroy the object once the last one is gone.
virtual void Destroy ()
 Destroy the object.

Static Public Member Functions

static void * operator new (size_t nSize)
 Allocate a task under the tag BarSequencer.
static void operator delete (void *pBlock)
 Release a task under the tag BarSequencer.
Static Public Member Functions inherited from Attachment
static void ReleaseIfSet (Attachment *pAttachment)
 Give back one reference to an object that may be null.

Additional Inherited Members

Public Attributes inherited from Attachment
int mRefs

Detailed Description

Task that sends one track's MIDI a bar at a time.

Its RTTI descriptor is at 0x008ef5f0. It derives publicly from TickTask at offset 0. Its type function is at 0x00100bb8 and its table at 0x007cc808 retains Attachment::Destroy(). The task runs once a bar, and each run replaces its Sequencer with one over the bar's MIDI and posts the new one against the clock.

ScoreTrackGraph and the routine at 0x0013fc48 construct it.

Constructor & Destructor Documentation

◆ BarSequencer()

BarSequencer::BarSequencer ( Sch::TickClock * pClock,
TrackData * pTrack,
MsgSink * pSink,
int nUnmapped )

Prepare the task with no sequencer.

Parameters
pClockThe clock the task and its sequencers run against.
pTrackThe track whose MIDI is sent.
pSinkThe sink every message goes to.
nUnmappedNon-zero to index the track's bars directly rather than through the play map.
Ghidra address:
NTSC-U/C: 0x00100c70
Ghidra address:
PAL: 0x00100c70

◆ ~BarSequencer()

virtual BarSequencer::~BarSequencer ( )
virtual

Delete the sequencer and release the task.

Ghidra address:
NTSC-U/C: 0x00100d78
Ghidra address:
PAL: 0x00100d78

Member Function Documentation

◆ operator new()

void * BarSequencer::operator new ( size_t nSize)
static

Allocate a task under the tag BarSequencer.

Parameters
nSizeThe object size the compiler supplies.
Returns
The block.
Ghidra address:
NTSC-U/C: 0x00100c08
Ghidra address:
PAL: 0x00100c08

◆ operator delete()

void BarSequencer::operator delete ( void * pBlock)
static

Release a task under the tag BarSequencer.

Parameters
pBlockThe block.
Ghidra address:
NTSC-U/C: 0x00100c28
Ghidra address:
PAL: 0x00100c28

◆ Print()

virtual void BarSequencer::Print ( std::ostream & stream)
virtual

Write {BarSequencer}.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x00100c48
Ghidra address:
PAL: 0x00100c48

Reimplemented from TickTask.

◆ Tick()

virtual int BarSequencer::Tick ( int nTick)
virtual

Start sending the MIDI of the bar a position falls in.

Deletes the previous sequencer, builds one over the bar's MIDI, and posts it.

Parameters
nTickThe song position of the run, in MIDI ticks.
Returns
1, which keeps the task running.
Ghidra address:
NTSC-U/C: 0x00100370
Ghidra address:
PAL: 0x00100370

Implements TickTask.


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