Expressions/Scripts/Presets

Moderator: Paul Tuersley

 
finest
Posts: 10
Joined: Tue Aug 30, 2005 5:18 pm

Sun Nov 06, 2005 12:20 pm

I have sent you a pm with example of the silence and how I varied the blur for sung syllables. Altough manually inserting keyframes for each syllable is quite tiring.
 
Paul Tuersley
Topic Author
Posts: 704
Joined: Sat Jun 05, 2004 7:59 am
Location: London, UK

Sun Nov 06, 2005 5:32 pm

Based on finest's feedback, there's another update to the script. The url in my original post now links to SSA_Import_v1.2.

Changes in SSA_Import_v1.2:
1. The only immediately noticeable change is that the script now correctly handles silences in karaoke, where nothing should be highlighted.

2. The ability to split highlighted text onto a separate layer. If you open the SSA_Import script in a text editor, you'll find some user-editable variables at the start of the script. Change the line var splitHighlight = false; to var splitHighlight = true; then resave the script. Lines of text that contain karaoke highlighting will be split onto two lines. By applying effects to the top-most of each pair of layers, the effects will only by applied to the highlighted text.

3. The ability to ramp effects applied to highlighted text up and down. This option should be used alongside the 'split highlighted' option mentioned above. Open the script in a text editor and locate the line var sliderRamp = 0. Change the value to 1,2 or 3 (the options are described in the script) and then resave the script. After importing a .ssa file with karaoke data, you'll find another layer called "Ramp Control Null" at the top of the Timeline that contains an animated "Slider Control" effect. By using expressions to link to these animated values, you can vary how effects applied to the highlighted layers are animated.

All sounds a bit advanced I know, but even if you don't know anything about expressions, stay with me. :)

How to use this feature:
1. Open the SSA_Import_v1.2 script in a text editor.
2. Locate the line var splitHighlight = false; and change it to var splitHighlight = true;
3. Locate the line var sliderRamp = 0 and change it to var sliderRamp = 3
4. Save the script.
5. Run the script as normal, importing a .ssa or .ass file that contains karaoke highlighted text data.
6. Select the top layer from any of the pairs of text lines generated and apply a "Fast Blur" effect.
7. Set the 'Blurriness' value to 10.
8. Apply an expression to the "Blurriness" property (the easiest way is to opt/alt-click on the stopwatch icon beside the property name).
9. Completely replace the expression with the following: value * thisComp.layer("Ramp Control Null").effect("Slider Control")("Slider")

The result is that as each word/syllable is highlighted, it will animate up from zero to your maximum blur value (10 in this case) and then back down to zero. You can now simply copy/paste the Fast Blur effect onto all of the other top-most layer pairs.

These features allow you to customize your karaoke subtitles in all kinds of ways. Another thing you could try is to add a Position property to the Highlight Animator and set the Y Position value to -20, then apply the expression in the way described above. As the text is highlighted it will animate up and down. You can also try changing the keyframe interpolation on the Ramp Control's Slider, i.e. highlight the keyframes and apply Keyframe Assistant > Easy Ease to give you smoother animation.

In a future version of the script, I'll probably add a UI so you don't have to edit the script. And based on feedback, I'll see if there's any way to make this whole process a bit less painful.
 
Hyugako
Posts: 4
Joined: Sun Nov 06, 2005 12:31 pm

Mon Nov 07, 2005 4:32 am

First of all thank you Paul for your hard work on this script.

Ok on to the subject:

The first update is nice and give us more liberty and the second will definitely save us a lot of time.

However I've got a little problem (maybe due to the fact that I'm still beginning in the world of After Effects). The thing is if I want to apply for example a "complete" fast blur I have to return the bluriness value to 0 at the end of the pronounced syllable if I want the next syllable to be visible. That means it is only possible to apply effects that you will reverse at the end of the highlighted text and hence makes it impossible for instance to make a syllable invisible even after it was pronounced but also restrain from applying many effects such as scatter, fade out... I hope I made myself clear but if it wasn't the case here's the same example done with SSA. Indeed in SSA you can use a little command which is {\r} that prevent every effects previously done to be applied to the following. So the type of effects i mentionned before is possible in SSA.

Here's the same example of fade effect done with ssa:
Dialogue: Marked=0,0:00:00.51,0:00:10.33,Test,,0000,0000,0000,Karaoke,{\t(0,250,1,\alpha&HFF)}{\k25}Ko{\r}{\t(250,550,1,\alpha&HFF)}{\k30}no {\r}{\t(550,1180,1,\alpha&HFF)}{\k63}so{\r}{\t(1180,1410,1,\alpha&HFF)}{\k23}ra

In this example the pronouced syllable disappear while it is pronounced and won't reappear (\t being the command to animate the syllable during the time between ,, and alpha&HFF is the command for the global fade.) So the {\r} prevent all the previous effects to be applied to the following.
You can imagine a wall or something blocking. Without it the first fade would be applied to the whole sentence.

I have sent you this example in video Paul in case you didn't understand.
That's all I got to say and remember this problem may come from the fact that I'm still beginning in After Effects and if that's the case I apologize for this have nothing to do with Paul's script.

finest wrote:
Altough manually inserting keyframes for each syllable is quite tiring.


You don't expect Paul to do all the work for you do you ? Inserting keyframes to do your effect is the least you can do xD

PS: Thanks for reading all of this and thank you again Paul for your work.
 
finest
Posts: 10
Joined: Tue Aug 30, 2005 5:18 pm

Mon Nov 07, 2005 12:30 pm

Hyugako, everything works fine for me. I just did what paul listed and the blur goes up and down for the sung syllable. Thanks again paul. I will mess around with it and see what else can be done.
 
Hyugako
Posts: 4
Joined: Sun Nov 06, 2005 12:31 pm

Mon Nov 07, 2005 12:57 pm

finest wrote:
Hyugako, everything works fine for me. I just did what paul listed and the blur goes up and down for the sung syllable.


That's exactly what I was talking about :x You can only put the blur to go up then down. What if I want it to go only up? Impossible (well I couldn't :?)

The thing Paul added in 1.2 allow you to apply an effect on the highlighted text but "goes down" at the end. Go ahead try to apply a blur that "goes only up" for the highlighted text and you will end up with the same problem I am in (If not please be sure to tell me how you did it :p)
 
finest
Posts: 10
Joined: Tue Aug 30, 2005 5:18 pm

Mon Nov 07, 2005 1:06 pm

Ah, I was trying to do the same thing with blur +one of the transitions fade out. I guess because the actual highlight animation for syllable is done in the highlight text layer. You will have to mess around with the opacity of the default layer which comes back on once the highlighting is finished.
 
finest
Posts: 10
Joined: Tue Aug 30, 2005 5:18 pm

Mon Nov 07, 2005 2:05 pm

I think I found a solution. It's rather inelegant and revolves around creating a copy of the default text layer and having one fade in very quickly syllable by syllable as its sung. and the other one to fade out. put var sliderramp to be 1.

First make sure the default animator text layer is the same colour.
Duplicate the default animator layer twice.
In the first duplicate don't apply any blur , set default animator opacity to 0 and highlight to 100. go to advanced of the highlight animator and change the ease high to 100 and ease low to -100 and shape to ramp down.

For the second duplicate, apply the exact amount of blur you applied for your sung highlight layers. Set default animator opacity to 100 and highlight animator to 0, ease high to 100, ease low to -100 and shape to ramp up.

Here is an example:
http://rapidshare.de/files/7325302/blur.rar.html
http://s65.yousendit.com/d.aspx?id=312C ... 7VX3927IA5
(please use you send it only if you can't use rapidshare)

edit: note since this was a practice run, the blur level of the duplicate and syllable highlighter are not the same. It doesn't necessarily have to be that way anyway :)
Last edited by finest on Mon Nov 07, 2005 2:11 pm, edited 1 time in total.
 
Paul Tuersley
Topic Author
Posts: 704
Joined: Sat Jun 05, 2004 7:59 am
Location: London, UK

Mon Nov 07, 2005 2:10 pm

You can make the blur only go up, in the sense that when using the new 'Ramp Up' Slider Control setting, while something is highlighted, the blur goes from zero to the max value.

But, of course, once it moves on to the next highlight, the slider control value jumps back to zero and the previous text is still visible on the non-highlight layer. So I guess you could say this is the effect going back down.

Here's a manual solution for the time being:
1. Follow all the steps in my last post, but this time set var sliderRamp = 1;

2. After you've carried out all the steps, delete the Range Selector > Start keyframes from the LOWER of each pair of text layers, so they just have a constant value of 0.0. This will stop the characters from reappearing after they've been highlighted.

3. Add the following expression to the Highlight Animator > Opacity property on the UPPER of each pair of text layers:
100 - (value * thisComp.layer("Ramp Control Null").effect("Slider Control")("Slider"));

The result of all this is that as characters are highlighted, they will blur and fade out and they won't reappear.
 
Paul Tuersley
Topic Author
Posts: 704
Joined: Sat Jun 05, 2004 7:59 am
Location: London, UK

Mon Nov 07, 2005 2:14 pm

Well there you go, two possible solutions :)

Changing the subject slightly, now would be a good time to start thinking about ways to make these advanced features more accessible.

Rather than trying to get the script to decipher more and more style modifiers that exist in the .ssa file, I'm thinking a simpler way would be to decide on a limited list of the most useful options and have that come up as a series of checkboxes on a floating palette, each time the user runs the import script. So certain karaoke styles can be achieved without any extra work for the user.

If everyone could give a list of the most common effects you'd like to achieve, I'll see if I can fit it into a set of UI options.
 
finest
Posts: 10
Joined: Tue Aug 30, 2005 5:18 pm

Mon Nov 07, 2005 2:41 pm

The most common is the expand/explode effect, where each sung syllable increases in size and goes back down again. To keep the origial tracking in the syllable while expanding you have to go to text -> more options -> anchor point grouping -> word. However with your scrip, since the slider goes from 0 -> 1 -> 1 the syllable goes from 0 to 100 to 0 which is not intended. Something like 100% -> 130% -> 100%.

Another common effect is fade out while moving in some direction. And another one is jumping down or up and going back to original position. There is a variation on this where the start time of the syllable is obviously the original, but the end time is arbitary ie start + some constant. So the next syllable could be sung while the old syllable is still floating down. Or for a rather violent effect, go up and down in a relatively short time.

Most of the above can be with changing colour instantly when the syllable starts or gradually as the syllable is sung. This is done convinietly in ssa with \k tags and \t tags, but here since we have to different layers, it might be a hassle.
 
Hyugako
Posts: 4
Joined: Sun Nov 06, 2005 12:31 pm

Wed Nov 09, 2005 1:05 pm

Thanks Paul for the little expression it helps a lot :o As for your GUI Options, I think finest said every most common effects used. The thing is most karaokers (well I think most of them) try to make every karaoke they make different, trying and searching for new effects every time . So this makes the GUI Options in a sense a little obsolete. However this will sure save us the trouble to change ourselves var slider and stuff.

As finest said, I would say the most common types of effects are:
:arrow: Playing with the font size of the highlighted text (Up then down, just up with a fade out, just down with a fade out...)
:arrow: Playing with the position of the highlighted text (Again up then down, just up with a fade out, just down with a fade out...)
:arrow: Playing with the colors of the highlighted text (By making the fill color of text quickly white then back to it's original color (shine), by making a fade in with the fill color...)
:arrow: Playing with the stroke of the highlighted text (By increasing the stroke width with a fade out of this stroke, By changing it's color, by making a fade in of the stroke as the text is sung...)

You can also play with the text shadow... Hope this will help and thank you again :D
 
Hiji
Posts: 9
Joined: Wed Jul 13, 2005 5:06 pm

Wed Nov 16, 2005 4:42 pm

Hi Paul, is been a while.glad to see alot of changes. i'll give them ago later.
I've been busy lately dont have time to play much with AE but finally i got my break now ^__^

And it seem this updated version people seem to like better

Good work again Paul. if you need anything else to test with let me know

EDIT: Also for the GUI for effects, to do karaoke people wanna take advantage over the effect that AE has such as shine,glow,blur and doing particle etc. cause to do those effect in ssa/ass usually the karaoke has they own tool which generates 10k at least of lines for the effect while doing in AE is much easier.
 
Hiji
Posts: 9
Joined: Wed Jul 13, 2005 5:06 pm

Sat Nov 19, 2005 3:08 am

Hi Paul,

I dont know why sometime it open the script fine sometime it doesnt
and most time it give me this error" Unable to execute script line at 139. Function theNull.outPoint.roundToFrames is undefined"

What seem to be the problem?
 
Hyugako
Posts: 4
Joined: Sun Nov 06, 2005 12:31 pm

Fri Nov 25, 2005 6:11 am

Hello,

Sorry to bother again but there's still something I'm unable to do :shock: I want to apply an effect such as glow or blur to the syllable after it has been highlighted. But once again I want it only "to go up". I was able to apply an effect to the text after it was highlighted by duplicating the layer putting 0% opacity for the default animator and 100% for the highlight one. Then I deleted the end keyframes from the range selector.
And so that there won't be two layers one top of each other for the text after it was highlighted, I deleted the start keyframes from the layer with 100% opacity in the default animator.

That way by applying a effect to the layer I duplicated I can apply an effect to the text after it was highlighted.
But what I originally wanted was to put an opacity effect on it so that after it was highlighted the text will disappeared and that way it is impossible.
I thought of duplicating again this layer and play with the end and start keyframes but I don't know really what to do :?

Hiji wrote:
I dont know why sometime it open the script fine sometime it doesnt
and most time it give me this error" Unable to execute script line at 139. Function theNull.outPoint.roundToFrames is undefined"

What seem to be the problem?


I don't know where the problem comes from but you can try changing the varslider value as Paul said this might solve your problem. I did it once and it worked :o

Thanks for reading.
 
Hiji
Posts: 9
Joined: Wed Jul 13, 2005 5:06 pm

Sun Nov 27, 2005 3:51 pm

Yah it work fine for me now. dont know why it happen before.
anyway with the new feature is so much easier to do effect in AE
can do heaps of stuff is awesome ^^ I dont think it need much more of an update im quite satisfied with the script.

Who is online

Users browsing this forum: No registered users and 3 guests