Generate CUE file from tracklist?

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)