Pasting lyrics from text files

Hi all,

I am currently working on getting the song's lyrics into the tags of my music collection. So I first started by creating a directory structure, which is equal to those in my music collection. The difference is, that this new directory structure does not contain the music in Ogg Vorbis format, but text files containing the lyrics.
I already collected a quite bunch of lyrics that way (though I'm not finished yet).

But I wonder if, from mp3tag, there is any way to paste tags from a collection of files, some operation like "file content -> tag".

I found that "file content -> tag" works like you select one file and tags are being copied line by line. Now, the problem is of course that my lyrics file contain multiple lines each file, but all lines need to be copied into a single tag field.

So is there any way to select the lyric's directory tree's root level and let mp3tag take the information to tags file by file (by following a path given from format string or sth. like that) ??

I would be grateful for any help on this.

Thanks! :slight_smile:

If you wan to copy tags from one set of files (perhaps MP3) to others (here perhaps ogg vorbis) it might be an idea to use the function "Copy tag" and "Paste tag": If order and number of source and target files match, you can copy the tags 1:1 in one go.

If you stay with the text file option, then you have to make sure that you have one line per file (one record). You would have to replace the line breaks (carriage return, line feed) with some meta-character like "#".
After the import you replace the "#" again with line breaks (carriage return, line feed).
There is no other way.

Here is a link to a similar problem: /t/10185/1

So I would do "copy tag" on those text files that contain one line each file? And than I could paste the tag into my music files? Just to make sure that I'm understanding you right.

I am not sure that we got it in sync:
The "Copy tag" function really copies the tag of one source file (e.g. Waterloo.mp3) and the function "Paste tag" pastes all the tag data to a target file (e.g. Waterloo.ogg).
The good thing is: if you have the whole album in mp3 and you now want to get all the tag data to the ogg files, you simply arrange all the mp3 files and all the ogg files in the same order.
Then select all the mp3 files and copy the tags.
Now select all the ogg files and paste the tags.

Ok, I understood that part, but I thought I could extend this scenario to *.txt files, which, as I found out, does not work since *.txt are not shown in mp3tag and adding the file extension in the config does not make the scenario work. And mp3 files or other files, where the lyrics I want to copy are already in, do not exist.

However, your first post gave me the idea which I did now:

Wrote a short console program which just concatenates the contents of all found *.txt files into one file, replacing newlines with the placeholder #CRLF#.

The result was a text file which contains all lyrics of all songs, line by line.

I successfully got them into my ogg files tags by using "file contents -> tags", but now I of course want to replace the #CRLF# placeholder with real newlines again. But I don't know how to express a newline character in mp3tag script language. I currently have:


where fistbump has to be the real newline I want to get into the tags.

See the help for such characters:

Use an action of the type "Replace" for UNSYNCEDLYRICS
Search string: #crlf#
Replace string:$char(13)$char(10)

Mp3tag offers a type of Action, which is called "Import text file".
This action can import text data from a text file into a tagfield of your wish.
Text can be read from one given textfile or ...
by the option of scripting the filename text can be read from different textfiles.


As an example:
Action type: Import Text file
Filename: %albumartist% - %title%.txt

This filename-definition works if you have placed your lyric-files in the album folders with the tracks and the naming scheme of the lyrics-files is like this. Otherwise you have to define the filename according to your naming scheme.

But you can also take the lyric-files from different paths, like this:
Filename: C:\Lyrics\%albumartist%\%album%\%albumartist% - %title%.txt

If you mark all your music-files and execute such an action the files get the unsyncedlyrics-tag filled from a text-file with this special name in the corresponding folder.

Thanks for these replies. I guess this is the easiest way to get my lyrics into the songs, though I can skip the "concatenate-and-replace" stuff.

Perfectly worked.