Line timing: quiet before and after a line in seconds; [pause] inside a line

This commit is contained in:
gator 2026-09-23 02:00:45 +00:00
parent 8fef1f264e
commit ca591ac6a5

View file

@ -1527,13 +1527,14 @@
: a.from_book.kind === "close" ? 'background:#fdf1dc;color:#8a5a00">close to the book'
: 'background:#f1e7e2;color:#b4531f">not in the book - written by the writer') + '</span>'
+ (a.from_book.near ? '<br><span class="dir">the book: “' + esc(a.from_book.near) + '”</span>' : '') : '')
+ ((a.lead_seconds != null || a.tail_seconds != null) ? ' <span class="tiny">quiet ' + Number(a.lead_seconds || 0).toFixed(1) + ' s before, ' + Number(a.tail_seconds || 0).toFixed(1) + ' s after</span>' : '')
+ ' <details style="display:inline"><summary style="cursor:pointer;color:var(--muted);font-size:12px;display:inline">change the words or when they are said</summary>'
+ '<input type="text" maxlength="400" style="width:100%;margin:4px 0" data-linetext="' + esc(s.id) + '|' + ai + '" value="' + esc(a.text || "") + '">'
+ (a.lip_sync ? '<label style="display:block;font-size:12px;color:var(--muted);margin:2px 0 4px">Said '
+ '<select data-linewhen="' + esc(s.id) + '|' + ai + '">'
+ [["start", "at the start of the shot"], ["middle", "in the middle of the shot"], ["end", "at the end of the shot"]].map(function (o) {
return '<option value="' + o[0] + '"' + ((a.say_at || "middle") === o[0] ? ' selected' : '') + '>' + o[1] + '</option>'; }).join("")
+ '</select> — the rest of the shot plays in quiet around it.</label>' : '')
+ '<div class="tiny" style="margin:0 0 4px">A pause inside the line: write <b>[pause 0.6]</b> between the words (seconds). It is never spoken.</div>'
+ (a.lip_sync ? '<label style="display:block;font-size:12px;color:var(--muted);margin:2px 0 4px">Quiet <b>before</b> the line '
+ '<input type="number" step="0.5" min="0" max="12" style="width:60px" data-linelead="' + esc(s.id) + '|' + ai + '" value="' + (a.lead_seconds != null ? Number(a.lead_seconds).toFixed(1) : '') + '" placeholder="1.0"> s - what the description puts before the words happens here - and <b>after</b> it '
+ '<input type="number" step="0.5" min="0" max="12" style="width:60px" data-linetail="' + esc(s.id) + '|' + ai + '" value="' + (a.tail_seconds != null ? Number(a.tail_seconds).toFixed(1) : '') + '" placeholder="0.5"> s. '
+ 'Leave both empty and the shot holds only the speaking; set either and the shot keeps the quiet. Then press Estimate on the length.</label>' : '')
+ '<button type="button" class="btn" data-lineset="' + esc(s.id) + '|' + ai + '">Save</button></details>'
+ (a.delivery ? '<br><span class="dir">' + esc(a.delivery) + '</span>' : '')
+ '</div><span class="dur" data-dur="' + esc(s.id) + '"></span></div>';
@ -2005,9 +2006,9 @@
var lk = el.getAttribute("data-lineset"), lp = lk.split("|");
var lin = document.querySelector('[data-linetext="' + lk + '"]');
el.disabled = true;
var lwh = document.querySelector('[data-linewhen="' + lk + '"]');
var lld = document.querySelector('[data-linelead="' + lk + '"]'), ltl = document.querySelector('[data-linetail="' + lk + '"]');
r = await act("set_line", { draft_id: CUR, shot_id: lp[0], index: Number(lp[1]), text: lin ? lin.value : "",
say_at: lwh ? lwh.value : "" });
lead: lld ? lld.value : "", tail: ltl ? ltl.value : "" });
if (r) { showMsg("msg", "Saved. The voice will be recorded again with the new words the next time it is played or filmed.", "ok"); await refresh(); }
return;
}