42 static void *
operator new(
size_t nSize) {
51 static void operator delete(
void *pBlock) {
107 mScheduler = pScheduler;
126 unsigned char nVelocity,
128 unsigned char nChannel);
Unit of work a Scheduler runs at a set time.
Definition command.h:13
Receiver of each note a muse starts.
Definition muse.h:20
Piece of MIDI performance that a Scheduler plays.
Definition muse.h:12
void Execute() override
Send the note on, or the note off when the note sounds.
void Cancel()
Silence the note when it sounds and withdraw the command.
~NoteCommand() override=default
Release the command.
Scheduler * GetScheduler() const
Definition notemusebase.h:101
void SetScheduler(Scheduler *pScheduler)
Definition notemusebase.h:106
NoteMuseBase * GetMuse() const
Definition notemusebase.h:96
void NoteOff()
Send the note off.
NoteCommand(NoteMuseBase *pMuse)
Construct the command of a note.
Definition notemusebase.h:33
void NoteOn()
Send the note on and report it to the receiver of the note.
unsigned char mChannel
Definition notemusebase.h:208
int mDuration
Definition notemusebase.h:210
unsigned char mSounding
Definition notemusebase.h:209
void SetNoteCB(NoteCB *pNoteCB) override
Set the receiver of the note.
NoteMuseBase(unsigned char nNote, unsigned char nVelocity, int nDuration, unsigned char nChannel)
Construct a note.
unsigned char mNote
Definition notemusebase.h:206
Ptr< NoteCommand > mCmd
Definition notemusebase.h:211
void Stop() override
Withdraw the queued note and silence it.
void PlayWindow(Scheduler *pScheduler, int nStart, int nEnd) override
Play the note like PlayFrom() when the window is not empty.
void Play(Scheduler *pScheduler) override
Play the note at once.
~NoteMuseBase() override
Silence the note and release the command.
int GetLength() override
Report the length of the note.
Definition notemusebase.h:192
bool IsPlaying() override
Report whether the note waits to sound or sounds.
unsigned char mVelocity
Definition notemusebase.h:207
NoteCB * mNoteCB
Definition notemusebase.h:212
void PlayFrom(Scheduler *pScheduler, int nOffset) override
Play the note after the ticks a negative offset delays it.
Owner of one reference to an Attachment.
Definition ptr.h:16
Queue of commands that run when the song clock reaches their tick.
Definition scheduler.h:20
void * PoolAlloc(int nSize, int nBlockSize, const char *pszTag, int nUnused)
Allocate a block from the small-block pool and bill it to a tag.
void PoolFree(int nSize, void *pBlock)
Return a block to the small-block pool.