Step 4 Functionality of XG Checker
XG Checker has the following functions.
** Checking functions
1. Maximum simultaneous notes
Locations where more than the specified number of notes (normally 32 notes) are sounding will be checked
2. Multiple notes
Locations where identical notes overlap in the same channel will be checked
3. XG initialization
The data will be checked to see whether the XG tone generator initialization message "F0 43 10 4C 00 00 7E 00 F7" is being used correctly
4. Note-on and Note-off ranges
Note events will be checked to see whether they are within the normally used range of note numbers (21-108).
5. Timbres
Bank Select MSB, Bank Select LSB, and Program Change messages will be checked to see whether the sounds are specified by XG
6. Parameter changes
Parameter changes (various types of SysEx) will be checked to see whether they are being used correctly.
7. Data traffic
The spacing of MIDI events will be checked to see whether they are more densely packed than a specified value
8. Control changes
The use of control changes will be checked for appropriateness
9. XF messages
The use of XF-related events will be checked for appropriateness
10. Low velocity
Notes with a velocity below a specified value will be detected
11. Pitch bend
The use of pitch bend will be checked for appropriateness
12. Pressure data
Poly/mono aftertouch data (the use of which the XG format prohibits) will be detected
13. Multiple control events
Errors in which multiple values of the identical control change exist at the same timing in the same channel will be detected
14. Short durations
Notes with durations (gate times) shorter than a specified value will be detected
15. Other
The use of meta events such as time signature, tempo, key signature, text etc. will be checked for correct usage
**Correction functions
1. Multiple Notes
If multiple note messages of the identical note number exist at the identical timing, the last one will be preserved, and the others will be deleted.
* Multiple events located at the same timing are not internally sorted in the file, so the last-occurring one will kept.
* This correction is carried out mechanically, so in some cases the results may not be what you expect.

2. Control On Same Tick
If multiple control changes of the identical number exist at the identical timing,




the last one will be preserved, and the others will be deleted (figure 5).


Figure 5

* Multiple events located at the same timing are not internally sorted in the file, so the last-occurring one will kept.
* This correction is carried out mechanically, so in some cases the results may not be what you expect.


3. Control + Note On
If note-on and control change events exist at the identical timing, the control change will be moved one tick toward the beginning of the song (figure 6).


control change and notes are in the same timing


Figure 6

* This correction is carried out mechanically, so in some cases the results may not be what you expect.
* This measure prevents the disordering of internal event processing order which can occur on many sequencers when reading or writing SMF data.

4. SysEx. Device Number
For any SysEx data with a device number other than 1 (i.e., cases of F0 43 1n 4C... where "n" is not 0), the device number will be forcibly set to 1.
5. MIDI Master Volume
If the master volume messages used to fade in or fade out are XG messages (F0 43 10 4C 00 00 04 mm F7), they will be replaced with the universal realtime message Master Volume.
* This measure is taken in consideration of playback on GM sound modules etc. If redundant End Of Exclusive (F7) bytes are found, the extra F7 bytes will be deleted.
6. End Of Exclusive
If redundant End Of Exclusive (F7) bytes are found, the extra F7 bytes will be deleted.


The file which has been corrected in this way will automatically be written as a separate file, without changing the original MIDI file in any way.