Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] New multi-highlight syntax for furigana folowed by hiragana/punctuation highlight in Karaoke Templater #129

Open
red5h4d0w opened this issue Apr 23, 2024 · 7 comments

Comments

@red5h4d0w
Copy link

Doing a lot of furigana karaoke subtitles recently, I came across a specific scenario that I needed to workaround not elegantly in order to get the desired display out of the Karaoke Templater. This scenario is when I need an highlight containing both a furigana and the following hiragana/punctuation (which is not furigana).

An example is this phrase:

image

Here I want the highlights

  1. 富|と
  2. #|み + 、
  3. 名|めい
  4. 声|せい + 、
  5. 力|ち
  6. #|か
  7. #|ら + 。

I couldn't find a syntax for highlights 2, 4 and 7 specifically, but I did a workaround to get to the right display by using zero duration syllables:
{\k18}富|と{\k0}#|み{\k35}、{\k25}名|めい{\k0}声|せい{\k49}、{\k11}力|<ち{\k9}#|か{\k0}#|ら{\k14}。

This works for displaying {\k} syllable, but if I wanted to fill with {\kf}, this workaround would fail as #|み has a zero duration instead of wanted duration.

This also arises with some verbs when the following highlights are desired (ex: 立った):

  1. 立|た + っ

This Feature Request is then to ask for a new syntax for the Karaoke Templater (and implementation) that can help with those cases. This could be something like a reserved character ending the furigana part. Ideas I had were things like

  • marking end of furigana with a new symbol like + ex: {\k100}立|た+っ{\k100}た
  • changing meaning of pipe symbol as furigana toggle ex: {\k100}立|た|っ{\k100}た
  • marking end of kanji with a new symbol like + ex: {\k100}立+っ|た{\k100}た

Personally, I prefer this first idea, because it is less confusing than the second and this syntax could be used for broader, but unlikely scenarios (something like {\k100}立|た{\k100}ち+上|あ{\k100}が{\k100}る?)

@Trildar
Copy link

Trildar commented Apr 27, 2024

To get some clarification since I managed to confuse myself a couple times while messing around with implementing this. Basically you would want the stuff between the + and the next syllable to merge into the current syllable but be ignored for the furigana placement, i.e. the furigana will align over the kanji?

For example,
{\k15}富|と{\k20}#|み+、{\k25}名|めい{\k15}声|せい+、{\k10}力|<ち{\k20}#|か{\k5}#|ら+。
would effectively become
{\k35}富、{\k25}名{\k15}声、{\k35}力。 for the main text.
With とみ centered over 富 rather than over 富、 as you would get if you did {\k15}富、|と{\k20}#|み


Also, more of a note so it's not missed in implementation, but the + should also separate the next furigana right?

For example, {\k15}富|と{\k20}#|み、{\k25}名|めい would merge the furigana to become とみめい all as one.
But inserting the + like {\k15}富|と{\k20}#|み+、{\k25}名|めい would have a similar effect to using ! for めい and split them up.

@red5h4d0w
Copy link
Author

To get some clarification since I managed to confuse myself a couple times while messing around with implementing this. Basically you would want the stuff between the + and the next syllable to merge into the current syllable but be ignored for the furigana placement, i.e. the furigana will align over the kanji?

Yes exactly that for the text alignment. For the main text timing, I had in mind something more like
{\k15}富{\k20}、{\k25}名{\k15}声、{\k30}力{\k5}。 so that the punctuation marks are highlighted at the timing of the first syllable they are featured in. The exact implement would have overlap between syllable and therefore cannot be represented as a single line. The timing for the non-furigana after script application would be

  1. {\k35}富 (syl.start_time=0, syl.duration=350)
  2. {\k15}{\k20}、 (syl.start_time=150, syl.duration=200)
  3. {\k35}{\k25}名 (syl.start_time=350, syl.duration=250)
  4. {\k60}{\k15}声、 (syl.start_time=600, syl.duration=150)
  5. etc.

That second point is something I completely missed in my proposal. I think the most reasonable choice would be to treat the comma in {\k20}#|み+、 like any syllable without furigana (therefore not combining furigana just like ! would do)

The case where it would be intuitive for it to combine would be something more complex like {\k20}立|た{\k30}#|ち+会|あい{\k20}人|にん (I couldn't think of a simpler example) where all furigana would be grouped since there is no syllable without furigana to break grouping nor there is ! or <.

@Trildar
Copy link

Trildar commented Apr 27, 2024

Seems kind of odd from the perspective of effects with duration. Animating the comma together with み rather than the kanji. Not sure if that's what most people would want.


Not sure if I'm missing something with the merging example.

If the desired main text timing is {\k20}立{\k30}会{\k20}人 then it can be written as {\k20}立|た{\k30}会|ちあい{\k20}人|にん

If it's {\k50}立会{\k20}人 then it can be written as {\k20}立会|た{\k30}#|ちあい{\k20}人|にん

And I can only see the furigana timing as {\k20}た{\k30}ちあい{\k20}にん all placed together.

@red5h4d0w
Copy link
Author

red5h4d0w commented Apr 27, 2024

I had not thought about people doing effects. Maybe it's better to go with what you had in mind and not have overlaps so that the effects look cleaner. So

  1. {\k35}富、 (syl.start_time=0, syl.duration=500)
  2. {\k35}{\k25}名 (syl.start_time=350, syl.duration=250)
  3. {\k60}{\k15}声、 (syl.start_time=600, syl.duration=150)
  4. etc.

Then the merging example I give seems unuseful, since the only difference would have been that in {\k20}立|た{\k30}#|ち+会|あい{\k20}人|にん would have lasted 50 and overlapped for 20 which cannot be represented by {\k20}立|た{\k30}会|ちあい{\k20}人|にん or {\k20}立会|た{\k30}#|ちあい{\k20}人|にん.

I'm not sure whether putting furigana on right-hand of plus is even necessary in this context. Maybe to specify splitting furigana in case like {\k20}立|た{\k30}#|ち+会|!あい{\k20}人|にん (we could also assume that + implies splitting furigana layout, but then I find this beahviour less clear)

@red5h4d0w
Copy link
Author

red5h4d0w commented Apr 27, 2024

Seems kind of odd from the perspective of effects with duration. Animating the comma together with み rather than the kanji. Not sure if that's what most people would want.

Maybe the behavior I talked about looks more desired for case like {\k10}放|は{\k10}#|な+っ{\k10}た where it is clear that you don't want to highlight at the same time as

@Trildar
Copy link

Trildar commented Apr 30, 2024

Maybe the behavior I talked about looks more desired for case like {\k10}放|は{\k10}#|な+っ{\k10}た where it is clear that you don't want to highlight at the same time as

Well, I think that's kind of stylistic choice, and one that largely applies the same to both punctuation and っ though grouping punctuation together with stuff after it may make less sense, and would likely be more headache in furigana positioning issues. So I'll try to list down the different timings one might want to have and see what is and isn't possible currently.

First, just with kanji only, using the 放った example. Assuming a syllable timing like {\k10}は{\k15}なっ{\k10}た.
Only caring about start time, you could have:

  1. 放 and っ together. {\k25}放っ{\k10}た
  2. っ on the な timing. {\k10}放{\k15}っ{\k10}た
  3. っ and た together. {\k25}放{\k10}った
  4. Give っ its own small timing slice somewhere in between. {\k24}放{\k2}っ{\k9}た

With duration/animation, I think there's all the options above plus:

5a. 放 overlapping with っ animating on な. (e.g. 放 has single duration=250 and っ has start=100 and duration=150)
5b. 放 multi-highlight, with 放 and っ animating together for な.
No existing support for the above, but is close to {\k10}放{\k15}#っ{\k10}た if it produced a syllable for っ with start=100 and duration=150. Difference between a and b would be through use of the multi template modifier.

  1. Give っ 0 duration. {\k25}放{\k0}っ{\k10}た
    I've not played around with templates and animation, so I'm just assuming 0 duration is actually useful and doesn't just break most animations.

Adding in furigana, I don't think the options change, except (1) has a layout issue, so going through the rest of them again for existing syntax support:
  1. Not supported. Except I guess a workaround with 0 duration stuff.
  2. {\k10}放|は{\k15}#|な{\k10}った
  3. {\k10}放|は{\k14}#|な{\k2}っ{\k9}た
  4. Not supported.
  5. {\k10}放|は{\k15}#|な{\k0}っ{\k10}た

(1) could be done like {\k10}放っ|は{\k15}#|な{\k10}た, but the furigana would not be centered over the kanji.

So I guess the question is if support for (1) with proper furigana positioning is better, or (cleaner) support for (2) and (5) (mostly 5b, since 5a sounds kind of weird).

My opinion would be (2) and (5), so your proposal, with the added detail of multi-highlight. But it would be nice if there was a way to also do (1). Maybe {\k10}放|は+っ{\k15}#|な{\k10}た, though that looks weird, and I think might also be a pain for implementation.


{\k20}立|た{\k30}#|ち+会|あい{\k20}人|にん would have lasted 50 and overlapped

Ah yeah, I missed that. I'm still not sure it makes sense to have | again after + without a {\k} split. And if it doesn't, then I think it's functionally the same whether + itself causes a furigana break or it's the presence of a syllable without furigana that + causes, since I don't think + with nothing after it is useful. Though it may not be much issue to implement it as the latter anyway.

Other issue though, is if | after + is useful, then the semantics of that probably need nailing down as it looks complicated.

@red5h4d0w
Copy link
Author

red5h4d0w commented May 1, 2024

Now thinking about an animation perspective, 2 is what I would want (5a seems weird after thinking a bit more about it). 5b sounds also useful to some people, although I've never used multi myself.

For no animation or some kinds of animation, this would be nice. For fill animations... maybe something like 4 would be better.


For the layout issue of 1, a possible workaround is to include space after furigana, but it isn't satisfying. I don't have any idea on how to express that. I also feel that {\k10}放|は+っ{\k15}#|な{\k10}た looks weird. To me the {\k15}#|な{\k10}た part should parse the same as if there was only this part, since breaks furigana.


Other issue though, is if | after + is useful, then the semantics of that probably need nailing down as it looks complicated.

I'm not sure myself if this is useful, so we can probably scrap this idea from the proposal and if there is interest of need let another feature request be opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants