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: CUETools template help (Read 16980 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

CUETools template help

Can someone please help me with my formatting? I want CUETools to output a CUE file with a name like this:

    Eric Clapton - Crossroads (disc 1).cue

If and only if there are 2 or more discs in the set. If there is one disc, it should read:

    Dire Straits - Love Over Gold.cue

This is what I have for a formatting string, used in the Template box of the main window of CUETools:

D:\%artist%\[%year% - ]%album%\%artist% - %album%[$ifgreater(%totaldiscs%,1, '('disc %discnumber%')',)].cue

Where am I going wrong? Thanks!

CUETools template help

Reply #1
$ifgreater(x,y,a,b) is already conditional, you don't need the brackets [] around it.
korth

CUETools template help

Reply #2
Thanks korth! I've got things just about perfect now.

Thank you for your kind help!

CUETools template help

Reply #3
Is it possible to remove templates from CUETools and CUERipper? I'd like to get rid of the ones that I don't use...

CUETools template help

Reply #4
You can't get rid of the 'stock' templates but you can delete ones you added. This can be done by editing the settings file(s) but you need to use caution. I'd suggest making a backup copy of each file before editing.

CUETools and CUERipper save the last state on exit so to avoid accidental re-saving make sure you don't have a template you want to get rid of selected. Exit both programs.

Run (Windows key + r)
%appdata%\CUERipper\settings.txt
%appdata%\CUE Tools\settings.txt

Find (might be easier if you turn 'word wrap' off.)
OutputPathUseTemplate

Delete the lines that contain the templates you no longer want.
Fix the numbering (important). Numbering starts with zero but may be listed in reverse order.
Adjust the total in OutputPathUseTemplates=

Save the file.

Code: [Select]
(The templates I no longer want I marked in [color=#FF0000]red[/color] for this example. Numbering is in [color=#A0522D]brown[/color].)

[color=#000000][b]before[/b][/color]
OutputPathUseTemplates=[color=#A0522D]6[/color]
OutputPathUseTemplate[color=#A0522D]5[/color]=mytemplate6.cue
OutputPathUseTemplate[color=#A0522D]4[/color]=mytemplate5.cue
[color=#FF0000]OutputPathUseTemplate[color=#A0522D]3[/color]=mytemplate4.cue[/color]
OutputPathUseTemplate[color=#A0522D]2[/color]=mytemplate3.cue
[color=#FF0000]OutputPathUseTemplate[color=#A0522D]1[/color]=mytemplate2.cue[/color]
OutputPathUseTemplate[color=#A0522D]0[/color]=mytemplate1.cue

[color=#000000][b]after[/b][/color]
OutputPathUseTemplates=[color=#A0522D]4[/color]
OutputPathUseTemplate[color=#A0522D]3[/color]=mytemplate6.cue
OutputPathUseTemplate[color=#A0522D]2[/color]=mytemplate5.cue
OutputPathUseTemplate[color=#A0522D]1[/color]=mytemplate3.cue
OutputPathUseTemplate[color=#A0522D]0[/color]=mytemplate1.cue
Edit: added color to example
korth

CUETools template help

Reply #5
Thanks again, korth. I really appreciate your clear answers.

I am also quite amazed and pleased that an amazing piece of software like CUETools is free. Now that I've got it configured the way I want, it is saving me quite a lot of time in my project. Very happy to have this.

Hopefully future releases will make it easier to delete unused templates. One more thing, I use different naming schemes for folders and tracks depending on if they are single artist (or predominantly single artist) CDs or various artists. Although CUETools allows me to change templates, I have found through experimentation that other settings are not template specific. So my custom naming scheme for tracks does not carry through. My fix is to have multiple copies of CUETools on my hard drive, one configured for single artists, and one for multiple artists. Not a bad workaround, but it would be much nicer to have this built in.

Nevertheless, I am very happy and grateful for this software!

CUETools template help

Reply #6
You can use 'profiles' in CUETools that will store an alternate 'settings' file. New settings are saved in the profile on exit so you may need to restart CUETools several times (with that profile selected) to get the new profile setup.
korth

CUETools template help

Reply #7
Since this thread is about output templates, is it possible to do the following per templates?

- input: M:\some\folders\file.wav
- output: z:\some\folders\file.flac

Basically convert keeping folder structure but to a different drive/path prefix.

CUETools template help

Reply #8
Not that I'm aware of. String functions in the Foobar2000 Title Formatting Reference aren't used by CUETools and %directoryname% in CUETools is actually the same as %path% (the complete path to file including drive letter).
korth

CUETools template help

Reply #9
Basically convert keeping folder structure but to a different drive/path prefix.

The best it can do is copy a certain amount of levels _up_ from the file, which can be kind of useless, but might work if your folder structure is very predictable.
Try something like
Z:\$directory(%path%,1,3)/%filename%
or
Z:\$directory(%path%,1,2)/%filename%
CUETools 2.1.6

CUETools template help

Reply #10
Yes, that does exactly what I want in my case, thanks.

 

CUETools template help

Reply #11
I see the profiles setting now, and that works exactly as I hoped. Very similar to EAC profiles, and just what I need. Thanks again, korth, for teaching me how to configure CUETools!

Might as well try my luck with one more question. If I don't want to specify the output directory, but choose it at the time of conversion, how would I do that? How would I change my template string?

CUETools template help

Reply #12
The best it can do is copy a certain amount of levels _up_ from the file, which can be kind of useless, but might work if your folder structure is very predictable.
Try something like
Z:\$directory(%path%,1,3)/%filename%
or
Z:\$directory(%path%,1,2)/%filename%

Thanks for correcting me. I admit I hadn't tried string functions since 2.1.2 and didn't work for me then. Apologies to ChronoSphere for the misinformation.

Might as well try my luck with one more question. If I don't want to specify the output directory, but choose it at the time of conversion, how would I do that? How would I change my template string?

Sorry, I can't help other than suggest 'Browse' or 'Manual' output (no template string).
korth


CUETools template help

Reply #14
You can't get rid of the 'stock' templates...

CUETools and CUERipper save the last state...

Run (Windows key + r)
%appdata%\CUERipper\settings.txt
%appdata%\CUE Tools\settings.txt

...


Hi,
I run windows + r and type  %appdata%\CUE Tools\settings.txt ... Windows
asked to choose a program to open the file. I choose Notepad but it shows only the lines:

List of interfaces
   1 ........................... Software Loopback Interface 1
  13 ... 00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface


Why I do not see OutputPathUseTemplates command?

thank you
Claudio

CUETools template help

Reply #15
Sounds like you are using Windows 8? That shortcut works on XP-Win7.
You can try entering just %appdata% and navigate to \CUE Tools\settings.txt
Or to navigate to the file directly "C:\Users\{YourUserName}\AppData\Roaming\CUE Tools\settings.txt", you will need to have 'Show Hidden Files & Folders' ticked in the Folder Options of Windows Explorer.
korth

CUETools template help

Reply #16
Sounds like you are using Windows 8?...
You can try entering just %appdata% and...
Or to navigate to the file directly "C:\Users\....


Hi korth,

My Windows is Win 7 ...
The problem is '%' character, e.g '%appdata%' don't work ... but
'appdata' works fine.


My cuetools not write files with the repair option ... he only checks
files and not write anything in the output folder. Why?

Appreciate your help
Claudio

CUETools template help

Reply #17
You've changed topics ([a href='index.php?showtopic=3974']TOS#5[/a])
Quote
My cuetools not write files with the repair option ... he only checks
files and not write anything in the output folder. Why?
Either the source could not be repaired or a non-supported Input type was used. (2.1.5 is a little more flexible and allows you to repair from batch modes provided only one image is selected.)
korth

CUETools template help

Reply #18
You've changed topics ([a href='index.php?showtopic=3974']TOS#5[/a])
Quote
My cuetools not write files with the repair option ...
Either the source could not be repaired or a... non-supported Input type was used. (2.1.5 is a little more flexible and allows you to repair from batch modes provided only one image is selected.)


I use EAC with CTDB plugin to rip my CDs

I read an article on the internet saying that CUETools does not repair a second time because
of CTDB considers the file has been repaired, is this true?

what is batch modes?

I'll detail my situation:
1 - In the EAC, only TWO tracks are incorrect:
       7 | (1/1) Differs in 4880 samples @ 00:00:27 to 00:00:32
       9 | (1/2) Differs in 20 samples @ 01:28:44,01:28:57,01:36:13,01:37:06 ...

       which means (1/1) and (1/2)?

2 - How can I do to create a Cue Sheet in EAC only these two tracks
      to fix them in cuetools?

Can you help me again?
Claudio

CUETools template help

Reply #19
Quote
I read an article on the internet saying that CUETools does not repair a second time because
of CTDB considers the file has been repaired, is this true?

That depends on how many repair records are present for that disc in the database. If there is only one repair record then there is nothing to repair a second time. If more than one repair record exists and you think you selected the wrong one for repair, you can run repair again and select a different one. Note: You shouldn't discard the original files until you are satisfied with the repair result.

Quote
what is batch modes?

Did you follow the link?[blockquote]On discs with multiple entries, Repair function needs to display a window asking confirmation and presenting you with a choice of available repair targets. This window is currently only visible when Input: is set to Folder browser mode with a single file (or file grouping) selected. Batch modes (Multiselect Browser mode, Drag'n'drop mode or selecting an entire folder in Folder Browser mode) not supported.[/blockquote]Batch modes are also described in this section of the wiki.

Quote
I'll detail my situation:
1 - In the EAC, only TWO tracks are incorrect:
      7 | (1/1) Differs in 4880 samples @ 00:00:27 to 00:00:32
      9 | (1/2) Differs in 20 samples @ 01:28:44,01:28:57,01:36:13,01:37:06 ...

      which means (1/1) and (1/2)?

(1/1) 1 record out of 1. (1/2) 1 record out of 2. There is only one record in the database for track#7 but there are two different versions of track#9.

Quote
2 - How can I do to create a Cue Sheet in EAC only these two tracks
      to fix them in cuetools?

You can't repair with CUETools that way. You need input the entire CD for CUETools to find the record in the database.
korth

CUETools template help

Reply #20
Hi!!
Can anyobody provide me a resource describing what exactly macros cuetools support. The homepage says something about template syntax being exactly same as fb2k but that's not quite true as I encountered some macros working in foobar don't get parsed at all. For example %date% is never triggered or assigned the year value from album properties dialog. Don't know why but it's always interpolated as %date% to output structure. Thanks for help!
Anyway a complete overview of all macro bindings to album info dialog and functions supported would be much appreciated!

CUETools template help

Reply #21
Quote
2 - How can I do to create a Cue Sheet in EAC only these two tracks
      to fix them in cuetools?

You can't repair with CUETools that way. You need input the entire CD for CUETools...


OK korth... I created this new topic, as you warned me ... sorry
The topic title is: EAC Cue Sheet for repair in the CUETools   

Thanks for help!
Claudio

Re: CUETools template help

Reply #22
Hello Everyone

Could you please help me to construct a naming template to use when CUETools (CT) has to create a cue sheet from the album name? I file my albums in Windows, where the folder name of each album is preceded by the year the album was issued, for e.g. "1995. Album Name". Now, when CT creates the cue sheet, I wish that it should remove the portion preceding the album name, i.e. "1995._", so that the album name only is displayed in the cue sheet description, thus: "album name.cue".

Lastly, where do I find the cue sheet template in the settings file to edit, or do I have to add a new line? Is there anything that I should watch out for?

Thank you.

Re: CUETools template help

Reply #23
Not sure what template you're using now. A partial template for "\Year. Album Name\Album Name.cue" could be
\[%year%. ]%album%\%album%.cue

cue sheet template? Please provide more info on what you're trying to edit.
korth

Re: CUETools template help

Reply #24
Not sure what template you're using now. A partial template for "\Year. Album Name\Album Name.cue" could be
\[%year%. ]%album%\%album%.cue

cue sheet template? Please provide more info on what you're trying to edit.


Hello, and thank you for responding Korth.

My bad about the "cue sheet" template. I meant the cue filename template.

Please ignore my message for the time being, while I try your suggested template.