wavelength 1.0.0
Loading...
Searching...
No Matches
StdMidiMuse Class Reference

Muse that sends one standard MIDI message. More...

#include <stdmidimuse.h>

Inheritance diagram for StdMidiMuse:
Collaboration diagram for StdMidiMuse:

Classes

class  StdMidiCommand
 Command that sends the message of a muse when the scheduler runs it. More...

Public Member Functions

 StdMidiMuse (unsigned char nStatus, unsigned char nData1, unsigned char nData2)
 Construct a muse for a message.
 ~StdMidiMuse () override
 Withdraw the message and release the command.
void Play (Scheduler *pScheduler) override
 Send the message at once.
void PlayFrom (Scheduler *pScheduler, int nOffset) override
 Send the message after the ticks a negative offset delays it, or at once.
void PlayWindow (Scheduler *pScheduler, int nStart, int nEnd) override
 Send the message like PlayFrom() when the window is not empty.
void Stop () override
 Withdraw the queued message.
bool IsPlaying () override
 Report whether the message waits to be sent.
int GetLength () override
 Report the length of the message.
Muse * Clone () override
 Produce a copy of the muse on the heap.
void SetNoteCB (NoteCB *pNoteCB) override
 Ignore a receiver of notes.
unsigned char GetData2 () const
unsigned char GetData1 () const
Public Member Functions inherited from Muse
 ~Muse () override
 Release the muse.
Public Member Functions inherited from Attachment
 Attachment ()
 Construct an object with no reference.
virtual ~Attachment ()
 Release the object.
void AddRef ()
 Take one reference.
void Release ()
 Give back one reference and delete the object once the last one is gone.

Static Public Member Functions

static void * operator new (size_t nSize)
 Allocate a muse from the pool.
static void operator delete (void *pBlock)
 Return a muse to the pool.
static StdMidiMuse * NewProgramChange (unsigned char nChannel, unsigned char nProgram)
 Allocate a program change message.
static StdMidiMuse * NewChannelPressure (unsigned char nChannel, unsigned char nPressure)
 Allocate a channel pressure message.
static StdMidiMuse * NewControlChange (unsigned char nChannel, unsigned char nController, unsigned char nValue)
 Allocate a control change message.
Static Public Member Functions inherited from Attachment
static void ReleaseIfSet (Attachment *pAttachment)
 Give back one reference to an object that may be null.

Detailed Description

Muse that sends one standard MIDI message.

The RTTI includes the class name and records Muse as the base, and the nested StdMidiMuse::StdMidiCommand. The allocations come from the pool of fixed-size blocks, billed to the tag "StdMidiMuse".

Constructor & Destructor Documentation

◆ StdMidiMuse()

StdMidiMuse::StdMidiMuse ( unsigned char nStatus,
unsigned char nData1,
unsigned char nData2 )

Construct a muse for a message.

Parameters
nStatusThe status byte.
nData1The first data byte.
nData2The second data byte.
Ghidra address:
NTSC-U/C: 0x0015bf70
Ghidra address:
PAL: 0x0015d760

◆ ~StdMidiMuse()

StdMidiMuse::~StdMidiMuse ( )
override

Withdraw the message and release the command.

Ghidra address:
NTSC-U/C: 0x0015bff8
Ghidra address:
PAL: 0x0015d7e8

Member Function Documentation

◆ operator new()

void * StdMidiMuse::operator new ( size_t nSize)
inlinestatic

Allocate a muse from the pool.

Parameters
nSizeThe object size.
Returns
The block.

◆ operator delete()

void StdMidiMuse::operator delete ( void * pBlock)
inlinestatic

Return a muse to the pool.

Parameters
pBlockThe block.

◆ Play()

void StdMidiMuse::Play ( Scheduler * pScheduler)
overridevirtual

Send the message at once.

Parameters
pSchedulerThe scheduler that sends it.
Ghidra address:
NTSC-U/C: 0x0015c070
Ghidra address:
PAL: 0x0015d860

Implements Muse.

◆ PlayFrom()

void StdMidiMuse::PlayFrom ( Scheduler * pScheduler,
int nOffset )
overridevirtual

Send the message after the ticks a negative offset delays it, or at once.

Parameters
pSchedulerThe scheduler that sends it.
nOffsetThe offset in ticks.
Ghidra address:
NTSC-U/C: 0x0015c0c8
Ghidra address:
PAL: 0x0015d8b8

Implements Muse.

◆ PlayWindow()

void StdMidiMuse::PlayWindow ( Scheduler * pScheduler,
int nStart,
int nEnd )
overridevirtual

Send the message like PlayFrom() when the window is not empty.

Parameters
pSchedulerThe scheduler that sends it.
nStartThe first tick of the window.
nEndThe tick after the window.
Ghidra address:
NTSC-U/C: 0x0015c130
Ghidra address:
PAL: 0x0015d920

Implements Muse.

◆ Stop()

void StdMidiMuse::Stop ( )
overridevirtual

Withdraw the queued message.

Ghidra address:
NTSC-U/C: 0x0015c1a0
Ghidra address:
PAL: 0x0015d990

Implements Muse.

◆ IsPlaying()

bool StdMidiMuse::IsPlaying ( )
overridevirtual

Report whether the message waits to be sent.

Returns
Whether it waits.
Ghidra address:
NTSC-U/C: 0x0015c1e0
Ghidra address:
PAL: 0x0015d9d0

Implements Muse.

◆ GetLength()

int StdMidiMuse::GetLength ( )
inlineoverridevirtual

Report the length of the message.

Returns
0.
Ghidra address:
NTSC-U/C: 0x0034f078
Ghidra address:
PAL: 0x003bc4a0

Implements Muse.

◆ Clone()

Muse * StdMidiMuse::Clone ( )
overridevirtual

Produce a copy of the muse on the heap.

Returns
The copy, with no reference taken.
Ghidra address:
NTSC-U/C: 0x0015c208
Ghidra address:
PAL: 0x0015d9f8

Implements Muse.

◆ SetNoteCB()

void StdMidiMuse::SetNoteCB ( NoteCB * pNoteCB)
overridevirtual

Ignore a receiver of notes.

The body is empty.

Parameters
pNoteCBThe receiver.
Ghidra address:
NTSC-U/C: 0x0015c258
Ghidra address:
PAL: 0x0015da48

Implements Muse.

◆ NewProgramChange()

StdMidiMuse * StdMidiMuse::NewProgramChange ( unsigned char nChannel,
unsigned char nProgram )
static

Allocate a program change message.

Parameters
nChannelThe MIDI channel.
nProgramThe program number.
Returns
The message, with no reference taken.
Ghidra address:
NTSC-U/C: 0x0015c260
Ghidra address:
PAL: 0x0015da50

◆ NewChannelPressure()

StdMidiMuse * StdMidiMuse::NewChannelPressure ( unsigned char nChannel,
unsigned char nPressure )
static

Allocate a channel pressure message.

Parameters
nChannelThe MIDI channel.
nPressureThe pressure.
Returns
The message, with no reference taken.
Ghidra address:
NTSC-U/C: 0x0015c2b8
Ghidra address:
PAL: 0x0015daa8

◆ NewControlChange()

StdMidiMuse * StdMidiMuse::NewControlChange ( unsigned char nChannel,
unsigned char nController,
unsigned char nValue )
static

Allocate a control change message.

Parameters
nChannelThe MIDI channel.
nControllerThe controller.
nValueThe value.
Returns
The message, with no reference taken.
Ghidra address:
NTSC-U/C: 0x0015c310
Ghidra address:
PAL: 0x0015db00

◆ GetData2()

unsigned char StdMidiMuse::GetData2 ( ) const
inline
Returns
The second data byte.

◆ GetData1()

unsigned char StdMidiMuse::GetData1 ( ) const
inline
Returns
The first data byte.

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