Web Playback Technology Lyrics Sync

Source: Internet
Author: User
Tags array object end expression net sleep window
The Web page WMP and real both have their own special lyrics, and they are both common lyrics expression. WMP Special lyrics are expressed in the form of *. SMI file is implemented, real-specific lyrics are expressed in the form of *. The RT file is implemented, both of which are common lyrics in the form of *. LRC files.

SMI Lyrics File

Click the Play button to see the effect (there is a buffer process, we have to wait for a moment). SMI file has a special production software, very convenient, the method behind the details. can achieve the lyrics of a single line, multi-line and karaoke and other special effects. SMI lyrics are actually implemented using the WMP Closed Caption attribute.

The code is as follows:

<object id= "Aboutplayer" classid= "Clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" height=150 width=200><param name= " Uimode "Value=" "none" > </OBJECT>
<table height=100 width=200 border=3 bordercolor=blue>
<TR align=center>
<TD Bgcolor=white><font color=olive size=2>smi demo </font> </td>
</tr>
<TR height=75>
<TD bgcolor= "Green" ><div id=captext> </div> </td>
</tr>
</table>
<table width=200>
<tr>
<TD align=center><input type= "button" value= "Play" > </td>
<TD align=center><input type= "button" value= "Stop" > </td>
</tr>
</table>
<SCRIPT>
function Play ()
{
Aboutplayer.closedCaption.CaptioningID = "Captext";
Aboutplayer.closedCaption.SAMIFileName = "Http://lrc.aboutplayer.com/goodbye.smi";
Aboutplayer. URL = "Http://www.shijiren.net/wma/g00146001/g0014600101.wma";
Aboutplayer.controls.play ();
}
function Stop ()
{
Aboutplayer.controls.stop ();
}
</SCRIPT>

The crux of the matter is the following three sentences:

Aboutplayer.closedCaption.CaptioningID = "Captext";

The location ID of the lyrics displayed on the Web page

Aboutplayer.closedCaption.SAMIFileName = Http://lrc.aboutplayer.com/goodbye.smi;

SMI Lyrics File Address

Aboutplayer. URL = http://www.shijiren.net/wma/g00146001/g0014600101.wma;

Media file Address

Put in Aboutplayer.controls.play (); The front. Where the SMI file address is best to use absolute address (with the media file address is absolute, relative and change). If the media file has the same path as SMI file, the SMI file address can be omitted.

Above is only the single lyrics to play The example, regarding the SMI lyrics to play continuously the classic version please see the bbsvisual for SMIproduced by the music.

RT Lyrics File

Please click the play key to watch the effect. The RT lyrics file can be synchronized on a line-by-row basis, or verbatim synchronization, the following is a verbatim demonstration of synchronization.


The code is as follows:

<window bgcolor= "Black" duration= "width=" "height=" "95"
<center>
<font charset= "gb2312" color= "Red"
<strong>
<b>
<time begin=00:00:00/><font size= "2" the Drizzle of tears </font>
<font size= "1" >
<p> Singing: Teresa Teng
<p> <font color= "green" (Spectrum music audio-visual) </font>
<p> <font color= "Red" > portrait making
<time begin=00:23.15/> <clear/> <time begin=00:23.55/> not <time begin=00:23.90/> out <time begin=00:24.30/> <time 00:24.80/> tear <time begin=00:25.40/> is <time begin=00:26.10/> rain
<time begin=00:28.80/> <p> Tear <time begin=00:29.15/> and <time begin=00:29.50/> rain <time begin=00:29.90/> Yi <time begin=00:30.36 /> up <time begin=00:30.95/> <time begin=00:31.70/> you.
<time begin=00:34.55/> <p> <time begin=00:34.85/> <time begin=00:35.40/> you <time begin=00:36.10/> rain <time <time begin=00:36.90/> in/> and <time begin=00:37.45/> away
<time begin=00:38.70/> <p> Tear <time begin=00:39.70/> bead <time begin=00:40.00/> son <time begin=00:41.30/> Sprinkle <time begin=00:42.05 /> Full <time begin=00:43.00/>
<time begin=00:45.25/> <clear/> Cry <time begin=00:45.70/> weep <time begin=00:46.60/> you <time begin=00:47.15/> cry <time 00:47.63/> Weeping <time begin=00:47.90/> <time begin=00:48.20/> <time of begin=00:48.50/> <time away
<time begin=00:49.55/> <p> <time begin=00:50.00/> off <time begin=00:50.85/> <time After/> <time begin=00:51.60/> and <time begin=00:51.90/> phase <time begin=00:52.40/> See <time begin=00:52.75/> not <time begin=00:53.00 /> Easy
<time begin=00:54.10/> <p> I <time begin=00:54.70/> heavy <time begin=00:54.95/> take <time begin=00:55.25/> <p> You <time begin= 00:55.70/> 's <time begin=00:56.00/> love <time begin=00:56.35/> <time in begin=00:56.65/> Tibet <time begin=00:57.10/> 00:57.40/> i <time begin=00:57.75/> heart <time begin=00:58.05/> Bottom
<time begin=00:58.80/> <clear/> Ah <time begin=01:01.75> hidden <time begin=01:02.05> <time i begin=01:02.40> <time 01:02.70> Heart <time begin=01:03.30> Bottom
<time begin=01:04.55/> <p> <time begin=01:05.07/> good <time begin=01:05.50/> like <time begin=01:06.35/><time > Tibetan <time begin=01:07.30/> <time begin=01:08.00/> back <time begin=01:08.77/>
<time begin=01:23.00/> <p> I <time begin=01:23.45/> XI <time begin=01:23.80/> Huan <time begin=01:24.15/> cotton <time begin=01:24.65 /> Cotton <time begin=01:25.25/> fine <time begin=01:25.87/> Rain
<time begin=01:28.80/> <p> Fine <time begin=01:29.20/> rain <time begin=01:29.45/>-<time begin=01:29.80/> yi <time begin=01:30.35 /> up <time begin=01:31.00/> <time begin=01:31.65/> you.
<time begin=01:34.50/> <clear/> recalls <time begin=01:34.80/> <time begin=01:35.35/> you <time begin=01:36.05/> in <time begin= 01:36.35/> i <time begin=01:36.85/> <time begin=01:37.40/>
<time begin=01:38.80/> <p> Tear <time begin=01:39.75/> bead <time begin=01:40.05/> son <time begin=01:41.50/> Sprinkle <time begin=01:42.10 /> Full <time begin=01:43.15/>
<time begin=01:45.25/> <p> Cry <time begin=01:45.80/> weep <time begin=01:46.70/> you <time begin=01:47.25/> cry <time /> Weeping <time begin=01:48.00/> <time begin=01:48.25/> <time of begin=01:48.50/> <time away
<time begin=01:49.65/> <p> <time begin=01:50.15/> off <time begin=01:51.10/> <time After/> <time begin=01:51.85/> and <time begin=01:52.10/> phase <time begin=01:52.65/> See <time begin=01:52.95/> not <time begin=01:53.25 /> Easy
<time begin=01:54.25/> <clear/> i <time begin=01:54.85/> heavy <time begin=01:55.15/>
<time begin=01:55.45/> <p> You <time begin=01:55.85/> <time begin=01:56.10/> shadow <time begin=01:56.52/> son <time /> <time begin=01:57.30/> in <time begin=01:57.55/> sleep <time begin=01:57.85/> Dream <time
<time begin=01:59.05/> <p> Ah <time begin=02:01.95/> Tibet <time begin=02:02.30/> <time sleep begin=02:02.65/> <time /> Dream <time begin=02:03.50/>.
<time begin=02:04.90/> <p> <time begin=02:05.40/> <time begin=02:05.80/> <time. begin=02:07.10/> /> up <time begin=02:08.30/> back <time begin=02:09.23/> Recalling
<time begin=02:35.50/> <clear/> <time begin=02:35.85/> not <time begin=02:36.15/> out <time begin=02:36.55/> <time 02:37.10/> tear <time begin=02:37.70/> is <time begin=02:38.45/> rain
<time begin=02:41.30/> <p> Tear <time begin=02:41.65/> and <time begin=02:41.95/> rain <time begin=02:42.25/> Yi <time begin=02:42.85 /> up <time begin=02:43.45/> <time begin=02:44.15/> you.
<time begin=02:47.10/> <p> <time begin=02:47.40/> <time begin=02:47.95/> you <time begin=02:48.55/> rain <time <time begin=02:49.40/> in/> and <time begin=02:50.00/> away
<time begin=02:51.40/> <p> Tear <time begin=02:52.30/> bead <time begin=02:52.65/> son <time begin=02:53.90/> Sprinkle <time begin=02:54.65 /> Full <time begin=02:55.57/>
<time begin=02:57.80/> <clear/> Cry <time begin=02:58.30/> weep <time begin=02:59.20/> you <time begin=02:59.70/> cry <time 03:00.30/> Weeping <time begin=03:00.60/> <time begin=03:00.95/> <time of begin=03:01.20/> <time away
<time begin=03:02.20/> <p> <time begin=03:02.75/> off <time begin=03:03.55/> <time After/> <time begin=03:04.30/> and <time begin=03:04.60/> phase <time begin=03:05.20/> See <time begin=03:05.50/> not <time begin=03:05.80 /> Easy
<time begin=03:06.85/> <p> I <time begin=03:07.40/> heavy <time begin=03:07.60/>
<time begin=03:07.90/> <p> You <time begin=03:08.40/> <time begin=03:08.65/> eyes <time begin=03:09.05/> Tears <time /> <time begin=03:09.80/> in <time begin=03:10.00/> silence <time begin=03:10.30/> Lonesome <time. begin=03:10.75/>
<time begin=03:11.55/> <clear/> ah <time begin=03:14.45/> Tibetan <time begin=03:14.80/> <time in begin=03:15.10/> 03:15.40/> Lonesome <time begin=03:15.90/>.
<time begin=03:17.35/> <p> <time begin=03:17.95/> <time begin=03:18.30/> <time. begin=03:19.60/> /> up <time begin=03:20.80/> back <time begin=03:21.73/> memory </font>
</font>
</b>
</strong>
</font>
</center>
</window>

This way the lyrics sync spectrum music called "precision guidance", that is, the karaoke effect, verbatim time and media playback accurate synchronization. "Online karaoke" for the first creative spectrum music, and achieved a variety of forms of expression.

LRC Lyrics File

LRC lyrics can also achieve "precision guidance", the specific effect of see http://aboutplayer.com/bbsvisual++, can be "verbatim color", feeling very cool. But this kind of "precise guidance" lyrics file making is very time-consuming and laborious, not easy to popularize. To this end, the spectrum music has developed a kind of Web page can automatically "change verbatim" player bbsvisual. Demo Address: http://qq.aboutplayer.com.

LRC lyrics as a universal lyric file, used very widely, online many places to provide downloads (spectral music lyrics search and download http://lrc.aboutplayer.com). The following is the lyrics file "Pan cloud-wild lily also has spring. LRC" Content:

[Ti: Wild Lily also has spring]//song name
[AR: Pan Yue Yun]//singer
[AL: Unique]//album name
[La:zh]//language category
[By: Spectral music]//lyrics compiling person
[offset:500]//Time parameter (positive number indicates overall advance, negative number indicates overall lag.) Implemented by making statements in a Web page
[00:00.00] pan clouds-wild lilies also have spring
[00:05.50]www.aboutplayer.com
[01:21.05] [00:07.14] As if it were a dream
[01:24.52] [00:10.42] We meet so briefly
[01:28.55] [00:14.09] You are like a spring breeze gently blowing into my heart
[01:35.69] [00:21.58] Where is the smile of your past
[01:43.01] [00:29.1] A smile as familiar as the memory
[02:18.93] [01:49.26] [00:35.4] Do you know that I love you and I want you to say that you will never change
[02:27.36] [01:57.61] [00:43.62] Don't you ever look back on yesterday's oath
[02:34.57] [02:04.90] [00:51.04] Even if you linger in the water of the daffodils
[02:42] [02:12.16] [00:58.54] Don't forget the lonely Valley in the corner of the wild Lily also has spring
[01:08.54] The Spectral music column
[02:48.65] ...... .......... ......

Front is the lyrics of the time, can be composed of time array times (1), timing (2) .... After the lyrics of the content, can compose the lyrics array txt (1), TXT (2) .... LRC Lyrics file working mechanism is "through the real-time Judgment, when the song play Time to arrive (1), lyrics Txt (1) display." TXT (1) "verbatim discoloration" of the time Algorithm for (Times (2) (1))/TXT (1). Length. "Lyrics sync" Music Sermon on the end, detailed work process please go to the Spectrum Music Forum Download Source research.

Finally introduced two lyrics to make auxiliary software. Lrc2smi: Easy to convert LRC file to SMI file. "Precision Guidance": the production of accurate "verbatim color" LRC lyrics file. The Spectrum Music Forum offers exclusive downloads.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.