2/29/2024 0 Comments Aegisub karaoke effect lua![]() Template B is matched against the line.Template A is matched against the line.Now these templates are applied against a line with 2 syllables. C has both the char and multi modifiers.A is a regular template with neither multi nor char modifier.Not per-character virtual syllables and not a combination.Īssume there are three syl class templates: A, B and C. Through are the parsed-stored syllables, not multi-highlight virtual syllables, It is important to note that the syllables and furigana syllables looped Syl class templates are attempted matched against the line and then run onįinally, all furigana syllables on the line are run through in order, for eachĮvery furi class template is attempted matched against the line and then run Next, all syllables on the line are run through in order and for each, all See below for a definition of when a template matches a Kara-templater attempts to match all templates against all other lines.Įach line that hasn’t been rejected by the above points is now run through allįirst, all line class templates are attempted matched against the line and.Karaoke or nothing (is blank) it is skipped immediately. If a line is not a comment and its Effect field contains anything else that.If a line is a comment and its Effect field doesn’t contain Karaoke it is.Iterate through karaoke lines in file #Įvery non-template line in the file is now run through and has all templates attempted applied in order. Happens here, the main thing that can happen is that some more things are added (Basically everything but line, orgline, sylĪll templates in the once class are executed first. See Code execution environment for moreĭetails on what’s in there. Possible before any templates are run, is put into tenv. Initialising the runtime environment for the templates. The last thing done before starting actually running the templates is Run of kara-templater, so they should be replaced in this new run. In the Effect field, as those are assumed to have been generated in a previous ![]() Lines are deleted from the subtitle file. Clean-up #Īfter all templates have been collected etc., all old and no longer needed The templates of different classes are each put in their own “bucket”, so forĮxample line and syl templates are not kept together. Pre-line template lines is added to the pre-line text of the template ModifiersĬannot be removed from templates in this way or any other way. Line but not in the current template are added to the template. To the current text of the template and modifiers present in the new template There is already one with that name, the text of the template line is appended New one is created with that name and initialised with the given modifiers. There is already a line class template with that name. When a named line class template lines is encountered, first it’s checked if The details aren’t important here, but every modifier name found in the Effectįield either sets a flag in the template or a value corresponding to the Collecting, parsing and compiling templates #Įvery line in the file is visited and checked for being a template line, i.e.īe a comment and have the first word in the Effect field be code or It then collects all template lines in the file. Generate_furigana in the llect_head function, meaning thatįurigana styles are always generated, unless they already The first thing kara-templater does is simply use template text** or just **text The “text” part of a template, either the Lua code in a code template or the modifier Modifiers affect how and when templates are executed. Syl and furi, the first only available for code templates. (One line class output template can span multiple template lines.) class A class is a kind of template. template line A line in the subtitle file that defines an output template, or part of one. With the template keyword.) code line A line in the subtitle that defines a code template. (Declared with the code keyword.) output template A template that produces output lines from some karaoke data input. ![]() code template A template that runs a chunk of Lua code but doesn’t produce output. Mini-program compiled and executed by kara-templater. template The basic “execution unit” of kara-templater, a template is essentially a varctx The inline variable con te xt, the storage for the actual tenv The template environment, or code execution environment. The namesĪre close to or the same as those used in the actual script. These are some terms and concepts used throughout the description. ![]() Most of this is technical details you don’t need to know to use kara-templater,īut if you see some behaviour you don’t understand this page might explain it. They do and why some things can’t and won’t work. ( kara-templater) works and will try to explain why various things work as This page describes various technical details about how Karaoke Templater Collecting, parsing and compiling templates. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |