bug with omitted sound when splitting from ape/cue

Discuss Max, an open source CD audio extractor and audio converter.
Post Reply
mattn
Posts: 154
Joined: Tue Sep 02, 2008 4:21 am

bug with omitted sound when splitting from ape/cue

Post by mattn » Sun Sep 07, 2008 12:55 am

I have some ape/cue file pairs representing complete CDs, which I have been converting to mp4 tracks using Max. So I choose File > Open, select the cue file, select all tracks, and convert. The music is continuous; the bug is that Max omits a little bit of sound at the end of each track, so that when the music is played back as individual tracks, there is a "jump" in the sound as we finish one track and start the next (playback is gapless, so clearly some sound is actually being omitted).

I experimented and found that it made no difference whether I split to, say, aiff files or to mp4 files; Max still makes the same mistake.

On the other hand, if I use XLD (a different program) to perform the split from ape/cue to individual wav tracks, there is no lost sound - the transition from one track to the next is inaudible (i.e. perfectly smooth and continuous), and when I convert those wav files to mp4 with Max, the resulting tracks are fine too.

Therefore I conclude that the bug is with Max's understanding of the cue file and how to use it to get the exact length of each track. The problem appears to be sheer rounding error when subtracting the start point of one track from the start point of the next. For example, a track that's a case in point comes out as exactly 4 minutes and 17 seconds when Max performs the split. But XLD says that the track should be 04:17:65 in length - (XLD appears to divide a second into 75 parts for some reason; perhaps this is because on a CD, 75 sectors = 1 second) - and indeed I can see that the file generated by XLD is indeed nearly a second longer. So I conclude that Max is throwing away the :65 (meaning 65 sectors, about .866 seconds) at the end. I can see and confirm this precise difference in a waveform editor.

The INDEX start values in the cue file for the given track and the next track are 34:43:20 and 39:01:10. Assuming that cue files, too, divide a second into 75 parts, that gives us exactly the 4:17:65 difference claimed by XLD. (20 + 65 is 85, which is one second [consisting of 75 sectors] with 10 sectors left over.) It looks as if, at the crucial moment, Max is just throwing the :65 away.

This is with Max 0.8.1 on an Intel Mac.

User avatar
sbooth
Site Admin
Posts: 2450
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: bug with omitted sound when splitting from ape/cue

Post by sbooth » Sun Sep 07, 2008 1:28 am

I will look into this ASAP. Thanks for letting me know.

Macman4hire
Posts: 8
Joined: Sun Jun 08, 2008 2:33 pm

Re: bug with omitted sound when splitting from ape/cue

Post by Macman4hire » Sun Sep 07, 2008 5:58 am

I have had a similar experience with problems cue sheets using Max(Intel Mac Pro). I can't us Max's cue sheets with XLD or XLD's in Max. The cue sheets in XLD work with EAC and Foobar2000 so I assumed the cue sheet produced on Max was some short of proprietary programing choosing not to use a standardized approach. I know this wrong now and hopefully this can be fixed.

User avatar
sbooth
Site Admin
Posts: 2450
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: bug with omitted sound when splitting from ape/cue

Post by sbooth » Sun Sep 07, 2008 7:10 am

The problem was with the way Max parses cue sheets- I've fixed it now.

The cue sheets that Max generates are not proprietary- they should work with any other program. What behavior have you seen?

mattn
Posts: 154
Joined: Tue Sep 02, 2008 4:21 am

Re: bug with omitted sound when splitting from ape/cue

Post by mattn » Mon Sep 08, 2008 2:07 am

sbooth wrote:The problem was with the way Max parses cue sheets- I've fixed it now.
Thanks - I was able to build from source so I've acquired the fix in my copy. (I knew it was going to turn out to be this kind of problem. Repeat after me: "C is evil." :evil: ) Now I've got about 30 CDs worth of ape/cue splitting to do over... :)

goldenband
Posts: 20
Joined: Sun Jul 30, 2006 3:56 am

Re: bug with omitted sound when splitting from ape/cue

Post by goldenband » Fri Nov 07, 2008 1:50 am

What's the best way for me to acquire a build with this bug fixed? I just got bitten by it, though I'm not too dismayed because prior to today I didn't even know that Max supported cue sheets (oops!). Still, I'd like to not lose the ends of my transcoded songs, so...


goldenband
Posts: 20
Joined: Sun Jul 30, 2006 3:56 am

Re: bug with omitted sound when splitting from ape/cue

Post by goldenband » Tue Nov 11, 2008 1:39 am

Thanks, not sure how I missed that!

Post Reply