|
resonance 1.0.1
|
Collector of a MIDI channel's controller state, for replaying it before playback starts. More...
#include <midichase.h>


Public Member Functions | |
| MidiChase () | |
| Start with nothing collected. | |
| virtual | ~MidiChase () |
| virtual void | DispatchPriv (Message *pMsg) |
| Record the channel, and the state a controller change, a program change, or a pitch bend sets. | |
| void | HandleRange (const TickObj< MuseMsg * > *pBegin, const TickObj< MuseMsg * > *pEnd) |
| Pass every message of a range to MsgSink::Dispatch(). | |
| void | Replay (MsgSink *pSink) |
| Send the collected state to a 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. | |
Static Public Attributes | |
| static constexpr unsigned char | kUnset = 0xff |
| The value every collected byte starts at. | |
| static constexpr int | kControllerCount = 128 |
| The number of MIDI controllers. | |
Collector of a MIDI channel's controller state, for replaying it before playback starts.
It has MsgSink as its one base. Its unit spans 0x001a6488 through 0x001a6960. BGTrackGraph::BuildSequencer() builds one on its stack, feeds it every bar of the track, and has it replay what it collected into the synthesiser.
Every byte of state starts at kUnset, which Replay() treats as nothing collected.
| MidiChase::MidiChase | ( | ) |
Start with nothing collected.
|
virtual |
|
virtual |
Record the channel, and the state a controller change, a program change, or a pitch bend sets.
Every other message is ignored.
| pMsg | The message. |
Implements MsgSink.
| void MidiChase::HandleRange | ( | const TickObj< MuseMsg * > * | pBegin, |
| const TickObj< MuseMsg * > * | pEnd ) |
Pass every message of a range to MsgSink::Dispatch().
The title is inferred.
| pBegin | The first message. |
| pEnd | One past the last message. |
| void MidiChase::Replay | ( | MsgSink * | pSink | ) |
Send the collected state to a sink.
Sends a controller change for every collected controller in order, then the program change, then the pitch bend, each only when collected, all on the recorded channel at kTickInfinity. The title is inferred.
| pSink | The sink. |
|
staticconstexpr |
The value every collected byte starts at.
|
staticconstexpr |
The number of MIDI controllers.