the_tuul icon indicating copy to clipboard operation
the_tuul copied to clipboard

Stagger line displays for screens that come up quickly

Open incidentist opened this issue 2 years ago • 2 comments

Sometimes a screen will segue into the next screen very quickly and you don't have time to read what's on the next screen before it starts. Normal karaoke tracks get around this by displaying the first few lines of the next screen on top of the last few lines of the current screen. There is probably a way to tell when this is going to happen, and do it automatically.

incidentist avatar Jun 09 '22 03:06 incidentist

General process for staggering lyrics for a given screen:

if nextScreen.startTime > screen.endTime + MIN_PAUSE_BETWEEN_SCREENS: return;
if len(screen.lines) < 2: return; // We can't remove the line early if it's the only line

earlyRemovalLines = get 1 or 2 lines to remove early
set their displayEndTimes to .5sec after earlyRemovalLines[-1].endTimestamp.

earlyDisplayLines = Get len(earlyRemovalTimes) lines from nextScreen.
// ensure early lines don't display on top of current lines
If earlyDisplayLines[0].yPosition > earlyRemovalLInes[0].yPosition:
    adjust nextScreen.lines yPositions to match screen.lines.yPositions

set earlyDisplayLines.displayStartTimes to .1 sec after the earlyRemovalLines.displayEndTimes

Corner cases:

  1. screen 1 has 1 line
  2. screen 2 has many more lines than screen 1
  3. screen 2 has many fewer lines than screen 1
  4. screen 1 has two lines, the last of which is sung very quickly

incidentist avatar Nov 18 '23 22:11 incidentist

This is pretty cool, actually. Early-removal lines can fade out midway through the next line, and early-display lines from the next screen can fade in after the early-removal lines have faded out.

Currently encountering an issue where screen.length = 2 and nextScreen.length = 4 -- the yOffset is not working.

incidentist avatar Nov 23 '23 21:11 incidentist