- UID
- 215
- 积分
- 15394
- 帖子
- 1163
- 主题
- 27
- 论坛币
- 428
- 威望
- 125
- EP值
- 1992
- MP值
- 26
- 阅读权限
- 100
- 注册时间
- 2011-10-13
- 在线时间
- 668 小时
- 最后登录
- 2018-6-25
|
本帖最后由 渣渣疯子 于 2012-3-2 21:49 编辑
- from tcaxPy import *
- def tcaxPy_Init():
- global _FontFileName # frame duration, in millisecond
- global _FD
- global _Fs
- global _Length
- global _Bd
- global _Br
- global _FaceID
- global Font
- _FontFileName = GetVal(val_FontFileName)
- _FD = 1000 / GetVal(val_FXFPS)
- _Fs = GetVal(val_FontSize)
- _Length = GetVal(val_TextLength)
- _Bd = GetVal(val_Bord)
- _Br = GetVal(val_Blur)
- _FaceID = GetVal(val_FaceID)
- Font = InitFont(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)
- def fr(x):
- X = randint(-x,x)
- return frx(X)+fry(X)+frz(X)
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
- ASS_BUF = [] # used for saving ASS FX line
- ############五线谱&音符部分##########
- text = ["m 0 0 b 0 -10 1 -21 1 -31 b 1 -31 0 -31 -1 -31 b -1 -22 -2 -13 -2 -4 b -5 -6 -9 -3 -10 -1 b -12 3 -9 5 -8 5 b -3 5 0 0 0 0 ","m 0 0 b 0 -7 1 -21 1 -21 b 4 -21 6 -18 7 -16 b 8 -13 9 -9 5 -5 b 5 -3 10 -9 9 -16 b 5 -25 1 -24 1 -28 b 1 -29 1 -30 1 -31 b 1 -31 0 -31 -1 -31 b -1 -21 -1 -13 -1 -4 b -2 -5 -4 -7 -10 -2 b -11 1 -12 2 -9 4 b -6 5 -1 3 0 0 ","m 0 0 b 0 -8 0 -15 0 -23 b 7 -25 13 -27 20 -29 b 20 -22 20 -15 20 -8 b 16 -10 12 -9 9 -5 b 7 -2 7 2 12 3 b 15 4 21 1 22 -4 b 22 -12 22 -24 22 -35 b 14 -33 5 -30 -2 -28 b -2 -19 -2 -11 -2 -3 b -5 -3 -9 -4 -12 0 b -13 1 -16 4 -12 8 b -7 9 0 8 0 0 ","m 0 0 b 0 -8 0 -15 0 -23 b 7 -25 13 -27 20 -29 b 20 -22 20 -15 20 -8 b 16 -10 12 -9 9 -5 b 7 -2 7 2 12 3 b 15 4 21 1 22 -4 b 22 -12 22 -24 22 -35 b 14 -33 5 -30 -2 -28 b -2 -19 -2 -11 -2 -3 b -5 -3 -9 -4 -12 0 b -13 1 -16 4 -12 8 b -7 9 0 8 0 0 m 0 -19 b 7 -21 13 -23 20 -25 b 20 -25 20 -24 20 -24 b 13 -22 7 -20 0 -18 b 0 -18 0 -19 0 -19 "]
- Color = ['0000FF','0080FF','00FFFF','00FF80','D9904C','3B3BEE','FF0080']
- if _j == 0:
- for j in range(5):
- if _n < 17:
- ass_main(ASS_BUF,SubL(_BT-20,_BT), an(5)+pos(426,_Y-_Fs+(_Fs * 2/5 * j)+5)+color1("FFFFFF")+color3("FFFFFF")+fscx(100)+alpha(150)+bord(1)+blur(2)+be(3)+animation(fscx(200*(_n+4))), "{\p2}m 0 0 b 10 0 20 0 30 0 b 30 1 30 1 30 2 b 20 2 10 2 0 2 b 0 1 0 1 0 0 {\p0}")
- ass_main(ASS_BUF,SubL(_BT,_ET), an(5)+pos(426,_Y-_Fs+(_Fs * 2/5 * j)+5)+color1("FFFFFF")+color3("FFFFFF")+fscx(200*(_n+4))+bord(1)+blur(2)+be(3), "{\p2}m 0 0 b 10 0 20 0 30 0 b 30 1 30 1 30 2 b 20 2 10 2 0 2 b 0 1 0 1 0 0 {\p0}")
- ass_main(ASS_BUF,SubL(_ET,_ET+20), an(5)+pos(426,_Y-_Fs+(_Fs * 2/5 * j)+5)+color1("FFFFFF")+color3("FFFFFF")+fscx(200*(_n+4))+alpha(150)+bord(1)+blur(2)+be(3)+animation(fscx(100)), "{\p2}m 0 0 b 10 0 20 0 30 0 b 30 1 30 1 30 2 b 20 2 10 2 0 2 b 0 1 0 1 0 0 {\p0}")
- else:
- ass_main(ASS_BUF,SubL(_BT-20,_BT), an(5)+pos(426,_Y-_Fs+(_Fs * 2/5 * j)+5)+color1("FFFFFF")+color3("FFFFFF")+fscx(100)+alpha(150)+bord(1)+blur(2)+be(3)+animation(fscx(200*(_n+4))), "{\p2}m 0 0 b 10 0 20 0 30 0 b 30 1 30 1 30 2 b 20 2 10 2 0 2 b 0 1 0 1 0 0 {\p0}")
- ass_main(ASS_BUF,SubL(_BT,_ET), an(5)+pos(426,_Y-_Fs+(_Fs * 2/5 * j)+5)+color1("FFFFFF")+color3("FFFFFF")+fscx(200*(_n+4))+bord(1)+blur(2)+be(3), "{\p2}m 0 0 b 10 0 20 0 30 0 b 30 1 30 1 30 2 b 20 2 10 2 0 2 b 0 1 0 1 0 0 {\p0}")
- ass_main(ASS_BUF,SubL(_ET,_ET+20), an(5)+pos(426,_Y-_Fs+(_Fs * 2/5 * j)+5)+color1("FFFFFF")+color3("FFFFFF")+fscx(200*(_n+4))+alpha(150)+bord(1)+blur(2)+be(3)+animation(fscx(100)), "{\p2}m 0 0 b 10 0 20 0 30 0 b 30 1 30 1 30 2 b 20 2 10 2 0 2 b 0 1 0 1 0 0 {\p0}")
- ass_main(ASS_BUF,SubL(_BT-20,_BT), an(5)+pos(_X-_A * 4,_Y+_Fs+5)+color1("FFFFFF")+color3("FFFFFF")+alpha(150)+bord(2)+blur(3)+be(3)+fsc(80,80), "{\p3}m 3 -35 b 18 -50 33 -64 33 -106 b 33 -125 30 -157 14 -157 b -4 -157 -11 -113 -11 -104 b -11 -83 -7 -65 -6 -60 l -1 -65 b -9 -97 5 -135 21 -131 b 37 -126 22 -81 -1 -65 l 3 -35 m -1 -65 b -22 -43 -55 -17 -55 21 b -55 70 -18 93 23 84 l 22 79 b -9 85 -47 72 -41 21 b -39 1 -14 -21 3 -35 l -1 -65 m 3 -35 l 10 -2 b 39 -6 50 11 55 25 b 60 39 59 69 28 82 l 23 84 l 22 79 l 27 77 b 42 67 46 54 43 40 b 40 26 28 15 14 16 l 27 77 l 22 79 l 9 16 b -16 25 -12 51 4 64 b -20 60 -35 17 6 -2 l 0 -32 l 3 -35 m 28 82 l 34 113 b 38 134 32 159 6 161 b -9 162 -29 154 -29 133 b -29 121 -22 114 -13 114 b -2 115 4 121 4 130 b 4 137 -1 144 -11 145 b -6 165 37 156 29 114 l 23 84 l 28 82 {\p0}")
- ass_main(ASS_BUF,SubL(_BT,_ET), an(5)+pos(_X-_A * 4,_Y+_Fs+5)+color1("FFFFFF")+color3("FFFFFF")+bord(2)+bord(2)+blur(3)+be(3)+fsc(80,80), "{\p3}m 3 -35 b 18 -50 33 -64 33 -106 b 33 -125 30 -157 14 -157 b -4 -157 -11 -113 -11 -104 b -11 -83 -7 -65 -6 -60 l -1 -65 b -9 -97 5 -135 21 -131 b 37 -126 22 -81 -1 -65 l 3 -35 m -1 -65 b -22 -43 -55 -17 -55 21 b -55 70 -18 93 23 84 l 22 79 b -9 85 -47 72 -41 21 b -39 1 -14 -21 3 -35 l -1 -65 m 3 -35 l 10 -2 b 39 -6 50 11 55 25 b 60 39 59 69 28 82 l 23 84 l 22 79 l 27 77 b 42 67 46 54 43 40 b 40 26 28 15 14 16 l 27 77 l 22 79 l 9 16 b -16 25 -12 51 4 64 b -20 60 -35 17 6 -2 l 0 -32 l 3 -35 m 28 82 l 34 113 b 38 134 32 159 6 161 b -9 162 -29 154 -29 133 b -29 121 -22 114 -13 114 b -2 115 4 121 4 130 b 4 137 -1 144 -11 145 b -6 165 37 156 29 114 l 23 84 l 28 82 {\p0}")
- ass_main(ASS_BUF,SubL(_ET,_ET+20), an(5)+pos(_X-_A * 4,_Y+_Fs+5)+color1("FFFFFF")+color3("FFFFFF")+alpha(150)+bord(2)+bord(2)+blur(3)+be(3)+fsc(80,80), "{\p3}m 3 -35 b 18 -50 33 -64 33 -106 b 33 -125 30 -157 14 -157 b -4 -157 -11 -113 -11 -104 b -11 -83 -7 -65 -6 -60 l -1 -65 b -9 -97 5 -135 21 -131 b 37 -126 22 -81 -1 -65 l 3 -35 m -1 -65 b -22 -43 -55 -17 -55 21 b -55 70 -18 93 23 84 l 22 79 b -9 85 -47 72 -41 21 b -39 1 -14 -21 3 -35 l -1 -65 m 3 -35 l 10 -2 b 39 -6 50 11 55 25 b 60 39 59 69 28 82 l 23 84 l 22 79 l 27 77 b 42 67 46 54 43 40 b 40 26 28 15 14 16 l 27 77 l 22 79 l 9 16 b -16 25 -12 51 4 64 b -20 60 -35 17 6 -2 l 0 -32 l 3 -35 m 28 82 l 34 113 b 38 134 32 159 6 161 b -9 162 -29 154 -29 133 b -29 121 -22 114 -13 114 b -2 115 4 121 4 130 b 4 137 -1 144 -11 145 b -6 165 37 156 29 114 l 23 84 l 28 82 {\p0}")
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT/2,_ET+20,7), an(5)+move(_X+50,_Y-50,_X,_Y+randint(-7,23),0,_KT * 5)+color1(Color[randint(0,6)])+color3("F0E7FB")+bord(2)+blur(3)+be(4)+fad(0,200), "{\p2}" + text[randint(0,3)] + "{\p0}")
- ############歌词部分##########
- ass_main(ASS_BUF,SubL(_BT-20,_BT+_SK,5), an(5)+pos(_X,_Y)+fad(200,0)+color1("CC7EE4")+color3("CCCCCC")+bord(0)+blur(1)+be(1)+animation(bord(2)+blur(2)+be(3)), _TXT)
- step = int(_FD/10)
- for i in range(int(_BT+_SK),int(_BT+_SK+_KT/2),step):
- ts = i
- te = ts+step
- ass_main(ASS_BUF,SubL(ts , te ,5), an(5)+pos(_X+randint(-3,3),_Y+randint(-3,3))+color1("FF7EF1")+color3("CCCCCC")+bord(2)+blur(2)+be(3), _TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT/2,_BT+_SK+_KT,5), an(5)+pos(_X,_Y)+color1("CCCCCC")+color3("CCCCCC")+fsc(100,100)+bord(2)+blur(2)+be(3)+animation(bord(3)+blur(3)+be(8)+fsc(130,50)), _TXT)
- for j in range(20):
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_ET,5), an(5)+fsc(50,50)+frz(randint(0,360))+fry(randint(0,360))+frx(randint(0,360))+t(fr(720))+shad(0)+bord(0)+color1("F0E7FB")+color3("D970C3")+alpha3(150)+move(_X,_Y,_X-randint(10,50),_Y-randint(-20,50))+bord(1.5)+be(1)+blur(3)+fad(20,500),"{\p1}m 9 23 b 8 22 7 21 5 19 b 4 18 2 16 1 11 b 1 8 2 5 4 3 b 5 2 6 1 7 1 b 8 3 8 4 9 5 b 10 4 10 3 11 1 b 13 2 14 3 14 3 b 16 5 17 8 17 11 b 16 16 14 18 13 19 b 11 21 10 22 9 23 {\p0}")
-
-
- return (ASS_BUF,None)
复制代码 音符和五线谱的距离,一直算不准...欢迎指导 |
-
1
查看全部评分
-
|