Generate CUE file from tracklist?

thanks for info!

To convert such a tracklist to a cue file with Mp3tag you can try:

  1. Import the information in the tracklist to a set of dummy files
  2. Use the export to create the cue file. The big problem as Detlev already said is adding the track lengths.

So I made an extra tool that can add the track lengths and the result is:

Test.txt (3.31 KB)

Where is the tool?? is an external program? I has seen the txt and the result it is ok for me. But how you can write the index time?

Thank you dano!

EDIT: Here's also a full automatic version:
Download
Just drop the Tracklist.txt file on the .exe or use the command line.
But it will probably only work with this text file format:
01.Aerospace - Space Odyssey - 07:44


I have uploaded it now.
Download

Please follow these instructions:

  1. Create a bunch of dummy files with no tags
  2. Select all files and open "Convert > text file - tag"
  3. Select your Tracklist.txt file and import artist and title tags to these files

For example if this is a line in the text file
01.Aerospace - Space Odyssey - 07:44
Use this format string
%dummy%.%artist% - %title% - %dummy%

  1. Start my tool from the command line: TextToCue_length.exe "Tracklist.txt"
    It should create a new file Tracklist.Cue_length.txt

It will only work if the track times are on the right side and every line must have a track time!

  1. Go to "Convert > text file - tag" again and load the new Tracklist.Cue_length.txt file.
    Use this format string:
    %composer%

  2. Finally start the export with this script:

    $filename(export.cue,ansi)TITLE ""
    PERFORMER ""
    FILE "Test.mp3" MP3
    $loop(a) TRACK $num(%_counter%,2) AUDIO
    TITLE "%title%"
    PERFORMER "%artist%"
    INDEX 01 %composer%
    $loopend()

Dano, good idea!

Three annotations following.

I would not use the tag-field 'COMPOSER' to store the index data, better use an "user defined tag-field 'INDEXTIME'.

The text file "Tracklist.Cue_length.txt" can also be dragged onto the exe file "TextToCue_length.exe".

Your tool can also create the zero byte dummy files.
The tracklist file knows how much files.
The dummy mp3's can be named 'Dummy.01.mp3' to 'Dummy.99.mp3'.
Perhaps Artist and Title from the tracklist file can be used to name the dummy files too.
Mp3tag can handle such dummy mp3 files and will import the tag-field values correctly.
Maybe you write in one go a complete new import text file, which contains the old data combined with the INDEXTIME data. This would reduce the import work flow to one import task.

So ...

  • read the given tracklist file,
  • create a temporary working folder,
  • create the dummy mp3 files from the given tracklist in the working folder,
  • create the new import text file including INDEXTIME,
  • run Mp3tag starting in the working folder,
  • run the converter "Textfile - Tag" using the new import file, using GUI control commands,
  • run the export using the special template, using GUI control commands,
  • close Mp3tag
  • remove the dummy mp3 files
  • save old tracklist, new tracklist, new report file.

So far my thoughts ... maybe not complete at all ...
... sorry just have a telephon call ....

... back again ...
... but when I look at the complete workflow and the enormous effort, then one can immediately write a simple text converter without using Mp3tag with dummy mp3 files and importing and exporting and so on.

At the lowest level a commandline script should do it.

DD.20110321.1805.CET

I also made a converter. No extra tool or dummy files necessary. An Actiongroup and an export. I have packed the mta & mte file into a zip for download. Copy the folder structure in the zip file to %appdata%\mp3tag

You have to do the following:

  1. Save the tracklist in the UNSYNCEDLYRICS tag-field
  2. Run the actiongroup

The tracklist must be written in the following style:

  • with or without tracknumbers at the begin of each line
  • artist must be written in front of title, must be separted with at leat " - " but can have also more additional spaces or dashes (-)
  • the tracklength must stand after the title, minutes and second must be seperated by a colon ( :slight_smile:
  • no headline or text after the tracklist.
    so most tracklist you find in the internet will work without extra text arranging. e.g. the one in the starting post works fine.

If you want, you can delete the last action of the group, which is the automatic start of the export script. Than you have only timestamped lyrics without a cue file, which also can be displayed with some plugins at some mediaplayers.

And that is how it works in detail:

Actions:

  1. delete tracknumbers
    Action: Format Value
    Field: UNSYNCEDLYRICS
    Formatstring: $regexp(%unsyncedlyrics%,(\r\n|^...||)\d+(\W|_)*,$1)

  2. tracklength into next line
    Action: Format Value
    Field: UNSYNCEDLYRICS
    Formatstring: $regexp(%unsyncedlyrics%,(\d+:\d+)\D*(\r\n),$2$1 - )

  3. add "[000:00] #01 - " at begin
    Action: Format Value
    Field: UNSYNCEDLYRICS
    Formatstring: $regexp(%unsyncedlyrics%,^...||(.*),'[000:00] #01 - $1')

  4. delete last tracklength
    Action: Format Value
    Field: UNSYNCEDLYRICS
    Formatstring: $regexp(%unsyncedlyrics%,(.*\D)\d+:\d+,$1)

  5. calculate timestamps & set new tracknumbers:
    Action: Replace with Regular Expression
    Regular Expression: (.*[(\d+):(\d+)] #(\d+) .+?\r\n)(\d+):(\d+)
    Replace Matches with: $1[$num($add($2,$5,$div($add($3,$6),60)),3):$num($mod($add($3,$6),60),2)] #$num($add($4,1),2)
    This action is repeated for every line, so I dublicated it about 100 times.

  6. clean up artist & title names
    Action: Format Value
    Field: UNSYNCEDLYRICS
    Formatstring: $regexp(%unsyncedlyrics%,'#(\d+) - (.?)[\s-]+-[\s-]+(.?)[\s-]*(\r\n|$)',#$1 - $2 - $3$4)

Export:

$filename(%_filename%.cue,ansi)PERFORMER "%albumartist%"
     TITLE "%album%"
     FILE "%_filename_rel%" %_extension%
     
     $regexp($regexp(%unsyncedlyrics%,ID,unknown - unknown),.*?'\['(.*?)']' #(\d+) - (.*?) - (.*?)(\r\n|$),
     TRACK $2 AUDIO
       TITLE "$4"
       PERFORMER "$3"
       INDEX 01 $1:00
     )

not bad, is it :smiley:
edit:
I just made a little change in the second action to get also tracklists with extra spaces or things like min after the tracklength

Cue_Sheet.zip (1.46 KB)

pone, good work too!

Annotations:
It does not work for me yet. I am still on evaluating why.

Maybe the UNSYNCEDLYRICS tag-field causes the error because of the leading "eng||" attribute.
You should choose an user defined tag-field 'TMP_CUESHEET' or something alike, that do not interfere with standard tag-fields.

One entry in the tracklist file looks like this:
"06 Forth - Solavox (Traffik's Tambura Psalm) - 6:32 " (without the double quotes)
Perhaps there is some trimming necessary.

You can embed the import of the tracklist into a prepended action to do a bit more automation.

DD.20110321.1920.CET

thank you

download it again. i stumbled over the same problem and made a edit of the second action to deal with the spaces after the tracklength.

i treated the "eng||" as a regex "^...||" so it should be no problem even if a user has changed the Mp3Tag standard

i deliberatly didn't pack the export into the actiongroup, because for many users (for me) timestamped lyrics will be enough. that's also the reason why i've chosen that field, it's more or less standard for tracklists of dj-mixes.
it should be easy even for beginners to add the export to the actiongroup.

I did.
You should not edit mta file manually. see action #1.

DD.20110321.2017.CET

I don't understand what you mean? Isn't it working now?
Where is the difference if I edited action within Mp3Tag or with a text editor in the mta file?
With the second action, I meant #1 (treating #0 as the first action)

EDIT:
Ah, I see the differences. There are some extra slashes in the mta. Uploaded it again, hope it's working now.

\r\n is not escaped to \\r\\n ...
... and you can add 6 actions more to get 99 actions, which should be the maximum of the cuesheet list.
I've changed the tag-field name and what before works does not work now. I have to dig in deeper.
Maybe now it is the missing "eng||" attribute?

DD.20110321.2030.CET

I hope it works now. Uploaded again. Had no internet connection for a short time before.

I've packed the export into the actiogroup now.

If you change the field, "^...||" must be replace with "^"

Thanks Dano!
I don't know if I had do anything wrong but when I execute this comand I get this error:


AutoIt Error

Line 1095 (File "D:\TextToCue_length.exe"):

Error: Subscript used with non-Array variable.

Aceptar

What could be causing this? I use win7x64.
Thanks!

Thank you pone!

Now I check it!

Sorry, the tool work. I'm write wrong the comand line (tracklist.txt.txt) :stuck_out_tongue:

QUOTE (dano @ Mar 21 2011, 14:56) <{POST_SNAPBACK}>
6) Finally start the export with this script:
$filename(export.cue,ansi)TITLE ""
PERFORMER ""
FILE "Test.mp3" MP3
$loop(a)  TRACK $num(%_counter%,2) AUDIO
    TITLE "%title%"
    PERFORMER "%artist%"
    INDEX 01 %composer%
$loopend()<!--QuoteEnd--></div><!--QuoteEEnd-->

Dano, all work ok! many thanks!!
Only one thing, for export I prefer use this:

$filename(export.cue,ansi)
FILE "Test.mp3" MP3
$loop(a)  TRACK $num(%_counter%,2) AUDIO
    TITLE "%title%"
    PERFORMER "%artist%"
    INDEX 01 %composer%
$loopend()

This form cue splitter run beter, if I don't do it get warnigs!

I've updated my post with a full automatic solution. But it is limited to a certain layout of the tracklist file.

Also great work by pone - solving the problem with Mp3tag.

pone, your work run ok, also many thanks!
dano, I test it and also work very fine! thanks!

you are my hero's!!! :laughing: :music: hehe

this function is good when you have a mp3 without cue file and you don't find in internet! this happens to me many times!

the only problem is you must to use a specific format on the tracklist. It's a pity that you can not use an custom format for read the tracklist but nothing happens with it I save the most part of the work and I this is fine. :w00t:

thanks again

edit: sorry, "shame" no, "pity" :stuck_out_tongue: google translator is a traitor.

Yes, dano, that is the simple app what I have thought of!
Better you mark all the old instructions in the 'download' post above as invalid.

DD.20110322.1604.CET

Dano, I have a little problem!

I would like create an action that:

  1. import text file:

field: INDEXTIME
filename: C:\Tracklist_length.txt

  1. Export:

Generar CUE

$filename(export.cue,ansi)
FILE "Test.mp3" MP3
$loop(a)  TRACK $num(%_counter%,2) AUDIO
    TITLE "%title%"
    PERFORMER "%artist%"
    INDEX 01 %INDEXTIME%
$loopend()

If I do it this I obtain this cue:

FILE "Test.mp3" MP3
  TRACK 01 AUDIO
	TITLE ""Cookies With A Smile" (Avicii remix)"
	PERFORMER "Dada Life"
	INDEX 01 00:00:00
06:03:00
13:33:00
20:43:00
28:59:00
36:57:00
42:26:00
49:52:00
56:11:00
60:08:00
66:18:00
72:34:00
79:45:00
86:55:00
95:26:00

  TRACK 02 AUDIO
	TITLE ""Conscindo""
	PERFORMER "Mark Knight & Wolfgang Gartner"
	INDEX 01 00:00:00
06:03:00
13:33:00
20:43:00
28:59:00
36:57:00
42:26:00
49:52:00
56:11:00
60:08:00
66:18:00
72:34:00
79:45:00
86:55:00
95:26:00

  TRACK 03 AUDIO
	TITLE ""Calypso" (Manuel De La Mare Shibuya remix)"
	PERFORMER "Jay Lumen"
	INDEX 01 00:00:00
06:03:00
13:33:00
20:43:00
28:59:00
36:57:00
42:26:00
49:52:00
56:11:00
60:08:00
66:18:00
72:34:00
79:45:00
86:55:00
95:26:00

  TRACK 04 AUDIO
	TITLE ""Get Fresh""
	PERFORMER "Moguai"
	INDEX 01 00:00:00
06:03:00
13:33:00
20:43:00
28:59:00
36:57:00
42:26:00
49:52:00
56:11:00
60:08:00
66:18:00
72:34:00
79:45:00
86:55:00
95:26:00

  TRACK 05 AUDIO
	TITLE ""Professional Killers" (Jerome Isma-ae & Daniel Portman remix)"
	PERFORMER "Komytea"
	INDEX 01 00:00:00
06:03:00
13:33:00
20:43:00
28:59:00
36:57:00
42:26:00
49:52:00
56:11:00
60:08:00
66:18:00
72:34:00
79:45:00
86:55:00
95:26:00

  TRACK 06 AUDIO
	TITLE ""I Feel So""
	PERFORMER "Olav Basoski"
	INDEX 01 00:00:00
06:03:00
13:33:00
20:43:00
28:59:00
36:57:00
42:26:00
49:52:00
56:11:00
60:08:00
66:18:00
72:34:00
79:45:00
86:55:00
95:26:00

  TRACK 07 AUDIO
	TITLE ""Bad Davis""
	PERFORMER "Stefano Noferini"
	INDEX 01 00:00:00
06:03:00
13:33:00
20:43:00
28:59:00
36:57:00
42:26:00
49:52:00
56:11:00
60:08:00
66:18:00
72:34:00
79:45:00
86:55:00
95:26:00

  TRACK 08 AUDIO
	TITLE ""Last Ones Standing" (Benny Benassi remix)"
	PERFORMER "Example"
	INDEX 01 00:00:00
06:03:00
13:33:00
20:43:00
28:59:00
36:57:00
42:26:00
49:52:00
56:11:00
60:08:00
66:18:00
72:34:00
79:45:00
86:55:00
95:26:00

  TRACK 09 AUDIO
	TITLE ""Bubblegum" (original mix)"
	PERFORMER "Afrojack"
	INDEX 01 00:00:00
06:03:00
13:33:00
20:43:00
28:59:00
36:57:00
42:26:00
49:52:00
56:11:00
60:08:00
66:18:00
72:34:00
79:45:00
86:55:00
95:26:00

  TRACK 10 AUDIO
	TITLE ""Melocoton" (original mix)"
	PERFORMER "Alex Kenji & Bass Kleph"
	INDEX 01 00:00:00
06:03:00
13:33:00
20:43:00
28:59:00
36:57:00
42:26:00
49:52:00
56:11:00
60:08:00
66:18:00
72:34:00
79:45:00
86:55:00
95:26:00

  TRACK 11 AUDIO
	TITLE ""Somewhere" (Bass Kleph remix)"
	PERFORMER "Jesse Voorn"
	INDEX 01 00:00:00
06:03:00
13:33:00
20:43:00
28:59:00
36:57:00
42:26:00
49:52:00
56:11:00
60:08:00
66:18:00
72:34:00
79:45:00
86:55:00
95:26:00

  TRACK 12 AUDIO
	TITLE ""The Knife" (Nic Fanciulli remix)"
	PERFORMER "Plump DJs"
	INDEX 01 00:00:00
06:03:00
13:33:00
20:43:00
28:59:00
36:57:00
42:26:00
49:52:00
56:11:00
60:08:00
66:18:00
72:34:00
79:45:00
86:55:00
95:26:00

  TRACK 13 AUDIO
	TITLE ""Headstrong""
	PERFORMER "Pete Tong & Paul Rogers"
	INDEX 01 00:00:00
06:03:00
13:33:00
20:43:00
28:59:00
36:57:00
42:26:00
49:52:00
56:11:00
60:08:00
66:18:00
72:34:00
79:45:00
86:55:00
95:26:00

  TRACK 14 AUDIO
	TITLE ""LoL""
	PERFORMER "Wally Lopez"
	INDEX 01 00:00:00
06:03:00
13:33:00
20:43:00
28:59:00
36:57:00
42:26:00
49:52:00
56:11:00
60:08:00
66:18:00
72:34:00
79:45:00
86:55:00
95:26:00

  TRACK 15 AUDIO
	TITLE ""Downpipe" (original club mix)"
	PERFORMER "Mark Knight & D Ramirez vs Underworld"
	INDEX 01 00:00:00
06:03:00
13:33:00
20:43:00
28:59:00
36:57:00
42:26:00
49:52:00
56:11:00
60:08:00
66:18:00
72:34:00
79:45:00
86:55:00
95:26:00

But, If I import without action (using the mp3tag menu) I get this:

FILE "Test.mp3" MP3
  TRACK 01 AUDIO
    TITLE ""Cookies With A Smile" (Avicii remix)"
    PERFORMER "Dada Life"
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE ""Conscindo""
    PERFORMER "Mark Knight & Wolfgang Gartner"
    INDEX 01 06:03:00
  TRACK 03 AUDIO
    TITLE ""Calypso" (Manuel De La Mare Shibuya remix)"
    PERFORMER "Jay Lumen"
    INDEX 01 13:33:00
  TRACK 04 AUDIO
    TITLE ""Get Fresh""
    PERFORMER "Moguai"
    INDEX 01 20:43:00
  TRACK 05 AUDIO
    TITLE ""Professional Killers" (Jerome Isma-ae & Daniel Portman remix)"
    PERFORMER "Komytea"
    INDEX 01 28:59:00
  TRACK 06 AUDIO
    TITLE ""I Feel So""
    PERFORMER "Olav Basoski"
    INDEX 01 36:57:00
  TRACK 07 AUDIO
    TITLE ""Bad Davis""
    PERFORMER "Stefano Noferini"
    INDEX 01 42:26:00
  TRACK 08 AUDIO
    TITLE ""Last Ones Standing" (Benny Benassi remix)"
    PERFORMER "Example"
    INDEX 01 49:52:00
  TRACK 09 AUDIO
    TITLE ""Bubblegum" (original mix)"
    PERFORMER "Afrojack"
    INDEX 01 56:11:00
  TRACK 10 AUDIO
    TITLE ""Melocoton" (original mix)"
    PERFORMER "Alex Kenji & Bass Kleph"
    INDEX 01 60:08:00
  TRACK 11 AUDIO
    TITLE ""Somewhere" (Bass Kleph remix)"
    PERFORMER "Jesse Voorn"
    INDEX 01 66:18:00
  TRACK 12 AUDIO
    TITLE ""The Knife" (Nic Fanciulli remix)"
    PERFORMER "Plump DJs"
    INDEX 01 72:34:00
  TRACK 13 AUDIO
    TITLE ""Headstrong""
    PERFORMER "Pete Tong & Paul Rogers"
    INDEX 01 79:45:00
  TRACK 14 AUDIO
    TITLE ""LoL""
    PERFORMER "Wally Lopez"
    INDEX 01 86:55:00
  TRACK 15 AUDIO
    TITLE ""Downpipe" (original club mix)"
    PERFORMER "Mark Knight & D Ramirez vs Underworld"
    INDEX 01 95:26:00

And this is OK. So, I undertand that is not possible create an action group for this? It is a bug of program?

thank you!