wavelength 1.0.0
Loading...
Searching...
No Matches
ScriptTrackBuilder Class Reference

TrackBuilder that parses the text events of a song's SCRIPT track into script commands. More...

#include <scripttrackbuilder.h>

Inheritance diagram for ScriptTrackBuilder:
Collaboration diagram for ScriptTrackBuilder:

Public Member Functions

 ScriptTrackBuilder (int nTrack, bool bValidate, ErrorHandler pfnError, int nReserved, ScriptTrackData *pData)
 Construct a builder.
 ~ScriptTrackBuilder () override
 Release the builder.
void OnNewTrack (unsigned char nTrack) override
 Ignore the start of the track.
void OnEndTrack () override
 Ignore the end of the track.
void OnAllDone () override
 Ignore the end of the file.
void OnMidi (int nTick, unsigned char nStatus, unsigned char nData1, unsigned char nData2) override
 Ignore a channel message.
void OnTempo (int nTick, int nMicrosecondsPerBeat) override
 Ignore a tempo change.
void OnText (int nTick, const char *pszText, unsigned char nType) override
 Parse a text event into a command at its tick.
void OnTimeSignature (int nTick, int nNumerator, int nDenominator) override
 Ignore a time signature.
Public Member Functions inherited from TrackBuilder
 TrackBuilder (int nTrack, bool bValidate, ErrorHandler pfnError)
 Construct a builder.
 ~TrackBuilder () override
 Release the builder.
void Error (int nTick, const char *pszMessage)
 Report a build error at a tick.
Public Member Functions inherited from MidiReceiver
virtual ~MidiReceiver ()
 Release the receiver.

Additional Inherited Members

Public Types inherited from TrackBuilder
typedef void(* ErrorHandler) (String &message)
 Routine that reports a build error.
Protected Attributes inherited from TrackBuilder
int mTrack
int mValidate
ErrorHandler mErrorHandler

Detailed Description

TrackBuilder that parses the text events of a song's SCRIPT track into script commands.

The RTTI includes the class name and records TrackBuilder as the base.

Constructor & Destructor Documentation

◆ ScriptTrackBuilder()

ScriptTrackBuilder::ScriptTrackBuilder ( int nTrack,
bool bValidate,
ErrorHandler pfnError,
int nReserved,
ScriptTrackData * pData )

Construct a builder.

Parameters
nTrackThe number of the MIDI track the error messages give.
bValidateCheck the events for authoring errors.
pfnErrorThe routine that reports an error, or null to print it.
nReservedThe value the constructor records at +0x10.
pDataThe data to fill.
Ghidra address:
NTSC-U/C: 0x00138b70
Ghidra address:
PAL: 0x0013a3d0

◆ ~ScriptTrackBuilder()

ScriptTrackBuilder::~ScriptTrackBuilder ( )
inlineoverride

Release the builder.

Ghidra address:
NTSC-U/C: 0x003407d0
Ghidra address:
PAL: 0x003add08

Member Function Documentation

◆ OnNewTrack()

void ScriptTrackBuilder::OnNewTrack ( unsigned char nTrack)
inlineoverridevirtual

Ignore the start of the track.

Parameters
nTrackThe track index.
Ghidra address:
NTSC-U/C: 0x003407f8
Ghidra address:
PAL: 0x003add30

Implements MidiReceiver.

◆ OnEndTrack()

void ScriptTrackBuilder::OnEndTrack ( )
inlineoverridevirtual

Ignore the end of the track.

Ghidra address:
NTSC-U/C: 0x00340818
Ghidra address:
PAL: 0x003add50

Implements MidiReceiver.

◆ OnAllDone()

void ScriptTrackBuilder::OnAllDone ( )
inlineoverridevirtual

Ignore the end of the file.

Ghidra address:
NTSC-U/C: 0x00340800
Ghidra address:
PAL: 0x003add38

Implements MidiReceiver.

◆ OnMidi()

void ScriptTrackBuilder::OnMidi ( int nTick,
unsigned char nStatus,
unsigned char nData1,
unsigned char nData2 )
inlineoverridevirtual

Ignore a channel message.

Parameters
nTickThe tick.
nStatusThe status byte.
nData1The first data byte.
nData2The second data byte.
Ghidra address:
NTSC-U/C: 0x00340820
Ghidra address:
PAL: 0x003add58

Implements MidiReceiver.

◆ OnTempo()

void ScriptTrackBuilder::OnTempo ( int nTick,
int nMicrosecondsPerBeat )
inlineoverridevirtual

Ignore a tempo change.

Parameters
nTickThe tick.
nMicrosecondsPerBeatThe new tempo.
Ghidra address:
NTSC-U/C: 0x00340808
Ghidra address:
PAL: 0x003add40

Implements MidiReceiver.

◆ OnText()

void ScriptTrackBuilder::OnText ( int nTick,
const char * pszText,
unsigned char nType )
overridevirtual

Parse a text event into a command at its tick.

Parameters
nTickThe tick.
pszTextThe command text.
nTypeThe meta event type, which the builder ignores.
Ghidra address:
NTSC-U/C: 0x00138bc8
Ghidra address:
PAL: 0x0013a428

Implements MidiReceiver.

◆ OnTimeSignature()

void ScriptTrackBuilder::OnTimeSignature ( int nTick,
int nNumerator,
int nDenominator )
inlineoverridevirtual

Ignore a time signature.

Parameters
nTickThe tick.
nNumeratorThe beats per bar.
nDenominatorThe beat unit.
Ghidra address:
NTSC-U/C: 0x00340810
Ghidra address:
PAL: 0x003add48

Implements MidiReceiver.


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