Closed unbored closed 1 month ago
Thanks for doing this :) I wonder if we can make it allow accidentals in the chords as well (the logic is very nearly there, they're just not appearing yet in the jianpu and there might be some complexities with auto-repeating them later in the bar). But we could leave in the code that disallows accidentals in chords for now
by he way, the readme file is auto generated from the doc section at the top of the code, so if you make changes in the readme it can be overwritten....
Thanks for doing this :) I wonder if we can make it allow accidentals in the chords as well (the logic is very nearly there, they're just not appearing yet in the jianpu and there might be some complexities with auto-repeating them later in the bar). But we could leave in the code that disallows accidentals in chords for now
Main problem is that if we put the accidental symbols along with the numbers as a whole, articulations such as octave dots and harmonic circles will be placed at the center of the whole instead of the numbers. I'll try some other workarounds
说得对, might need to add \halign #RIGHT
before any note in the column without an accidental and also change the \tweak #'X-offset
of dots outside the chord.
Unless we can figure out how to make Lilypond itself stack notes vertically instead of defining one big notehead for all of them, which would also have the advantage of correctly lining up with the accidentals on any 5-line staves in the same score. But that's going to be more complicated: I don't know if a RhythmicStaff
can do it, and other staff types are going to be harder to override how we want. So we might have to settle for the halign
and X-offset
hacks as a least-bad option (I'm hoping that chords with accidentals are a rare use-case, but CUCOS did want one for a computer-game track they're playing at the student fair and they ended up using Ziipoo)
Unless we can figure out how to make Lilypond itself stack notes vertically instead of defining one big notehead for all of them, which would also have the advantage of correctly lining up with the accidentals on any 5-line staves in the same score.
Much more problems would be solved if it does, including slurs between grace and main notes.
说得对, might need to add \halign #RIGHT before any note in the column without an accidental and also change the \tweak #'X-offset of dots outside the chord.
The put-adjacent
function can put the accidental symbols before numbers without changing the original alignment. However, special tweak for X-offset is still necessary.
Or we have another solution by making another markup hanging the accidentals before the chord with fine vertical adjustment. Both solutions are far from perfection.
By the way, It seems that \tweak affects only the operation right after it in my test case at least. Would it be possible that the missing of the octaves is because lilypond won't allow the same articulation applied multiple times on the same note by default? Thus the case ,,1'2
works well while ,1'2
fails. I'm looking for a workaround to apply the same articulation above and below.
A Y-offset
in a chord puts one note over another, which helps dealing with accidentals and octave dots naturally. However, the main problem is that \applyOutput
works on all notes inside a chord, which makes generating different numbers impossible. Would there be a general function that turns noteheads to numbers according to their pitches automatically just like what jianpu10a does? Or a function that gets positions of the notes inside a chord and writes corresponding markups?
Working accidentals in chords looks really nice. Unfortunately, this branch does break accidentals in Indonesian not-angka mode. I'm not sure what to do about that: it would be a bit messy if we had to bring back the old code as well and use that when in not-angka mode (which didn't support accidentals in chords).
I have no idea what a not-angka mode should look like, do you have any typical samples including accidentals, chords and graces?
I think we got not-angka back to what it was before now. I'm not sure about chords & grace notes in it, so we might have to support simple tunes only
I've already tried a new grace implement using the similar idea, thus the original grace mechanism works generally. Unfortunately not-angka mode still not tested. We can work on it later after this merge.
Thanks so much for working on this. Unfortunately my automatic script overwrote the Readme change when I ran it to upload to PyPI. But we can undo that with another commit. Normally we need to make sure all readme changes are in the docstring at the start of jianpu-ly.py
, because the function write_docs()
in jianpu-ly.py
is used to automatically update the Readme and the HTML on the website
Fix slur around octave dots. Fix grace note flag to generate correct octave dot offsets. Add a more complex chord implement, which displays octave dots correctly. However, the previous input behaves differently in the new implement. Known issue: Dashes output wrong western notes.