resonance 1.0.1
Loading...
Searching...
No Matches
Mid::Receiver Class Reference

Sink a Standard MIDI File reader delivers one event at a time to. More...

#include <receiver.h>

Inheritance diagram for Mid::Receiver:

Public Member Functions

virtual ~Receiver ()
virtual void NewTrack (unsigned char nTrack)
 Begin one track of the file.
virtual void NoteOn (int nTick, unsigned char nNote, unsigned char nVelocity, unsigned char nChannel)
 Receive a note on.
virtual void NoteOff (int nTick, unsigned char nNote, unsigned char nChannel)
 Receive a note off.
virtual void Controller (int nTick, unsigned char nController, unsigned char nValue, unsigned char nChannel)
 Receive a controller change.
virtual void ProgramChange (int nTick, unsigned char nProgram, unsigned char nChannel)
 Receive a program change.
virtual void PitchBend (int nTick, unsigned char nLow, unsigned char nHigh, unsigned char nChannel)
 Receive a pitch bend.
virtual void Tempo (int nTick, int nMicrosecondsPerQuarter)
 Receive a tempo meta event.
virtual void TextEvent (int nTick, const char *pText, unsigned char nType)
 Receive one text meta event.
virtual void EndTrack ()
 End the track NewTrack() began.
virtual void AllDone ()
 Report that the whole file has been delivered.
virtual void UnusedFirstHook ()
 Do nothing.
virtual void UnusedSecondHook ()
 Do nothing.
virtual void UnusedThirdHook ()
 Do nothing.
virtual void UnusedFourthHook ()
 Do nothing.

Detailed Description

Sink a Standard MIDI File reader delivers one event at a time to.

Its RTTI descriptor is at 0x0086f5f0. It is a leaf with no base list. The class has no data member. The vptr sits at +0x00, and the object is four bytes. Its table is at 0x007e7740 and has sixteen entries with a zero terminator at index 16. Every one of the fourteen virtuals below is a two-instruction jr ra default. An unoverridden slot does nothing.

LevelConverter is the one subclass in the image, and it overrides slots 2 through 10. Mid::Reader is the one caller, and its call sites fix slots 2 through 11. Slots 3 through 7 each receive one channel event, and LevelConverter forwards each to LevelBuilder with a MIDI status byte (0x90 note on, 0x80 note off, 0xb0 controller, 0xc0 program change, and 0xe0 pitch bend, in slot order). The reader calls slot 8 for a tempo meta event, slot 9 for a text meta event, slot 10 at the end of each track, and slot 11 at the end of the file.

Slots 12 through 15 have no override and no caller anywhere. An empty body is the whole of what the image records for each. Their names, parameter lists, and return types are all unrecovered, and each is declared below with its index because a gap in the sequence would describe a different class.

Every method name here is inferred. RTTI in this image yields class names only.

Constructor & Destructor Documentation

◆ ~Receiver()

virtual Mid::Receiver::~Receiver ( )
virtual
Ghidra address:
NTSC-U/C: 0x001ea248
Ghidra address:
PAL: 0x001f04b8

Member Function Documentation

◆ NewTrack()

virtual void Mid::Receiver::NewTrack ( unsigned char nTrack)
virtual

Begin one track of the file.

Slot 2.

Parameters
nTrackThe track index.
Ghidra address:
NTSC-U/C: 0x001ea278
Ghidra address:
PAL: 0x001f04e8

Reimplemented in LevelConverter.

◆ NoteOn()

virtual void Mid::Receiver::NoteOn ( int nTick,
unsigned char nNote,
unsigned char nVelocity,
unsigned char nChannel )
virtual

Receive a note on.

Slot 3. LevelConverter's override forwards these arguments under MIDI status 0x90.

Parameters
nTickThe event position, in MIDI ticks.
nNoteThe note number.
nVelocityThe velocity.
nChannelThe channel.
Ghidra address:
NTSC-U/C: 0x001ea280
Ghidra address:
PAL: 0x001f04f0

Reimplemented in LevelConverter.

◆ NoteOff()

virtual void Mid::Receiver::NoteOff ( int nTick,
unsigned char nNote,
unsigned char nChannel )
virtual

Receive a note off.

Slot 4. LevelConverter's override forwards these arguments under MIDI status 0x80. The slot takes no velocity, and the override's forwarded call passes zero in its place.

Parameters
nTickThe event position, in MIDI ticks.
nNoteThe note number.
nChannelThe channel.
Ghidra address:
NTSC-U/C: 0x001ea288
Ghidra address:
PAL: 0x001f04f8

Reimplemented in LevelConverter.

◆ Controller()

virtual void Mid::Receiver::Controller ( int nTick,
unsigned char nController,
unsigned char nValue,
unsigned char nChannel )
virtual

Receive a controller change.

Slot 5. LevelConverter's override forwards these arguments under MIDI status 0xb0.

Parameters
nTickThe event position, in MIDI ticks.
nControllerThe controller number.
nValueThe value.
nChannelThe channel.
Ghidra address:
NTSC-U/C: 0x001ea290
Ghidra address:
PAL: 0x001f0500

Reimplemented in LevelConverter.

◆ ProgramChange()

virtual void Mid::Receiver::ProgramChange ( int nTick,
unsigned char nProgram,
unsigned char nChannel )
virtual

Receive a program change.

Slot 6. LevelConverter's override forwards these arguments under MIDI status 0xc0.

Parameters
nTickThe event position, in MIDI ticks.
nProgramThe program number.
nChannelThe channel.
Ghidra address:
NTSC-U/C: 0x001ea298
Ghidra address:
PAL: 0x001f0508

Reimplemented in LevelConverter.

◆ PitchBend()

virtual void Mid::Receiver::PitchBend ( int nTick,
unsigned char nLow,
unsigned char nHigh,
unsigned char nChannel )
virtual

Receive a pitch bend.

Slot 7. LevelConverter's override forwards these arguments under MIDI status 0xe0.

Parameters
nTickThe event position, in MIDI ticks.
nLowThe low seven bits of the bend.
nHighThe high seven bits of the bend.
nChannelThe channel.
Ghidra address:
NTSC-U/C: 0x001ea2a0
Ghidra address:
PAL: 0x001f0510

Reimplemented in LevelConverter.

◆ Tempo()

virtual void Mid::Receiver::Tempo ( int nTick,
int nMicrosecondsPerQuarter )
virtual

Receive a tempo meta event.

Slot 8. Mid::Reader::ReadMeta() calls it only for meta type 0x51, with the event position and the event's 24-bit value. That value is the MIDI tempo in microseconds per quarter note. LevelConverter's override passes both to LevelBuilder::SetTempo(). SetTempo() builds its tempo map from the second.

Parameters
nTickThe event position, in MIDI ticks.
nMicrosecondsPerQuarterThe tempo.
Ghidra address:
NTSC-U/C: 0x001ea2a8
Ghidra address:
PAL: 0x001f0518

Reimplemented in LevelConverter.

◆ TextEvent()

virtual void Mid::Receiver::TextEvent ( int nTick,
const char * pText,
unsigned char nType )
virtual

Receive one text meta event.

Slot 9. LevelConverter's override acts only on a type of 3 at tick 0, and 3 is the MIDI track-name meta type, which is what fixes the third argument as the meta type.

Parameters
nTickThe event position, in MIDI ticks.
pTextThe text, which is NUL-terminated by the reader.
nTypeThe meta type.
Ghidra address:
NTSC-U/C: 0x001ea2b0
Ghidra address:
PAL: 0x001f0520

Reimplemented in LevelConverter.

◆ EndTrack()

virtual void Mid::Receiver::EndTrack ( )
virtual

End the track NewTrack() began.

Slot 10.

Ghidra address:
NTSC-U/C: 0x001ea2b8
Ghidra address:
PAL: 0x001f0528

Reimplemented in LevelConverter.

◆ AllDone()

virtual void Mid::Receiver::AllDone ( )
virtual

Report that the whole file has been delivered.

Slot 11. Mid::Reader::AllTracksRead() calls it with no argument once the chunk reader has no chunk left. LevelConverter's table points at a two-instruction body of its own at 0x001ea360. That body is this default re-emitted rather than an override.

Ghidra address:
NTSC-U/C: 0x001ea2c0
Ghidra address:
PAL: 0x001f0530

◆ UnusedFirstHook()

virtual void Mid::Receiver::UnusedFirstHook ( )
virtual

Do nothing.

Slot 12, an empty default with no override anywhere. Mid::Reader never calls it.

Ghidra address:
NTSC-U/C: 0x001ea2c8
Ghidra address:
PAL: 0x001f0538

◆ UnusedSecondHook()

virtual void Mid::Receiver::UnusedSecondHook ( )
virtual

Do nothing.

Slot 13, an empty default with no override anywhere. Mid::Reader never calls it.

Ghidra address:
NTSC-U/C: 0x001ea2d0
Ghidra address:
PAL: 0x001f0540

◆ UnusedThirdHook()

virtual void Mid::Receiver::UnusedThirdHook ( )
virtual

Do nothing.

Slot 14, an empty default with no override anywhere. Mid::Reader never calls it.

Ghidra address:
NTSC-U/C: 0x001ea2d8
Ghidra address:
PAL: 0x001f0548

◆ UnusedFourthHook()

virtual void Mid::Receiver::UnusedFourthHook ( )
virtual

Do nothing.

Slot 15, an empty default with no override anywhere. Mid::Reader never calls it.

Ghidra address:
NTSC-U/C: 0x001ea2e0
Ghidra address:
PAL: 0x001f0550

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