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

Chooser of which pitch a guitar track's input resolves to. More...

#include <pitchpicker.h>

Inheritance diagram for PitchPicker:
Collaboration diagram for PitchPicker:

Classes

struct  NoteMapping
 A note number paired with the pitch it was played as. More...

Public Member Functions

 PitchPicker (const TrackData *pTrackData)
virtual void DispatchPriv (Message *pMsg)
 Act on a message.
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 Member Functions inherited from MsgSource
virtual ~MsgSource ()
virtual void AddSink (MsgSink *pSink)
 Register a sink, ignoring a sink that is already registered.
virtual void RemoveSink (MsgSink *pSink)
 Unregister the first occurrence of a sink.
void Send (Message *pMsg) const
 Deliver a message to every registered sink, in registration order.
void ClearSinks ()
 Unregister every sink.

Additional Inherited Members

Public Attributes inherited from MsgSource
int mGraphBuilt
 A word no member of this class reads.

Detailed Description

Chooser of which pitch a guitar track's input resolves to.

Its RTTI descriptor is at 0x008eef88. It is built over MsgSink at offset 0 and MsgSource at offset 4. Its primary table is at 0x007e3418 with four entries and its MsgSource subobject table at 0x007e33f0 with four, which adjusts this by -4. The object is 0x50 bytes, which AxingSTG's tagged allocation measures.

A note-on picks a pitch from the harmony in force, offset by the axis position across the range of the current riff, and records the pairing so the matching note-off releases the same pitch. Notes at the tick of the last SustainNoteMsg reuse the pitch a sustained note already received.

The destructor at 0x001c3e10 is implicitly declared. It restores the base tables, destroys the two note vectors and MsgSource's vector, and releases the object under MsgSink's tag.

Constructor & Destructor Documentation

◆ PitchPicker()

PitchPicker::PitchPicker ( const TrackData * pTrackData)
Parameters
pTrackDataThe track description. The constructor copies its track number.
Ghidra address:
NTSC-U/C: 0x001c29c8
Ghidra address:
PAL: 0x001c8810

Member Function Documentation

◆ DispatchPriv()

virtual void PitchPicker::DispatchPriv ( Message * pMsg)
virtual

Act on a message.

Slot 3. A MultiMuseMsg goes to OnMsg(), a StdMidiMsg to the branch OnStdMidi() copies, and a SustainNoteMsg to PostSustainNoteMsg(). An AxisRegisterMsg from mPlayer sets mAxis to its value times 1024, and a TrackSelectMsg for this track with a zero second word sets mPlayer. Every other message is discarded.

Parameters
pMsgThe message.
Ghidra address:
NTSC-U/C: 0x001c3130
Ghidra address:
PAL: 0x001c8f78

Implements MsgSink.


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