50 static void *
operator new(
size_t nSize) {
59 static void operator delete(
void *pBlock) {
86 mScheduler = pScheduler;
103 StdMidiMuse(
unsigned char nStatus,
unsigned char nData1,
unsigned char nData2);
111 static void *
operator new(
size_t nSize) {
120 static void operator delete(
void *pBlock) {
254 unsigned char mStatus;
255 unsigned char mData1;
256 unsigned char mData2;
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
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
StdMidiCommand(StdMidiMuse *pMuse)
Construct the command of a muse.
Definition stdmidimuse.h:41
~StdMidiCommand() override=default
Destroy the object.
void Cancel()
Withdraw the command from the scheduler that queued it.
void SetScheduler(Scheduler *pScheduler)
Definition stdmidimuse.h:85
void Execute() override
Send the message, timed within the pump of the scheduler, and forget the scheduler.
Scheduler * GetScheduler() const
Definition stdmidimuse.h:80
unsigned char GetData2() const
Definition stdmidimuse.h:244
void Stop() override
Withdraw the queued message.
bool IsPlaying() override
Report whether the message waits to be sent.
static StdMidiMuse * NewChannelPressure(unsigned char nChannel, unsigned char nPressure)
Allocate a channel pressure message.
static StdMidiMuse * NewProgramChange(unsigned char nChannel, unsigned char nProgram)
Allocate a program change message.
void PlayWindow(Scheduler *pScheduler, int nStart, int nEnd) override
Send the message like PlayFrom() when the window is not empty.
void Play(Scheduler *pScheduler) override
Send the message at once.
void SetNoteCB(NoteCB *pNoteCB) override
Ignore a receiver of notes.
~StdMidiMuse() override
Withdraw the message and release the command.
StdMidiMuse(unsigned char nStatus, unsigned char nData1, unsigned char nData2)
Construct a muse for a message.
static StdMidiMuse * NewControlChange(unsigned char nChannel, unsigned char nController, unsigned char nValue)
Allocate a control change message.
int GetLength() override
Report the length of the message.
Definition stdmidimuse.h:186
void PlayFrom(Scheduler *pScheduler, int nOffset) override
Send the message after the ticks a negative offset delays it, or at once.
Muse * Clone() override
Produce a copy of the muse on the heap.
unsigned char GetData1() const
Definition stdmidimuse.h:249
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.