Aegisub/aegisub/automation/v4-docs/template-scripting-ideas.ass

64 lines
8.0 KiB
Plaintext
Raw Normal View History

[Script Info]
; Script generated by Aegisub v2.00 PRE-RELEASE (SVN r939, jfs)
; http://www.aegisub.net
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
PlayResX: 640
PlayResY: 480
Video Aspect Ratio: 0
Video Zoom: 6
Video Position: 0
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,20,&H00FFFFFF,&H0000FFFF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,2,2,10,10,10,0
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,,some ideas on how templated karaoke could work in auto4/lua
Comment: 0,0:00:00.00,0:00:05.00,Default,,0000,0000,0000,code once,-- here's some code that gets executed once at the very beginning of processing
Comment: 0,0:00:00.00,0:00:05.00,Default,,0000,0000,0000,code,-- this code is also executed just once, at the start of processing (ie. like "once")
Comment: 0,0:00:05.00,0:00:10.00,Default,,0000,0000,0000,code line,-- here's some code that gets executed once every line
Comment: 0,0:00:10.00,0:00:15.00,Default,,0000,0000,0000,code syl,-- here's some code that gets executed once every syllable
Comment: 0,0:00:10.00,0:00:15.00,Default,,0000,0000,0000,code syl all,-- this code gets executed for any style, not just the one specified in the template line
Comment: 0,0:00:15.00,0:00:20.00,Default,,0000,0000,0000,code char,-- here's some code that gets executed once every character
Comment: 0,0:00:15.00,0:00:20.00,Default,,0000,0000,0000,code furi,-- here's some code that gets executed once for every furigana part
Comment: 0,0:00:20.00,0:00:25.00,Default,,0000,0000,0000,template pre-line 1,{this gets inserted before every line 1}
Comment: 0,0:00:25.00,0:00:30.00,Default,,0000,0000,0000,template line 1,{this gets inserted into line 1 for every syllable, text automatically follows}
Comment: 0,0:00:30.00,0:00:35.00,Default,,0000,0000,0000,template pre-line 2,{this gets inserted before every line 2}
Comment: 0,0:00:35.00,0:00:40.00,Default,,0000,0000,0000,template line 2 notext,{this gets inserted into line 2 for every syllable, syllable text not automatically inserted}
Comment: 0,0:00:40.00,0:00:40.00,Default,,0000,0000,0000,template line 2,{this appends more tags to each syllable in every line 2, the notext from previous line 2 template is automatically "carried over"}
Comment: 0,0:00:40.00,0:00:40.00,Default,,0000,0000,0000,template line,{this generates an anonymous simple-k-replacer style template line}
Comment: 0,0:00:40.00,0:00:40.00,Default,,0000,0000,0000,template line keeptags,{this creates another anonymous simple-k-replacer style template line, and also keeps all tags from the original text. the lines built by this template are separate from those built by the previous anonymous one}
Comment: 0,0:00:40.00,0:00:45.00,Default,,0000,0000,0000,template syl,{each syllable genrates a line like this, with the syllable text appended}
Comment: 0,0:00:45.00,0:00:50.00,Default,,0000,0000,0000,template syl notext,{each syllable generates a line like this, syllable text not automatically appended}
Comment: 0,0:00:50.00,0:00:55.00,Default,,0000,0000,0000,template syl repeat 10,{each syllable generates 10 lines like this, syllable text automatically appended, repeat counter in variable j}
Comment: 0,0:00:55.00,0:01:00.00,Default,,0000,0000,0000,template syl all,{this template is used for any style, not just the one specified}
Comment: 0,0:00:55.00,0:01:00.00,Default,,0000,0000,0000,template syl multi,{every highlight of a syllable generates a line from this, timing is changed to match current highlight}
Comment: 0,0:00:55.00,0:01:00.00,Default,,0000,0000,0000,template syl fx foo,{only applied for syllables with inline-fx "foo"}
Comment: 0,0:00:55.00,0:01:00.00,Default,,0000,0000,0000,template syl notext loop 10,{modifiers can be combined, loop is another name for repeat}
Comment: 0,0:01:00.00,0:01:05.00,Default,,0000,0000,0000,template char,{each character generates a line like this, with the character appended. positioning variables matches the character and timing matches syllable}
Comment: 0,0:01:05.00,0:01:10.00,Default,,0000,0000,0000,template char multi,{multi highlight also supported for char, as well as repeat and notext}
Comment: 0,0:01:10.00,0:01:15.00,Default,,0000,0000,0000,template furi,{each furigana part generates a line like this, a new style with changed font size is automatically generated and applied}
Comment: 0,0:01:15.00,0:01:20.00,Default,,0000,0000,0000,template syl furi,{this template generates both normal syllables and furigana, positionig/sizing info adjusted to match whatever the template produces at the time}
Dialogue: 0,0:01:20.00,0:01:25.00,Default,,0000,0000,0000,,for notext syl and char templates there are also variables $pretext and $posttext which hold the text before and after the syllable/character, to be able to create "build up" style effects
Dialogue: 0,0:01:25.00,0:01:30.00,Default,,0000,0000,0000,,template line timing doesn't matter but layer does (layer is copied directly to the output lines)
Dialogue: 0,0:01:30.00,0:01:35.00,Default,,0000,0000,0000,,style is used for matching again the text
Dialogue: 0,0:01:35.00,0:01:40.00,Default,,0000,0000,0000,,it's not possible to do furigana per-character
Dialogue: 0,0:01:40.00,0:01:45.00,Default,,0000,0000,0000,,templates are applied first in order of class, then in order of appearance
Dialogue: 0,0:01:45.00,0:01:50.00,Default,,0000,0000,0000,,class order: pre-line/line, syl, char, furi
Dialogue: 0,0:01:50.00,0:01:55.00,Default,,0000,0000,0000,,ie. first all pre-line/line templates are applied for a karaoke line, then all syl templates are, then all char templates, then all furi templates, then proceed to next karaoke line
Dialogue: 0,0:01:55.00,0:02:00.00,Default,,0000,0000,0000,,code and template lines within same class are executed intermixed as they appear
Dialogue: 0,0:02:00.00,0:02:05.00,Default,,0000,0000,0000,,(code lines are like template lines, they just don't generate any output)
Dialogue: 0,0:02:05.00,0:02:05.00,Default,,0000,0000,0000,,the 'all' modifier should be used carefully, it will catch *any* line, even those without karaoke tags in them
Dialogue: 0,0:02:05.00,0:02:05.00,Default,,0000,0000,0000,,if 'keeptags' is used, tags in syllable zero are prepended to the line and tags in the current syllable are inserted between the template text and syllable text (this is not compatible with 'notext')
Dialogue: 0,0:02:05.00,0:02:05.00,Default,,0000,0000,0000,,the optional identifier for 'pre-line'/'line' can be any string, but numbers are recommended as they won't clash with other modifiers (you can also insert some other special character at the start of the identifier though) - ascii identifiers are case insensitive
Dialogue: 0,0:02:05.00,0:02:05.00,Default,,0000,0000,0000,,'line' templates with identifiers can be used to split long effect lines into several, however they are simply concatenated when parsed, not processed separately
Dialogue: 0,0:02:05.00,0:02:05.00,Default,,0000,0000,0000,,also, there is no guarantee of execution order of non-anonymous 'line' templates
Dialogue: 0,0:02:05.00,0:02:05.00,Default,,0000,0000,0000,,anonymous 'line' templates can't have 'pre-line' templates
Dialogue: 0,0:02:05.00,0:02:05.00,Default,,0000,0000,0000,,while 'syl', 'char' and 'furi' can freely be combined in one line, 'line' and 'pre-line' can't live with any other class, not even each other (ie. you can't have 'line pre-line', 'line syl', 'syl pre-line' etc.)
Dialogue: 0,0:02:05.00,0:02:05.00,Default,,0000,0000,0000,,'syl' is the default for templates with no other class specified, like 'once' is the default for code
Comment: 0,0:02:05.00,0:02:10.00,Default,template,0000,0000,0000,,auto3 multi-template style is not supported, it'll need a different script (supporting it all in one will be more work than it's worth, probably, particularily because of differences in variables)
Dialogue: 0,0:02:10.00,0:02:15.00,Default,,0000,0000,0000,,