-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKaraoke_Templater_Tutorial_1.html
272 lines (261 loc) · 19 KB
/
Karaoke_Templater_Tutorial_1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="keywords" content="Karaoke Templater Tutorial 1,ASS Tags,Glossary:Karaoke effect,Karaoke Templater Tutorial 2,Karaoke Timing Tutorial" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="./opensearch_desc.php" title="Aegisub Manual (English)" />
<title>Karaoke Templater Tutorial 1 - Aegisub Manual</title>
<style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "./skins/aegisub/main.css"; /*]]>*/</style>
<link rel="stylesheet" type="text/css" media="print" href="./skins/common/commonPrint.css" />
<!--[if lt IE 5.5000]><style type="text/css">@import "./skins/aegisub/IE50Fixes.css";</style><![endif]-->
<!--[if IE 5.5000]><style type="text/css">@import "./skins/aegisub/IE55Fixes.css";</style><![endif]-->
<!--[if gte IE 6]><style type="text/css">@import "./skins/aegisub/IE60Fixes.css";</style><![endif]-->
<!--[if IE]><script type="text/javascript" src="/docs/skins/common/IEFixes.js"></script>
<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<script type= "text/javascript">/*<![CDATA[*/
var skin = "aegisub";
var stylepath = "/docs/skins";
var wgArticlePath = "/docs/$1";
var wgScriptPath = "/docs";
var wgServer = "http://aegisub.cellosoft.com";
var wgCanonicalNamespace = "";
var wgCanonicalSpecialPageName = false;
var wgNamespaceNumber = 0;
var wgPageName = "Karaoke_Templater_Tutorial_1";
var wgTitle = "Karaoke Templater Tutorial 1";
var wgAction = "view";
var wgArticleId = "49";
var wgIsArticle = true;
var wgUserName = null;
var wgUserGroups = null;
var wgUserLanguage = "en";
var wgContentLanguage = "en";
var wgBreakFrames = false;
var wgCurRevisionId = "208";
/*]]>*/</script>
<script type="text/javascript" src="./skins/common/wikibits.js_63.html"><!-- wikibits js --></script>
<script type="text/javascript" src="/docs/index.php?title=-&action=raw&gen=js"><!-- site js --></script>
<style type="text/css">/*<![CDATA[*/
@import "./Common.css";
@import "./Aegisub.css";
@import "/docs/index.php?title=-&action=raw&gen=css&maxage=18000";
/*]]>*/</style>
<!-- Head Scripts -->
<style>
.editsection { display: none; }
</style>
</head>
<body class="mediawiki ns-0 ltr page-Karaoke_Templater_Tutorial_1">
<div id="globalWrapper">
<div id="column-content">
<div id="content">
<a name="top" id="contentTop"></a>
<h1 class="firstHeading">Karaoke Templater Tutorial 1</h1>
<div id="bodyContent">
<h3 id="siteSub">From Aegisub Manual</h3>
<div id="contentSub"></div>
<!-- start content -->
<p>Welcome to the first tutorial in using Karaoke Templater to create <a href="./Glossary_Karaoke_effect.html" title="Glossary:Karaoke effect">karaoke effects</a>. We'll start out with something simple and then continue on to more advanced effects throughout the series.
</p>
<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="#Finding_Karaoke_Templater"><span class="tocnumber">1</span> <span class="toctext">Finding Karaoke Templater</span></a></li>
<li class="toclevel-1"><a href="#Getting_timed_karaoke"><span class="tocnumber">2</span> <span class="toctext">Getting timed karaoke</span></a>
<ul>
<li class="toclevel-2"><a href="#Load_a_video"><span class="tocnumber">2.1</span> <span class="toctext">Load a video</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="#Writing_a_k-replacer_style_template"><span class="tocnumber">3</span> <span class="toctext">Writing a k-replacer style template</span></a></li>
<li class="toclevel-1"><a href="#Extending_the_effect_a_bit"><span class="tocnumber">4</span> <span class="toctext">Extending the effect a bit</span></a></li>
<li class="toclevel-1"><a href="#So_what_does_it_all_mean.3F"><span class="tocnumber">5</span> <span class="toctext">So what does it all mean?</span></a></li>
</ul>
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
<a name="Finding_Karaoke_Templater"></a><h2><span class="editsection">[edit]</span> <span class="mw-headline"> Finding Karaoke Templater </span></h2>
<p>You can run Karaoke Templater in two different ways. For now we'll just concentrate on one of them.
</p><p>Look under the Automation menu in Aegisub.
</p><p><img alt="Image:Automation-menu-kara-templater-gray.png" longdesc="/docs/Image:Automation-menu-kara-templater-gray.png" src="./images/Automation-menu-kara-templater-gray.png" width="173" height="113" />
</p><p>You should see the option called <i>Apply karaoke template</i>, though it will be unavailable. This is what you'll select to use the "templates" we'll be writing throughout these tutorials. Right now it's unavailable because you haven't entered any templates. We'll get to that in a moment.
</p><p>If you don't have the <i>Apply karaoke template</i> option, your Aegisub installation is either incomplete or damaged. You need to repair your installation in that case, to be able to use Karaoke Templater.
</p><p>But there is something else to make sure of first.
</p>
<a name="Getting_timed_karaoke"></a><h2><span class="editsection">[edit]</span> <span class="mw-headline"> Getting timed karaoke </span></h2>
<p>Karaoke Templater can do many things for you, but it can't guess the lyrics for your song, or how they're synchronised with the music. You'll have to time the lyrics yourself, or get someone else to do it. You can learn how to time karaoke at the <a href="./Karaoke_Timing_Tutorial.html" title="Karaoke Timing Tutorial">Karaoke Timing Tutorial</a>.
</p><p>We'll call song lyrics with basic karaoke timing (\k timing), but no other special effects, for <i>timed karaoke</i>. When an effect has been applied to the karaoke we'll call it <i>styled karaoke</i>.
</p><p>If you don't have any song to work with here are two lines from a song. You can select them in your browser, select <i>Edit</i>→<i>Copy</i>, then go to Aegisub and select <i>Edit</i>→<i>Paste</i>, to get them into Aegisub.
</p>
<pre>Dialogue: 0,0:00:01.85,0:00:09.06,Default,,0000,0000,0000,,{\k97}shi{\k41}ta{\k0} {\k20}no{\k10} {\k30}u{\k80}e{\k53} {\k23}a{\k21}ma{\k39}ku{\k7} {\k24}to{\k24}ke{\k31}ru{\k0} {\k37}wa{\k23}ta{\k92}gu{\k69}mo
Dialogue: 0,0:00:09.28,0:00:16.21,Default,,0000,0000,0000,,{\k79}ki{\k61}su{\k0} {\k9}o{\k0} {\k37}shi{\k98}te{\k40} {\k23}ku{\k25}ro{\k40}i{\k0} {\k28}tsu{\k19}ba{\k51}sa{\k0} {\k11}no{\k0} {\k34}shi{\k138}ta
</pre>
<p>Either way you have some karaoke timed lyrics now, so we can start.
</p>
<a name="Load_a_video"></a><h3><span class="editsection">[edit]</span> <span class="mw-headline"> Load a video </span></h3>
<p>You don't need to load any audio, but it can be a good idea to have some video open. If you don't have any video files ready you can use, select <i>Video</i>→<i>Use dummy video</i> and just say OK. It's not a very interesting video you will get, but it will show you how the subtitles and the effect we're creating will look.
</p>
<a name="Writing_a_k-replacer_style_template"></a><h2><span class="editsection">[edit]</span> <span class="mw-headline"> Writing a <i>k-replacer</i> style template </span></h2>
<p>Now we have everything else set up it's time to make the actual template. First, here's how to add it. The explanation of what every part means will follow.
</p>
<ol><li> Select the very first subtitle line in the file.
</li><li> Select <i>Subtitles</i>→<i>Insert Lines</i>→<i>Before Current</i> to get a new line before it. This will become our karaoke template line. It doesn't <i>need</i> to be first, but it usually makes it easier to keep track of for yourself.
</li><li> Make sure the newly created line has the same <i>style</i> as your timed karaoke.
</li><li> Click the <i>Comment</i> check box for the new line. It should change colour in the subtitle grid.
</li><li> Find the <i>Effect</i> field, it's to the right of the <i>Style</i> and <i>Actor</i> fields. Put the text "<code>template line</code>" into it. (Without the quotes!) Press the <i>Enter</i> key on your keyboard to save the Effect field.
</li><li> Finally, enter this text for the main text of your template line. Finish off with <i>Enter</i> again. <code>{\r\t($start,$mid,\fscy120)\t($mid,$end,\fscy100)}</code>
</li></ol>
<div style="margin-left: 2em; margin-right: 3em; margin-top: 0.5em; padding-left: 1em; padding-right: 4em; background-color: #FDFEE7; border: 1px solid #F9FD96;"><b>Todo:</b> Insert a screenshot of how it should look after the steps.</div>
<p><br />
Now look at the <i>Automation</i> menu again. If you made the template line correctly, <i>Apply karaoke template</i> will now be available. If it isn't review the steps above again.
</p><p>Select <i>Apply karaoke templates</i> and watch Karaoke Templater do its work.
</p>
<div style="margin-left: 2em; margin-right: 3em; margin-top: 0.5em; padding-left: 1em; padding-right: 4em; background-color: #FDFEE7; border: 1px solid #F9FD96;"><b>Todo:</b> Another screenshot, this time after applying templates.</div>
<p><br />
If you have a video open you can view the effect right now, inside Aegisub.
</p><p>Also notice how the template line was left in place, and the timed karaoke was changed to comment lines and had <i>karaoke</i> filled into their Effect fields. Karaoke Templater preserves your timed karaoke in the styled karaoke so you won't lose it. But it also has another function...
</p>
<a name="Extending_the_effect_a_bit"></a><h2><span class="editsection">[edit]</span> <span class="mw-headline"> Extending the effect a bit </span></h2>
<p>Continuing right on from above, now try doing this:
</p>
<ol><li> Change the text of the template line to: <code>{\r\k$kdur\t($start,$end,\1c&H00FF00&)\t($start,$mid,\fscy120)\t($mid,$end,\fscy100)}</code>
</li><li> Apply templates again
</li></ol>
<div style="margin-left: 2em; margin-right: 3em; margin-top: 0.5em; padding-left: 1em; padding-right: 4em; background-color: #FDFEE7; border: 1px solid #F9FD96;"><b>Todo:</b> More screenshot</div>
<p><br />
Karaoke Templater re-used the commented out timed karaoke and changed the styled karaoke to match the new effect instead. You can also try changing the commented out timed karaoke and apply templates again.
</p><p>Like this, you can work gradually on your effect and preview it as you go.
</p>
<a name="So_what_does_it_all_mean.3F"></a><h2><span class="editsection">[edit]</span> <span class="mw-headline"> So what does it all mean? </span></h2>
<p>To finish off this first part of the tutorial, here's what each part means. This is not the full explanation of everything, but it should be plenty for now.
</p>
<ul><li> <i>Template lines</i> are lines in the subtitle file marked in a special way. They must always be Comment lines, and the first word in their Effect field must be <code>template</code>.
</li><li> There are several kinds of template lines. We only used one in this tutorial, this template line type, or <i>template class</i>, is called a <i>line template</i>. Yes, it might be a bit confusing. It's called this because it creates one line of styled karaoke from one line of timed karaoke. The second word in the Effect field of a template line tells what template class it is. For line templates, this is <code>line</code>.
</li><li> So, the <code>template line</code> text in the Effect field means this is a <i>template line</i> of <i>line class</i>.
</li></ul>
<ul><li> A template only does something to timed karaoke lines that have the same Style as the template line.
</li></ul>
<ul><li> Styled karaoke produced by Karaoke Templater all has <code>fx</code> in the Effect field. This is used as a reminder for Karaoke Templater that this line should be replaced, if templates are applied once again.
</li></ul>
<ul><li> The main text for a template line is called the <i>template text</i>. In <i>line</i> templates, every \k tag is replaced with the template text.
</li><li> Template text can use several <i>variables</i>. These are short words that start with a dollar-sign, like <code>$start</code>, <code>$end</code>, <code>$mid</code> and <code>$kdur</code>. Variables are replaced with the information they store for every syllable that's replaced.
<ul><li> <code>$start</code> gets replaced with the start time of the syllable. This is in milliseconds from the start of the line, ie. a time code suitable for putting into the \t, \move and \fade tags.
</li><li> Similarly, <code>$end</code> is the end time of the syllable, also in milliseconds.
</li><li> A bit more special is <code>$mid</code>, this is the <i>midway time</i> of the syllable, the time right in the middle of <code>$start</code> and <code>$end</code>. Here, we used it to grow each syllable taller the first half of its duration, and back to normal height for the second half. Also in milliseconds.
</li><li> The <code>$kdur</code> variable, however is in centiseconds. This is the original time from the \k tag, and is almost only useful for putting back into a \k tag, like we did here.
</li></ul>
</li></ul>
<p>With this knowledge, you should already be able to create lots of effects. You may also want to refer to the page on <a href="./ASS_Tags.html" title="ASS Tags">ASS override tags</a>.
</p><p>You can also <a href="./Karaoke_Templater_Tutorial_2.html" title="Karaoke Templater Tutorial 2">continue to the next tutorial</a>, where we'll look at how to do math with variables to get more variation.
</p><!--
Pre-expand include size: 2361 bytes
Post-expand include size: 776 bytes
Template argument size: 128 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key zeratul-aegimanual_:pcache:idhash:49-0!1!0!!en!2 and timestamp 20090614211209 -->
<div class="printfooter">
Retrieved from "<a href="./Karaoke_Templater_Tutorial_1.html">http://aegisub.cellosoft.com/docs/Karaoke_Templater_Tutorial_1</a>"</div>
<div id="catlinks"><p class='catlinks'>Category: <span dir='ltr'><a href="./Category_Pages_with_Todo_items.html" title="Category:Pages with Todo items">Pages with Todo items</a></span></p></div> <!-- end content -->
<div class="visualClear"></div>
</div>
</div>
</div>
<div id="column-one">
<div class="portlet" id="p-logo">
<a style="background-image: url(/docs/skins/common/images/wiki.png);"
href="./Main_Page.html"
title="Main Page"></a>
</div>
<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
<div class='portlet' id='p-navigation'>
<h5>Navigation</h5>
<div class='pBody'>
<ul>
<li id="n-mainpage"><a href="./Main_Page.html">Main Page</a></li>
</ul>
</div>
</div>
<div class='portlet' id='p-Introduction'>
<h5>Introduction</h5>
<div class='pBody'>
<ul>
<li id="n-What-is-Aegisub?"><a href="./About.html">What is Aegisub?</a></li>
<li id="n-Highlights"><a href="./Highlights.html">Highlights</a></li>
<li id="n-Credits"><a href="./Credits.html">Credits</a></li>
<li id="n-Support-Aegisub"><a href="./Support.html">Support Aegisub</a></li>
<li id="n-FAQ"><a href="./FAQ.html">FAQ</a></li>
<li id="n-Tutorials"><a href="./Tutorials.html">Tutorials</a></li>
</ul>
</div>
</div>
<div class='portlet' id='p-Working with Subtitles'>
<h5>Working with Subtitles</h5>
<div class='pBody'>
<ul>
<li id="n-Editing-Subtitles"><a href="./Editing_Subtitles.html">Editing Subtitles</a></li>
<li id="n-Exporting-Subtitles"><a href="./Exporting.html">Exporting Subtitles</a></li>
<li id="n-Applying-Subtitles"><a href="./Attaching_subtitles_to_video.html">Applying Subtitles</a></li>
<li id="n-Spell-Checker"><a href="./Spell_Checker.html">Spell Checker</a></li>
<li id="n-Translation-Assistant"><a href="./Translation_Assistant.html">Translation Assistant</a></li>
<li id="n-Paste-Over"><a href="./Paste_Over.html">Paste Over</a></li>
<li id="n-Select-Lines"><a href="./Select_Lines.html">Select Lines</a></li>
</ul>
</div>
</div>
<div class='portlet' id='p-Typesetting'>
<h5>Typesetting</h5>
<div class='pBody'>
<ul>
<li id="n-Introduction"><a href="./Typesetting.html">Introduction</a></li>
<li id="n-Working-with-Video"><a href="./Video.html">Working with Video</a></li>
<li id="n-Editing-styles"><a href="./Styles.html">Editing styles</a></li>
<li id="n-Visual-Typesetting"><a href="./Visual_Typesetting.html">Visual Typesetting</a></li>
<li id="n-ASS-Override-Tags"><a href="./ASS_Tags.html">ASS Override Tags</a></li>
<li id="n-Colour-Picker"><a href="./Colour_Picker.html">Colour Picker</a></li>
<li id="n-Styling-Assistant"><a href="./Styling_Assistant.html">Styling Assistant</a></li>
<li id="n-Resolution-Resampler"><a href="./Resolution_Resampler.html">Resolution Resampler</a></li>
<li id="n-Fonts-Collector"><a href="./Fonts_Collector.html">Fonts Collector</a></li>
</ul>
</div>
</div>
<div class='portlet' id='p-Timing'>
<h5>Timing</h5>
<div class='pBody'>
<ul>
<li id="n-Working-with-Audio"><a href="./Audio.html">Working with Audio</a></li>
<li id="n-Shift-times"><a href="./Shift_Times.html">Shift times</a></li>
<li id="n-Timing-Post-Processor"><a href="./Timing_Post-Processor.html">Timing Post-Processor</a></li>
<li id="n-Kanji-Timer"><a href="./Kanji_Timer.html">Kanji Timer</a></li>
</ul>
</div>
</div>
<div class='portlet' id='p-Automation'>
<h5>Automation</h5>
<div class='pBody'>
<ul>
<li id="n-Overview"><a href="./Automation.html">Overview</a></li>
<li id="n-Karaoke-Templater"><a href="./Karaoke_Templater.html">Karaoke Templater</a></li>
<li id="n-Lua-Reference"><a href="./Lua_Reference.html">Lua Reference</a></li>
</ul>
</div>
</div>
<div class='portlet' id='p-Miscellaneous'>
<h5>Miscellaneous</h5>
<div class='pBody'>
<ul>
<li id="n-Aegisub-Options"><a href="./Options.html">Aegisub Options</a></li>
<li id="n-Script-Properties"><a href="./Properties.html">Script Properties</a></li>
<li id="n-Attachment-Manager"><a href="./Attachment_Manager.html">Attachment Manager</a></li>
</ul>
</div>
</div>
<!-- end of the left (by default at least) column -->
<div class="visualClear"></div>
<div id="footer">
<table width = "100%">
<tr><td width="5%" align="left" nowrap='nowrap'></td>
<td align="center"></td>
<td width="5%" align="right" nowrap='nowrap'></td></tr></table>
</div>
<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script>
</div>
<!-- Served by cellosoft.com in 0.172 secs. --> </body>
</html>