|
resonance 1.0.1
|
Event the game passes between a MsgSource and a MsgSink. More...
#include <notemsg.h>


Public Member Functions | |
| NoteMsg () | |
| Construct a message with the position and the length at kTickInfinity. | |
| NoteMsg (int nTick, unsigned char nChannel, unsigned char nNote, unsigned char nVelocity, Sch::Tick length) | |
| Report one note. | |
| virtual Message * | Clone () |
| Produce a heap copy of this message. | |
| virtual int | Type () |
| Report this message's registered identity. | |
| virtual const char * | GetName () const |
| Report this message's class name. | |
| virtual void | PrintExtra (std::ostream &stream) const |
| Write the message to a diagnostic stream. | |
| virtual void | saveGuts (OBStream &stream) const |
| Write the three bytes and the low sixteen bits of the second position to a stream. | |
| virtual void | restoreGuts (IBStream &stream) |
| Read the three bytes and the second position back from a stream. | |
| Public Member Functions inherited from MuseMsg | |
| MuseMsg () | |
| Start the song position at kTickInfinity. | |
| MuseMsg (int nTick) | |
| Start the song position at a tick. | |
| MuseMsg * | CloneAndShift (int nTick) |
| Copy this message and move the copy to a song position. | |
| Public Member Functions inherited from Message | |
| void * | operator new (size_t nSize) |
| Allocate a message from the tagged heap under the tag MSG. | |
| void | operator delete (void *pBlock) |
| Release a message to the tagged heap under the tag MSG. | |
| virtual | ~Message () |
| Vtable slot 1. | |
| std::ostream & | Print (std::ostream &stream) const |
| Write this message to a diagnostic stream as {GetName() PrintExtra()}. | |
Static Public Member Functions | |
| static Message * | New () |
| Produce a default-constructed message on the heap. | |
| Static Public Member Functions inherited from Message | |
| static Message * | NewMessage (int nType) |
| Produce a message of the identified class through the factory list. | |
Public Attributes | |
| unsigned char | mChannel |
| The MIDI channel. | |
| unsigned char | mNote |
| The note number. | |
| unsigned char | mVelocity |
| The note-on velocity. | |
| Sch::Tick | mLength |
| The length of the note, in MIDI ticks. | |
| Public Attributes inherited from MuseMsg | |
| int | mTick |
| The song position, in MIDI ticks. | |
Static Public Attributes | |
| static unsigned int | sID |
| Identity that Type() reports. | |
Event the game passes between a MsgSource and a MsgSink.
Its RTTI descriptor is at 0x008f0000. It has MuseMsg as its one base. The object is 0x10 bytes and its vtable is at 0x00812e90. The members below are the whole of the class. No other routine in the image refers to this type by anything but its vtable. The fields through +0x07 belong to MuseMsg and are declared there.
The payload layout comes from the run of field copies in Clone(). AxePhraseMaker::OnStdMidi() builds one on its stack at 0x0019bad4 from its channel, a held note's number and velocity, and the note's clamped length, which identifies the fields. PrintExtra() writes mChannel after the label n, the label StdMidiMsg::PrintExtra() places ahead of its channel. mLength at +0x0c is a tick count, handed to Sch::Tick::Print() in place and initialised to kTickInfinity by New(). saveGuts() and restoreGuts() move only its low sixteen bits.
The destructor at 0x003dc0e8 is compiler-generated and has no declaration here.
|
inline |
Construct a message with the position and the length at kTickInfinity.
Inline. New() expands it. A declaration is required because the class declares a second constructor.
|
inline |
Report one note.
Inline, with no address of its own. AxePhraseMaker::OnStdMidi() expands it on its stack at 0x0019bad4, and AxePhraseMaker::FinishPhrase() at 0x0019c270.
| nTick | The song position of the note-on, in MIDI ticks. |
| nChannel | The MIDI channel. |
| nNote | The note number. |
| nVelocity | The note-on velocity. |
| length | The length of the note. |
|
static |
Produce a default-constructed message on the heap.
The translation unit at 0x003d9818 registers this factory.
|
virtual |
Produce a heap copy of this message.
Implements Message.
|
virtual |
Report this message's registered identity.
Implements Message.
|
virtual |
|
virtual |
Write the message to a diagnostic stream.
Writes the song position, both data bytes as numbers, the second position, and the byte at +0x08 after n.
| stream | The stream to write to. |
Reimplemented from Message.
|
virtual |
Write the three bytes and the low sixteen bits of the second position to a stream.
The bytes go one at a time through OBStream::Write() and the position through OBStream::WriteLE(). The song position MuseMsg provides is not written.
| stream | The stream to write to. |
Reimplemented from Message.
|
virtual |
Read the three bytes and the second position back from a stream.
The position arrives as an unsigned sixteen-bit value and is widened into the member.
| stream | The stream to read from. |
Reimplemented from Message.
|
static |
| unsigned char NoteMsg::mChannel |
The MIDI channel.
+0x08
Public because MuseSynth::StartNotePlayer() at 0x001aa6bc reads it directly.
| unsigned char NoteMsg::mNote |
The note number.
+0x09
Public because RiffRangeFinder::DispatchPriv() at 0x001c4574 reads it directly with lbu, with no accessor in the image, widening its range of notes to include it.
| unsigned char NoteMsg::mVelocity |
The note-on velocity.
+0x0a
Public because MuseSynth::StartNotePlayer() at 0x001aa6c8 reads it directly.
| Sch::Tick NoteMsg::mLength |
The length of the note, in MIDI ticks.
+0x0c
Public because NoteFinder::DispatchPriv() at 0x001023b0 reads it directly with no accessor in the image, adding it to the inherited mTick to find where the note ends.