ssb22 / jianpu-ly

Jianpu in Lilypond
http://ssb22.user.srcf.net/mwrhome/jianpu-ly.html
Apache License 2.0
70 stars 18 forks source link

[End case] KeepOctave and higher note #37

Closed suntong closed 1 year ago

suntong commented 1 year ago

Don't know how exactly to describe the issue in English, but take a look at the screenshot:

image

I think it should be able to be produced by the following jianpu:

KeepOctave
KeepLength

2/4

<1 <1
 c1 2 3 4 5. s6 7
>c1 2 3 4 5. s6 7
>c1 2 3 4 5'. s6 7
>c1 2 3 4 5. s6 7
>c1 2 3 4 5. s6 7

However, it is giving me loads of errors.

How to make it work please?

ssb22 commented 1 year ago

You don't get loads of errors, you get 1 error that's 12 lines long.... I should probably catch that and make it easier to read.

The problem is that > and ' are equivalent and KeepOctave affects both of them. So if you put 5' that is the same as putting >5, and then you don't put a < so it stays up in the new octave. So the last line ends up wanting three dots above the notes, and it doesn't know how to do 3 dots, so it crashes with that error.

Now there might have been an argument for making > have the KeepOctave behaviour and ' not have the KeepOctave behaviour, but if we did that now, we'd need a new option to turn it on because otherwise we'd break everyone's input that uses the current behaviour😞

suntong commented 1 year ago

Now there might have been an argument for making > have the KeepOctave behaviour and ' not have the KeepOctave behaviour, but if we did that now, we'd need a new option to turn it on because otherwise we'd break everyone's input that uses the current behaviour

Hmm... that behaviour is what I thought to be the default, because it gives us an option to raise / lower to the next octave without changing the current KeepOctave level, just as the one shown in OP. It will be really useful when there is only one or two notes are outliers and we have a "shorthand" to change them on the spot, without raising then lowering the current KeepOctave level as what I had to do before.

So, we don't need a new option to turn it on as I believe I'm the only one that is using it, because so far it is still an undocumented behaviour. Even if, for the rare case that another person is using it, they would find that the benefits weight far more than the trouble of correcting the current way.

If you insist that a new option IS necessary, then please use it for specifying the current behavior, IE, the KeepOctave alone would behave as what I described above.

Please consider, thanks.

ssb22 commented 1 year ago

Good point: I'd forgotten that KeepOctave is still undocumented. In that case we can do what we like with it....

suntong commented 1 year ago

Yeah, in that case, the behaviour / definition of > and ' will be very clear and crisp. Otherwise, there is no need to introduce another set of symbols.

suntong commented 1 year ago

the behaviour / definition of > and ' will be very clear and crisp. Otherwise, there is no need to introduce another set of symbols.

Oh, BTW, in such case, is it still necessary to introduce the KeepOctave option?

As the definition of > and ' will be very clear, and works as before the introduction of the KeepOctave option, I'm thinking to get rid of the KeepOctave option entirely.

suntong commented 1 year ago

I'm thinking to get rid of the KeepOctave option entirely.

I meant that no internal logic will be using it, but don't error out when script has it, just it has no effect at all.

suntong commented 1 year ago

Bravo! works like a charm. thx!