ACTIONS - Export Lyrics as the Export Cover..


#1

Well, I've tested the Actions|Export Cover and it works well! :slight_smile:

But actually I am more interested in exporting the ID3V2 Lyrics from the mp3 file by just using the same concept. :music:

I believe it's possible.

Any comments?

Thank you..


Lyrics in Einzeldateien: Import <-> Export
#2

Is it impossible? :frowning:


#3

Yes.


#4

Thanks for your response.

But can you please explain why is that so? :astonished:

Coz logically what I see it's the same concept i.e. extract the metadata from the mp3 file, instead of the %_cover_mimetype%, read the %unsyncedlyrics%

Isn't it? :unsure:


#5

From my quick test I think that this isn't possible because you want each set of lyrics to go into a separate file. The Export action seems to create one file for all selected items. I think you could easily export the lyrics into one large file though.


#6

Ermm.. Anyone from the mp3tag team to confirm about this? :frowning:

Again, I see it as the same concept as the Export Cover, not the general Export.

Thank you.


#7

For exporting text data do use the Mainmenu/File/Export section.
At first step export a dataset of tagfields like TITLE, UNSYNCEDLYRICS etc. into a CSV export file or something alike. At second step split the export file into separate text files by a DOS commandfile or so.

Well, it would be very handsome to have a $filename() function which can be used anywhere in an Mp3tag export script to re-define the current output file on the fly as need. I've suggested it repeatedly.

From the logical or conceptual point of view to the Mp3tag user interface regarding meta data of covers and unsyncedlyrics I can see that both meta data should be handled in the same way.
That means, the unsyncedlyrics data should have its own SaveAs dialog and action type for creating a separate text file. And further on ... there should be a distinguished Open dialog and action type to read a text file into an unsyncedlyrics tag field.

DD.20091127.1328.CET


#8

Anyway, this is also what I would like to achieve a very long time ago..

Export Configuration

$filename(txt)$loop(%_path%)%artist%  - %title%
---------------------------------------------------------------------------------------
$trim($replace($regexp(%unsyncedlyrics%,^eng,),'||',))
%dummy%
%dummy%
$loopend()

Thank you so much Mp3Tag developers! :slight_smile:


#9

Column Customization:

Just a simple column to indicate if the mp3 is embededded with IDV32 Lyrics:

$if(%UNSYNCEDLYRICS%,X,)

To tell whether the Lyrics is timestamped or not:

$ifgreater(20,$replace($strchr($regexp(%UNSYNCEDLYRICS%,':',:),:),0,1000),'Y',)

#10

The following expression detects whether the tag field UNSYNCEDLYRICS contains data, and if so, then displays "Yes" or "No" with respect to embedded time stamp string of format "[MM:SS.hh]".

[$ifgreater($len(%UNSYNCEDLYRICS%),$len($regexp(%UNSYNCEDLYRICS%,'\[\d\d\:\d\d\.\d\d\]',)),'Yes','No')]

DD.20100416.1418.CEST


#11

Hello friends.

As of now, is this possible with a file for each track and not just all lyrics appended in a single text file?


#12

each export gives you one export file as output.
if you want a file for each track, run a export for each track separately.


#13

Ohh that seems a bit cumbersome, when you have let's say, 100 tracks :wink:


#14

Or thousands.

I'm simultaneously adding lyrics to my current .mp3's and re-ripping my CD's at higher bitrates, and looking for a way to get the lyrics from the lower-bitrate tracks into the higher bit-rate tracks.

A batch export to & import from .txt files of the same name as the .mp3 would be awesome. I'm not smart enough to figure it out how to do though.

I know I can at least accomplish the imports one at a time with the Covert: Text File > Tag function. I'm just wishing that the open dialog there would accept %_filename% (.txt) or something, and do them all at once.

Also wondering where the Covert: Tag > Text File feature is. Perhaps I just haven't found it yet. Found it!

Awesome, neat program I'm still exploring.


#15

I managed to create a template for exporting unsynced lyrics to individual files.
Unfortunately I found no way to prefix each line with a dummy timestamp like [00:00.00].
Maybe somebody could add that.
The code for the template is:
'[ti:'%title%']'
'[ar:'%artist%']'
'[al:'%album%']'
$puts(T1,%UNSYNCEDLYRICS%) $puts(T2,$get(T1)'[[Lyrics provided') $puts(L1,$sub($strstr($get(T2),'[['),1)) $puts(T3,$left($get(T2),$get(L1))) $puts(L2,$sub($strstr($get(T2),'Lyrics provided'),1)) $puts(T4,$left($get(T3),$get(L2))) $puts(L3,$sub($len($get(T4)),5)) $puts(T5,$right($get(T4),$get(L3)))
$get(T5)
=========================
Please note that the ""$puts" are all in one line!

Whenever I use a "$puts" on a separate line, a blank line is output during export - would be nice if that could be fixed. I don't see the purpose of this behaviour, as the "$puts" is supposed to be "silent", opposite to "$put".

How to use this to export:

  1. Add the root folder of the music files to export via the "file / add folder" menu,

My files are organised in subfolders like
rootfolder\artist\album\song.mp3

  1. Select all files you want to work on, then click the export icon.

  2. In the export dialog, select any export template, click the "duplicate" icon, select the duplicate, click the "edit" icon, copy the code above and paste it into the template, and save it.

  3. In the export dialog, select the new template you created, use "%_filename%.lrc" in the "filename" box, and check the "create one file per directory" option, and click "OK".

You will then find one "*.lrc" file per song in the root folder of the mp3 files.
Hope this works for you.

What I would need is a "loop" function over all lines of a variable's content, to be able to prefix each line with something. If anybody has any ideas, please let me know.

Pete


#16

You could use a $replace function:
$replace(%unsyncedlyrics%,$char(13)$char(10),$char(13)$char(10)'['00:00:00']')


#17

I just thought about trying the replace function for regular expressions with "\n" to be replace by "\n" plus the dummy timestamp.

I also forgot to mention that I'm cutting off anything that starts with "[[" as some of the lyrics have some "[[lyrics added by ...]]" at the end, and others have "Lyrics provided by ..." at the end, which I'm cutting off too.

And I noticed I overlooked the "$cutleft" function that would have saved me the calculation of the string length to get rid of the leading "xxx||" at the start of the lyrics.


#18

I modifed my template. Using the cutleft function now, and replacing begin-of-line by dummy timestamp.

Code:>>

'[ti:'%title%']'
'[ar:'%artist%']'
'[al:'%album%']'
$puts(T1,%UNSYNCEDLYRICS%) $puts(T2,$get(T1)'[[Lyrics provided') $puts(L1,$sub($strstr($get(T2),'[['),1)) $puts(T3,$left($get(T2),$get(L1))) $puts(L2,$sub($strstr($get(T2),'Lyrics provided'),1)) $puts(T4,$left($get(T3),$get(L2))) $puts(L3,$sub($len($get(T4)),5)) $puts(T5,$cutleft($get(T4),5)) $puts(T6,$regexp($get(T5),'^','[00:00.00]'))
$get(T6)
=========================

<<code