IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
What are common cue sheet errors, Is there any validator?
klonuo
post Mar 1 2012, 22:31
Post #1





Group: Members
Posts: 256
Joined: 29-April 10
Member No.: 80274



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?
Go to the top of the page
+Quote Post
slks
post Mar 2 2012, 11:11
Post #2





Group: Members
Posts: 349
Joined: 31-March 06
From: Houston, Texas
Member No.: 29046



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?


--------------------
http://www.last.fm/user/sls/
Go to the top of the page
+Quote Post
klonuo
post Mar 2 2012, 11:49
Post #3





Group: Members
Posts: 256
Joined: 29-April 10
Member No.: 80274



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 happy.gif

I guess I'll have to look at some source code how players parse cue sheets, and try similar procedure
Go to the top of the page
+Quote Post
mjb2006
post Mar 2 2012, 12:40
Post #4





Group: Members
Posts: 581
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



QUOTE (slks @ Mar 2 2012, 03:11) *
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
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 smile.gif

This post has been edited by mjb2006: Mar 2 2012, 12:41
Go to the top of the page
+Quote Post
klonuo
post Mar 2 2012, 13:06
Post #5





Group: Members
Posts: 256
Joined: 29-April 10
Member No.: 80274



Thank you mjb2006, your post is what I wished to get smile.gif
It will keep me busy for some time, and when I get confident enough with the procedure, I'll post my results

Cheers
Go to the top of the page
+Quote Post
klonuo
post Mar 4 2012, 01:25
Post #6





Group: Members
Posts: 256
Joined: 29-April 10
Member No.: 80274



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


This post has been edited by klonuo: Mar 4 2012, 01:25
Go to the top of the page
+Quote Post
Porcus
post Mar 4 2012, 23:39
Post #7





Group: Members
Posts: 1468
Joined: 30-November 06
Member No.: 38207



QUOTE (slks @ Mar 2 2012, 11:11) *
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 ...


--------------------
geocities.com/hydrogenaudio: http://goo.gl/tqYZj
Go to the top of the page
+Quote Post
klonuo
post Mar 5 2012, 02:42
Post #8





Group: Members
Posts: 256
Joined: 29-April 10
Member No.: 80274



... 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

This post has been edited by klonuo: Mar 5 2012, 02:43
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd May 2013 - 08:28