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

NoteMuseBase whose note can change after it is built. More...

#include <mutablenotemuse.h>

Inheritance diagram for MutableNoteMuse:
Collaboration diagram for MutableNoteMuse:

Public Member Functions

 MutableNoteMuse (unsigned char nNote, unsigned char nVelocity, int nDuration, unsigned char nChannel)
 Construct a note.
 ~MutableNoteMuse () override
 Release the note.
void Play (Scheduler *pScheduler) override
 Play from the start.
void PlayFrom (Scheduler *pScheduler, int nOffset) override
 Play with the note moved by an offset.
void PlayWindow (Scheduler *pScheduler, int nStart, int nEnd) override
 Play the note when it falls in a window.
Muse * Clone () override
 Produce a copy of the note on the heap.
void SetNote (unsigned char nNote)
 Set the note the muse plays from now on.
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 whose note can change after it is built.

The RTTI includes the class name and records NoteMuseBase as the base. The allocations come from the pool of fixed-size blocks, billed to the tag "MuteNoteMuse". AxeContour builds one for each note of a guitar track and moves its note to fit the harmony.

Constructor & Destructor Documentation

◆ MutableNoteMuse()

MutableNoteMuse::MutableNoteMuse ( unsigned char nNote,
unsigned char nVelocity,
int nDuration,
unsigned char nChannel )

Construct a note.

Parameters
nNoteThe MIDI note number.
nVelocityThe MIDI velocity.
nDurationThe length in ticks.
nChannelThe MIDI channel.
Ghidra address:
NTSC-U/C: 0x0015bb78
Ghidra address:
PAL: 0x0015d368

◆ ~MutableNoteMuse()

MutableNoteMuse::~MutableNoteMuse ( )
override

Release the note.

Ghidra address:
NTSC-U/C: 0x0015bbc8
Ghidra address:
PAL: 0x0015d3b8

Member Function Documentation

◆ operator new()

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

Allocate a note from the pool.

Parameters
nSizeThe object size.
Returns
The block.

◆ operator delete()

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

Return a note to the pool.

Parameters
pBlockThe block.

◆ Play()

void MutableNoteMuse::Play ( Scheduler * pScheduler)
overridevirtual

Play from the start.

Parameters
pSchedulerThe scheduler that plays the events.
Ghidra address:
NTSC-U/C: 0x0015bc20
Ghidra address:
PAL: 0x0015d410

Implements Muse.

◆ PlayFrom()

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

Play with the note moved by an offset.

Parameters
pSchedulerThe scheduler that plays the events.
nOffsetThe offset in ticks.
Ghidra address:
NTSC-U/C: 0x0015bc48
Ghidra address:
PAL: 0x0015d438

Implements Muse.

◆ PlayWindow()

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

Play the note when it falls in a window.

Parameters
pSchedulerThe scheduler that plays the events.
nStartThe first tick of the window.
nEndThe tick after the window.
Ghidra address:
NTSC-U/C: 0x0015bc70
Ghidra address:
PAL: 0x0015d460

Implements Muse.

◆ Clone()

Muse * MutableNoteMuse::Clone ( )
overridevirtual

Produce a copy of the note on the heap.

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

Implements Muse.

◆ SetNote()

void MutableNoteMuse::SetNote ( unsigned char nNote)

Set the note the muse plays from now on.

Parameters
nNoteThe MIDI note number.
Ghidra address:
NTSC-U/C: 0x0015bd20
Ghidra address:
PAL: 0x0015d510

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