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

Reader of the interface sound file that builds each named track into its cue of TheFxMidi. More...

#include <sfxbuilder.h>

Inheritance diagram for SFXBuilder:
Collaboration diagram for SFXBuilder:

Public Member Functions

 SFXBuilder (const char *pszFile)
 Construct a builder for a file.
 ~SFXBuilder () override
 Destroy the builder of the current track.
void Read ()
 Read the file.
void OnNewTrack (unsigned char nTrack) override
 Ignore the start of a track.
void OnEndTrack () override
 Finish the cue of the track and count 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
 Pass a channel message to the builder of the track, if any.
void OnTempo (int nTick, int nMicrosecondsPerBeat) override
 Set TheSfxTickDuration from the tempo, at 480 ticks a beat.
void OnText (int nTick, const char *pszText, unsigned char nType) override
 Start the builder of the cue a track name identifies, after the first track.
void OnTimeSignature (int nTick, int nNumerator, int nDenominator) override
 Ignore a time signature.
Public Member Functions inherited from MidiReceiver
virtual ~MidiReceiver ()
 Release the receiver.

Detailed Description

Reader of the interface sound file that builds each named track into its cue of TheFxMidi.

The RTTI records the class as deriving from MidiReceiver, and the vtable is at 0x003d6720. The first track only sets the tempo. Each later track names its cue in its track name meta event, and a MuseBuilder collects the track's messages into that cue.

Constructor & Destructor Documentation

◆ SFXBuilder()

SFXBuilder::SFXBuilder ( const char * pszFile)
inlineexplicit

Construct a builder for a file.

Parameters
pszFileThe MIDI file.
Ghidra address:
NTSC-U/C: 0x0027ebd0
Ghidra address:
PAL: 0x002884b8

◆ ~SFXBuilder()

SFXBuilder::~SFXBuilder ( )
override

Destroy the builder of the current track.

Ghidra address:
NTSC-U/C: 0x0027ebf0
Ghidra address:
PAL: 0x002884d8

Member Function Documentation

◆ Read()

void SFXBuilder::Read ( )

Read the file.

Ghidra address:
NTSC-U/C: 0x0027ec68
Ghidra address:
PAL: 0x00288550

◆ OnNewTrack()

void SFXBuilder::OnNewTrack ( unsigned char nTrack)
inlineoverridevirtual

Ignore the start of a track.

Parameters
nTrackThe track index.
Ghidra address:
NTSC-U/C: 0x003a63c8
Ghidra address:
PAL: 0x004150a8

Implements MidiReceiver.

◆ OnEndTrack()

void SFXBuilder::OnEndTrack ( )
overridevirtual

Finish the cue of the track and count the track.

Ghidra address:
NTSC-U/C: 0x0027eca0
Ghidra address:
PAL: 0x00288588

Implements MidiReceiver.

◆ OnAllDone()

void SFXBuilder::OnAllDone ( )
inlineoverridevirtual

Ignore the end of the file.

Ghidra address:
NTSC-U/C: 0x003a63d0
Ghidra address:
PAL: 0x004150b0

Implements MidiReceiver.

◆ OnMidi()

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

Pass a channel message to the builder of the track, if any.

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

Implements MidiReceiver.

◆ OnTempo()

void SFXBuilder::OnTempo ( int nTick,
int nMicrosecondsPerBeat )
overridevirtual

Set TheSfxTickDuration from the tempo, at 480 ticks a beat.

Parameters
nTickThe tick.
nMicrosecondsPerBeatThe tempo.
Ghidra address:
NTSC-U/C: 0x0027ed10
Ghidra address:
PAL: 0x002885f8

Implements MidiReceiver.

◆ OnText()

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

Start the builder of the cue a track name identifies, after the first track.

The name is compared in capitals. An unknown name reports an error that the shipped build discards, and the track is not built.

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

Implements MidiReceiver.

◆ OnTimeSignature()

void SFXBuilder::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: 0x003a63d8
Ghidra address:
PAL: 0x004150b8

Implements MidiReceiver.


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