Skip to main content

Topic: What are common cue sheet errors (Read 4486 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • klonuo
  • [*][*][*][*]
What are common cue sheet errors
I'm doing a little "project" of mine, and wanted to be able to tell if cue sheet is valid or not. Just regular compliant simple cue sheets.
I wasn't able to find any tool that would validate cue sheet, except of course audio player that supports cue sheets

So in a lack of command line validator, what are common mistakes in cue sheets, except presence of referenced file name?

  • slks
  • [*][*][*][*]
What are common cue sheet errors
Reply #1
I don't think errors are common at all, any type of error. Cue sheets get generated by software, so unless there's a bug in the software causing to to generate the cue wrongly, errors shouldn't occur ever.

The only time a "mistake" could get into a .cue is if it was typed up by hand - Why would anyone do that?

  • klonuo
  • [*][*][*][*]
What are common cue sheet errors
Reply #2
Doesn't matter how cue sheets got bad - could be tempered by hand, HD corruption, transfer problem... anything imaginable. I'm just looking for a way to validate it - to issue *this is valid cue sheet*

Searching previously HA, majority or cue sheet error reports are about non-compliant cue sheet and foobar > 0.9 not being able to parse
There may be issues with character encodings
...

Checking that TRACK is matched with following INDEX 01 is obvious

Done all that in bash script, and looking for more

I guess I'll have to look at some source code how players parse cue sheets, and try similar procedure

  • mjb2006
  • [*][*][*][*][*]
What are common cue sheet errors
Reply #3
The only time a "mistake" could get into a .cue is if it was typed up by hand - Why would anyone do that?
I rip vinyl and sometimes manually author cue sheets so these rips can be burned to CD with gaps/indexes, where appropriate. It's possible to enter cue points in a wave editor-type interface, but if I'm going to have to edit the cue sheet to add metadata, I figure why not just write it all by hand. The syntax is not very complicated. Behold:

Code: [Select]
REM COMMENT This manually edited cue sheet is non-compliant (EAC-style) because gaps are in the preceding track's file.
REM COMMENT Track divisions correspond to bands visible on the vinyl. Indexes are based on sonic content.
REM DATE 1991
PERFORMER "C-Schulz"
TITLE "10. Hose Horn"
FILE "[A01] C-Schulz - Reis.wav" WAVE
  TRACK 01 AUDIO
   TITLE "Reis"
   PERFORMER "C-Schulz"
   REM COMMENT Track A01 layout=======================================================================================
   REM COMMENT  0:00:00 main song
   REM COMMENT 10:29:08 pause with audible print-through
   REM COMMENT 10:31:16 1st unbanded, unlisted interlude
   REM COMMENT 10:50:25 pause with audible print-through
   REM COMMENT 10:52:32 2nd unbanded, unlisted interlude
   REM COMMENT 11:01:43 pause
   REM COMMENT We could give the interludes their own indexes, but then what to do with the pauses before each one?
   REM COMMENT Give the pauses their own indexes, too? Aren't the non-zero indexes supposed to be for non-pauses?
   REM COMMENT I guess just make the interludes and the pause before them be index 02. *shrug*
   REM COMMENT ====================================================================================================
===
   INDEX 01 00:00:00
   INDEX 02 10:29:08
  TRACK 02 AUDIO
   TITLE "Meister"
   PERFORMER "C-Schulz"
   INDEX 00 11:01:43
FILE "[A02] C-Schulz - Meister.wav" WAVE
   INDEX 01 00:00:00
FILE "[B01] C-Schulz - Ein.wav" WAVE
  TRACK 03 AUDIO
   TITLE "Ein"
   PERFORMER "C-Schulz"
   PREGAP 00:04:00
   INDEX 01 00:00:00
FILE "[B02] C-Schulz - Klang.wav" WAVE
  TRACK 04 AUDIO
   TITLE "Klang"
   PERFORMER "C-Schulz"
   INDEX 01 00:00:00
FILE "[B03] C-Schulz - Glockenspiel.wav" WAVE
  TRACK 05 AUDIO
   TITLE "Glockenspiel"
   PERFORMER "C-Schulz"
   INDEX 01 00:00:00
FILE "[B04] C-Schulz - Tri-Top.wav" WAVE
  TRACK 06 AUDIO
   TITLE "Tri-Top"
   PERFORMER "C-Schulz"
   INDEX 01 00:00:00
FILE "[B05] C-Schulz - Barbapapa.wav" WAVE
  TRACK 07 AUDIO
   TITLE "Barbapapa"
   PERFORMER "C-Schulz"
   INDEX 01 00:00:00
  TRACK 08 AUDIO
   TITLE "1972"
   PERFORMER "C-Schulz"
   INDEX 00 04:05:69
FILE "[B06] C-Schulz - 1972.wav" WAVE
   INDEX 01 00:00:00
  TRACK 09 AUDIO
   TITLE "KreuzChor"
   PERFORMER "C-Schulz"
   INDEX 00 01:05:43
FILE "[B07] C-Schulz - KreuzChor.wav" WAVE
   INDEX 01 00:00:00
  TRACK 10 AUDIO
   TITLE "Star"
   PERFORMER "C-Schulz"
   INDEX 00 01:29:08
FILE "[B08] C-Schulz - Star.wav" WAVE
   INDEX 01 00:00:00
FILE "[B09] C-Schulz - Nr.5.wav" WAVE
  TRACK 11 AUDIO
   TITLE "Nr.5"
   PERFORMER "C-Schulz"
   INDEX 01 00:00:00
FILE "[B10] C-Schulz - Kurze Flitze.wav" WAVE
  TRACK 12 AUDIO
   TITLE "Kurze Flitze"
   PERFORMER "C-Schulz"
   INDEX 01 00:00:00
  TRACK 13 AUDIO
   TITLE "Aus"
   PERFORMER "C-Schulz"
   INDEX 00 01:40:17
FILE "[B11] C-Schulz - Aus.wav" WAVE
   INDEX 01 00:00:00

Mistakes can be introduced when editing machine-generated cue sheets. There are many reasons to edit cue sheets, such as:
  • Fixing problems in existing cue sheets (like inaccurate track boundaries)
  • Creating track boundaries where there were none (like for a 1-track DJ mix or live CD)
  • Converting indexes to tracks (or vice-versa)
  • Combining cue sheets
  • Editing or adding metadata (e.g. removing quotation marks)
  • Adding info that wasn't able to be scanned for at rip time
  • Removing a data track (e.g. the cue sheet refers to the data track, but the track wasn't ripped)
  • Removing a Unicode BOM (to help apps that don't recognize it)

A few mistakes to watch for:
  • First index for a given track not 00:00:00 (even though in theory this should be OK)
  • unclosed quotation marks (quote mark count on a line must be even, nothing after the last quote)
  • tracks out of sequence (first track must be 01, next 02, next 03, etc.)
  • indexes out of sequence (first must be 00 or 01...)
  • track or index out of range (must be 00 to 99)
  • index times in wrong format (must be MM:SS:FF, SS must be 00 to 59, FF must be 00 to 74)
  • PREGAP and INDEX 00 both given for a track
  • unrecognized instruction (line starts with unknown keyword)

Questionable circumstances (what's correct is unclear, maybe issue a warning):
  • quotation marks in the metadata or comments (maybe not allowed)
  • non-CRLF line breaks (no rule, but LF or CR only isn't universally compatible)
  • non-compliant (TRACK changes before next FILE: not allowed, but no other way to handle ordinary file-per track rips)
  • non-ASCII, non-CRLF characters in non-UTF-8 document (no rule, but UTF-8 is de facto standard)
  • Unicode BOM present (it helps identify encoding, but isn't universally supported)
  • blank lines (no rule, I think)

Those are just off the top of my head
  • Last Edit: 02 March, 2012, 06:41:15 AM by mjb2006

  • klonuo
  • [*][*][*][*]
What are common cue sheet errors
Reply #4
Thank you mjb2006, your post is what I wished to get
It will keep me busy for some time, and when I get confident enough with the procedure, I'll post my results

Cheers

  • klonuo
  • [*][*][*][*]
What are common cue sheet errors
Reply #5
Here is one try: https://github.com/klonuo/bash-cue-validator

Includes test script and applied (Nautilus thumbnailer) script.
I understand that this should have be done in Python or similar more universal and easier approach, but wanted to try hard luck with bash, nonetheless
Please try it if you can, and comment
  • Last Edit: 03 March, 2012, 07:25:54 PM by klonuo

  • Porcus
  • [*][*][*][*][*]
What are common cue sheet errors
Reply #6
The only time a "mistake" could get into a .cue is if it was typed up by hand - Why would anyone do that?


When a CD is technically an entire track, but in reality has lots of songs? Like http://www.hydrogenaudio.org/forums/index....showtopic=93154 ...

  • klonuo
  • [*][*][*][*]
What are common cue sheet errors
Reply #7
... and on attached screenshots on github, first cuesheet with invalid referenced file was created by foobar under wine - "Boris Kova─Ź..." mp3 file was created and in the accompanied cuesheet it was referenced as "Boris Kovac...", by foobar converter
  • Last Edit: 04 March, 2012, 08:43:51 PM by klonuo