欢迎光临散文网 会员登陆 & 注册

AE卡拉ok字幕供大家参考的脚本

2023-01-22 22:23 作者:求文问道  | 我要投稿


var comp = app.project.items.addComp("test",1920,1080,1,1,24);

var textLayer = comp.layers.addText("心跳在感应着同样频率的荡漾");


textLayer.sourceText.value.justification = ParagraphJustification.CENTER_JUSTIFY;


b = [58.41,58.8,59.2,59.6,59.8,60.3,61.3,61.7,62,62.4,62.7,63.5,64,64.89];  //每句歌词的每个字的入场时间和结束时间

d = '[' + b.toString() + ']';


textLayer.inPoint = b[0];

textLayer.outPoint = b[b.length-1];


comp.duration = b[b.length-1];


textLayer.position.setValue([comp.width / 2, comp.height * .85]);


textLayer.Effects.addProperty("线性擦除");

textLayer.Effects(1)(1).expression = 'a =c;\r'.replace('c',d) +

'n = a.length; \r' +

'm = 0; \r' +

'if(time<thisLayer.outPoint) \r' +

'{ \r'+

'for(i=0;i<n;i++)\r'+

'{ \r'+

'if(time<a[i+1])\r'+

'{\r'+

'm = i;\r'+

'intime = a[i];\r'+

'outtime = a[i+1];\r'+

'break; \r'+

'}\r'+

'else \r'+

'{ \r'+

'continue; \r'+

'} \r'+

'} \r'+

'} \r'+

'longfont = sourceRectAtTime().width/(n-1);\r'+ 

'width1 = (width - sourceRectAtTime().width)/2 + longfont*m;\r'+

'width2 = width1 + longfont;\r'+

'linear(time,intime,outtime,width1*100/width,width2*100/width);';




AE卡拉ok字幕供大家参考的脚本的评论 (共 条)

分享到微博请遵守国家法律