XF Format Specifications 2.01 (1999)
XF Format Specifications 2.01 (1999)
V 2.01
January 13, 1999
Contents
§1 Outline of the format............................................................................................. 3
4. XF Karaoke Message....................................................................................... 16
Yamaha will continue to develop and market electronic musical instruments and software that
uses the “XF format,” and will endeavor to maintain data compatibility and scalability between
Yamaha models.
<Background of development>
MIDI is being used in a wide variety of fields other than musical instruments, such as commu-
nications and computer games. A sequencer is required in order to edit or playback a song
using MIDI. However sequencer file formats differed between manufacturers and models, and
could not be used compatibly. In 1988, the American MMA (MIDI Manufacturers Association)
proposed a “Standard MIDI File” (SMF) format in order to unify sequencer file formats, and in
1991 the MIDI association adopted this as an RP (Recommended Practice). This meant that
files could be exchanged between SMF-compatible sequencers. The number of MIDI users grew
dramatically, and the variety of SMF-compatible software is also increasing. However, since the
principle objective of SMF is playback of MIDI data, it provides only a minimal definition, and
does not define song lyric data or score data, etc. Thus, there is an increasing need for expan-
sion to meet these requirements.
In the area of computer-based multimedia, sound and video are receiving greater attention.
Similarly to the progress in image compression being made in the field of video, developments
are taking place in multimedia sound and music handling as well. At present, there are two
approaches to the handling of multimedia sound. One method is for the software to digitally
store the sound data, and play it back continually. The second method is to have the software
supply control data that makes the computer's tone generator produce sound. The first
method offers realistic sound, but requires immense quantities of data and does not allow the
performance or voices to be changed freely. The second method requires less data and allows
voices and tempo etc. to be changed freely, and is therefore suitable for interactive multimedia
such as repetitive game music or karaoke. MIDI-based applications are typical of this second
type of approach. This is the background out of which arises the need for a compatible
sequencer file format with expanded capabilities. To respond to these needs, Yamaha proposes
the “XF format” — the next-generation sequencer file format.
<Basic concepts>
“XF” is a new format which includes the flexibility and compatibility that made SMF a success-
ful format, and goes on to provide even greater expressive power and flexible scalability, as well
as data continuity.
1. Compatibility
“XF format” compatible song data can be used on any “XF format” compatible
sequencer.
2. Scalability
Since the “XF format” is based on SMF, the basic aspects of MIDI such as perfor-
mance data are supported by SMF, and extensions can be freely supported by
sequencer or other processing device.
3. Expandability
The “XF format” will be flexibly extended in line with future product development.
<Extensions to SMF>
• An “XF Information Header” has been defined and added to list features/attributes of the
song.
• The “Lyric Meta-Event” which was loosely defined by SMF has been defined in detail.
• The addition of “XF Karaoke Message,” a special banner sequence data type targeted at
karaoke applications etc., and defined based on the Lyrics meta event and Cue Point meta-
event.
<Data structure>
The data structure of the XF format is based on the data structure of SMF.
Events that are newly defined by the XF format use SMF meta-events.
This means that the XF format can accommodate lyric data and karaoke data while preserving
the SMF data structure.
Several chunks are defined as additions. By using added chunks, the data structure is made
functionally cleaner.
Examples of the added chunks are shown below.
The XF Information Header chunk is a cluster of data that begins with the symbol “XFIH.”
Characteristics and attributes of the song are placed here.
The XF Karaoke Message chunk is a cluster of data that begins with the symbol “XFKM.” Lyr-
ics and screen wipe data etc. are placed here.
If the XF Information Header chunk is divided into a separate file, it uses a filename extension
of “.XIH”
If the XF Karaoke Message chunk is divided into a separate file, it uses a filename extension of
“.XKM”
§2 MIDI Specifications
4) XF Version ID
Uses the SMF-defined meta-event Sequencer-Specific Meta-Event
ID that shows the XF format version
5) XF Lyrics Header
Uses the SMF-defined meta-event Cue Point
Data for subsequent lyric meta-events
Example:
Song name “After Hours Club”
FF 03 10 41 66 74 65 72 20 48 6F 75 72 73 20 43 6C 75 62
FF 58 04 nn dd cc bb Time Signature
nn: numerator
dd: denominator
Indicates the power of two to which the denominator
corresponds. A value of 2 is quarter note, and a value of
3 is eighth note.
cc: number of MIDI clocks in a metronome click
The number of MIDI timing clocks (24 tpqn) in one
count of the metronome. In this example, the metro-
nome would sound every quarter note.
bb: number of notated 32nd-notes in a MIDI quarter-note
Indicates the number of notated 32nd notes that corre-
spond to one MIDI quarter note.
Example:
4/4 time signature
FF 58 04 04 02 18 08
FF 51 03 tt tt tt Set Tempo
tt tt tt:microseconds per MIDI quarter-note
µ (micro) seconds / MIDI quarter note
Example:
120bpm
FF 51 03 07 A1 20 60,000,000 µ seconds / 120 = 500,000
(7 × 256 × 256) + ((10 × 16 + 1) × 256) + (2 × 16) = 500,000
FF 7F 09 43 7B 00 58 46 30 32 s1 s0
FF 07 len <text>
‘$Lyrc’
XF Lyrics Header ID
An ID indicating that this is a XF Lyrics Header
Indicates that subsequent lyric meta-events are XF format compatible.
‘l’ l:Language
Language (character code data)
Data that specifies the character code system used for the lyrics.
Use the symbols given in “Appendix A. Character codes.”
If the character code listed in the Language field cannot be handled, lyric
meta-events need not be displayed.
Example: XF lyric header when the MIDI channels of the melody are ch.4 and ch.12,
the offset value is 240/480 tpqn, and the language of the lyrics is Japa-
nese
FF 07 len <$Lyrc:4,12:240:JP>
2. XF Information Header
• Information on the features/attributes of the song is specified in the form of a text meta-
event. This is used for searching/classifying songs.
• The information header can be given in the following three ways, and handling is up to the
processing system.
1) Specified as a meta-event within the SMF track chunk.
2) Specified in meta-event format, in a separate chunk following the track chunk.
Chunk type: ‘XFIH’
Data length: 4 bytes
<XFIH Event> = <delta-time> <Meta Event>
3) Specified with the chunk of 2) placed in a separate file.
The contents of the file are identical to chunk 2).
DOS filename extension: ‘.XIH’
Mac file type: ‘XFIH’
If two or more of these exist, they will take priority in the order of 3), 2), 1).
FF 01 len <text>
Data items
1) XF Information Header —Common — ID
An ID (4 characters) indicating that this is the XF Information Header —
Common “XFhd”
5) Beat
English text indicating the beat of the rhythm of the original song or the
song data.
Select from the following.
2 Beat, 2 Beat(March),
3 Beat, Waltz, Waltz(Swing), Other 3/4,
4 Beat, 4 Beat(Swing), Other 4/4,
6 Beat, 12/8(6/8),
8 Beat,
12 Beat,
16 Beat,
24 Beat,
Shuffle(Bounce), Other(Even), Other(NonEven),
Others
7) Vocal Type
This indicates the gender and number of the person(s) playing or singing the
original song.
Select from the following.
f1: Female Solo
m1: Male Solo
fm: Female & Male (male/female duet, or male/female mixed),
fp: Female Chorus,
mp: Male Chorus,
no: Instrumental (no vocal)
8) Composer
The name of the composer of the original song is given in alphabetical char-
acters.
List in the order of Given Name and Family Name.
Separate the given and family names with a space.
A middle name may also be input.
If there are two or more names, separate them with a slash “/”.
Example: Jake Ryan
9) Lyricist
If the original song has lyrics, the name of the lyricist.
The format is the same as for Composer.
10) Arranger
The name of the person who arranged the original song or song data.
The format is the same as for Composer.
12) Programmer
The name of the person who produced the music data.
The format is the same as for Composer.
13) Keyword
Input keywords chosen from Appendix D.
One or more may be input.
Use a slash “/” to separate multiple entries.
Example: movie/Love Song/Tears
Data items
1) XF Information Header — Language Specific — ID
An ID (4 characters) indicating that this is the XF Information Header —
Language Specific. “XFln”
2) Language
Data that specifies the character code system used in the XF information
header (language specific).
This does not specify the character code system used for the lyrics. The
character code system for the lyrics is specified by the XF lyric header.
Nor does this specify the country in which the song data was produced.
Use the symbols given in “Appendix A. Character codes.”
3) Song Name
The language-specific display of the song name.
If you wish to display the song name over two or more lines, insert a slash
“/” at the desired line return locations.
Example: This is my song./This is your song.
Display : This is my song.
This is your song.
If the processing system displays the song, it must interpret control charac-
ters as in the above example.
4) Composer
The name of the composer of the original song.
Separate the first name and last name with a single-byte space “ ”.
If there are two or more names, separate them with a single-byte slash “/”.
Example: Jake Ryan/Lydia Diaz
5) Lyricist
If the original song has lyrics, this is the name of the lyricist.
The format is the same as for the Composer.
6) Arranger
The name of the person who arranged the original song or the song data.
The format is the same as for the Composer.
7) Performer (performer/singer)
The name of the person or group performing or singing the original song.
The format is the same as for the Composer.
8) Programmer
The name of the person who produced the song data.
The format is the same as for the Composer.
Example: An American song published on September 28, 1994, where
the genre is Pops, the beat is 8Beat, the melody played in the
song data is by a sax, solo vocals are by a female, composed
by Jake Ryan, lyrics by Kerry Williams, no arranger, per-
formed and sung by Lydia Diaz, song data produced by Joe
Moore and titled "Happy Sunday" would have the following
header.
3. Lyric Meta-Event
• This defines the use of the Lyrics meta-event within the track chunk which had not been
defined in detail by the SMF format.
• This is compatible with the Standard MIDI Files with Lyrics specification of the TUNE1000
Corp. (Canada).
• This is compatible with the “Proposal about Lyric Meta Events in Standard MIDI Files” by
the Association of Musical Electronics Industry (AMEI).
<Syllable>
• The SMF-defined Lyric meta-event is used.
• Each syllable is a single Lyric meta-event.
• Add a single-byte space “ ” after the last syllable of a word.
• Add a single-byte space “ ” after the punctuation mark of the last syllable that has a
punctuation mark.
FF 05 len <text>
Example: FF 05 len <This >
FF 05 len <is >
FF 05 len <an >
FF 05 len <ex>
FF 05 len <am>
FF 05 len <ple. >
FF 05 01 0D
FF 05 01 0A
Control characters
• Lyric data may include control characters to perform various types of pro-
cessing.
• ASCII (single-byte) characters are used for control characters.
• If you wish to display the control character itself, prefix it with a single-byte
backslash “\”.
\r : Carriage Return(0D)
\n : New Line (Line Feed)(0A)
\t : Horizontal Tab (09)
\\ : ‘\’ itself
\{ : ‘{’ itself
\} : ‘}’ itself
\[ : ‘[’ itself
\] : ‘]’ itself
Tags
1) Character code information tag (Suggested Character Information Tag)
This is used to suggest the character code. This must be given at the begin-
ning of the Lyric meta-event. This data is valid until the next character code
data.
Application: {@<keyword>}
{@LATIN},{@Latin},{@latin} G@default
Indicates the ANSI character code set for most European languages.
If the character code is not specified, the lyrics will be handled as {@LATIN}.
If the character code given by the character code data cannot be handled by
the processing system, display need not be performed until the arrival of
character code data that can be handled.
Item types:
3) Null Tag
Usage: @{#}
4. XF Karaoke Message
• This is special banner sequence data targeted for displaying banners such as for karaoke.
• Lyrics banner data can be “wiped” in synchronization with the song.
• Karaoke messages can be broadly divided into lyrics data and control cue data.
• Karaoke messages can be given in the following three ways, and handling is up to the pro-
cessing system.
1) Specified as a meta-event within the track chunk.
2) Specified in meta-event format, in a separate chunk following the track chunk.
Chunk type: XFKM
Data length specifier: 4 bytes
<XFKM Event> = <delta-time> <Meta Event>
3) Specified with the chunk of 2) placed in a separate file.
The contents of the file are identical to chunk 2).
DOS filename extension: .XKM
Mac file type: XFKM
If two or more of these exist, they will take priority in the order of 3), 2), 1).
<Lyrics data>
• This defines the specifications of the lyrics information of a song, and provides suffi-
cient data to create lyric sheets and karaoke applications, etc.
Lyrics
• The Lyric meta-event defined by SMF is used without change as the data for-
mat.
• For the character code that is used, refer to “Appendix A. Character codes.”
• The character code that is used is specified within the XF Lyric header that
precedes the lyric events. For details refer to 1. Contents at the beginning of
the track chunk.
• It is desirable that the timing data of the lyrics events have the same value as
the notes of the melody. However as long as major discrepancies do not occur
in the wipe/display timing, this can move forward or backward.
FF 05 len <Text>
Control characters
Lyrics data can include control characters for performing various types of con-
trol.
ASCII (single-byte) is used for control characters.
If you wish to display the control character itself with the lyrics, prefix it with a
single-byte backslash “\” control character.
FF 05 len <text>
1) “^” Space
This is used in place of a space (blank code).
The width of spacing is left up to the display system.
Example:
Wind|blows|through|the|trees^|The|moon|bounces|off|the|water|
Display output
Wind blows through the trees The moon bounces off the water
Display output
If music be the food of love,
play on.
If the note corresponding to the character string that precedes the carriage
return has a long note value, it is desirable to insert the carriage return as an
independent Lyric meta-event at the key-off timing, so that when using a “wipe”
you can adjust the timing at which the wipe ends.
Example:
So it goes (the note “goes” has a long duration)
× |So |it |goes/|
|So |it |goes|/|
Display output
Shall I compare thee to a summer’s day?
Nay, thou art fairer
Add the page break to the beginning of the character string that you wish to dis-
play as the first line.
Example:
× |<|Shall |I |compare |thee |to |a |summer’s |day?|
|<Shall |I |compare |thee |to |a |summer’s |day?|
5) “>” Tab
This indicates a horizontal tab.
The width of the spacing produced by the tab is left up to the display system.
A tab can be input only at the beginning of a line.
Example:
|<Shall |I |compare |thee/|>To |a |summer’s |day?|
Display output
Shall I compare thee
To a summer’s day?
6) “\” Backslash
“\” backslash causes the following single-byte ASCII character to lose its func-
tion as a control character, and be treated as a displayed character.
Prefix a backslash to a control character when you wish to display that control
character itself within the lyrics.
<Cue data>
• The following text data adds various functionality to the processing system.
• These use the SMF-defined meta-event Cue Point.
• These are written in ASCII.
FF 07 len <Text>
1) XF Lyrics Header
Information on the subsequent Lyrics meta-events.
For details refer to 1. Contents at the beginning of the track chunk.
Example:
FF 07 len <$Lyrc:4,12:240:US>
5. Style Messages
• These are used to define chords, styles, and style sections etc.
• These are specified in the form of Sequencer-Specific meta-events.
• The addition of Style Messages to the XF format shall be considered as XF format version 2.0
[Key Signature]
• The SMF Key Signature meta-event is used for key signature data.
[Chord Name]
• Specify the chord name.
FF 7F 07 43 7B 01 cr ct bn bt Chord Name
ct Chord type 0 - 34
00000000 00 0 Maj
00000001 01 1 Maj6
00000010 02 2 Maj7
00000011 03 3 Maj7(#11)
00000100 04 4 Maj(9)
00000101 05 5 Maj7(9)
00000110 06 6 Maj6(9)
00000111 07 7 aug
00001000 08 8 min
00001001 09 9 min6
00001010 0A 10 min7
00001011 0B 11 min7b5
00001100 0C 12 min(9)
00001101 0D 13 min7(9)
00001110 0E 14 min7(11)
00001111 0F 15 minMaj7
00010000 10 16 minMaj7(9)
00010001 11 17 dim
00010010 12 18 dim7
00010011 13 19 7th
00010100 14 20 7sus4
00010101 15 21 7b5
00010110 16 22 7(9)
00010111 17 23 7(#11)
00011000 18 24 7(13)
00011001 19 25 7(b9)
00011010 1A 26 7(b13)
00011011 1B 27 7(#9)
00011100 1C 28 Maj7aug
00011101 1D 29 7aug
00011110 1E 30 1+8
00011111 1F 31 1+5
00100000 20 32 sus4
00100001 21 33 1+2+5
00100010 22 34 cc
[Rehearsal Mark]
FF 7F 04 43 7B 02 rr Rehearsal Mark
[Phrase mark]
FF 7F 05 43 7B 03 xx yy Phrase mark
bit6(h)
0:Right, 1:Left right hand / left hand
bit5(f)
0:CH enabled, 1:CH disabled Channel disabling flag
Enabled/disabled condition of the bit 4-0 channel data
For a phrase common to all channels, this is 1
bit4-0(ccccc)
CH(0:1ch - 31:32ch) Channel data for which the phrase mark is valid
0: Reserved
1: Level 1 (guide phrase level)
2: Level 2
:
8: Level 8 (DOC phrase level)
:
Input a number that is one less than the number of Level 8 phrase marks you input.
• Use this event to specify the channel(s) that contain the melody.
FF 7F len 43 7B 10 xx pp kk aa bb cc dd ee ff .......
pp Applicable part
0: Guitar
1: Bass
2: Ukulele
Other: Reserve
0 - 24
0: Open string
127: Unplayed string
0 - 24
0: Open string
127: Unplayed string
[Fingering Number]
FF 7F 06 43 7B 05 cc nn ff Fingering Number
The following table defines the symbols used to specify the character code used in the XG
information header or in lyric data.
Symbol: Symbols used as data items in the XF information header or XG lyric header to
specify the character conversion code.
Character conversion code: Character conversion code indicated by “Symbols.”
Supported languages: Languages that can be expressed using the applicable character
conversion code.
The following two-character codes are used to indicate the “Country of production” data item in
the XF information header (common).
The following words shall be used to indicate the “Song genre (Category)” data item in the XF
information header (common).
The following words shall be used to specify the “Song keyword (Keyword)” data item in the XF
information header (common).
---------------------------
movie
TV
Dramatic
Love song
Old Familiar Melody
Contemporary
Ballad
Calm
Rhythmical
Cheerful
Joy
Humorous
Sad
Scary
Horror
Dangerous
High-spirited
Grand
Epic
Passionate
Intense
Surprise
Cool
Serious
Good mood
Mysterious
Ethnic
Friends
Love
Wedding
Parting
Lost Love
One-sided Love
Tears
Liquor
Dream
Natural
Sea
Sky
Spring
Summer
Autumn
Winter
Snow
Rain
Christmas
---------------------------
FF 7F 0D 43 7B 7F c1 c2 c3 c4 c5 c6 c7 c8 v1 v2