wavelength 1.0.0
Loading...
Searching...
No Matches
Muse Class Referenceabstract

Piece of MIDI performance that a Scheduler plays. More...

#include <muse.h>

Inheritance diagram for Muse:
Collaboration diagram for Muse:

Classes

class  NoteCB
 Receiver of each note a muse starts. More...

Public Member Functions

 ~Muse () override
 Release the muse.
virtual void Play (Scheduler *pScheduler)=0
 Play from the start.
virtual void PlayFrom (Scheduler *pScheduler, int nOffset)=0
 Play with every event moved by an offset.
virtual void PlayWindow (Scheduler *pScheduler, int nStart, int nEnd)=0
 Play the events that fall in a window.
virtual void Stop ()=0
 Withdraw every event still queued and silence the notes that sound.
virtual bool IsPlaying ()=0
 Report whether a note of the muse still sounds or waits to sound.
virtual int GetLength ()=0
 Report the length of the muse.
virtual Muse * Clone ()=0
 Produce a copy of the muse on the heap.
virtual void SetNoteCB (NoteCB *pNoteCB)=0
 Set the receiver of the notes the muse starts.
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.

Additional Inherited Members

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

Piece of MIDI performance that a Scheduler plays.

The RTTI includes the class name and records Attachment as the base. The vtable lists eight pure members after the destructor.

Constructor & Destructor Documentation

◆ ~Muse()

Muse::~Muse ( )
inlineoverride

Release the muse.

Ghidra address:
NTSC-U/C: 0x0034e3a8
Ghidra address:
PAL: 0x003bb7d0

Member Function Documentation

◆ Play()

virtual void Muse::Play ( Scheduler * pScheduler)
pure virtual

Play from the start.

Parameters
pSchedulerThe scheduler that plays the events.

Implemented in MultiMuse, MutableNoteMuse, NoteMuseBase, and StdMidiMuse.

◆ PlayFrom()

virtual void Muse::PlayFrom ( Scheduler * pScheduler,
int nOffset )
pure virtual

Play with every event moved by an offset.

Parameters
pSchedulerThe scheduler that plays the events.
nOffsetThe offset in ticks.

Implemented in MultiMuse, MutableNoteMuse, NoteMuseBase, and StdMidiMuse.

◆ PlayWindow()

virtual void Muse::PlayWindow ( Scheduler * pScheduler,
int nStart,
int nEnd )
pure virtual

Play the events that fall in a window.

Parameters
pSchedulerThe scheduler that plays the events.
nStartThe first tick of the window.
nEndThe tick after the window.

Implemented in MultiMuse, MutableNoteMuse, NoteMuseBase, and StdMidiMuse.

◆ Stop()

virtual void Muse::Stop ( )
pure virtual

Withdraw every event still queued and silence the notes that sound.

Implemented in MultiMuse, NoteMuseBase, and StdMidiMuse.

◆ IsPlaying()

virtual bool Muse::IsPlaying ( )
pure virtual

Report whether a note of the muse still sounds or waits to sound.

Returns
Whether the muse plays.

Implemented in MultiMuse, NoteMuseBase, and StdMidiMuse.

◆ GetLength()

virtual int Muse::GetLength ( )
pure virtual

Report the length of the muse.

Returns
The length in ticks.

Implemented in MultiMuse, NoteMuseBase, and StdMidiMuse.

◆ Clone()

virtual Muse * Muse::Clone ( )
pure virtual

Produce a copy of the muse on the heap.

Returns
The copy, with no reference taken.

Implemented in MultiMuse, MutableNoteMuse, NoteMuse, and StdMidiMuse.

◆ SetNoteCB()

virtual void Muse::SetNoteCB ( NoteCB * pNoteCB)
pure virtual

Set the receiver of the notes the muse starts.

Parameters
pNoteCBThe receiver, or null.

Implemented in MultiMuse, NoteMuseBase, and StdMidiMuse.


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