|
resonance 1.0.1
|
One riff of a track at one difficulty level, as a sequence of MIDI messages. More...
#include <riff.h>


Public Member Functions | |
| void * | operator new (size_t nSize) |
| Allocate a riff from the tagged heap under the tag Riff. | |
| void | operator delete (void *pBlock) |
| Release a riff to the tagged heap. | |
| Riff (int nId) | |
| Construct an empty riff for one difficulty level. | |
| virtual void | Print (std::ostream &stream) |
| Write riff[id= and the level, then the sequence through MultiMuse::Print(). | |
| void | AddNoteMsg (int nTick, unsigned char nNote, unsigned char nVelocity, int nLength, unsigned char nChannel) |
| Schedule a NoteMsg. | |
| void | AddMidiMsg (int nTick, unsigned char nStatus, unsigned char nData1, unsigned char nData2, unsigned char nChannel) |
| Schedule a StdMidiMsg built from a status byte and two data bytes. | |
| Public Member Functions inherited from MultiMuse | |
| void * | operator new (size_t nSize) |
| Allocate a sequence from the tagged heap under the tag "MultiMuse". | |
| void | operator delete (void *pBlock) |
| Release a sequence to the tagged heap. | |
| virtual | ~MultiMuse () |
| Delete every stored message, then release the vector. | |
| void | SaveFields (OBStream &stream) |
| Write the sequence to an output stream. | |
| void | LoadFields (IBStream &stream) |
| Read the sequence back from an input stream. | |
| void | Add (MuseMsg *pMsg, int nTick, int bCheckLast) |
| Schedule a copy of a message at a song position. | |
| MuseMsg * | Find (int nTick) |
| Find the message scheduled at exactly a song position. | |
| void | Append (const MultiMuse &other) |
| Append a Clone() of every message of another sequence, at the same song positions. | |
| Public Member Functions inherited from Attachment | |
| Attachment () | |
| virtual | ~Attachment () |
| int | Release () |
| Give back one reference and destroy the object once the last one is gone. | |
| virtual void | Destroy () |
| Destroy the object. | |
Public Attributes | |
| int | mId |
| Public Attributes inherited from MultiMuse | |
| std::vector< TickObj< MuseMsg * > > | mEntries |
| Every message of the sequence, in ascending song position. | |
| Public Attributes inherited from Attachment | |
| int | mRefs |
Friends | |
| class | AutoRiffer |
| class | LevelConverter |
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. | |
One riff of a track at one difficulty level, as a sequence of MIDI messages.
It has MultiMuse as its one base. Its vtable at 0x007e4f78 runs four entries: the type function, the destructor at 0x001cead0, the retained Attachment::Destroy(), and the Print() override below. The object is 0x1c bytes, the 0x14-byte MultiMuse followed by the two members below.
mId is the difficulty level the riff belongs to. RiffSet stores a riff at the index mId names, and Print() labels it riff[id=.
The destructor is implicitly declared. It runs MultiMuse's destructor and releases the object under the tag Riff.
Both members are private apart from mId. RiffSet and TrackData read mId directly.
|
explicit |
Construct an empty riff for one difficulty level.
| nId | The difficulty level. |
| void * Riff::operator new | ( | size_t | nSize | ) |
Allocate a riff from the tagged heap under the tag Riff.
| nSize | The object size the compiler supplies. |
| void Riff::operator delete | ( | void * | pBlock | ) |
Release a riff to the tagged heap.
| pBlock | The block. |
|
virtual |
Write riff[id= and the level, then the sequence through MultiMuse::Print().
| stream | The stream to write to. |
Reimplemented from MultiMuse.
| void Riff::AddNoteMsg | ( | int | nTick, |
| unsigned char | nNote, | ||
| unsigned char | nVelocity, | ||
| int | nLength, | ||
| unsigned char | nChannel ) |
Schedule a NoteMsg.
A position at or before tick 2 moves to 0, and one after tick 30 moves one tick later, clamped to the finite range. The message is added through MultiMuse::Add() with appending allowed.
| nTick | The song position, in MIDI ticks. |
| nNote | The note number. |
| nVelocity | The note-on velocity. |
| nLength | The length of the note, in MIDI ticks. |
| nChannel | The MIDI channel. |
| void Riff::AddMidiMsg | ( | int | nTick, |
| unsigned char | nStatus, | ||
| unsigned char | nData1, | ||
| unsigned char | nData2, | ||
| unsigned char | nChannel ) |
Schedule a StdMidiMsg built from a status byte and two data bytes.
The position is adjusted as AddNoteMsg() adjusts it, and the status is the bitwise or of the second and the fifth arguments.
| nTick | The song position, in MIDI ticks. |
| nStatus | The status byte without its channel. |
| nData1 | The first data byte. |
| nData2 | The second data byte. |
| nChannel | The channel, combined into the status with a bitwise or. |
|
friend |
|
friend |
| int Riff::mId |
The difficulty level, 0 through 3. +0x14