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

TrackBuilder that collects the channel messages of a track into a piece of music. More...

#include <musebuilder.h>

Inheritance diagram for MuseBuilder:
Collaboration diagram for MuseBuilder:

Public Member Functions

 MuseBuilder (int nTrack, bool bValidate, ErrorHandler pfnError, Ptr< Muse > *pMuse)
 Construct a builder.
 ~MuseBuilder () override
 Release the builder.
void OnNewTrack (unsigned char nTrack) override
 Ignore the start of the track.
void OnEndTrack () override
 Build the piece from the collected messages and store it through the owner.
void OnAllDone () override
 Ignore the end of the file.
void OnMidi (int nTick, unsigned char nStatus, unsigned char nData1, unsigned char nData2) override
 Check and collect 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
 Ignore a text meta event.
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 collects the channel messages of a track into a piece of music.

The RTTI includes the class name and records TrackBuilder as the base. The object is 0x8c bytes. At the end of the track the builder stores the piece through the owner it was given.

Constructor & Destructor Documentation

◆ MuseBuilder()

MuseBuilder::MuseBuilder ( int nTrack,
bool bValidate,
ErrorHandler pfnError,
Ptr< Muse > * pMuse )

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.
pMuseThe owner the finished piece is stored through.
Ghidra address:
NTSC-U/C: 0x0027e6f8
Ghidra address:
PAL: 0x00288010

◆ ~MuseBuilder()

MuseBuilder::~MuseBuilder ( )
override

Release the builder.

Ghidra address:
NTSC-U/C: 0x0027e778
Ghidra address:
PAL: 0x00288090

Member Function Documentation

◆ OnNewTrack()

void MuseBuilder::OnNewTrack ( unsigned char nTrack)
inlineoverridevirtual

Ignore the start of the track.

Parameters
nTrackThe track index.
Ghidra address:
NTSC-U/C: 0x003a5a58
Ghidra address:
PAL: 0x00414738

Implements MidiReceiver.

◆ OnEndTrack()

void MuseBuilder::OnEndTrack ( )
overridevirtual

Build the piece from the collected messages and store it through the owner.

Ghidra address:
NTSC-U/C: 0x0027e7d8
Ghidra address:
PAL: 0x002880f0

Implements MidiReceiver.

◆ OnAllDone()

void MuseBuilder::OnAllDone ( )
inlineoverridevirtual

Ignore the end of the file.

Ghidra address:
NTSC-U/C: 0x003a5a60
Ghidra address:
PAL: 0x00414740

Implements MidiReceiver.

◆ OnMidi()

void MuseBuilder::OnMidi ( int nTick,
unsigned char nStatus,
unsigned char nData1,
unsigned char nData2 )
overridevirtual

Check and collect a channel message.

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

Implements MidiReceiver.

◆ OnTempo()

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

Ignore a tempo change.

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

Implements MidiReceiver.

◆ OnText()

void MuseBuilder::OnText ( int nTick,
const char * pszText,
unsigned char nType )
inlineoverridevirtual

Ignore a text meta event.

Parameters
nTickThe tick.
pszTextThe text.
nTypeThe meta event type.
Ghidra address:
NTSC-U/C: 0x003a5a70
Ghidra address:
PAL: 0x00414750

Implements MidiReceiver.

◆ OnTimeSignature()

void MuseBuilder::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: 0x003a5a78
Ghidra address:
PAL: 0x00414758

Implements MidiReceiver.


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