Closed BertrandSim closed 8 months ago
I think the "proper" way is to just use continuations, not ties:
WithStaff 1 - - - | - - - -
(the tie is automatically added in the 5-line staff, and the note is just continued with dashes in the jianpu)
If we need to do something different, it would help if we could find an example of published jianpu music to confirm what it "should" look like...
I think the "proper" way is to just use continuations.
Got it, thank you.
if we could find an example of published jianpu music to confirm what it "should" look like...
After some searching, here is an example that uses 'numbered notes' at the start of each bar, with the 'numbers' being tied together
(Source: https://theocarinanetwork.com/decoding-jianpu-notation-t18028.html)
Thanks, ah that makes things complicated.
Lilypond has 3 types of curve to connect notes: tie, slur, and phrase mark. These 3 have slightly different curvatures. The tie is the flattest of the 3, and is supposed to be used only between notes that are right next to each other.
When you say 6 -
jianpu-ly actually implements it as 6 ~ 6
but makes the tie invisible and sets the second 6
as a -
. That explains why adding a ~
after the -
results in a tie starting from the last -
.
If we wanted Lilypond to tie from a note at the start of one bar, directly to the note at the start of the next bar, passing over the dashes in between, then we'd probably have to tell Lilypond the true length of the numbered note and add the dashes as fake notes in a separate voice, skipping the non-dash beat in this new voice. That could lead to some quite complex code in jianpu-ly to handle all the cases.
Or you could fake it by using a slur:
2/4 6 ( - | 6 ) -
puts the ends of the curve on the right places, but it does have disadvantages:
Appreciate the reply, and thanks for the details.
When you say
6 -
jianpu-ly actually implements it as6 ~ 6
but makes the tie invisible and sets the second6
as a-
. That explains why adding a~
after the-
results in a tie starting from the last-
.
I see, and now that makes sense.
tell Lilypond the true length of the numbered note and add the dashes as fake notes in a separate voice, ...
Regarding this, what about using fake rests in a separate voice? Feel free to critique.
Rests will probably not affect the midi in anyway, so the implementation may be simpler ( I think). Again, I may have overlooked some complications, so feel free to comment!
Hi, well if we're in the jianpu-ly code (not just giving it input), then we don't have to worry about the midi, because we already have a mechanism to say the jianpu, the 5-line and the midi are three different scores at that level i.e. we can do things in jianpu that are different from what was done in midi (that's why there's lines of code that say "if midi or western..." - the whole thing is repeated for each type of output). And I said fake notes instead of fake rests because we already know that notes are easier to work with when we're beaming (although in some cases you can beam across a rest as well).
But it turns out that Lilypond 2.20 and above can do labelled curves which are independent of slurs and phrase marks, so we might as well just use that (most people have 2.20+ these days, and if we still want to support 2.18 we can just detect it and say "your long-note ties are not going to look right unless you upgrade Lilypond to 2.20 or above")
Thanks Silas,
I think using fake rests doesn't concern beaming here (since the note durations are minims and longer), and if we are talking on the code level, either rests or notes is fine.
Either of the approaches in your comment above sounds good :)
Hi Silas,
Could I check how to have ties for minims and breves? I tried
but this was rendered as
Thanks!