Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display lyrics as per song playing in android? [closed]

I would like to create music player, with a textView displaying lyrics of MP3 being played. The lyrics should displayed in sync with music.

I want to know that how to get lyrics and for display the text I refer this example.

Any suggestions on how I can do this? I am stuck in this.

Thanks in advance.

like image 300
anddev Avatar asked Dec 20 '22 04:12

anddev


1 Answers

Use the following music metadata library.

http://javamusictag.sourceforge.net/

You can go to documentation and look for Lyrics tag and follow it. Normally you would open the mp3 file and extract the vaule of the Lyrics tag. Note that this may or may not be available inside the mp3. (I suggest you use a tagged mp3 for testing) If the info is there. You will be able to extract it as a String or a buffer.

That info will look like this

[00:02]Let's talk about time
[00:05]tickin away every day 

Now you just need to display the line according to the time given at the front of the line. This should be simple enough, just do some string operations.

like image 75
Arveen Avatar answered Dec 22 '22 17:12

Arveen