|
resonance 1.0.1
|
Phrase maker for a guitar track. More...
#include <axephrasemaker.h>


Classes | |
| struct | HeldNote |
| A note-on the maker holds until its note-off. More... | |
Public Member Functions | |
| AxePhraseMaker (PhraseMgr *pPhraseMgr, Quantizer *pQuantizer, const TrackData *pTrackData, Sch::TickClock *pClock) | |
| virtual void | DispatchPriv (Message *pMsg) |
| Act on a message. | |
| virtual void | OnPeriod (int nBar) |
| Act on the start of a bar. | |
| virtual int | GetPeriodOrigin () |
| Report the song position periods are counted from. | |
| int | IsBarPlayable (int nBar) |
| Report whether a bar can be played. | |
| void | Erase (Player *pPlayer, int nTick, int bWholeStep) |
| Erase a player's phrase at a song position. | |
| 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. | |
| 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. | |
Additional Inherited Members | |
| Public Attributes inherited from MsgSource | |
| int | mGraphBuilt |
| A word no member of this class reads. | |
Phrase maker for a guitar track.
Its RTTI descriptor is at 0x008f2a50. It has PhraseMaker as its only base at offset 0. Its primary table is at 0x007ddc50 with six entries and its MsgSource subobject table at 0x007ddc28 with four. The class introduces two virtuals. The object is 0x50 bytes, measured by AxingSTG's tagged allocation.
Slot 0 of the table at 0x007ddc50 addresses the accessor at 0x0019d390. The accessor guards on the descriptor at 0x008f2a50, and the descriptor settles the class name.
The maker records what the player plays over a bar into a fresh Phrase and installs it in the phrase manager when the bar ends. A note-on is held until its note-off (or the end of the bar) gives it a length, and every recorded message also records the current axis value.
The destructor at 0x0019b7f0 is implicitly declared. It destroys mHeldNotes and MsgSource's vector and releases the object under MsgSink's tag.
| AxePhraseMaker::AxePhraseMaker | ( | PhraseMgr * | pPhraseMgr, |
| Quantizer * | pQuantizer, | ||
| const TrackData * | pTrackData, | ||
| Sch::TickClock * | pClock ) |
| pPhraseMgr | The phrase manager for the track. |
| pQuantizer | The quantiser for the track. |
| pTrackData | The track description. The constructor copies its track and channel. |
| pClock | Not read. |
|
virtual |
Act on a message.
Slot 3. An AxisRegisterMsg for this track and player stores its value in mValue. A StdMidiMsg goes to OnStdMidi(), a SustainNoteMsg to the branch OnSustainNote() copies, a TrackSelectMsg to the branch OnTrackSelect() copies, and an InvalidateSeekerMsg to the branch OnInvalidateSeeker() copies.
| pMsg | The message. |
Implements MsgSink.
|
virtual |
Act on the start of a bar.
Slot 4.
A bar right after mPhraseBar finishes the phrase in progress, and the seeker is cleared. With mSwitchBanks set, a bar that starts a step selects the synthesiser bank of that step for mChannel.
| nBar | The bar. |
Implements PhraseMaker.
|
virtual |
Report the song position periods are counted from.
Slot 5.
Reimplemented from PhraseMaker.
| int AxePhraseMaker::IsBarPlayable | ( | int | nBar | ) |
Report whether a bar can be played.
AutoRiffer is the recovered caller.
| nBar | The bar. |
| void AxePhraseMaker::Erase | ( | Player * | pPlayer, |
| int | nTick, | ||
| int | bWholeStep ) |
Erase a player's phrase at a song position.
The bar of the position, or with bWholeStep set every bar of its step, is cleared through PhraseMgr::ClearPhrase() wherever pPlayer owns it. When anything was cleared, or a phrase is in progress, one of two sounds plays and a ShowEraseEffectMsg goes out. The phrase in progress is discarded either way. The sound is SND_ERASE_SECTION for a whole step and SND_ERASE otherwise, and the message names mPlayer rather than pPlayer. AutoRiffer::OnErase() is the recovered caller.
| pPlayer | The player the erase is for. |
| nTick | The song position, in MIDI ticks. |
| bWholeStep | Non-zero to erase the whole step around the position. |