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

MidiReceiver that turns one MIDI track into game data. More...

#include <trackbuilder.h>

Inheritance diagram for TrackBuilder:
Collaboration diagram for TrackBuilder:

Public Types

typedef void(* ErrorHandler) (String &message)
 Routine that reports a build error.

Public Member Functions

 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.
virtual void OnNewTrack (unsigned char nTrack)=0
 Begin a track.
virtual void OnEndTrack ()=0
 End the track.
virtual void OnAllDone ()=0
 End the file.
virtual void OnMidi (int nTick, unsigned char nStatus, unsigned char nData1, unsigned char nData2)=0
 Report a channel message.
virtual void OnTempo (int nTick, int nMicrosecondsPerBeat)=0
 Report a tempo change.
virtual void OnText (int nTick, const char *pszText, unsigned char nType)=0
 Report a text meta event.
virtual void OnTimeSignature (int nTick, int nNumerator, int nDenominator)=0
 Report a time signature.

Protected Attributes

int mTrack
int mValidate
ErrorHandler mErrorHandler

Detailed Description

MidiReceiver that turns one MIDI track into game data.

The RTTI includes the class name and records MidiReceiver as the base. This header declares only the members a ScratchTrackBuilder uses.

Member Typedef Documentation

◆ ErrorHandler

typedef void(* TrackBuilder::ErrorHandler) (String &message)

Routine that reports a build error.

Parameters
messageThe message, with the track name and the location.

Constructor & Destructor Documentation

◆ TrackBuilder()

TrackBuilder::TrackBuilder ( int nTrack,
bool bValidate,
ErrorHandler pfnError )

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.
Ghidra address:
NTSC-U/C: 0x00280af0
Ghidra address:
PAL: 0x0028a3f0

◆ ~TrackBuilder()

TrackBuilder::~TrackBuilder ( )
override

Release the builder.

Ghidra address:
NTSC-U/C: 0x00280b10
Ghidra address:
PAL: 0x0028a410

Member Function Documentation

◆ Error()

void TrackBuilder::Error ( int nTick,
const char * pszMessage )

Report a build error at a tick.

Parameters
nTickThe tick.
pszMessageThe message.
Ghidra address:
NTSC-U/C: 0x00280b40
Ghidra address:
PAL: 0x0028a440

Member Data Documentation

◆ mTrack

int TrackBuilder::mTrack
protected

The number of the MIDI track.

◆ mValidate

int TrackBuilder::mValidate
protected

Check the events for authoring errors.

◆ mErrorHandler

ErrorHandler TrackBuilder::mErrorHandler
protected

The routine that reports an error, or null.


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