20100317, 09:32  Link #1021 
Aegisub dev
Join Date: Sep 2004
Location: Stockholm, Sweden
Age: 29

Okay so it's actually an echo effect and not a syllable that repeats.
You need something completely different for that, the furigana/multihighlight syntax isn't designed for that. Last time I needed to do one, I made a copy of the source line, without any repetition of words in, and timed the duplicate of the line to the echo, then I marked the line so it would get a different effect. It's important here to note that the line with the echo timing still needs to have all of the original line's text in, even if it isn't timed in detail, but the text needs to be there for the positioning to work correctly. I made up some random timings for the echo text here. The rest is mostly based on the examples from the Inlinefx page in the manual. Code:
Comment: 0,0:00:00.00,0:00:10.00,Default,,0000,0000,0000,karaoke,{\k23}I{\k28}ma {\k101}wa{\k101} {\k23}to{\k38}ke{\k37}na{\k52}i {\k23}wa{\k28}ke {\k120}wo Comment: 0,0:00:00.00,0:00:10.00,Default,,0000,0000,0000,karaoke,{\k80\invisible}{\k23\echo}I{\k28}ma {\k101}wa{\k100\invisible} {\k23}to{\k38}ke{\k37}na{\k52}i {\k71}{\k23\echo}wa{\k28}ke {\k120}wo Comment: 0,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,code syl,fxgroup.blankfx = (syl.inline_fx == "") Comment: 0,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,code syl,fxgroup.notinvis = (syl.inline_fx ~= "invisible") Comment: 1,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,template syl fxgroup blankfx noblank,{\pos($x,$y)\shad0\bord2} Comment: 0,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,template syl fx invisible notext noblank,{invisible syllable skipped: !syl.text_stripped!} Comment: 0,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,template syl fxgroup notinvis noblank,!retime("syl")!{\pos($x,$y)\shad0\bord10\t(\bord2)}
__________________

20100325, 11:09  Link #1024 
Junior Member
Join Date: Dec 2006

I read through this forum and Aegisub and didn't see anyone having this same problem, I apoligize if I missed it.
I've been banging my head against the wall all morning. I'm trying to do a simple rotation effect, which I've done several times before without any trouble. For some reason today it just won't rotate. I've tried everything I could think of, so I'm here to plead for help. Code:
{\alpha&Hff&\an5\t($start,$start,\1a&H00&)\t($start,$end,\frz360)\t($end,$end,\alpha&Hff&)} 
20100325, 13:18  Link #1026 
Junior Member
Join Date: Dec 2006

Thanks for getting right back to me jfs.
It's a template line and I've checked the timing, there's nothing wrong with it that I can find. Edit: The timing is right, but I'd copied the line above and it was a template line and not a template. I changed it to a template and it turns now. Though it's a bit distorted, not just a rotate like I wanted. I'll have to figure what I did to cause that and figure out where my border went. Thanks again! I knew it was something stupid I just couldn't think of it. Last edited by Maiku2; 20100325 at 13:29. 
20100325, 13:25  Link #1027 
Aegisub dev
Join Date: Sep 2004
Location: Stockholm, Sweden
Age: 29

If you want a syllable to rotate around its own centre you must use a "syl" template. If you use a line template as you do now, the centre of rotation for everything on the line will be the origin point of the line, i.e. the middle of the line, which makes for a rather strange effect for the rotation, probably not what you want.
__________________

20100408, 22:30  Link #1028 
Member

How can i repeat \t() syl.n times or 10 times for once lines, increase in startadjust & endadjust
Some thing like this time = line.duration/syl.n {\frz0\t(0, !1*time!, \frz5)\t(!1*time!, !2*time!,\frz0)\\t(!3*time!, !3*time!,\frz5)...} I mean i want to join all lines (10 lines or more) of the loop to only once line. Code:
code line: rotz = math.random(1,4)*0.1 template syl loop 10: !retime("preline", (j1)*(line.duration/10), j*(line.duration/10))!{\k$skdur}{\frz!((j%2)*21) == 1 and rotz or rotz!\fry!((j%2)*21) == 1 and rotz*3+10 or rotz*3+10!\t(\frz!((j%2)*21) == 1 and rotz or rotz!\fry!((j%2)*21) == 1 and rotz*3+10 or rotz*3+10!)\pos($scenter, $smiddle)} Comment: 0,0:00:17.16,0:00:24.16,Default,,0000,0000,0000,karaoke,{\k45}Tell {\k42}me {\k31}na{\k39}ni{\k43}mo {\k20}wa{\k27}ka{\k16}ra{\k32}na{\k40}i {\k152}no {\k25}de{\k188}mo http://www.youtube.com/watch?v=4HTWx263opY&fmt=18 Last edited by jofori89; 20100408 at 22:40. 
20100409, 22:31  Link #1030  
Member

Quote:
Code:
code line: rotz = math.random(1,4)*0.1; wind_offset = line.duration/(line.kara.n); function turn() for r=1,line.kara.n do turn = turn .. string.format("\\t(%d,%d,\\frz%d\\fry%d)",wind_offset*(r1),wind_offset*r,rotz,rotz*3+10) if rotz < 0 then rotz=0 else rotz=math.random(1,3)*3 end end return turn end; wind = "{"..turn.."}" template syl: {\an5\pos($scenter, $smiddle)}!wind! Quote:


20100410, 02:22  Link #1031 
Aegisub dev
Join Date: Sep 2004
Location: Stockholm, Sweden
Age: 29

You're forgetting to put function call parentheses onto the function name, so you're concatenating a function with a string, instead of concatenating the result of calling the function.
template syl: {\an5\pos($scenter, $smiddle)}{!turn()!}
__________________

20100410, 04:29  Link #1032  
Member

Quote:
Code:
code line: rotz = math.random(1,4)*0.1; wind_offset = line.duration/(line.kara.n); function turn() for r=1,line.kara.n do turn = turn .. string.format("\\t(%d,%d,\\frz%d\\fry%d)",wind_offset*(r1),wind_offset*r,rotz,rotz*3+10) if rotz < 0 then rotz = 0 else rotz = math.random(1,3)*3 end end return turn() end; turn = "{"..turn.."}" template syl: {\an5\pos($scenter, $smiddle)}{!turn()!} 

20100410, 14:32  Link #1033 
Aegisub dev
Join Date: Sep 2004
Location: Stockholm, Sweden
Age: 29

Oh, I didn't notice you were abusing the function name that much.
Actually you probably won't need a callable function at all and can just do it directly in a code line... of course that will need to be a "code syl" line if you want it to update for every syllable. Note that you're using the same name, "turn", for two different things. You're using it as the name of the function, but you're also using it for the name of the value the function calculates. Because the function is the first thing defined, it's the first thing that goes into the global variable by the name "turn" (in Lua, functions don't really have a name, their names are just variables that point to the function code) and after the function name has become valid, you start trying to treat the function value as a string.
__________________

20100411, 05:15  Link #1034  
Member

Quote:
Quote:
function turn() for r=1,line.kara.n do b_turn = turn .. string.format("\\t(%d,%d,\\frz%d\\fry%d)",wind_off set*(r1),wind_offset*r,rotz,rotz*3+10) if rotz < 0 then rotz = 0 else rotz = math.random(1,3)*3 end end return b_turn end; 

20100411, 17:40  Link #1035 
Aegisub dev
Join Date: Sep 2004
Location: Stockholm, Sweden
Age: 29

Code:
code syl: turntags = ""; for T = 1, line.kara.n do turntags = turntags .. string.format("\\t(%d,%d,\\frz%d\\fry%d)", wind_offset*(T1), wind_offset*T, rotz, rotz*3+10); rotz = math.max(0, math.random(1, 3)*3); end template syl: {\an5\pos($scenter, $smiddle)}{!turntags!} Code:
turntags = "" for T = 1, line.kara.n do turntags = turntags .. string.format( "\\t(%d,%d,\\frz%d\\fry%d)", wind_offset*(T1), wind_offset*T, rotz, rotz*3+10) rotz = math.max(0, math.random(1, 3)*3) end Though, I'm not sure why the number of syllables in the line should determine how much the shaking/rotating is done, and why the timings of the syllables isn't used either when you're essentially doing the same thing for each syllable. Another thing, this will obviously make each syllable get a different sequence of rotations, since the "turntags" is calculated once for every syllable, but you can easily change that to be once per line instead.
__________________

20100411, 19:08  Link #1036  
Member

Quote:
Thanks you so much, this code'll help me for a lot of other karaoke FX 

20100504, 19:36  Link #1038  
Member

Quote:
Random is random taking a number/string from a to b or 0 to b 5.6  Mathematical Functions This library is an interface to the standard C math library. It provides all its functions inside the table math. math.abs (x) Returns the absolute value of x. math.acos (x) Returns the arc cosine of x (in radians). math.asin (x) Returns the arc sine of x (in radians). math.atan (x) Returns the arc tangent of x (in radians). math.atan2 (y, x) Returns the arc tangent of y/x (in radians), but uses the signs of both parameters to find the quadrant of the result. (It also handles correctly the case of x being zero.) math.ceil (x) Returns the smallest integer larger than or equal to x. math.cos (x) Returns the cosine of x (assumed to be in radians). math.cosh (x) Returns the hyperbolic cosine of x. math.deg (x) Returns the angle x (given in radians) in degrees. math.exp (x) Returns the value ex. math.floor (x) Returns the largest integer smaller than or equal to x. math.fmod (x, y) Returns the remainder of the division of x by y that rounds the quotient towards zero. math.frexp (x) Returns m and e such that x = m2e, e is an integer and the absolute value of m is in the range [0.5, 1) (or zero when x is zero). math.huge The value HUGE_VAL, a value larger than or equal to any other numerical value. math.ldexp (m, e) Returns m2e (e should be an integer). math.log (x) Returns the natural logarithm of x. math.log10 (x) Returns the base10 logarithm of x. math.max (x, ···) Returns the maximum value among its arguments. math.min (x, ···) Returns the minimum value among its arguments. math.modf (x) Returns two numbers, the integral part of x and the fractional part of x. math.pi The value of pi. math.pow (x, y) Returns xy. (You can also use the expression x^y to compute this value.) math.rad (x) Returns the angle x (given in degrees) in radians. math.random ([m [, n]]) This function is an interface to the simple pseudorandom generator function rand provided by ANSI C. (No guarantees can be given for its statistical properties.) When called without arguments, returns a uniform pseudorandom real number in the range [0,1). When called with an integer number m, math.random returns a uniform pseudorandom integer in the range [1, m]. When called with two integer numbers m and n, math.random returns a uniform pseudorandom integer in the range [m, n]. math.randomseed (x) Sets x as the "seed" for the pseudorandom generator: equal seeds produce equal sequences of numbers. math.sin (x) Returns the sine of x (assumed to be in radians). math.sinh (x) Returns the hyperbolic sine of x. math.sqrt (x) Returns the square root of x. (You can also use the expression x^0.5 to compute this value.) math.tan (x) Returns the tangent of x (assumed to be in radians). math.tanh (x) Returns the hyperbolic tangent of x. 

20100505, 07:27  Link #1040 
Member

Sorry i wrong, I dont know how to call this.
Code:
code once: code_a = {"a", "b", "c"} !code_a[math.random(3)]! Code:
fxgroup.ginkgo = (line.actor == "ginkgo" and syl.i == 1); fxgroup.ginkgo = (line.actor == "ginkgo" and syl.i == 5); fxgroup.ginkgo = (line.actor == "ginkgo" and syl.i == 9); 
Tags 
fansubbing, karaoke, software, subbing 
Thread Tools  

