TrackBuilder that reads one SCRATCH track of a song into the shared ScratchTrackData.
More...
#include <scratchtrackbuilder.h>
|
| | ScratchTrackBuilder (int nTrack, bool bValidate, ErrorHandler pfnError, int nChannel, int nIndex, int nTicksPerBar, int nIntroTicks, int nReserved, ScratchTrackData *pData) |
| | Construct a builder.
|
| | ~ScratchTrackBuilder () override |
| | Release the builder.
|
| void | OnNewTrack (unsigned char nTrack) override |
| | Ignore the start of the track.
|
| void | OnEndTrack () override |
| | Build a scratcher from each set of three notes, and check that every set is complete once the last SCRATCH track ends.
|
| void | OnAllDone () override |
| | Ignore the end of the file.
|
| void | OnMidi (int nTick, unsigned char nStatus, unsigned char nData1, unsigned char nData2) override |
| | Record a scratch button note, or collect any other channel message for the pieces.
|
| 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.
|
| | 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.
|
|
| static int | ButtonForNote (unsigned char nNote) |
| | Report the scratch button a note plays.
|
TrackBuilder that reads one SCRATCH track of a song into the shared ScratchTrackData.
The RTTI includes the class name and records TrackBuilder as the base. Each of the three SCRATCH tracks fills one position of every scratcher set. A track holds its scratchers as consecutive notes, three to a scratcher, one note on each of the three scratch buttons. The other channel messages are the sound the scratchers cut their pieces from.
◆ ScratchTrackBuilder()
| ScratchTrackBuilder::ScratchTrackBuilder |
( |
int | nTrack, |
|
|
bool | bValidate, |
|
|
ErrorHandler | pfnError, |
|
|
int | nChannel, |
|
|
int | nIndex, |
|
|
int | nTicksPerBar, |
|
|
int | nIntroTicks, |
|
|
int | nReserved, |
|
|
ScratchTrackData * | pData ) |
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. |
| nChannel | The MIDI channel of the track. |
| nIndex | The position the track fills in each scratcher set. |
| nTicksPerBar | The length of a bar. |
| nIntroTicks | The length of the song intro, which must not have notes. |
| nReserved | The value the constructor records at +0x14. |
| pData | The data to fill. |
- Ghidra address:
- NTSC-U/C: 0x001380d8
- Ghidra address:
- PAL: 0x00139938
◆ ~ScratchTrackBuilder()
| ScratchTrackBuilder::~ScratchTrackBuilder |
( |
| ) |
|
|
override |
Release the builder.
- Ghidra address:
- NTSC-U/C: 0x001381b0
- Ghidra address:
- PAL: 0x00139a10
◆ OnNewTrack()
| void ScratchTrackBuilder::OnNewTrack |
( |
unsigned char | nTrack | ) |
|
|
inlineoverridevirtual |
Ignore the start of the track.
- Parameters
-
- Ghidra address:
- NTSC-U/C: 0x00340010
- Ghidra address:
- PAL: 0x003ad548
Implements MidiReceiver.
◆ OnEndTrack()
| void ScratchTrackBuilder::OnEndTrack |
( |
| ) |
|
|
overridevirtual |
Build a scratcher from each set of three notes, and check that every set is complete once the last SCRATCH track ends.
- Ghidra address:
- NTSC-U/C: 0x00138268
- Ghidra address:
- PAL: 0x00139ac8
Implements MidiReceiver.
◆ OnAllDone()
| void ScratchTrackBuilder::OnAllDone |
( |
| ) |
|
|
inlineoverridevirtual |
Ignore the end of the file.
- Ghidra address:
- NTSC-U/C: 0x00340018
- Ghidra address:
- PAL: 0x003ad550
Implements MidiReceiver.
◆ OnMidi()
| void ScratchTrackBuilder::OnMidi |
( |
int | nTick, |
|
|
unsigned char | nStatus, |
|
|
unsigned char | nData1, |
|
|
unsigned char | nData2 ) |
|
overridevirtual |
Record a scratch button note, or collect any other channel message for the pieces.
- Parameters
-
| nTick | The tick. |
| nStatus | The status byte. |
| nData1 | The first data byte. |
| nData2 | The second data byte. |
- Ghidra address:
- NTSC-U/C: 0x00138570
- Ghidra address:
- PAL: 0x00139dd0
Implements MidiReceiver.
◆ OnTempo()
| void ScratchTrackBuilder::OnTempo |
( |
int | nTick, |
|
|
int | nMicrosecondsPerBeat ) |
|
inlineoverridevirtual |
Ignore a tempo change.
- Parameters
-
| nTick | The tick. |
| nMicrosecondsPerBeat | The new tempo. |
- Ghidra address:
- NTSC-U/C: 0x00340020
- Ghidra address:
- PAL: 0x003ad558
Implements MidiReceiver.
◆ OnText()
| void ScratchTrackBuilder::OnText |
( |
int | nTick, |
|
|
const char * | pszText, |
|
|
unsigned char | nType ) |
|
inlineoverridevirtual |
Ignore a text meta event.
- Parameters
-
| nTick | The tick. |
| pszText | The text. |
| nType | The meta event type. |
- Ghidra address:
- NTSC-U/C: 0x00340028
- Ghidra address:
- PAL: 0x003ad560
Implements MidiReceiver.
◆ OnTimeSignature()
| void ScratchTrackBuilder::OnTimeSignature |
( |
int | nTick, |
|
|
int | nNumerator, |
|
|
int | nDenominator ) |
|
inlineoverridevirtual |
Ignore a time signature.
- Parameters
-
| nTick | The tick. |
| nNumerator | The beats per bar. |
| nDenominator | The beat unit. |
- Ghidra address:
- NTSC-U/C: 0x00340030
- Ghidra address:
- PAL: 0x003ad568
Implements MidiReceiver.
◆ ButtonForNote()
| int ScratchTrackBuilder::ButtonForNote |
( |
unsigned char | nNote | ) |
|
|
static |
Report the scratch button a note plays.
- Parameters
-
- Returns
- The button, 0 to 2, or -1 for a note that is not a scratch button.
- Ghidra address:
- NTSC-U/C: 0x00138078
- Ghidra address:
- PAL: 0x001398d8
The documentation for this class was generated from the following file: