|
resonance 1.0.1
|
Player of the phrases one track is divided into. More...
#include <phraseplayer.h>


Public Member Functions | |
| PhrasePlayer (PhraseMgr *pPhraseMgr, Quantizer *pQuantizer, const TrackData *pTrackData) | |
| virtual void | DispatchPriv (Message *pMsg) |
| Act on a message. | |
| void | PlayBar (int nBar) |
| Play the phrase of one bar. | |
| void | PlayBarAt (int nBar, int nOffset, int nElapsed) |
| Play a bar again from an offset, already some ticks under way. | |
| void | SetJamEffectsMgr (JamEffectsMgr *pJamEffects) |
| Install the jam-effects manager the step values go to. | |
| Public Member Functions inherited from MsgSource | |
| virtual | ~MsgSource () |
| virtual void | AddSink (MsgSink *pSink) |
| Register a sink, ignoring a sink that is already registered. | |
| virtual void | RemoveSink (MsgSink *pSink) |
| Unregister the first occurrence of a sink. | |
| void | Send (Message *pMsg) const |
| Deliver a message to every registered sink, in registration order. | |
| void | ClearSinks () |
| Unregister every sink. | |
| Public Member Functions inherited from MsgSink | |
| void * | operator new (size_t nSize) |
| Allocate a sink from the tagged heap under the tag "MsgSink". | |
| void | operator delete (void *pBlock) |
| Release a sink to the tagged heap. | |
| virtual | ~MsgSink () |
| virtual void | Dispatch (Message *pMsg) |
| Accept a message. | |
Additional Inherited Members | |
| Public Attributes inherited from MsgSource | |
| int | mGraphBuilt |
| A word no member of this class reads. | |
Player of the phrases one track is divided into.
Its RTTI descriptor is at 0x008eff30. It is built over MsgSource at offset 0 and MsgSink at offset 20. The primary table is at 0x007e3120 with four entries and the MsgSink subobject table at 0x007e30f8. MsgSource coming first is why every upcast to MsgSink in the stage classes adjusts by +0x14 and guards the adjustment against a null pointer. The object is 0x30 bytes, which ScoreTrackGraph's constructor measures at 0x001cef40.
Each bar sends the bar's phrase to the sinks as one MultiMuseMsg. How the sequence is built depends on the track mode: an axe or vocal track sends the phrase's own sequence, a riff or scratch track the riff of every phrase gem, and a catch track the riff of every gem of the bar.
The destructor at 0x001c2658 is implicitly declared. It restores the base tables, frees MsgSource's vector, and releases the object under MsgSink's tag.
| PhrasePlayer::PhrasePlayer | ( | PhraseMgr * | pPhraseMgr, |
| Quantizer * | pQuantizer, | ||
| const TrackData * | pTrackData ) |
| pPhraseMgr | The phrase manager of the track. |
| pQuantizer | The quantiser of the track. |
| pTrackData | The track description. The constructor copies its mode. |
|
virtual |
Act on a message.
Slot 3 of the MsgSink table. The routine asks the message for its identity and discards the answer, which is what remains of a dispatch with no case left in the release build.
| pMsg | The message. |
Implements MsgSink.
| void PhrasePlayer::PlayBar | ( | int | nBar | ) |
Play the phrase of one bar.
PhraseMgr::OnCommand() calls it once a bar. The step value of the bar goes to mJamEffects when there is one. A bar after mLastBar with a phrase is then played from its start.
| nBar | The bar. |
| void PhrasePlayer::PlayBarAt | ( | int | nBar, |
| int | nOffset, | ||
| int | nElapsed ) |
Play a bar again from an offset, already some ticks under way.
PhraseMgr::ReplayBar() is the recovered caller. A riff track plays the phrase gems and every other mode plays the bar's gems, whatever the phrase of the bar.
| nBar | The bar. |
| nOffset | The offset within the bar, in MIDI ticks. Earlier gems are skipped. |
| nElapsed | The ticks since the bar started, subtracted from every gem position. |
| void PhrasePlayer::SetJamEffectsMgr | ( | JamEffectsMgr * | pJamEffects | ) |
Install the jam-effects manager the step values go to.
PitchingSTG's and VoxingSTG's constructors call it. The title is inferred.
| pJamEffects | The manager, or null. |