Generate CUE file from tracklist?

I'm searching for the easiest (automatic) way to create a cuesheet from a textfile like this for example:

01.Aerospace - Space Odyssey - 07:44
02.Dino Psaras - Neverland - 09:24
03.Neelix - Inquisition Synphonie - 08:52
04.Silent Sphere vs DJ Bim - Revolution - 08:06
05.Cosmic Tone - End Of Time - 06:11
06.Elec3 - Innervoice - 07:11
07.Mad Contrabender vs Psytrain Psychic Content - 08:03
08.Miditec - Hidden Signs - 07:57
09.Interactive - Return To The Source - 07:21
10.Genetic Spin - Chemical Principles - 07:51
11.Elec3 - Acidtest - 06:21
12.BLT vs 40 % - SPO - 07:24
13.Mahamudra - 4th Dimension - 06:52
14.PsyNina - The Legend Sophia Scholl - 08:10
15.Smugh - Virus - 07:21
16.Lucky Seven - New Crypton #7 - 06:29
17.Miditec - Botanical Seduction - 08:10
18.Galactika vs PsyNina - Cocaine Serotonine - 07:24
19.Ace Ventura and Lish - The Light - 10:00
20.Gaudium - Calm Reality - 07:32
21.Freq - Brazil (Brush Mix) - 08:20
22.Nyquist - Digi - 05:57
23.Emok - Da Shizzy - 10:27
24.Motion Drive - Deception - 08:14
25.Behind Blue Eyes - Rumble In The Cave - 08:09
26.Trancemission and Saeg - Forget About It - 06:57
27.Prahlad - Homage To R A Moog - 08:56
28.Psytrain - Royale Rumble - 07:16
29.Rumble Pack - Timecode - 07:36
30.Galactika and Alexander Ligowski - 3 Stiff - 07:38
31.U-Recken vs Nitro - Eternity - 08:00
32.Oforia - Headed For Infinity (Fatali Rmx) - 08:52
33.Astrix - Poison (Wrecked Machines Rmx) - 08:26
34.X-Noize - Live Or Die (Rmx) - 07:55
35.Xerox And Illumination - The Beast Within - 07:13

I don't have the single tracks, it's one long file (dj session). Is there an application which can import this and save as a cuesheet with all informations? I found QeD, but this doesn't import the times. Is it possible do it this with an script with mp3tag??? :music: :laughing:

Thanks!

How would a correct cuesheet look like for you? Can you give a small example?
Into what tag field should Mp3tag store the converted text? Or do you need a textual report output?

Be aware that the shown play durations per song title, which are rounded to seconds, may not fit to the existing cut or crossover points within the big mix file.

Because you speak about only one file, I recommend to use a text editor and convert the given text file into cue sheet format once by hand.
Wikipedia can help about the format to be needed:
http://en.wikipedia.org/wiki/Cue_sheet_(computing)

I also recommend to look there ...
http://mpesch3.de1.cc/mp3dc.html

DD.20110320.0720.CET

Hi,

I need get a text file, after I will rename to .cue. For example, if I have this tracklist:

Electric Calm V.1
The Forth

01 Soku Feat. Jess Okoro - Time On My Hands     5:41     
02 Bluefish - Two                         5:10     
03 Stef, Pako & Frederik - Seaside Atmosphere     5:54     
04 Pako & Frederik - Atlantic Break(er)s         8:59     
05 Traffik - Your Light (I'm Dark Calm Electric)    2:49     
06 Forth - Solavox (Traffik's Tambura Psalm)     6:32     
07 Digital Monkeys - Skyline                 4:37     
08 Forth - Secret Silence                     1:01     
09 Pink Bomb - Amsterdam By Night             5:54     
10 Pink Bomb - Requiem                     5:01     
11 Traffik* - The Perfume Suite                 7:00

I want get this txt file:

TITLE "Electric Calm V.1"
PERFORMER "The Forth"
REM ** Generated by CueMaster v1.6 **
REM Time  : 58:45:00
REM Length: 3525 seconds
REM Year  : 2002
REM Genre : Ambient
REM DiscID: 8c0dc30b
FILE "The Forth - Global Underground Electric Calm v1 [Mixed by The Forth].mp3" MP3
  TRACK 01 AUDIO
    TITLE "Time On My Hands"
    PERFORMER "Soku feat. Jess Okoro"
    PREGAP 00:02:00
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "Two"
    PERFORMER "Bluefish"
    INDEX 01 05:41:07
  TRACK 03 AUDIO
    TITLE "Seaside Atmosphere (Evolution AmbientSeagull)"
    PERFORMER "Stef, Pako & Frederik"
    INDEX 01 10:51:32
  TRACK 04 AUDIO
    TITLE "Atlantic Break(er)s"
    PERFORMER "Pako & Frederik"
    INDEX 01 16:46:02
  TRACK 05 AUDIO
    TITLE "Your Light (I'm Dark Calm Electric)"
    PERFORMER "Traffic"
    INDEX 01 25:45:67
  TRACK 06 AUDIO
    TITLE "Solavox (Traffik's Tambura Psalm)"
    INDEX 01 28:35:00
  TRACK 07 AUDIO
    TITLE "Skyline"
    PERFORMER "Digital Monkeys"
    INDEX 01 35:07:17
  TRACK 08 AUDIO
    TITLE "Secret Silence"
    INDEX 01 39:45:05
  TRACK 09 AUDIO
    TITLE "Amsterdam by Night"
    PERFORMER "Pink Bomb"
    INDEX 01 40:47:02
  TRACK 10 AUDIO
    TITLE "Requiem"
    PERFORMER "Pink Bomb"
    INDEX 01 46:41:17
  TRACK 11 AUDIO
    TITLE "The Perfume Suite"
    PERFORMER "Traffik"
    INDEX 01 51:42:17

I don't want split mp3 file with mp3tag. I have CUE media splitter for this. I know mp3DirectCut but this program don't have this function. I only want the txt file.

The main problem is that calculate the index time. I know the duration of the song but not index time! I hope that duration total of session is the same as the sum of all.

Sorry my english is very bad you understand me?
Thank you!

The format text will can change! Normally the string it is:

%track% %artist% - %title% MIN:SEG

But I would like to have the possibility to modify this string if I have diferent traklist!

Thanks!

The more important are:

Title
Artist
Index time

The other items are not important. With mp3tag I will write when I split mp3 file session.

Ok, this is a decision which will work for you.
With Mp3tag you can work after you have split the big mix file into parts.

So far as I know something about Mp3tag, it is not possible for Mp3tag for doing such text manipulation you need to convert a given textual track list of "track artist - title playtime" or "track.artist - title - playtime" into a detailed .cue cuesheet list.

Mp3tag works on audio files and can create reports about data given by these files.
Mp3tag can also do simple integer math, calculate sum and such, but cannot work with fractions of seconds in a simple way.
The calculation about fractions of seconds needs rather sophisticated usage of the Mp3tag math functions and I am not convinced yet, whether it could be done or not.
Well, since the 'Frames' value is an integer value, it should be possible anyway.

You should try to get the original cuesheet coming along with the big mix file - or sit down 5 minutes and write the list manually into a text file using some text editor.

You can also search the internet for free tools or web services, which can, for example, convert a list of freedb entries into a cuesheet format.

DD.20110320.0836.CET
Edit.DD.20110321.0940.CET

that's the way I do it:
/t/10090/1

thanks for reply! I will check pone's info for try it!
If don't work I will use cue master! this program can download cuesheet from internet db. Or I will write manually :frowning:

thanks!

Now I reply you in your post!
thanks!

I have also done this:
/t/10946/1

But it only works for timestamped tracklists
like:
[00:00] Artist 1 - Title 1
[04:30] Artist 2 - Title 2
[08:45] Artist 3 - Title 3
...

It does not work perfectly. It does not work when there are hours in the timestamp. And it does not write the correct trackindexes. You have to change them afterward.

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.