[Song] is a .chart file’s first section. It gives the chart’s resolution, and may repeat metadata from song.ini, such as the song’s name and artist:
Resolution
Resolution is the number of ticks in a beat. Required: one Resolution line, whose value is a whole number from 1 up, written in digits without quotation marks.
Metadata
song.ini holds the song’s metadata. [Song] may repeat any of these keys:
- Text is written in quotation marks:
Name = "Song Name". - Times are written in seconds, as digits with an optional
-before them and an optional decimal part, without quotation marks:PreviewStart = 45.5. Required: this form. Recommended: at most three decimals. - Required: a
Namethat is the song’s title, notTEMPO TRACKormidi_export, which some converters wrote in its place.
PreviewStart = 1.001 is 1,002 milliseconds in Clone Hero and 1,000 in YARG. The song.ini keys hold milliseconds, so they’re exact.
Edge case: Year after , . Older charts, and charts Moonscraper saves, write Year = ", 2002": the comma made the year look better in Guitar Hero III. A scanner removes a leading , , so it means the same as Year = "2002". YARG also removes a leading , without the space. scan-chart’s exporter writes Year without the , . When it saves an edited song, it keeps an existing line’s form.
Edge case: PreviewEnd = 0. It means there’s no preview end: a preview can’t end at the start of the song. Moonscraper writes it in every chart.
[Song] and song.ini
A song folder holds asong.ini file. See Files in a song folder. Required: when both [Song] and song.ini set a key from the table, the same value in both. Times are compared in milliseconds, and Year without its leading , .
A scanner reads the metadata from song.ini:
- It takes the name, artist, album, genre, year and charter from
song.inialone, even whensong.inileaves one of them out. - It takes
Offset,PreviewStartandPreviewEndfrom[Song]only whensong.inidoesn’t setdelay,preview_start_timeorpreview_end_time. Adelayof 0 and apreview_end_timeof 0 count as not set. - It may ignore
Difficulty, as Clone Hero and scan-chart do. YARG takes it asdiff_bandwhensong.inidoesn’t setdiff_band, or sets it to 0.
Deprecated
- An
Offsetother than 0. Line the notes up with the tempo map and the audio’s leading silence instead. A scanner still appliesOffset, but only whensong.inidoesn’t setdelay.
Ignored
A scanner ignores every other key. An exporter may keep them as written. Older chart editors wrote some of them:- Audio file names, such as
MusicStreamandGuitarStream. Games find the audio by file name instead. See Audio. A new chart leaves them out: a chart editor keeps a charter’s choice of audio file in its own settings. Moonscraper still finds a.chart’s audio only through these keys. Player2,MediaTypeand others, which no game reads.
Invalid forms
No Resolution
No Resolution
A scanner reads a file with no
[Song] section, or no Resolution in it, with a resolution of 192. scan-chart’s saving adds Resolution = 192.A Resolution that isn't a whole number from 1 up, in digits
A Resolution that isn't a whole number from 1 up, in digits
A scanner reads the value’s leading digits, so
Resolution = 480.5 reads as 480. YARG’s chart loader reads every character as a digit, so Resolution = 192.5 is 19185 there. A scanner refuses a file whose Resolution doesn’t start with a digit, or is 0.A Resolution in quotation marks
A Resolution in quotation marks
A scanner removes the quotation marks, so
Resolution = "480" reads as 480. YARG’s song list reads a quoted value as 0, and doesn’t list the song. scan-chart saves the line as it is.Resolution written more than once
Resolution written more than once
A scanner uses the last one, as Clone Hero, scan-chart and YARG’s song list do. YARG’s chart loader uses the first.
A key written more than once
A key written more than once
A scanner uses the first line of the key that has a value. YARG’s song list uses the last line, even an empty one.
A time in another form, such as Offset = 1e-1 or Offset = "0.1"
A time in another form, such as Offset = 1e-1 or Offset = "0.1"
Clone Hero and scan-chart read an exponent, a
+ and quotation marks around the number, so both of these are 0.1 seconds. YARG reads only a sign, digits and a decimal point, so it reads 1e-1 as 1 second, and a quoted time as 0. A decimal comma, such as Offset = 0,1, gives no time in Clone Hero and scan-chart. scan-chart saves the line as it is. See Nonstandard files.No song.ini
No song.ini
A scanner takes the metadata from the keys of the table in
[Song], except Length, and may ignore Difficulty: scan-chart reads it as diff_band, and Clone Hero ignores it. YARG doesn’t list the song. See Files in a song folder.[Song] and song.ini giving different values
[Song] and song.ini giving different values
A scanner uses
song.ini, as described above. When scan-chart saves an edited song, [Song] takes song.ini’s values. A key that only [Song] sets is removed from it, except Offset, PreviewStart and PreviewEnd, which are copied into song.ini, since scanners read them when song.ini doesn’t set them.Name = "TEMPO TRACK" or Name = "midi_export"
Name = "TEMPO TRACK" or Name = "midi_export"
Some converters wrote these instead of the song’s name. A scanner ignores that line and every metadata line after it, as Clone Hero and scan-chart do. Clone Hero doesn’t list such a song when its folder has no
song.ini. YARG reads the line as the song’s name. scan-chart saves the section as it is.