retime
Synopsis: retime(mode, startadjust, endadjust)
This function is usually used once in a template in a code block by itself. It adjusts the start and end time of the output line in various ways.
The
mode parameter determines how the start and end times of the line are changed, it must be a string with one of the following values. Because it must be a string, the name of the mode must be enclosed in quotation marks!
The
startadjust and
endadjust parameters slightly change meaning based on the mode, but generally is a number of milliseconds added to the "base" time controlled by the mode.
Possible
modes:
- abs or set - Both startadjust and endadjust are used as absolute time values to set the start and end time of the line directly.
- preline - Intended to make effects that happen before the actual line start. Both start and end time of the line are set to the start time of the line, then startadjust is added to the start time and endadjust added to the end time. Usually startadjust should be negative here and endadjust be zero.
- line - Use the regular line timings and just add startadjust to the start time and endadjust to the end time.
- start2syl - Intended to make the look of the syllable from the start of the line until it is highlighted. The start time of the line is kept and the end time is set to the start time of the syllable. Use startadjust and endadjust to offset the times.
- presyl - Similar to preline but for the syllable timing instead.
- syl - From start of syllable to end of syllable.
- postsyl - Similar to presyl but the base timing is the syllable end time instead of start time. You will usually want to use a zero addstart and positive addend here.
- syl2end - The time from the end of the syllable to the end of line, similar to start2syl.
- postline - Similar to postsyl but for the line timing instead.
There is also a special
mode:
- sylpct - Both of startadjust and endadjust are treated as percentage values from 0 to 100 and are used to set the line timing to cover that part of the syllable's time.
Be careful with the retime function on
line templates, if you use it directly on a
line template it will probably not do what you want. You should only use it on
pre-line,
syl and
furi templates. You should also only use it once in e
المفضلات