Trouble logging in?If you can't remember your password or are having trouble logging in, you will have to reset your password. If you have trouble resetting your password (for example, if you lost access to the original email address), please do not start posting with a new account, as this is against the forum rules. If you create a temporary account, please contact us right away via Forum Support, and send us any information you can about your original account, such as the account name and any email address that may have been associated with it.

I've been using after effects for YEARS, I even script SFX in a studio and I don't even understand what you're typing

Well... I've been using/coding in JavaScript for more than 10 years. JS Objects in AFX is no different from any other JS calls I've ever used.

I made a sample project already, showing simple examples. It's very simple. I'm planning to make a more advanced one (perhaps involving with Particles playground and shatters -- particles playground needs positions and shattering works the best on syllable per layer scheme).

I'm still fixing my syllables per layer, because it's not as good as I'd like it to be. Currently, the syllable per layer can do the following:

1. Layer timed to the syllable with specified lead-ins and lead-outs: KRKLayer::l( styles , true )
2. Layer timed to the line with specified lead-ins and lead-outs: KRKLayer::l( styles , "all" ) -- added in 0.45 (which I can't think of an application for this)

EDIT: ! I found its application. Set Opacity=100% for Start=0% and End=100% (with one keyframe), and Set the rest opacity=0% with a range selector (the script has a bug and requires you to have a range selector) of ALL. Then you will have the following effect:

One Syllable per layer for the duration of the entire line
Therefore, you can apply all kinds of effects to that syllable. You can use expressions to apply effects or use the given property from krk to apply effects.

pichu, im pretty sure most people here still have no idea how to use your karaoke script at all (myself included, even after listening to you talk about for forever). I think you should go with shinji's idea and make simple video tutorial.

pichu, im pretty sure most people here still have no idea how to use your karaoke script at all (myself included, even after listening to you talk about for forever). I think you should go with shinji's idea and make simple video tutorial.

I believe the quickstart tutorial pichu made ( it is on his google page ), is very easy to follow, he also provided a simple sample project for those that want to see it in practice and want to make sure they got everything right. I was able to follow his tutorial on my first try and never tried doing AFX karaoke before, nor am I that good at AFX in general. ( I tried the other karaoke importer scripts, but didn't end up using them as they were either limited or required a lot of repetitive copy/paste manual labor ). Instead of a video tutorial, I believe he should write more documentation on both how his script works as well as a more detailed text animator tutorial ( even if this should be the user's job to learn by himself ).

First off, thank you pichu for creating that script and sharing it with the rest of us

So, i have tried your script even though i have no scripting expierence at all (except wiggle, heh). You provided a great start with your get started guide and i was able to reproduce the effects on my first try and started developing a karaoke effect myself. However, i can't figure out how to use the position data.
I've tried something like this:

First off, thank you pichu for creating that script and sharing it with the rest of us

So, i have tried your script even though i have no scripting expierence at all (except wiggle, heh). You provided a great start with your get started guide and i was able to reproduce the effects on my first try and started developing a karaoke effect myself. However, i can't figure out how to use the position data.
I've tried something like this:

but i don't know how to use the position data in the expression.

It would be great if someone could explain that further.

nice!

to use the positional data, you need the following requirements:

1. make sure you styled your .ass with the right font and weight (bold or regular) and style (italics or not).

2. in your KRK comp, make sure you set the right font size (or else, you can renormalize with your expressions).

3. type in the config in your KRK text layer (and you have it correct)
4. Use slider control or point control. Slider is 1d, point is 2 or 3D, but it will dump out 2D positions there.

5. if you're using slider control: write this in your KRK text layer:

.p( "effect('Slider Control')" , {syl:true, pos:true} ) or something

6. Add keyframes to your slider control. 0 means beginning of the syllable, 100 means end of the syllable. Align them the same way as you did before.

7. use expressions in your slider control. If you're using center text: use this--

Code:

var o={w:200,h:200}
640 - o.w/2 + value

if 640 is the center of your text. Note, this part is very restrictive-- i'm thinking of making it a bit easier... var o will get replaced with the right stuff. w means the width of the text, and h is the height (as if it's vertical text--but don't count on h just yet)

8. In your particular's emitter, position XY: use the following expressions:

[ effect("Slider Control")(1) , value[1] ]

adjust the particular emitter's vertical pos to match where you want to go.

9. I think that should be it, but make sure you tweak the values ... you can tweak it after you generated the layer. Make sure you use SOLO option to see only your template layers.

I changed a few parameters and the codes to include the following features:

You no longer are required to paste your JSON. You can now paste your .ass into your text layer in KRK comp. (source text is recommended because of the UTF-8) The program will parse the .ass internally. SO you will no longer need to style your .ass to get the positions; they're obtained through AFX.

Positions are obtained directly in AFX. The default property for positions are Point expression control named "Position". This process is extremely slow, so be warn about it. Note, if your layer names contain an underscore (_), positions won't be processed. The reason for this is because if you are using the same layer over and over again, the program will add an underscore to it, so essentially, it's pointless to generate the positions over and over again.

Auto-zero word spacing is implemented. Just set your Text, More Options, Anchor Point Grouping to "Word." It will obtain zero-word spacing transparently, allowing you to do per syllable effects. Spacing Slider control has been deprecated in this version.

Notes about positions:

You create keyframes from 0 to 100 with Point Control. 0 means top/left, and 100 means bottom/right within the marker areas. They will get denormalized to the right values. The values obtained from the script are relative to transform.position, so you can add the following expression into your position property to get the correct reference:

Code:

transform.position + value

Although I do not plan to use any presets or any settings with this script, I added "KRK Syllable" to assist in obtaining the positions.

Currently, positions can only be obtained for one-lined, per syllable stuff. It will not work for overlapped syllables (i.e. negative \k timings) or to get only the line positions.

Again, this script is very slow, and it may take 5-10 minutes to generate your karaoke. I'll optimize it later on. Please comment and provide me some feedbacks. Thanks.

Because of these requirements, this script will only work in CS3 (or higher perhaps)

A sample of the positional key (tested using very simple effects because I'm more interested in getting the codes to work)

Edited: I uploaded a sample project (using Trapcode Particular's Glow Trail preset) -- you'll see how it works. BTW, 0.52 is updated, because I'm still trying to squeeze out all of the mistakes I made.

Hi, I tried this script but I couldn't get it working somehow... I got somekind of an error that says "undefined is not an object"... I've tried 0.55, 0.56b and 0.56c and none of them seem to be working.

that's because you most likely didn't match the name exactly what you typed in your layers.
They're case sensitive, and that if you have trailing white spaces in the names, make sure you remove them too. The version I started working on prevents that problem by caching every single objects in your compositions instead of using default AE's method, which you can't do anything about it.

Ok thank you. I'll see if I can get it working now. I'll post again if I get more errors.

EDIT: I still get the same error on line 564 and there is probably more errors that I get. It says null is not an object. I could send the file perhaps if you could have a look on it unless you're not too busy.

Last edited by Kyuu9sha; 2009-08-23 at 13:27.
Reason: Still get the error

Alright what I did to fix it was deleted the keyframes on the "Text->Source Text" property on your template layer. I really have no idea why it was keyframed but deleting the keyframes seems to have fixed the problem.

I got a few pm's on how difficult is the script, so I've decided to change the configurations a bit... I hope this makes more sense. I deprecated the javascript functional evaluations in favor of XML configurations. However, the XML config does nothing but to call back the old js functions i created earlier.

The old configuration is obsolete in this version, since it's a hackish way of implementing the configurator. The new way is described as follows:

1. The timeline marker is left untouched
2. KRK Composition needs to have a text layer which has the Karaoke .ass codes only in the source text.
3. Drag any compositions into KRK Composition if you want them to be processed. Make sure they're below your text layer containing the .ass lyrics.
4. Check on Shy Layer if you don't want them to be processed. Check off the Shy Layer (hide) to process them.
5. Open Layer comments.
6. Type in XML Configurations next to the composition to process them.

As a side note, you cannot undo any changes made in the comments once you swapped out of the comment mode. To prevent this from happening, please edit these XML configurations with an external editor, then paste the XML config back into the box.

* name is the layer's name
* space is the zero-space override. Note, you cannot disable zero-space if the anchor point group is set to Word.
* no is a little optimization in calculations, where the KRK Syllable won't be generated. However, if you enable 'no', you won't be able to collect positional values.
* alias = alias name (instead of based on name + repeated index)

line: (abbreviate to l)

* name is the style name (alias: style)
* syl indicates if the line is a per-syllable line
* layer is the layer number in .ass (by default, it selects all layers)
* unnorm determines if the current line has unnormalized lead-in/lead-out.

animator: (abbreviate to a)

* name is the text animator's name
* syl is if it's a syllable timing (if syl=0, then it's a line timing)
* unnorm is if it's unnormalized

property (abbreviate to p)

* name is the afx eval name for the properties (copy and paste from expressions)
* syl is if it's a syllable timing (if syl=0, then it's a line timing)
* unnorm is if it's unnormalized
* pos is to generate positional keys
* link -- link to another property (it requires either layer OR comp and layer) (if you need the property from the same layer, just make your own expression within the same layer)
* comp -- comp link
* layer -- layer link

(Properties need at least one keyframe to process, so make sure you have a dummy keyframe if you want to link properties) Example:

<copy /> copies the template layer from another composition (make sure that the source composition is in KRK composition, and the name is composition name in KRK comp) to the current composition, so it's useful if you want all your templates in one composition, and the generated ones in other comps.

Basically, I'm precomposing (it's automatically collapsed) all the generated layers one-by-one, have them disabled (eye off), set the blend mode to soft light . The point of precomposing is to allow using text layers in layer controls such as Trapcode particular, which would require text layers to be precomposed and 3D. I haven't tested this part with an actual effect, but I already tested this feature to ensure it does the right job, but if anyone wants to test it, be my guest.

Also using bezier keyframes is fixed. It was a simple typo in the script (temoralEase instead of temporalEase).