resonance 1.0.1
Loading...
Searching...
No Matches
SynthSustainer Class Reference

Message filter that suppresses note-offs for the notes a sustain request covers. More...

#include <synthsustainer.h>

Inheritance diagram for SynthSustainer:
Collaboration diagram for SynthSustainer:

Public Member Functions

 SynthSustainer ()
 Construct a filter with both sets empty and no downstream sink.
virtual ~SynthSustainer ()
Public Member Functions inherited from MsgSink
void * operator new (size_t nSize)
 Allocate a sink from the tagged heap under the tag "MsgSink".
void operator delete (void *pBlock)
 Release a sink to the tagged heap.
virtual ~MsgSink ()
virtual void Dispatch (Message *pMsg)
 Accept a message.

Public Attributes

MsgSink * mSink
 Sink that receives every message the filter passes on.

Protected Member Functions

virtual void DispatchPriv (Message *pMsg)
 Dispatch on the message's registered identity.

Detailed Description

Message filter that suppresses note-offs for the notes a sustain request covers.

Its RTTI descriptor is at 0x008f2a70. It derives from MsgSink at offset 0. The base vptr lands at +0x00 and the class is 0x20 bytes. Its vtable is at 0x007e5b00 and runs the type function, the destructor, the inherited MsgSink::Dispatch(), and DispatchPriv().

Two sets of note numbers drive the filter. The sounding set records every note a note-on has let through, and the sustained set records every note a SustainNoteMsg has requested the filter sustain. A note-off for a sustained note is discarded, a note-on for a sustained note drops it from the sustained set instead of going downstream, and every other MIDI message goes downstream unchanged.

The descriptor at 0x008f2a70 is what settles the name.

Constructor & Destructor Documentation

◆ SynthSustainer()

SynthSustainer::SynthSustainer ( )

Construct a filter with both sets empty and no downstream sink.

Ghidra address:
NTSC-U/C: 0x001d2060
Ghidra address:
PAL: 0x001d7f18

◆ ~SynthSustainer()

virtual SynthSustainer::~SynthSustainer ( )
virtual
Ghidra address:
NTSC-U/C: 0x001d2860
Ghidra address:
PAL: 0x001d8718

Member Function Documentation

◆ DispatchPriv()

virtual void SynthSustainer::DispatchPriv ( Message * pMsg)
protectedvirtual

Dispatch on the message's registered identity.

Vtable slot 3. A SustainNoteMsg and a StdMidiMsg arrive at their handlers and every other message is discarded.

Parameters
pMsgThe message.
Ghidra address:
NTSC-U/C: 0x001d2a10
Ghidra address:
PAL: 0x001d88c8

Implements MsgSink.

Member Data Documentation

◆ mSink

MsgSink* SynthSustainer::mSink

Sink that receives every message the filter passes on.

The constructor zeroes it and nothing in this translation unit assigns it, so the writer is outside the class and the member is recorded public. A friend declaration on whichever class builds the filter fits the image equally well. The declaration sits after the two vectors because the member sits after them in the object. The downstream sink. +0x1c


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