|
resonance 1.0.1
|
One phrase of a track, with its gems, its player, and the messages and values scheduled across it. More...
#include <phrase.h>


Classes | |
| class | Gem |
| One gem of the phrase at one song position. More... | |
Public Member Functions | |
| void * | operator new (size_t nSize) |
| Allocate a phrase from the tagged heap under the tag Phrase. | |
| void | operator delete (void *pBlock) |
| Release a phrase to the tagged heap. | |
| Phrase () | |
| Construct an empty phrase owned by the stand-in player. | |
| virtual | ~Phrase () |
| Release the message sequence, when one exists, and both vectors. | |
| int | AddGem (int nTick, int nGem, int nTrans) |
| Place a gem at a song position, replacing any gem already there. | |
| void | AddMuseMsg (int nTick, MuseMsg *pMsg) |
| Schedule a copy of a message at a song position, creating the sequence on first use. | |
| void | Print (std::ostream &stream) |
| Write the phrase to a diagnostic stream. | |
| void | Save (OBStream &stream) |
| Write the phrase behind a version byte of 2. | |
| void | Load (IBStream &stream) |
| Read the phrase back. | |
| void | AddXLocal (int nTick, float flValue) |
| Add a value at a song position, keeping the values sorted by position. | |
| float | GetValue (int nTick) |
| Report the value in force at a song position. | |
| 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. | |
Friends | |
| class | AxeOldGemMaker |
| class | AxePhraseMaker |
| class | PhraseDatabase |
| class | PhraseMgr |
| class | PhrasePlayer |
| class | TrackData |
| class | Voxer |
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. | |
| Public Attributes inherited from Attachment | |
| int | mRefs |
One phrase of a track, with its gems, its player, and the messages and values scheduled across it.
It has Attachment as its one base. The allocation in operator>>(IBStream &, Phrase *&) measures the object at 0x2c bytes. Its vtable at 0x007e1b68 runs three entries (the type function, the destructor, and the retained Attachment::Destroy()). The destructor is the only virtual the class declares.
The constructor and the destructor together account for every byte of the member map. Print() labels three of the members gems: , pl: , and X: , and Save() and Load() transfer the same three in the same order behind a version byte of 2.
Every member is private. AxePhraseMaker::StartPhrase() and Voxer::StartPhrase() write mPlayer at 0x0019bd7c and 0x001d8aa8, and AxeOldGemMaker reads mPlayer and mMuse at 0x001a3420 and 0x001a3698. PhraseDatabase writes mPlayer and reads and writes mScore directly, PhraseMgr::GetOwner() reads mPlayer, TrackData::AddPhrases() walks mGems directly, PhrasePlayer reads mPlayer, mGems, and mMuse when it plays a bar, the image exposes no accessor, and friend declarations model that access. Promoting the members to public fits the image equally well.
| Phrase::Phrase | ( | ) |
Construct an empty phrase owned by the stand-in player.
|
virtual |
Release the message sequence, when one exists, and both vectors.
| void * Phrase::operator new | ( | size_t | nSize | ) |
Allocate a phrase from the tagged heap under the tag Phrase.
| nSize | The object size the compiler supplies. |
| void Phrase::operator delete | ( | void * | pBlock | ) |
Release a phrase to the tagged heap.
| pBlock | The block. |
| int Phrase::AddGem | ( | int | nTick, |
| int | nGem, | ||
| int | nTrans ) |
Place a gem at a song position, replacing any gem already there.
A gem after the last one is appended. Otherwise the gem is inserted at its sorted position, and an existing gem at the same position is removed first.
| nTick | The song position, in MIDI ticks. |
| nGem | The gem. |
| nTrans | The transposition. |
| void Phrase::AddMuseMsg | ( | int | nTick, |
| MuseMsg * | pMsg ) |
Schedule a copy of a message at a song position, creating the sequence on first use.
| nTick | The song position, in MIDI ticks. |
| pMsg | The message. The sequence stores a clone of it. |
| void Phrase::Print | ( | std::ostream & | stream | ) |
Write the phrase to a diagnostic stream.
| stream | The stream to write to. |
| void Phrase::Save | ( | OBStream & | stream | ) |
Write the phrase behind a version byte of 2.
| stream | The stream to write to. |
| void Phrase::Load | ( | IBStream & | stream | ) |
Read the phrase back.
Version 1 and any version below 2 are reported through Fatal(). The player arrives as its identifier, and an identifier the table does not resolve falls back to the table's first player.
| stream | The stream to read from. |
| void Phrase::AddXLocal | ( | int | nTick, |
| float | flValue ) |
Add a value at a song position, keeping the values sorted by position.
| nTick | The song position, in MIDI ticks. |
| flValue | The value. |
| float Phrase::GetValue | ( | int | nTick | ) |
Report the value in force at a song position.
| nTick | The song position, in MIDI ticks. |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |