TrackBuilder that reads the time signature of the song and checks its tempo.
More...
#include <conductorbuilder.h>
|
| | ConductorBuilder (int nTrack, bool bValidate, ErrorHandler pfnError, int nNumBars, int nTicksPerBeat, const float *pfMsPerTick, std::unique_ptr< PlayMap > *ppPlayMap, int *pTicksPerBar) |
| | Construct a builder.
|
| | ~ConductorBuilder () 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 |
| | Report an error when a validating builder reads a tempo that differs from the song text by more than a tenth of a millisecond a beat.
|
| void | OnText (int nTick, const char *pszText, unsigned char nType) override |
| | Ignore a text event.
|
| void | OnTimeSignature (int nTick, int nNumerator, int nDenominator) override |
| | Set the length of a bar and create the play map.
|
| | 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.
|
| virtual | ~MidiReceiver () |
| | Release the receiver.
|
TrackBuilder that reads the time signature of the song and checks its tempo.
The RTTI includes the class name and records TrackBuilder as the base. The time signature sets the length of a bar and creates the play map of the song.
◆ ConductorBuilder()
| ConductorBuilder::ConductorBuilder |
( |
int | nTrack, |
|
|
bool | bValidate, |
|
|
ErrorHandler | pfnError, |
|
|
int | nNumBars, |
|
|
int | nTicksPerBeat, |
|
|
const float * | pfMsPerTick, |
|
|
std::unique_ptr< PlayMap > * | ppPlayMap, |
|
|
int * | pTicksPerBar ) |
Construct a builder.
- Parameters
-
| nTrack | The number of the MIDI track the error messages give. |
| bValidate | Check the events for authoring errors. |
| pfnError | The routine that reports an error, or null to print it. |
| nNumBars | The length of the song in bars, which the play map ends at. |
| nTicksPerBeat | The song ticks in one beat. |
| pfMsPerTick | The length of a tick that the song text gives, in milliseconds. |
| ppPlayMap | Receives the play map the time signature creates. |
| pTicksPerBar | Receives the song ticks in one bar, and must be 0 at the start. |
- Ghidra address:
- NTSC-U/C: 0x0014e5c0
- Ghidra address:
- PAL: 0x0014ff60
◆ ~ConductorBuilder()
| ConductorBuilder::~ConductorBuilder |
( |
| ) |
|
|
override |
Release the builder.
- Ghidra address:
- NTSC-U/C: 0x0014e648
- Ghidra address:
- PAL: 0x0014ffe8
◆ OnNewTrack()
| void ConductorBuilder::OnNewTrack |
( |
unsigned char | nTrack | ) |
|
|
inlineoverridevirtual |
Ignore the start of the track.
- Parameters
-
- Ghidra address:
- NTSC-U/C: 0x0034b000
- Ghidra address:
- PAL: 0x003b8430
Implements MidiReceiver.
◆ OnEndTrack()
| void ConductorBuilder::OnEndTrack |
( |
| ) |
|
|
inlineoverridevirtual |
Ignore the end of the track.
- Ghidra address:
- NTSC-U/C: 0x0034b020
- Ghidra address:
- PAL: 0x003b8450
Implements MidiReceiver.
◆ OnAllDone()
| void ConductorBuilder::OnAllDone |
( |
| ) |
|
|
inlineoverridevirtual |
Ignore the end of the file.
- Ghidra address:
- NTSC-U/C: 0x0034b008
- Ghidra address:
- PAL: 0x003b8438
Implements MidiReceiver.
◆ OnMidi()
| void ConductorBuilder::OnMidi |
( |
int | nTick, |
|
|
unsigned char | nStatus, |
|
|
unsigned char | nData1, |
|
|
unsigned char | nData2 ) |
|
inlineoverridevirtual |
Ignore a channel message.
- Parameters
-
| nTick | The tick of the message. |
| nStatus | The status byte. |
| nData1 | The first data byte. |
| nData2 | The second data byte. |
- Ghidra address:
- NTSC-U/C: 0x0034b010
- Ghidra address:
- PAL: 0x003b8440
Implements MidiReceiver.
◆ OnTempo()
| void ConductorBuilder::OnTempo |
( |
int | nTick, |
|
|
int | nMicrosecondsPerBeat ) |
|
overridevirtual |
Report an error when a validating builder reads a tempo that differs from the song text by more than a tenth of a millisecond a beat.
- Parameters
-
| nTick | The tick of the tempo change. |
| nMicrosecondsPerBeat | The tempo. |
- Ghidra address:
- NTSC-U/C: 0x0014e670
- Ghidra address:
- PAL: 0x00150010
Implements MidiReceiver.
◆ OnText()
| void ConductorBuilder::OnText |
( |
int | nTick, |
|
|
const char * | pszText, |
|
|
unsigned char | nType ) |
|
inlineoverridevirtual |
Ignore a text event.
- Parameters
-
| nTick | The tick of the event. |
| pszText | The text. |
| nType | The type of the event. |
- Ghidra address:
- NTSC-U/C: 0x0034b018
- Ghidra address:
- PAL: 0x003b8448
Implements MidiReceiver.
◆ OnTimeSignature()
| void ConductorBuilder::OnTimeSignature |
( |
int | nTick, |
|
|
int | nNumerator, |
|
|
int | nDenominator ) |
|
overridevirtual |
Set the length of a bar and create the play map.
A second time signature is an error, and replaces the first.
- Parameters
-
| nTick | The tick of the time signature. |
| nNumerator | The beats in one bar. |
| nDenominator | The note value of a beat, which is not read. |
- Ghidra address:
- NTSC-U/C: 0x0014e718
- Ghidra address:
- PAL: 0x001500b8
Implements MidiReceiver.
The documentation for this class was generated from the following file: