iLeichun

当前位置: 首页 > 个人日志

ksc歌词文件源码手动编辑

分类:个人日志   来源:原创   时间:2016-01-30 18:26:12

在做一些卡拉OK形式的视频的时候,ksc歌词文件是必不可少的,但有时候下载的ksc文件可能跟下载的歌曲不同步,如果大概上都可以对得上的话,还是比较好修改的。我们用记事本打开ksc文件,将看到如下样式的歌词源码:

karaoke := CreateKaraokeObject;
karaoke.rows := 2;
karaoke.clear;

karaoke.singer := ¹庞龙¹;
karaoke.songname := ¹两只蝴蝶¹;
karaoke.TimeOffset := 0;
karaoke.AnimateBorderColor := RGB(255, 255, 255);
karaoke.AnimateColor := RGB(0, 0, 255);
karaoke.NormalBorderColor := RGB(0, 0, 0);
karaoke.NormalColor := RGB(255, 255, 255);
karaoke.TransparentColor := RGB(0, 128, 0);
karaoke.AnimateBorderThickness := 1;
karaoke.NormalBorderThickness := 1;
karaoke.Font(¹黑体¹, 24, false);
karaoke.Charset := 0;
karaoke.Width := 318;
karaoke.Height := 110;
karaoke.AutoSize := true;
karaoke.linespace := 4;
karaoke.Rows := 2;
karaoke.FirstAlignment := 0;
karaoke.FirstIndent := 30;
karaoke.NextAlignment := 1;
karaoke.NextIndent := 30;

karaoke.add(¹000:01.839¹, ¹000:08.040¹, ¹ 两只蝴蝶¹, ¹275,275,275,275,275,275,275,276¹);
karaoke.add(¹000:08.409¹, ¹000:20.270¹, ¹ 演唱:庞龙¹, ¹1976,1976,1976,1976,1976,1981¹);
karaoke.add(¹000:20.779¹, ¹000:25.590¹, ¹ .....¹, ¹801,801,801,801,801,806¹);
karaoke.add(¹000:26.099¹, ¹000:30.460¹, ¹ 亲爱的 你慢慢飞¹, ¹484,484,484,484,484,484,484,484,489¹);
karaoke.add(¹000:30.969¹, ¹000:35.520¹, ¹ 小心前面带刺的玫瑰¹, ¹455,455,455,455,455,455,455,455,455,456¹);
karaoke.add(¹000:36.029¹, ¹000:40.200¹, ¹ 亲爱的 你张张嘴¹, ¹463,463,463,463,463,463,463,463,467¹);
karaoke.add(¹000:40.709¹, ¹000:45.490¹, ¹ 风中花香会让你沉醉¹, ¹478,478,478,478,478,478,478,478,478,479¹);
karaoke.add(¹000:45.999¹, ¹000:50.460¹, ¹ 亲爱的 你跟我飞¹, ¹495,495,495,495,495,495,495,495,501¹);
karaoke.add(¹000:50.969¹, ¹000:55.440¹, ¹ 穿过丛林去看小溪水¹, ¹447,447,447,447,447,447,447,447,447,448¹);
karaoke.add(¹000:55.949¹, ¹001:00.530¹, ¹ 亲爱的 来跳个舞¹, ¹509,509,509,509,509,509,509,509,509¹);
karaoke.add(¹001:01.039¹, ¹001:07.770¹, ¹ 爱的春天不会有天黑¹, ¹673,673,673,673,673,673,673,673,673,674¹);
karaoke.add(¹001:08.279¹, ¹001:12.460¹, ¹ 我和你缠缠绵绵翩翩飞¹, ¹380,380,380,380,380,380,380,380,380,380,381¹);
karaoke.add(¹001:12.969¹, ¹001:17.980¹, ¹ 飞越这红尘永相随¹, ¹556,556,556,556,556,556,556,556,563¹);
karaoke.add(¹001:18.489¹, ¹001:20.110¹, ¹ 追逐你一生¹, ¹270,270,270,270,270,271¹);
karaoke.add(¹001:20.619¹, ¹001:22.590¹, ¹ 爱恋无前悔¹, ¹328,328,328,328,328,331¹);
karaoke.add(¹001:23.099¹, ¹001:27.770¹, ¹ 不辜负我的柔情你的美¹, ¹424,424,424,424,424,424,424,424,424,424,431¹);
karaoke.add(¹001:28.279¹, ¹001:32.550¹, ¹ 我和你缠缠绵绵翩翩飞¹, ¹388,388,388,388,388,388,388,388,388,388,391¹);
karaoke.add(¹001:33.059¹, ¹001:37.750¹, ¹ 飞越这红尘永相随¹, ¹521,521,521,521,521,521,521,521,523¹);
karaoke.add(¹001:38.259¹, ¹001:42.700¹, ¹ 等到秋风起 秋叶落成堆¹, ¹370,370,370,370,370,370,370,370,370,370,370,371¹);
karaoke.add(¹001:43.209¹, ¹001:46.360¹, ¹ 能陪你一起枯萎也无悔¹, ¹286,286,286,286,286,286,286,286,286,286,291¹);
karaoke.add(¹001:46.869¹, ¹002:10.400¹, ¹ ..[m][u][s][i][c].....¹, ¹2579,2579,2579,1579,1579,1579,1579,1579,1579,1579,1579,1579,1583¹);
karaoke.add(¹002:10.909¹, ¹002:15.200¹, ¹ 亲爱的 你慢慢飞¹, ¹476,476,476,476,476,476,476,476,483¹);
karaoke.add(¹002:15.709¹, ¹002:20.230¹, ¹ 小心前面带刺的玫瑰¹, ¹452,452,452,452,452,452,452,452,452,453¹);
karaoke.add(¹002:20.739¹, ¹002:25.380¹, ¹ 亲爱的 你张张嘴¹, ¹515,515,515,515,515,515,515,515,521¹);
karaoke.add(¹002:25.889¹, ¹002:30.300¹, ¹ 风中花香会让你沉醉¹, ¹441,441,441,441,441,441,441,441,441,442¹);
karaoke.add(¹002:30.809¹, ¹002:35.220¹, ¹ 亲爱的 你跟我飞¹, ¹490,490,490,490,490,490,490,490,491¹);
karaoke.add(¹002:35.729¹, ¹002:40.170¹, ¹ 穿过丛林去看小溪水¹, ¹444,444,444,444,444,444,444,444,444,445¹);
karaoke.add(¹002:40.679¹, ¹002:45.290¹, ¹ 亲爱的 来跳个舞¹, ¹512,512,512,512,512,512,512,512,515¹);
karaoke.add(¹002:45.799¹, ¹002:50.100¹, ¹ 爱的春天不会有天黑¹, ¹430,430,430,430,430,430,430,430,430,431¹);
karaoke.add(¹002:52.609¹, ¹002:57.060¹, ¹ 我和你缠缠绵绵翩翩飞¹, ¹404,404,404,404,404,404,404,404,404,404,411¹);
karaoke.add(¹002:57.569¹, ¹003:02.280¹, ¹ 飞越这红尘永相随¹, ¹523,523,523,523,523,523,523,523,527¹);
karaoke.add(¹003:02.789¹, ¹003:04.510¹, ¹ 追逐你一生¹, ¹286,286,286,286,286,291¹);
karaoke.add(¹003:05.019¹, ¹003:06.960¹, ¹ 爱恋无前悔¹, ¹323,323,323,323,323,326¹);
karaoke.add(¹003:07.469¹, ¹003:12.040¹, ¹ 不辜负我的柔情你的美¹, ¹415,415,415,415,415,415,415,415,415,415,421¹);
karaoke.add(¹003:12.549¹, ¹003:16.760¹, ¹ 我和你缠缠绵绵翩翩飞¹, ¹382,382,382,382,382,382,382,382,382,382,391¹);
karaoke.add(¹003:17.269¹, ¹003:22.350¹, ¹ 飞越这红尘永相随¹, ¹564,564,564,564,564,564,564,564,569¹);
karaoke.add(¹003:22.859¹, ¹003:26.950¹, ¹ 等到秋风起 秋叶落成堆¹, ¹340,340,340,340,340,340,340,340,340,340,340,351¹);
karaoke.add(¹003:27.459¹, ¹003:32.080¹, ¹ 能陪你一起枯萎也无悔¹, ¹420,420,420,420,420,420,420,420,420,420,421¹);
karaoke.add(¹003:32.589¹, ¹003:37.010¹, ¹ 我和你缠缠绵绵翩翩飞¹, ¹401,401,401,401,401,401,401,401,401,401,411¹);
karaoke.add(¹003:37.519¹, ¹003:42.330¹, ¹ 飞跃这红尘永相随¹, ¹534,534,534,534,534,534,534,534,539¹);
karaoke.add(¹003:42.839¹, ¹003:46.840¹, ¹ 等到秋风起 秋叶落成堆¹, ¹333,333,333,333,333,333,333,333,333,333,333,338¹);
karaoke.add(¹003:47.349¹, ¹003:52.180¹, ¹ 能陪你一起枯萎也无悔¹, ¹439,439,439,439,439,439,439,439,439,439,441¹);
karaoke.add(¹003:52.689¹, ¹003:56.940¹, ¹ 等到秋风起 秋叶落成堆¹, ¹354,354,354,354,354,354,354,354,354,354,354,357¹);
karaoke.add(¹003:57.449¹, ¹004:01.150¹, ¹ 能陪你一起枯萎也无悔¹, ¹336,336,336,336,336,336,336,336,336,336,341¹);
karaoke.add(¹004:01.659¹, ¹004:28.000¹, ¹ ....¹, ¹5268,5268,5268,5268,5269¹);
karaoke.add(¹004:28.509¹, ¹004:33.009¹, ¹ =[E][N][D]¹, ¹900,900,900,900,900¹);
 
其中前面那段主要是设置歌词的一些通用样式,例如设置字体:
karaoke.Font(¹黑体¹, 24, false);
 
当然最主要的还是下面的歌词部分了,比如哪个字错了,你可以修改下,改完保存就好了。但更多的时候可能是歌词慢了或者快了,特别是前面一段是好好的,而唱到后面就跟不上了,这样就需要我们修改歌词出现的时间了,我研究了好久,终于找到了规律,现在告诉大家。
比如这句:
karaoke.add(¹003:02.789¹, ¹003:04.510¹, ¹ 追逐你一生¹, ¹286,286,286,286,286,291¹);
 
¹003:02.789¹, ¹003:04.510¹   分别表示歌词出现和消失的时间点
 ¹ 追逐你一生¹    这个就不用说了,当然是歌词内容啦
 ¹286,286,286,286,286,291¹    其实最关键也是最难理解的是这句,这是表示歌词颜色变色的时间点,单位是毫秒,而这些时间的总和就是歌词从出现到消失的总时间。当然这两个总和不一样也是可以的,只是会出现歌词变色完了还没消失或者已经消失了但还没变色完的情况,当然有时候可能正需要这种样式,那就根据自己的喜好自己去调节了。
 
总之,改起来还是不难的,但很费时间。
 
 
 

 

更多