HydrogenAudio

CD-R and Audio Hardware => CD Hardware/Software => Topic started by: Zorlac on 2017-09-01 18:07:53

Title: CD Subcode & TOC Reader Software
Post by: Zorlac on 2017-09-01 18:07:53
I would like to find a tool that allows me to read the subcode and TOC on an audio CD. Does such a tool exist? If not, then does anyone know why? (e.g., Are there legal issues?)

I am looking to check things like pre-emphasis, HDCD, etc. on a track-by-track basis.

I have heard CUETools might have this functionality, but I cannot seem to find a guide/how-to.

Anyone heard of ISRCViewer?
Title: Re: CD Subcode & TOC Reader Software
Post by: Hotsoup on 2017-09-01 21:29:11
The CueRipper part of CUETools does. Simply start ripping the CD and watch the status bar. Once it's done analyzing, I abort the rip (chances are, I've already ripped it with dbpoweramp or foobar, so I don't need to do it over). Even though you abort the rip, it's created the cue sheet for you which will show pre-emphasis flags.
Title: Re: CD Subcode & TOC Reader Software
Post by: Zorlac on 2017-09-02 00:35:41
Does the cue sheet tell you what data is coming from the TOC vs the subcode?

Does it show all TOC and subcode data, or only certain items?
Title: Re: CD Subcode & TOC Reader Software
Post by: shaboo on 2017-09-02 07:46:25
Does the cue sheet tell you what data is coming from the TOC vs the subcode?

Does it show all TOC and subcode data?
No and no.

AFAIK, in contrast to pre-emphasis, HDCD encoding is nothing to be found in a CD's subcode, but only in the audio data part.
Title: Re: CD Subcode & TOC Reader Software
Post by: Porcus on 2017-09-02 17:47:51
HDCD on a track-by-track basis can cause lots of issues, some if you use software and some if you use a physical CD player:

You are vulnerable against jumping to tracks. If your DAC has received HDCD packets, it will decode HDCD for some (ten?) seconds after the last one. A non-HDCD track after a HDCD track could be decoded wrongly. This is a problem with compilation CDs thoughtlessly put together from HDCD and non-HDCD sources, but also if you in software switch between tracks from different CDs (you won't do that quick enough with a physical player!). However, software decoding should know what you are doing, even though a physical DAC cannot.

You are vulnerable against misplaced track boundaries. Case: a compilation again, but the trackmark is set a bit too early, so it starts with what should have been the last split second of the previous song - which has HDCD. Then HDCD will be on for some ten seconds. foo_hdcd has the option to put a "no" in the HDCD tag.

And you are vulnerable against jumping to tracks that were intended to be decoded as HDCD, but does not have HDCD flags for the first few seconds (while in continuous playback, the HDCD flag would still be on).
Title: Re: CD Subcode & TOC Reader Software
Post by: Zorlac on 2017-09-05 17:39:01
It really surprises me that there is not a tool that reads *all* subcode, TOC and audio data. I have heard of tools like hdcd.exe, CUETools, etc., but I would think easy to use apps like dBPowerAmp would have a button or log to show all subcode, one for TOC and one for audio data.

Is this just too hard? (obviously I am not a programmer)

Are there legal issues that prevent apps like dBPowerAmp from implementing such features?
Title: Re: CD Subcode & TOC Reader Software
Post by: Wombat on 2017-09-05 17:53:05
I just remembered (flashback) once wanted to have some info about the pre-emphasis on an old cd and used a tool named icedax under linux.
https://hydrogenaud.io/index.php/topic,76265.msg668270.html#msg668270
Title: Re: CD Subcode & TOC Reader Software
Post by: Porcus on 2017-09-05 19:24:47
Zorlac:  I agree that e.g. CUETools could easily produce a filename.subcode.cue and a filename.TOC.cue if they disagree. Now, IIRC:

* EAC removed some features out of fear of legal issues: http://wiki.hydrogenaud.io/index.php?title=Exact_Audio_Copy#cite_note-1

* I once asked about storing index points in the CUETools database, to which (deleloper) Gregory replied that detection isn't always reliable (https://hydrogenaud.io/index.php/topic,79882.msg934112.html#msg934112). Dunno what that means apart from the above defective-by-design thingies. Maybe it was because EAC is likely a way larger contributor to the CUETools database than CUERipper is.
(And, for all that I know: it need not be the CD. It could be the drive.)

* André (EAC developer) also points out that some subcode information is often wrong: https://groups.yahoo.com/neo/groups/EAC/conversations/messages/7463
(Again: for all that I know, it could be the drive.)

* cdda2wav has a feature to check both TOC and subcode and tell you inconsistencies. There are some. Some have wondered if cdda2wav's method is any good: https://hydrogenaud.io/index.php/topic,114278.0.html . 
(And for all that I know ... again. And it could even be doing things "technically correct but mostly useless" in the sense that when it matters, the errors are so that you will not get much help from the information.)

* CDs with inconsistencies for the Pre-emphasis flag include certain pressings of Pink Floyd's Dark Side of the Moon. IOW, it isn't limited to backyard pressing plants.

* HDCD and hdcd.exe has no place in this discussion. The HDCD flag is part of the signal itself, hidden in the dither. Thus, as long as you rip the CD to a lossless format, you can always retro-scan for HDCD.
Title: Re: CD Subcode & TOC Reader Software
Post by: itisljar on 2017-09-05 20:35:02
I vaguely remeber CD ripping software named PerfectRip which had something about subcodes, TOC and stuff like that... haven't used it, though, may be worth checking it out.
Title: Re: CD Subcode & TOC Reader Software
Post by: Porcus on 2017-09-06 00:48:08
http://perfectrip.cdfreaks.com/ .  (I never got that to work, actually.)
Title: Re: CD Subcode & TOC Reader Software
Post by: Zorlac on 2017-09-07 17:45:30
I am hoping we can get a comment from the devs of EAC, dBPowerAmp, etc.
I messaged them (thru their official channels), so we shall see.
Title: Re: CD Subcode & TOC Reader Software
Post by: Porcus on 2017-09-08 10:46:32
Zorlac:
I don't think André posts much here anymore, but he has indeed clarified why already.
From my experience here and at the dBpoweramp forum, Spoon will answer "how" dBp does it (though, that is already known, so you do not need more clarification?) - but not so much why he chose this or that solution.