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: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file (Read 3091 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Hi There,

It appears there are several old threads dealing with the above mentioned request. I would like to reinitiate the discussion here. I understand from the previouse threads that the tags "REM DISCNUMBER 1" and "REM TOTALDISCS 2" in an external CUE file will be ignored. I also understand that one can use the custom group schema to display the DISC 1 and DISC 2 in playlist.

However, it would be much appreciate to have enabled so that the title of the songs are displayed in as 1.01, 1.02, 1.03, (...), 2.01, 2.02, 2.03 (...). My current work around for this is to only insert these two tags the WAV file and the other information remains in the CUE file. The reason I use the extermal CUE files is that I can easily modify them with a script in case of need.

Any chance to enable foorbar2000 to use the tags DISCNUMBER and TOTALDISCS in the CUE file? From technical point of view it should be not difficualt since the other values like DATE are well used.

Best regards

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #1
Does anyone have comments on this? It would be much appreciated.

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #2
Given there's little demand and you already have a workaround I doubt they'd be any development time dedicated to this.

I know you already have a workaround, but have you considered something like External Tags? I don't use it myself so I don't know if it'll work in your situation but it seems like it should.

Also, I hope you don't mind me asking, but why/how are you still using single image files? The only thing I know that will even accept them (from a playing perspective) is foobar and then you're really restricted on metadata.

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #3
Thanks for the information about external tags. I will try that one later on.

With regards to the single image file, I started ripping my CDs in single image files since years as it has some advantages using the CUE files, e.g. (i) if the tagging information needs to be changed the image file will be untouched, thereby saving the backup for that file; (ii) the CUE can be modified using script: when retrieving the track information from the database, the Chinese character set is sometimes in UTF-HK (traditional Chinese) and sometimes in UTF-CN (simplified Chinese).

By the way, Audirvana on macOS also works well with single image file with CUE file.

Well, giving the fact of the limitation as you mentioned, I may consider to convert the single image file into flac files per track, which is indeed more flexible, and the convertion from UTF-HK to UT-CN can be also done using script since metaflac is quite powerful.

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #4
My current work around for this is to only insert these two tags the WAV file
How do you do this please?

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #5
If there's no way to derive this from the filepath/filename then I'd write a quick script to pull it from the CUE sheet and have it read in using Mp3Tags Text File to Tag functionality.

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #6
Thanks for the suggestion, but it won't work for me. The problem is described over at
https://hydrogenaud.io/index.php/topic,125170.0.html

I'm attempting to use the solution you proposed in that thread!  -  foobar's file operations. It fails because foodbar doesn't read DISCNUMBER from the cue file.

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #7
Thanks for the suggestion, but it won't work for me. The problem is described over at
https://hydrogenaud.io/index.php/topic,125170.0.html

I'm attempting to use the solution you proposed in that thread!  -  foobar's file operations. It fails because foodbar doesn't read DISCNUMBER from the cue file.
It will fail, because metadata support through CUE sheets is massively restricted, that's why no one uses this approach.

My response in this thread was about how to add DISCNUMBER and TOTALDISCS to the associated WAV/FLAC file. It's qute simple, you just need to generate a file containing:
Code: [Select]
<full path and filename of wav/flac>|DISCNUMBER|TOTALDISCS
Then use Mp3tag to update the files using the format: %_path%|%discnumber%|%totaldiscs% (if that's what Mp3tag calls them)

At that point you'll be able to reference them in foobar.

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #8
Are you suggesting that I can tag the .wav file with the discnumber?

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #9
Are you suggesting that I can tag the .wav file with the discnumber?
Yes.

I avoid windows scripting at all costs, but https://zzzcode.ai/code-generator (mostly) generated this:
Code: [Select]
$directory = "D:\TestMusic"
$outputFile = "D:\TestMusic\File.txt"

Get-ChildItem -Path $directory -Filter "*.cue" -Recurse | ForEach-Object {
    $cueFile = $_.FullName
    $wavFile = (Get-Item $_.FullName ).DirectoryName+"\"+(Get-Item $_.FullName ).BaseName+".wav"

    Get-Content -Path $cueFile | Where-Object { $_ -match "REM DISCNUMBER" } | ForEach-Object {
        $discNumber = $_
    }
    Get-Content -Path $cueFile | Where-Object { $_ -match "REM TOTALDISCS" } | ForEach-Object {
        $totalDiscs = $_
    }
        $output = "$wavFile|$discNumber|$totalDiscs"
        $output | Out-File -FilePath $outputFile -Append
}
That should generate something like:
Code: [Select]
D:\TestMusic\01.wav|REM DISCNUMBER 01|REM TOTALDISCS 02
D:\TestMusic\a1\02.wav|REM DISCNUMBER 03|REM TOTALDISCS 03
D:\TestMusic\a1\dd\03.wav|REM DISCNUMBER 01|REM TOTALDISCS 01
If you use a format of '%_path%|REM DISCNUMBER %discnumber%|REM TOTALDISCS %totaldiscs%' in Mp3Tag that should work.

NOTE: Test on a small subset first, obviously.

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #10
And then how do I use foobar’s file operations or are you suggesting I script the moves?

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #11
And then how do I use foobar’s file operations or are you suggesting I script the moves?

You previously said:
I'm attempting to use the solution you proposed in that thread!  -  foobar's file operations. It fails because foodbar doesn't read DISCNUMBER from the cue file.
With Mp3tag adding discnumber to the WAVs does that not fix the problem?

Because you've split these requests over multiple threads it's difficult to know your current thinking.
Given this thread is about DISCNUMBER from CUE sheets and I think we've addressed that, it might be worth continuing back on your original thread.

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #12
Given this thread is about DISCNUMBER from CUE sheets and I think we've addressed that, it might be worth continuing back on your original thread.

Agreed, I'll go back to the original thread. See it for updates...

However, the request to add support for reading DISCNUMBER and TOTALDISCS  from the cue file still stands. Given that foobar2000 already reads other values from the cue file, adding support for these too can't be that difficult or time consuming. It would be helpful for me. Maybe its low on the priority list, but the request is still valid.

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #13
Found this thread after encountering same issue.

My folder structure follows this pattern where possible: %ARTIST% / %DATE% - %ALBUM% [<differentiator>] [/CDx] / single flac or separate tracks.

Everything I have on CD's is archived as a single FLAC together with a cuesheet in same folder as the FLAC.
The remainder is, where possible, in separate files, also with a cuesheet in same folder.

For some reason I never had this issue in FB2K < 1.6, I had a ColumnsUI column in my playlist view which pulled discnumber and tracknumber just fine if there were ./CDx/  folders present (otherwise it would just be the tracknumber).

All of a sudden, while cleaning up some files, I encounter a situation where the cuesheet entries in the playlistview didn't show the discnumber... still can't understand why, as I still have cuesheet entries from way back where they DO show.

I finally gave up trying to find out why and just went with titleformatting.
Code: [Select]
$if($or($strstr(%path%,'\CD'),
$greater(%discnumber%,1),
$and(%discnumber%,%tracknumber%)),
$substr($directory(%path%),3,$strrchr(%path%,'\')))-,)
[$num(%tracknumber%,2)]

This only works if you have each disc of a multi-cd album in it's own CDx folder.
I just gave up using DISCNUMBER  for the display and instead substr the number part from the containing CDx folder to construct the DISCNUMBER display. So at least now my multi-disc entries show a DISCNUMBER in the playlist views, regardless if it is generated by a cuesheet or just the actual audio files if there's separate tracks instead of a single archive file..

So, yes, I vote +1 to have DISCNUMBER and TOTALDISCS retrievable when reading a cuesheet. As it stands now, in a library where there's a mixed occurence of both single archive files with cuesheets and folders with just separate tracks, using DISCNUMBER and TOTALDISCS in playlistview columns, besides the already mentioned other uses in the other thread, is pretty much impossible. Seeing as you need to jump through hoops using titleformatting functions when there's a cuesheet present, it's pretty much useless to even fall back to DISCNUMBER and TOTALDISCS when there's no cuesheet.

The argument that this way you have a workaround is just a lazy man's answer. These tags exists for a reason, one shouldn't be forced to bend over backwards trying to get the same information because some filetype doesn't support the use natively.

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #14
These tags exists for a reason, one shouldn't be forced to bend over backwards trying to get the same information because some filetype doesn't support the use natively.
Which tags exactly? The problem is that you don't have any, just some arbitrary text in a CUE sheet. If you can point to a specification that includes them then I'm sure they're more likely to get added (still very unlikely though as the world moved on a long time ago).

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #15
Which tags exactly? The problem is that you don't have any, just some arbitrary text in a CUE sheet. If you can point to a specification that includes them then I'm sure they're more likely to get added (still very unlikely though as the world moved on a long time ago).

I meant the tags DISCNUMBER and TRACKNUMBER,

BUT!

I finally discovered why some of my old cuesheet entries showed everything like it should...
It turned out that those cuesheets only contained the bare minimum of info.
They only had (FILE,TRACK,TITLE,INDEX) info for each track, no header, no REMs with TOTALDISCS or whatever, just plain basic track info... and if the file it points to has TOTALDISCS and DISCNUMBER tags present and filled, the cuesheet entries showed up in playlist views perfectly fine...so my titleformatting script is out the window... no more need for it...
CAVEAT, this means you at least need to have at least the DISCNUMBER tag added to the actual audio file itself if it's only a single file archive.
And for separate track files also optionally the TRACKNUMBER, but that still gets picked up from the cuesheet if not present in the trackfile.
EDIT: Weird, the quote system behaves different on this forum than I'm used to.,..

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #16
Should work now in foobar2000 v2.1.1.

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #17
foobar2000 2.2.1 change log says: "Added reading & writing of discnumber/totaldiscs tags in cuesheets".

How to write "discnumber/totaldiscs" in a cuesheet within foobar2000?

Thanks

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #18
They get written automatically when foobar2000 creates a cuesheet.

Re: Enabling foobar2000 to read DISCNUMBER and TOTALDISCS in CUE file

Reply #19
Should work now in foobar2000 v2.1.1.
I was so happy, I almost did a back-flip when I saw this. :))
Did you contribute this feature? I ask because maybe it could be simply expanded for other cue-sheet tags:
  • FLAGS <flags> (useful for automatic activation/deactivation of the de-emphasize DSP/component if <flags> contain PRE (e.g. FLAGS DCP PRE))
  • REM COMPOSER, REM RELEASEDATE, REM LABEL, REM CATALOGNUMBER, REM COUNTRY, REM DISCSUBTITLE
I realize that the current lack of support for these tags is a minor issue, I'm just chiming in while there seems to be a bit of renewed interest in single-file cue-sheets. ;)