24 explicit SFXBuilder(
const char *pszFile) : mFile(pszFile), mBuilder(nullptr), mTrack(0) {
50 void OnNewTrack([[maybe_unused]]
unsigned char nTrack)
override {
81 OnMidi(
int nTick,
unsigned char nStatus,
unsigned char nData1,
unsigned char nData2)
override;
91 void OnTempo(
int nTick,
int nMicrosecondsPerBeat)
override;
105 void OnText(
int nTick,
const char *pszText,
unsigned char nType)
override;
117 [[maybe_unused]]
int nNumerator,
118 [[maybe_unused]]
int nDenominator)
override {
123 std::unique_ptr<MuseBuilder> mBuilder;
Listener a MIDI file reader reports each track and event to.
Definition midireceiver.h:8
void OnEndTrack() override
Finish the cue of the track and count the track.
void OnMidi(int nTick, unsigned char nStatus, unsigned char nData1, unsigned char nData2) override
Pass a channel message to the builder of the track, if any.
void OnText(int nTick, const char *pszText, unsigned char nType) override
Start the builder of the cue a track name identifies, after the first track.
SFXBuilder(const char *pszFile)
Construct a builder for a file.
Definition sfxbuilder.h:24
void OnTempo(int nTick, int nMicrosecondsPerBeat) override
Set TheSfxTickDuration from the tempo, at 480 ticks a beat.
void OnAllDone() override
Ignore the end of the file.
Definition sfxbuilder.h:67
void Read()
Read the file.
~SFXBuilder() override
Destroy the builder of the current track.
void OnNewTrack(unsigned char nTrack) override
Ignore the start of a track.
Definition sfxbuilder.h:50
void OnTimeSignature(int nTick, int nNumerator, int nDenominator) override
Ignore a time signature.
Definition sfxbuilder.h:116
std::unique_ptr< float > TheSfxTickDuration
The duration of one tick of the interface sounds, which the last tempo of the file set.