Lyrics Jukebox

Playing music with synchronized lyrics display for Windows, Linux and Mac


Know how

On this page I will tell you how to obtain synchronized lyrics, how LRC files are constructed, how you can use playlists with Lyrics Jukebox, and which formulas from your physics textbooks are helpful when displaying lyrics.


Obtaining and editing texts with time stamps

unsynchronized

When you start dealing with displaying music with lyrics, the question as of where to find those lyrics arises. Internet search engines tend to link commercial websites that offer unsynchronized lyrics interspersed with advertising (which often contains an astonishing number of errors). They provide links to sites that only pretend to have the texts and cheat their way up the search results even though they have nothing to offer.

If a text cannot be found at all, it sometimes helps to quote some lyrics, you can understand and search in Google. Sometimes websites appear that are not found by a simple search for artist, title and lyrics (or text, testo, texte or texto, depending on the language).

Another way to deal with English lyrics that cannot be found is to use websites that employ special variants of machine learning for audio analysis. At least for some songs, a text transcription is possible with a result that requires only a few corrections. But most of the time, it is still necessary to turn the machine-generated jumble of words into usable lyrics.
In some cases, I had achieved useful results by extracting the vocals with Vocal Remover and then creating a transcription with AssemblyAI.
But now there is the Lyric Potato website that has an automatic text transcription and provides time stamps. However, it still requires some manual work because the automatically recognized lyrics often contain strange errors. The site also has some bugs at the moment (July 2024). For example, when accessed from Germany, it activates an automatic translation of the page content, which unfortunately also affects parts of recognized English-language lyrics. And if you want to download an LRC file, there are two links to the SRT format (for subtitles), and you have to cobble together the LRC link yourself by replacing the letters “srt” with “lrc”. But it's worth keeping an eye on the site.

When you finally have a text, place the text file in the directory of the music file or in the separate text directory under the name of the music file.
Baker's choir - Hiking is the miller's delight.mp3
Baker's choir - Hiking is the miller's delight.txt

At some point, however, you will probably want to add timestamps to the text. There is some software to do this; I recommend looking for a suitable tool on the German Wikipedia page on the LRC file format from the web links.

I don't want to give a specific recommendation because I now have a fairly complete collection of lyrics and have become accustomed to the MiniLyrics editor, which is somewhat impractical to use (I don't really like using F7 to enter the timestamps) but has always worked reliably.
The web editors I tested occasionally no longer had the exact position after correcting lines, which you only notice afterward and then get an unusable list of time stamps. This could also be browser-dependent, but I haven't tested thoroughly enough to evaluate it.
And LRC-Lyricist only supports lyrics files in the music file directory, but I had started with MiniLyrics differently and have all my lyrics separately.

synchronized Lyrics

Of course, it would be nicer if the lyrics were available fully synchronized. I owe a considerable part of my LRC collection to the download function of the foobar2000 plugin Lyric Show Panel 3 (foo_uie_lyrics3), which is no longer maintained.
► Instead, there is now the OpenLyrics plugin, which offers a text display, an automatic or manual download function from various sources and an editor.
► Secondly, the program MiniLyrics from crintsoft (which I also use as a foobar2000 plugin) and
► thirdly, the website Lyricsify are helpful in this respect. They can be found in the web links of the German Wikipedia article.
► Another website with lyrics in LRC format is https://rclyricsband.com/.

MiniLyrics is the most comprehensive solution I know of (lyrics display, its own online database with TXT and LRC lyrics and an LRC editor), but it is apparently no longer being developed, and its website has been unavailable for several weeks on several times – so you'd better hurry up with the lyrics acquisition.
If you use foobar2000 and install MiniLyrics and OpenLyrics as plugins, you already have a combination that will find many lyrics.

► The fifth source for synchronized lyrics is the program LRCGET, which you can find on Github, which attempts to provide lyrics for a complete music collection. It also includes an editor, but it is still rather rudimentary, although it receives regular updates.

► Then there is Musixmatch, but I haven't tried it directly because OpenLyrics also searches for lyrics there.
► And I haven't tried these instructions yet, which allow you to download lyrics from Chinese servers.

If there are other sources for synchronized lyrics that I don't know about, I would be grateful for any tips.

Once you have finally found all the synchronized lyrics files, you need to make sure that they have the same file name as the corresponding music file so that they can be found by Lyrics Jukebox.
Baker's choir - Hiking is the miller's delight.mp3
Baker's choir - Hiking is the miller's delight.lrc


The LRC file format

The LRC file format is not standardized in the way that many other formats are, where a standardization committee is responsible for providing official descriptions of the standard.
In this section, I try to collect all relevant information about the LRC format.

According to various statements on the net (which, however, seem to be largely copied from each other or from Wikipedia and are ultimately all based on a sentence from the FAQ included with the "A2 Media Player" version 2.51), the basic structure seems to have been designed in the 1990s by a programmer in Taiwan who needed a solution for his lyrics display program. The type of time stamps was then adopted by other developers, who also made extensions according to their own ideas, so that LRC files from different sources can be structured somewhat differently (the author of the above-mentioned LRCGET program has also come up with a private variant of the LRC format: all lines start with a space, and the LRC editor forces an empty line at the end).
Lyrics Jukebox should be able to cope with all LRC variants, so if you find files that are not displayed correctly, please send me an e-mail.

After the establishment of the LRC format, websites were created on the Internet where users could upload lyrics and thus build up a large LRC collection. However, some of these sites no longer exist (e.g. https://web.archive.org/web/20111025202311/http://www.lrcfiles.com/ or https://web.archive.org/web/20120701190252/http://www.lyrdb.com/karaoke/index.htm or http://powerlrc.atspace.com/). Some still exist but are no longer maintained (e.g. https://cool-lyrics.tripod.com/). The four active ones (that I know of) are listed above under the Sources for Synchronized Lyrics.

To view an LRC file, you do not need any special software, a text editor will do, it is just a text, only not with a .txt extension, but with an .lrc extension.
The beginning of such a file could look like this:

[ar:Bäckerchor]
[ti:Das Wandern ist des Müllers Lust]
[au:Musik: Carl Friedrich Zöllner / Text: Wilhelm Müller]
[la:de]
[offset:500]
[00:13.45]Das Wandern ist des Müllers Lust,
[00:17.32]das Wandern ist des Müllers Lust,
[00:21.26]das Wandern!
[00:25.45]Das muß ein schlechter Müller sein,
[00:29.45][00:33.45]dem niemals fiel das Wandern ein,
[00:37.38][00:53.49]das Wandern.
[00:41.42]Das Wandern,
[00:45.42][00:49.42][00:51.49]das Wandern,
[00:57.43]
[01:01.50]Vom Wasser haben wir's gelernt,
[01:05.47]vom Wasser haben wir's gelernt,
[01:09.41]vom Wasser!
[01:13.41]Das hat nicht Ruh bei Tag und Nacht,
[01:17.47]ist stets auf Wanderschaft bedacht,
[01:21.45]ist stets auf Wanderschaft bedacht,
[01:25.39][01:41.45]das Wasser.
[01:29.39]Das Wasser,
[01:33.45][01:37.45][01:39.39]das Wasser,

In this example, you can already see all the essential elements of a simple LRC file, and you can usually guess what they are intended for.
Basically, an LRC file consists of two types of text lines:
1. The ID tags
2. The lines of lyrics preceded by timestamps

The ID tags

At the beginning of the example, there are ID tags in square brackets on each line, which describe the LRC file ("ID" stands for identification).
These are the artist behind the tag ar:, the title in the tag ti:, followed by the composer and lyrics author (au:), the language(la:) and an offset (offset:).
Whether a music playback program uses these tags depends on the programmer. Lyrics Jukebox ignores most of them and instead displays the artist and title information contained in the song's tags. It might make sense to use the tags of the LRC file if the corresponding tags are missing in the music file, but since my music collection is fully tagged, I haven't found this important so far.
The position of the tags in the LRC file is not fixed; sometimes they appear in the middle of the lyrics or at the end. And many LRC files contain no ID tags at all.

An important tag is the offset. The number specified in it is a time in milliseconds that can be used to synchronize the beginning of the track and the first line of the LRC text. This is needed because the same pieces of music from different sources often have a different length of silence at the beginning; in one version music might start after a second, in the others immediately. As a result, the entire lyrics created for the case with the single second will usually be displayed one second too late for the other case. The offset:1000 entry would correct this. In the opposite case, the entry would have to be offset:-1000.
At the moment, Lyrics Jukebox only evaluates two tags, the offset and the language. As described, the offset shifts all timestamps during playback, and depending on the la tag, you can select a different font for tracks in the language marked with it.

Here is a list of the ID tags I have come across so far:

TagMeaningExamples
ar: (Artist) Name of the performer, band or orchestra[ar:Agnetha Fältskog]
ti: (Title) Title of the track[ti:Tack för en underbar, vanlig dag]
al: (Album) Album on which the piece of music was released[al:Elva kvinnor i ett hus]
au: (Author) Composer, lyricist[Agnetha Fältskog / Bosse Carlgren]
length: Length of the track in the form mm:ss, also mm:ss.cc[length:2:38]
[length:2:38.11]
la: (Language) Language of the text in the form of two letters of the ISO 639-1 notation[la:sv]
by: (Entered by) Author of the LRC file
[by:Flinx]
offset: Offset for all timestamps in milliseconds[offset:-100]
re: (Remarks) Remarks of all kinds. Some programs write their name here.[re: LRC Editor - Android app]
ve: (Version) Version number. Originally intended for the version of the extended LRC format (described below), the LRC editors now sometimes leave their program version here.[ve:V2.20]
[ve:Version 2.4.1]
tool: The device or program with which the LRC file was created[tool:LRC Maker https://lrc-maker.github.io]
id: (Identification) An internal identifier of the MiniLyrics database[id: lq_khiqqpqk]
artist: The same as ar:[artist:Chris de Burgh]
title: The same as ti:[title:Say Goodbye To It All]
album: The same as al:[album:Into the Light]
Artiste: The same as ar: (French)[Artiste: Alan Jackson]
Titre: Same as ti: (French)[Titre: Don't Rock The Jukebox]
Album: The same as al: (French)[Album: Don't Rock The Jukebox,(1991)]

Lyrics with time stamps

The text that is to be displayed with the music has a timestamp at the beginning of each line. This timestamp indicates the exact time whenthe line should start.
There are four syntax cases for this timestamp:

[mm:ss.cc] The most common case. mm are minutes,ss seconds and cchundredths of a second.
[mm:ss:cc] Similar, but with a colon instead of the decimal separator between seconds and hundredths of a second.
[mm:ss.ttt] Similar, but with thousandths of a second ttt.
[mm:ss] Only minutes mm and seconds ss.

The second case could be regarded as an error. The programmer has probably not understood that the seconds in the other three cases are simply floating-point numbers.

Lyrics often repeat lines - think of the chorus of many songs. To keep the LRC files small, identical lines can be combined. The text line is then only present once and all timestamps are listed one after the other at the beginning of the line. This occurs several times in the example above, for example here:
[00:45.42][00:49.42][00:51.49]das Wandern,

The extended LRC format

For karaoke, the normal LRC format is not sufficient. The first karaoke systems in Japan not only marked the current line but also the individual words or syllables. To achieve a similar display, the extended LRC format was created. (It was designed for a program called "A2 Media Player", with its last version released in 2005).
Additional time stamps within the line are used for more precise marking. These additional time stamps are called "Word Time Tag", they have the format <mm:ss.cc> and can be placed anywhere in the text. A line of the example lyrics from above could look like this:

[00:13.45]The <00:14.05>hiking <00:15.05>is <00:15.49>the <00:15.98>Müller's <00:17.02>lust,
or like this
[00:12.95]<00:13.45>The <00:14.05>hiking <00:15.05>is <00:15.49>the <00:15.98>Müller's <00:17.02>lust,<00:17.23

In the second case, the additional times at the beginning and end of the line are used to change the display of the line that is currently in focus during playback, regardless of whether the words are selected.

For the time being, Lyrics Jukebox can only mark the entire line of text, but not individual words. I don't know yet whether I will add this at some point but at the moment, timestamps in the extended LRC format are only hidden from the displayed text.


Blank lines with end-of-line time stamps

Sometimes downloaded LRC files contain the end times of many or all lines of the lyrics as an empty line, sometimes completely empty, sometimes with a blank space. Often these times are combined at the beginning of a line. It will look like the following:
[04:19.62][04:14.63][04:07.26][04:03.33][03:55.64][03:48.96][03:45.29]

For example, lines with end times also arise when you convert lyrics from the SubRip subtitle format to the LRC format using a tool like the SRT to LRC Converter.

Because such lyrics with increased line spacing look rather unfavorable in Lyrics Jukebox, the program has two options for dealing with them.

Actually, LRC files with empty lines combined into one line with many time stamps do not differ formally from those in which the lines are separate, but there is a practical reason why I distinguish between them in EmptyLinesThreshold: Among the LRC files I've downloaded, there are hardly any that have separate blank lines intended as line endings. This probably depends on the tools used to create the files. In any case, with the separate thresholds, the heuristic's hit rate is better.
  • By default, Lyrics Jukebox tries to guess whether empty lines with a timestamp are the desired empty lines that often occur between verses and choruses, or whether they are just timestamps with the end time of the previous line. To do this, the ratio of the number of text lines to the number of empty lines is used. If there are more than about a third empty lines, they are considered end times and not displayed.
    You can control this behavior with the configuration entries EmptyLinesThreshold and EmptyLinesThresholdC. If you want to disable this heuristic completely, enter 1 for both values.
  • Furthermore, I have provided the HideSpaceLines parameter to hide such lines manually. Lines that consist of only one blank space are hidden. In the example here, you would therefore place a single space at the end of this line in the LRC file to make the seven empty lines invisible.
    However, there is also a special case here: Because some LRC editors add a space between the timestamp and the song line to all lines, Lyrics Jukebox removes this space internally when reading in the text (in order to center the lines properly). For such LRC files, you must enter two spaces instead of one.

Of course, you could also simply delete the blank lines. The advantage of the procedure described is that the blank line is no longer displayed, but the highlighting of the previous active text line is still removed at the specified time and not only when the next line is due.


Embedded Lyrics in Music Files

There have been attempts to establish standards for embedding lyrics in MP3 files.

For unsynchronized lyrics, there were Lyrics3 and Lyrics3 v2; but more up-to-date is the ID3 frame USLT of the tag formats ID3v2.3 and ID3v2.4.
► Lyrics Jukebox reads the content of an USLT frame and also recognizes if there is a LRC text in it.

For synchronized lyrics, the A2 Media Player already had a function for embedding the text in the ID3 tag. This function tries to insert a frame called A2LC into the tag, but it probably only works for outdated ID3 versions. In my tests with MP3 files that contain an id3v2.3 tag, the program failed to calculate the frame sizes correctly and partially overwrote the APIC frame (contains a album cover) each time. So there's little point in trying to support it.

Then there is the ID3 frame SYLT of the ID3v2 tag format (see section 4.9). In this frame, the timestamps are given syllable- or word-wise in the form of a 32-bit binary number, and the end of the line is marked with a line feed. This is not as flexible as the extended LRC format because the time stamps do not distinguish between words and lines. The description of the frame is also a bit imprecise, which is probably why it is not widely used yet.
► Lyrics Jukebox currently supports reading a SYLT frame in the form written by MiniLyrics when you select the "Save lyrics to song file..." function in the "Lyrics Editor" and select the ID3v2 format. This variant differs somewhat from the description at id3.org: timestamps are given line by line, and there are no line breaks, but the timestamp also marks the end of the line.


Working with Playlists

Lyrics Jukebox currently supports the playlist formats M3U and EXTM3U.
There are several options for using playlists.

  • First, you can specify a playlist in the PlayList configuration parameter. This playlist is then loaded instead of the automatically generated one, so the configuration entry MusicDir has no meaning in this case. This playlist is then treated in the same way as one generated from directory contents, i.e. also reordered for random playback (depending on the configuration). The playback frequency is also controlled according to the RatingList.
  • Secondly, if all the tracks listed in a playlist are in the MusicDir or MusicSpareDir directories, there is another practical option. If you enter this list in the OldPlayList configuration entry, the internal playlist is reordered so that all the tracks in the OldPlayList are at the beginning. Then all other tracks from the two music directories that are not in the list will be added.
    The paths of the list taken over in this way are ignored (the paths are known), and so it is also sufficient to list only the file names of the music tracks in the list. This is also useful if you have moved music tracks in the directories to a different location.
    You could also use this function to create a new playlist with the correct paths for this case (which will then also work in other programs). To do this, enter a file name in ExportPlayList. The complete internal playlist is then exported to this file as M3U format.
    If an OldPlayList has been imported and a RatingList is activated at the same time, the tracks in the OldPlayList are ignored when the RatingList is evaluated so that the tracks in the OldPlayList are played back in their exact order.
  • The third method to play a playlist is to drag and drop it into the program window with the mouse. However, the music tracks in this list are then inserted in the same way as the search and jukebox options. This means that the tracks you select using the search or jukebox are then sorted after the playlist inserted using drag & drop. This type of import is therefore only useful for short playlists.

Resetting the playback position

If you want to start playback from the beginning after making changes to the playlists, you can do so by removing the name of the current track from the last line in the text file defined in StateFile (LJ_Status.config by default).
If required, you can also trigger the reading of the directory content of the music folders and the rebuilding of the internal playlist and the cache of the album covers by changing the value of Music Hash.
You can also delete the entire file, but then the saved settings will be lost, for example the volume, the jukebox settings or the current radio station.




Recap Kinematics

This section isn’t necessary for Lcrics Jukebox users, but might be interesting for someone who wants to develop a similar feature in another programming language.
After much trial and error, I finally got the text scrolling and animated, I thought to myself: You'd better write a documentation of the algorithm so that you’d still understand your program in a few years' time. So let's revisit 9th grade physics class and calculate the scrolling speed.

Initially, I calculated the speed needed for the bottom line of text to reach the middle at the desired time. To avoid a jerky movement, I averaged the speeds of all lines below the center. Since it still looked choppy, I added damping to prevent sudden speed changes. While this usually worked, there were always exceptions. For instance, fast moving text lines followed by a longer pause, caused lines to scroll outof the view too soon. Therefore, I needed an emergency brake and more special cases kept cropping up, which became frustrating.

In the end, I rewrote the entire calculation to determine acceleration instead of required speed. This might sound familiar from school,or you can also find it online by searching for uniformly accelerated motion with initial velocity. The explanations often involve cars, but the principles apply equally to km/h and pixel/s.

Given the distance s to be covered, the time t available, and the initial speed v1, then we obtain the necessary acceleration a as follows:

a = 2 s - 2 v 1 t t 2 a = { 2 cdot s - 2 cdot v_1 cdot t} over t^2

A physics teacher might explain that distance and time should actually be differences, with delta symbols, and everything should be vectors. But we prefer to keep things as simple as possible. We don't need vectors since velocity and acceleration are in the same direction. Then, for example, we define the beginning of the distance Δs (delta s) as zero, making Δs the same as s because it is calculated as the end minus the beginning.
(However, it doesn't hurt to know about the differences, because you might understand better later on how mathematicians ultimately came up with things like differential calculus. But we don't need to go that far here).

Now that we know how to calculate acceleration , we can determin how far the text lines need to be move when the scroll function is called, which is responsible for moving all text lines up a few pixels in short intervals. We know the current speed, acceleration, and the time since the last scroll, and we need the distance s:

s = v 1 t + a t 2 2 s = v_1 cdot t +{ a cdot t^2 } over 2

And we need the new speed v2 for each scrolling process:

v 2 = v 1 + a t v_2 = v_1 + a cdot t

All three formulas can also be found in the program. This would suffice if we didn't have a special requirement: After all, the text should only ever move forwards (upwards). Uniformly accelerated motion does not guarantee this.

The following diagram shows the relationship between speed v, time t and distance traveled s. The distance is shown as an area, the product of speed and time.

Diagramm für konstante Geschwindigkeit

In this first diagram, the speed is constant (i.e. the acceleration is zero).

With positive acceleration, it looks like this:

Diagramm für positive Beschleunigung

With increasing time, the speed and the distance traveled per unit of time increase.

With negative acceleration (i.e. braking), it can look like this:

Diagramm für negative Beschleunigung

With increasing time, the speed and thus the distance traveled per unit of time decrease.

Negative acceleration can also have other effects that may not immediately come to mind if you only think of the car examples you have just found on the internet. Have you ever thrown an object into the air, like an apple? It is also accelerated negatively because it is subject to gravity. It moves upwards, slows downthen speed changes from positive to negative, and the apple comes back down again.
The diagram looks like this:

Diagramm für negative Beschleunigung mit Richtungsumkehr

The speed decreases evenly and finally becomes negative. (In this example, the apple falls not as far down as it was thrown upwards, it has probably landed on a roof).

Our first formula for calculating acceleration, time and speed, works here, but unfortunately it delivers a result that doesn't help us. After all, we don't want our song lyrics to scroll far upwards and then back down to arrive at the right time, but in the wrong direction. The fact that the desired path was actually covered mathematically is shown in the diagram by subtracting the negative path from the positive one. The left-hand dark area of s therefore represents our predetermined path.

Constant acceleration cannot use the first formula without reversal of directions. So the program therefore checks whether the speed v2 would be negative at the destination, and if so, it chooses a negative acceleration that allows the text to reach the destination point with zero speed and then waits until it continues with the next line:

a = 0 - v 1 2 2 s a = { 0 - v_1^2} over {2 cdot s}