Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Foobar2000 v1.4.3 incorrectly ignores INDEX 00 in track lengths and playback (Read 3299 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Foobar2000 v1.4.3 incorrectly ignores INDEX 00 in track lengths and playback

A segment of my cuesheet file is:

FILE "combined.mp3" MP3
TRACK 01 AUDIO
TITLE "Track 01"
INDEX 01 00:00:00

TRACK 02 AUDIO
TITLE "Track 02"
INDEX 00 09:28:00
INDEX 01 09:41:00
...

I open this cuesheet in foobar2000 and it correctly identifies all the tracks (there are 25 total, I'm just showing the first two since it's sufficient to explain my issue), track names, etc. However, it incorrectly identifies Track 1 is having a length of 9:41 (instead of 9:28), and if I ask it to play just Track 01, it will play all the way to 9:41 before stopping. This would be reasonable if the optional INDEX 00 entry were absent for TRACK 02, but it is not absent.

The cuesheet specification very clearly identifies all INDEX entries as belonging to the specified track (TRACK 02 in this case).

Now, I accept that there are a few cases where if you played the entire disk, you may WANT all the pregap information to be played (and not replaced by silence either), such as live recordings and the like (and even then, probably not while playing individual tracks or shuffle/random play). In my case, it is a live studio recording, and the musicians are idly plucking their instruments or tuning or chitchatting between songs, and I definitely want to exclude those and have done so, or so I thought, by setting the INDEX 00 entries accordingly. But foobar2000 isn't cooperating.

Basically foobar2000 seems to ignore INDEX 00 entries entirely and it conveys useful information which I propose be used as follows:

Add a pair of option settings when playing from cue sheets ("x" indicates default):

WHEN PLAYING 2 OR MORE SONGS SEQUENTIALLY
[ x ] 1. Play pregaps only between songs (default)
         [   ] Include pregap before first song
[  ] 2. Always ignore (don't play) pregaps and replace with fixed silence of __._ seconds between tracks (what I would like)
[  ] 3. Replace pregaps with equivalent silence between tracks (why not?)
[  ] 4. Always associate pregap with previous track, even after last song (current behaviour, not logical but for backward compatibility ...)

WHEN PLAYING SONGS INDIVIDUALLY OR IN RANDOM/SHUFFLE MODE
[ x ] 1. Always ignore (don't play) pregaps and replace with fixed silence of __._ seconds between tracks (default)
[  ] 2. Replace pregaps with equivalent silence at end of previous track (odd in this mode, but why not?)
[  ] 3. Always associate pregap with previous track (current behaviour, even less logical in this mode, but for backward compatibility ...))

My marked defaults above are what I believe a regular CD player would do. At any rate, I think displaying the track length after adding the pregap length of the following track as foobar2000 does is always wrong, and a regular CD player wouldn't do that (it would display a negative countdown).

Re: Foobar2000 v1.4.3 incorrectly ignores INDEX 00 in track lengths and playback

Reply #1
Maybe upgrade your Foobar2000 to the latest version, it might have already been fixed?
Who are you and how did you get in here ?
I'm a locksmith, I'm a locksmith.

Re: Foobar2000 v1.4.3 incorrectly ignores INDEX 00 in track lengths and playback

Reply #2
foobar2000 interprets pregaps as appended to the preceding track. There is no reasonable way to try to "guess" when you're playing two tracks in sequential order and simply insert the gap outside of playing the two tracks.

Re: Foobar2000 v1.4.3 incorrectly ignores INDEX 00 in track lengths and playback

Reply #3
Maybe upgrade your Foobar2000 to the latest version, it might have already been fixed?
Hmm, I thought I had the latest, but I see that is 1.4.8. I'll try it (though I doubt it will be different in that--it's a conceptual change and would have been mentioned in the release notes).
foobar2000 interprets pregaps as appended to the preceding track. There is no reasonable way to try to "guess" when you're playing two tracks in sequential order and simply insert the gap outside of playing the two tracks.
That is exactly my point. At the very least there needs to be an option that says "Do not play pregaps" which involves no guessing at all.

Nor does it need to guess if I'm playing tracks in sequential order or not. If I'm playing from a cue sheet and playing the whole disk without shuffling, I'm playing tracks in sequential order. If I've selected sequential tracks, I'm playing tracks in sequential order. If I've selected only 1 track to play, or multiple tracks in non sequential order, I'm not. I can't speak to the implementation difficulty, of course, but conceptually it's simple. In pseudo code:

If (playing from cue sheet)
   For each selected track (N) to play
         If (no next track defined)   # E.g., last track in list or playing only 1 track
            Play track N without any following pregap
         ElseIf (next track != Track N+1 OR AlwaysIgnorePregap option is set)
            Ignore pregap of following Track and play fixed silence of n.n seconds after track
         Else
            Play Track N with pregap of Track N+1
         End if
   End For
End If

Zero guessing. This implements a slightly simplified version of my proposal (the most important one from my standpoint) but a more complete one is not much more difficult to articulate, and is equally deterministic. The above does what a real CD player would do (foobar2000 currently does not do that since it ignores INDEX 00 information), plus adds my AlwaysIgnorePregap option that a real CD player typically doesn't have.

Re: Foobar2000 v1.4.3 incorrectly ignores INDEX 00 in track lengths and playback

Reply #4
What about albums that have no gaps? They'll still have all tracks listed as INDEX 01, and no INDEX 00 at all.

Re: Foobar2000 v1.4.3 incorrectly ignores INDEX 00 in track lengths and playback

Reply #5
Track lengths are correct. Technically tracks start at index 1. Your CD player shows lengths calculated this way too. Other than that index markers are ignored and it's highly unlikely to get some special support for them.

foobar2000 doesn't limit you to do things the way they were done on a CD. You can for example split the part between index 0 and 1 to a separate track and mark it with a special tag. You can then make foo_skip skip those when using shuffle or random play modes.

Re: Foobar2000 v1.4.3 incorrectly ignores INDEX 00 in track lengths and playback

Reply #6
What about albums that have no gaps? They'll still have all tracks listed as INDEX 01, and no INDEX 00 at all.
What's the point? That is clearly not my case, don't see the relevance. If you mean what would my algorithm do, it would obviously treat them as pregap 0 and still do the right thing.

Re: Foobar2000 v1.4.3 incorrectly ignores INDEX 00 in track lengths and playback

Reply #7
Track lengths are correct. Technically tracks start at index 1. Your CD player shows lengths calculated this way too. Other than that index markers are ignored and it's highly unlikely to get some special support for them.
Well, the track lengths are correct only if you define correct to be the way foobar2000 handles them. No CD player I've ever had shows it that way (it shows the pregap separately as a count up from a negative number after the previous track ends, and the previous track time does not include the pregap of the following track). Yes, of course track lengths start at INDEX 01. But they end at INDEX 00 of the following track, not at INDEX 01, unless there is no INDEX 00. But foobar2000 does not seem to understand (use) INDEX 00 at all, at least not in reading cue sheets (that is one index marker that clearly should not be ignored).

EAC for example also does this by default (append following track pregap to the end of the previous track) but DOES have options to exclude pregaps.

Anyway, it looks like Medieval Cue Splitter does the right thing "out of the box," showing the track lengths correctly and the unwanted pregaps separately, so I'll use that instead to split the tracks and play them separately. Maybe one day foobar2000 will be able to do this, but it sounds like I shouldn't hold my breath. Thanks anyway!

Re: Foobar2000 v1.4.3 incorrectly ignores INDEX 00 in track lengths and playback

Reply #8
Medieval Cue Splitter does the right thing "out of the box,"
Medieval Cue Splitter is piece of crap. It can loose samples on tracks boundaries, so you will not have bit-perfect copy anymore. Proper tool to work with cue is CUETools.

 

Re: Foobar2000 v1.4.3 incorrectly ignores INDEX 00 in track lengths and playback

Reply #9
Proper tool to work with cue is CUETools.
The example given was for MP3 Image+CUE. MP3 is an "Unsupported audio type" for Input (CUETools).
Maybe mp3DirectCut would be a better choice.
korth

Re: Foobar2000 v1.4.3 incorrectly ignores INDEX 00 in track lengths and playback

Reply #10
Medieval Cue Splitter is piece of crap. It can loose samples on tracks boundaries, so you will not have bit-perfect copy anymore. Proper tool to work with cue is CUETools.
Not that I don't believe you, but do you have some reference for this or more details on when and how this happens? I can believe that it may add samples to fill out the block as it would have to do, but lose samples?

Proper tool to work with cue is CUETools.
Maybe mp3DirectCut would be a better choice.
Thanks for the two references Rollin and korth. I'll definitely check out mp3DirectCut. CUE editing is not something I do frequently (this was a 1-time things) but I'll see what CUETools offers too.

Re: Foobar2000 v1.4.3 incorrectly ignores INDEX 00 in track lengths and playback

Reply #11
Medieval doesn't know how to reencode partial blocks, and does not attempt to do it even with FLAC. It's non-trivial to do with overlapping frames of lossy codecs, and Medieval is a simple application.

I don't see what would be gained by muting the gap in most cases. If the gap is silent, nothing changes. But quite often a gap still contains traces of music or background noise that would draw attention to itself if it were suddenly muted and reappeared again at the start of the next composition. Even Index 01 sometimes cuts into music, and index 00 is even less accurate. It annoys me to no end when music is ripped with gaps left out for digital distribution today, and songs step one onto another like on radio or end with a click.