wavelength 1.0.0
Loading...
Searching...
No Matches
notemuse.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4
5#include "gs/notemusebase.h"
6#include "os/mem.h"
7
15class NoteMuse : public NoteMuseBase {
16public:
23 static void *operator new(size_t nSize) {
24 return PoolAlloc(static_cast<int>(nSize), sizeof(NoteMuse), "NoteMuse", 0);
25 }
26
32 static void operator delete(void *pBlock) {
33 PoolFree(sizeof(NoteMuse), pBlock);
34 }
35
44 NoteMuse(unsigned char nNote, unsigned char nVelocity, int nDuration, unsigned char nChannel)
45 : NoteMuseBase(nNote, nVelocity, nDuration, nChannel) {
46 }
47
54 ~NoteMuse() override {
55 }
56
64 Muse *Clone() override;
65};
Piece of MIDI performance that a Scheduler plays.
Definition muse.h:12
NoteMuseBase(unsigned char nNote, unsigned char nVelocity, int nDuration, unsigned char nChannel)
Construct a note.
NoteMuse(unsigned char nNote, unsigned char nVelocity, int nDuration, unsigned char nChannel)
Construct a note.
Definition notemuse.h:44
Muse * Clone() override
Produce a copy of the note on the heap.
~NoteMuse() override
Release the note.
Definition notemuse.h:54
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.