wavelength 1.0.0
Loading...
Searching...
No Matches
MidiValidator Class Reference

Checker of the channel messages of one MIDI track for authoring errors. More...

#include <midivalidator.h>

Public Member Functions

 MidiValidator (int nTrack, TrackBuilder::ErrorHandler pfnError, int nChannel, bool bRequirePrograms)
 Construct a checker.
 ~MidiValidator ()
 Release the checker.
void Check (int nTick, unsigned char nStatus, unsigned char nData1, unsigned char nData2)
 Check one channel message.

Static Public Attributes

static constexpr int kNone = -1
 The value of the channel and tick members before one is known.

Detailed Description

Checker of the channel messages of one MIDI track for authoring errors.

The errors are messages on the wrong channel, duplicate notes, program changes, and controller messages within one tick, and a note before the first program or bank change. The class is not polymorphic and has no RTTI. The name is inferred. The object is 0x4c bytes.

Constructor & Destructor Documentation

◆ MidiValidator()

MidiValidator::MidiValidator ( int nTrack,
TrackBuilder::ErrorHandler pfnError,
int nChannel,
bool bRequirePrograms )

Construct a checker.

Parameters
nTrackThe number of the MIDI track the error messages give.
pfnErrorThe routine that reports an error, or null to print it.
nChannelThe channel every message must use, or kNone for any.
bRequireProgramsReport a note that precedes the first program or bank change.
Ghidra address:
NTSC-U/C: 0x0027e1e8
Ghidra address:
PAL: 0x00287b00

◆ ~MidiValidator()

MidiValidator::~MidiValidator ( )

Release the checker.

Ghidra address:
NTSC-U/C: 0x0033cd90
Ghidra address:
PAL: 0x003aa2c8

Member Function Documentation

◆ Check()

void MidiValidator::Check ( int nTick,
unsigned char nStatus,
unsigned char nData1,
unsigned char nData2 )

Check one channel message.

Parameters
nTickThe tick.
nStatusThe status byte.
nData1The first data byte.
nData2The second data byte.
Ghidra address:
NTSC-U/C: 0x0027e340
Ghidra address:
PAL: 0x00287c58

Member Data Documentation

◆ kNone

int MidiValidator::kNone = -1
staticconstexpr

The value of the channel and tick members before one is known.


The documentation for this class was generated from the following file: