Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add factor for inter-track gaps #20

Open
PaulWebster opened this issue Apr 7, 2024 · 2 comments
Open

Add factor for inter-track gaps #20

PaulWebster opened this issue Apr 7, 2024 · 2 comments
Assignees

Comments

@PaulWebster
Copy link

Thanks for keeping this application going.

A suggestion based on some recent digitising some old reel-to-reel tapes.
The track timings on Discogs (at least for few that I tried) are for the duration of the song but do not allow for the few seconds of silence between the tracks.
Being able to specify an interval to add to each track (in the case of the current tape I have in my hand it would be 4 seconds) would mean that the subsequent adjustments to make would be minimal.
They still need to be checked but if feels better having to add 1 or 2 seconds instead of thinking that the tape machine is playing slow.

An option to add to the track length or to add a non-track gap could also be useful.
People seem to use INDEX 00 or PREGAP for this sort of thing.

My use is a tape to flac as a single file - so I think I would prefer the gap to be added as extra time to the track rather than as a real gap that would be skipped by a player ... since that is the experience when playing the tape.

@lighterowl
Copy link
Owner

lighterowl commented Apr 7, 2024

Hi there.

Unfortunately, this isn't as easy as adding a command to cue entries as there is a significant difference between INDEX 00 and PREGAP. The former specifies that "data at mm:ss:ff in the current FILE is supposed to be treated as pre-gap of the current TRACK", while the latter tells the player "please insert mm:ss:ff of silence before any subsequent content (presumably introduced by an INDEX command)". This means that INDEX 00 expects the pre-gap data to be actually present in the file that the cue file is using for the current track.

Based on what you're saying (i.e. flac as a single file), what you're looking for is INDEX 00 and not PREGAP. To illustrate (perhaps it helps you decide which option applies to you) - when ripping audio CDs to individual track files with Exact Audio Copy, you are given three options when it comes to gap handling :

  • Leave Out Gaps. This completely discards the data from the track's pregap and none of it is present in the output file. Gaps like these are replaced with PREGAP in the generated CUE files :
FILE "foo.wav" WAVE
  TRACK 01 AUDIO
    PREGAP 00:02:00
    INDEX 01 00:00:00

Of course, if there was any significant data in the pregap, it is effectively lost. Players using the CUE file for playback usually generate the requested duration of silence when playing the CUE contents in sequence, and skip it when playing an individual CUE track.

  • Append Gaps To Previous Track. Pregap data for track n is appended to track n-1. This means that the individual track file is perfectly playable as-is since it starts right at the actual content, and all gap data is preserved and played when playing back individual files in sequence. The downside is that this is not directly supported by CUE files as it requires splitting INDEX commands across FILEs and having multiple TRACK commands per FILE :
FILE "previous.wav" WAVE
  TRACK 01 AUDIO
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    INDEX 00 03:30:50
FILE "next.wav" WAVE
    INDEX 01 00:00:00

CUE files like these are only readable by Exact Audio Copy itself. This setting is the default, presumably due to its convenience w.r.t. individual files.

  • Append Gaps To Next Track. Pregap for track n appears in the file for track n. The gigantic downside is that playing the individual file results in starting out with awkward silence / gap content. The CUE content is what you'd expect though :
FILE "track.wav" WAVE
  TRACK 01 AUDIO
    INDEX 00 00:00:00
    INDEX 01 00:02:00

I imagine most dcue users work with "disc images" which are just audio contents dumped to a single file with the CUE used for indexing, so INDEX 00 should probably be the default.

@lighterowl lighterowl self-assigned this Apr 7, 2024
@PaulWebster
Copy link
Author

Thought an example might help as well.
This is track 2 of the recording.
Discogs has the length of the track as 02:52 - which is the same as is shown on the tape box ... so it is, broadly, first to last beat - and, remarkably for technology from 1970s, it looks like my ree-to-reel tape drive is very well calibrated (I checked a few other tracks as well). Well done to Revox and the skills of the person who refurbished it recently.

However, the audio gap on the tape between tracks is 4 seconds.

So there are a few strategies ... of course, it is all guesswork since DCue does not try to read the audio file and find the gaps itself, but if the prior track was had its length extended by half the new "gap" field and the next track had its start time moved back by the other half of the gap then there is a good chance that it would give enough tolerance to allow for tape speed etc - alternatively a INDEX 00 for the gap might work but I have a fear that it would occasionally catch the start or end of the audio.
Maybe with a gap setting of 4 it could be .... +1 for preceding track end, 2 second gap, -1 for start of next track.
Anyway - with some new parameters to control this it would lead to hours f "fun" trying to get it to match a recording automatically ... when all I really need to do is edit 12 lines to adjust the start time!
So no great need but I think it might be helpful.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants