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

NoteMuseBase that can copy itself. More...

#include <notemuse.h>

Inheritance diagram for NoteMuse:
Collaboration diagram for NoteMuse:

Public Member Functions

 NoteMuse (unsigned char nNote, unsigned char nVelocity, int nDuration, unsigned char nChannel)
 Construct a note.
 ~NoteMuse () override
 Release the note.
Muse * Clone () override
 Produce a copy of the note on the heap.
Public Member Functions inherited from NoteMuseBase
 NoteMuseBase (unsigned char nNote, unsigned char nVelocity, int nDuration, unsigned char nChannel)
 Construct a note.
 ~NoteMuseBase () override
 Silence the note and release the command.
void Play (Scheduler *pScheduler) override
 Play the note at once.
void PlayFrom (Scheduler *pScheduler, int nOffset) override
 Play the note after the ticks a negative offset delays it.
void PlayWindow (Scheduler *pScheduler, int nStart, int nEnd) override
 Play the note like PlayFrom() when the window is not empty.
void Stop () override
 Withdraw the queued note and silence it.
bool IsPlaying () override
 Report whether the note waits to sound or sounds.
int GetLength () override
 Report the length of the note.
void SetNoteCB (NoteCB *pNoteCB) override
 Set the receiver of the note.
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 note from the pool.
static void operator delete (void *pBlock)
 Return a note to the pool.
Static Public Member Functions inherited from Attachment
static void ReleaseIfSet (Attachment *pAttachment)
 Give back one reference to an object that may be null.

Additional Inherited Members

Protected Attributes inherited from NoteMuseBase
unsigned char mNote
unsigned char mVelocity
unsigned char mChannel
unsigned char mSounding
int mDuration
Ptr< NoteCommand > mCmd
NoteCB * mNoteCB

Detailed Description

NoteMuseBase that can copy itself.

The RTTI includes the class name and records NoteMuseBase as the base. The constructor has no out-of-line copy. The allocations come from the pool of fixed-size blocks, billed to the tag "NoteMuse".

Constructor & Destructor Documentation

◆ NoteMuse()

NoteMuse::NoteMuse ( unsigned char nNote,
unsigned char nVelocity,
int nDuration,
unsigned char nChannel )
inline

Construct a note.

Parameters
nNoteThe MIDI note number.
nVelocityThe MIDI velocity.
nDurationThe length in ticks.
nChannelThe MIDI channel.

◆ ~NoteMuse()

NoteMuse::~NoteMuse ( )
inlineoverride

Release the note.

Ghidra address:
NTSC-U/C: 0x0034ea68
Ghidra address:
PAL: 0x003bbe90

Member Function Documentation

◆ operator new()

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

Allocate a note from the pool.

Parameters
nSizeThe object size.
Returns
The block.

◆ operator delete()

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

Return a note to the pool.

Parameters
pBlockThe block.

◆ Clone()

Muse * NoteMuse::Clone ( )
overridevirtual

Produce a copy of the note on the heap.

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

Implements Muse.


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