Re: printing "a 2" at the beginning of staves automatically

2022-05-23 Thread Werner LEMBERG
>> * Contrary to Valentin's solution, the first 'a 2' text is not >> left-aligned to the left edge of the note head. This is >> especially visible with whole notes (see attached image). [...] > > See the attached file, fixing that problem and making it per-voice. Thanks, will test soon in m

Re: printing "a 2" at the beginning of staves automatically

2022-05-23 Thread Jean Abou Samra
Le 23/05/2022 à 08:55, Werner LEMBERG a écrit : Aaand some nits :-) * Contrary to Valentin's solution, the first 'a 2' text is not left-aligned to the left edge of the note head. This is especially visible with whole notes (see attached image). It is not clear to me why this is so, giv

Re: printing "a 2" at the beginning of staves automatically

2022-05-23 Thread Jean Abou Samra
Le 23/05/2022 à 12:26, Jean Abou Samra a écrit : See the attached file, fixing that problem and making it per-voice. Now with the attachment … \version "2.23.9" #(set-object-property! 'annotationText 'translation-type? markup?) #(define (Annotation_spanner_engraver context) (let* ((las

Re: printing "a 2" at the beginning of staves automatically

2022-05-23 Thread Valentin Petzel
True, using a spanner like that is probably much better than what I’ve hacked together there. Should have though of that instead of doing weird stuff ... Valentin Am Sonntag, 22. Mai 2022, 14:06:27 CEST schrieb Jean Abou Samra: > Le 22/05/2022 à 10:52, Valentin Petzel a écrit : > > Hello Werner,

Re: printing "a 2" at the beginning of staves automatically

2022-05-23 Thread Werner LEMBERG
>>> Meanwhile, how about using a spanner rather than an item? See >>> attached. > > Aaand some nits :-) I forget another one. * If you look at the attached image (from 'Carmina burana') it probably makes sense to have the staff annotation engraver actually live in the Voice context. We sh

Re: printing "a 2" at the beginning of staves automatically

2022-05-22 Thread Werner LEMBERG
>> Meanwhile, how about using a spanner rather than an item? See >> attached. Aaand some nits :-) * Contrary to Valentin's solution, the first 'a 2' text is not left-aligned to the left edge of the note head. This is especially visible with whole notes (see attached image). It is not clea

Re: printing "a 2" at the beginning of staves automatically

2022-05-22 Thread Jean Abou Samra
Le 23/05/2022 à 08:02, Werner LEMBERG a écrit : Meanwhile, how about using a spanner rather than an item? See attached. Very nice, thanks! Besides the (hopefully) harmless warning ``` programming error: Spanner `TextSpanner' is not fully contained in parent spanner. Ign

Re: printing "a 2" at the beginning of staves automatically,Re: printing "a 2" at the beginning of staves automatically

2022-05-22 Thread Werner LEMBERG
> I’ve changed it up so that the a2 is always aligned to the note when > it is set. This also solves the first one not being printed. Thanks! Werner

Re: printing "a 2" at the beginning of staves automatically

2022-05-22 Thread Werner LEMBERG
> Meanwhile, how about using a spanner rather than an item? See > attached. Very nice, thanks! Besides the (hopefully) harmless warning ``` programming error: Spanner `TextSpanner' is not fully contained in parent spanner. Ignoring orphaned part continuing, cross fingers ``

Re: printing "a 2" at the beginning of staves automatically

2022-05-22 Thread Jean Abou Samra
Le 22/05/2022 à 10:52, Valentin Petzel a écrit : Hello Werner, after some testing I've concluded that the broken slur only starts after the mark, which in this case leads to negative length and thus suicide. While I still think that this is questionable behaviour by the tie stencil, I think I

Re: printing "a 2" at the beginning of staves automatically

2022-05-22 Thread Kieren MacMillan
Hi Werner, > AFAICS, there isn't an issue in the LilyPond tracker that documents > the needs, a possible algorithm, and the necessary parameters. No… I worked directly [mostly off-list] with Han-Wen back when I sponsored part of the existing mechanism. > I think it would be a good start if you

Re: printing "a 2" at the beginning of staves automatically

2022-05-22 Thread Valentin Petzel
Hello Werner, after some testing I've concluded that the broken slur only starts after the mark, which in this case leads to negative length and thus suicide. While I still think that this is questionable behaviour by the tie stencil, I think I can solve this by delaying the timestep this Mark

Re: printing "a 2" at the beginning of staves automatically

2022-05-22 Thread Valentin Petzel
Hello Werner, I’ve changed it up so that the a2 is always aligned to the note when it is set. This also solves the first one not being printed. I’m not yet sure about the thing with the tie, but it seems to me that this is a bug in the tie engraver. My code does not touch ties in any way, and i

Re: printing "a 2" at the beginning of staves automatically

2022-05-21 Thread Werner LEMBERG
> Basically, it works great, but there are two problems (tested with > 2.23.9). > > * It doesn't print 'a 2' at the very beginning. > > * Contrary to `\mark`, the 'a 2' should always be horizontally > aligned to a note column and not to prefatory matter like time or > key signatures. And I'

Re: printing "a 2" at the beginning of staves automatically

2022-05-21 Thread Werner LEMBERG
> The optimal solution (IMO) would be to improve the whole instrument > definition, switching, and [staff-]labelling framework such that > \addInstrumentDefinition and \instrumentSwitch would change the > appropriate texts so that the engraver(s) could present the > information automagically acco

Re: printing "a 2" at the beginning of staves automatically

2022-05-21 Thread Werner LEMBERG
>> while it is probably not the best way to do it, here is a >> pragmatical solution to the problem. > > Thanks a lot! Will try it soon. Basically, it works great, but there are two problems (tested with 2.23.9). * It doesn't print 'a 2' at the very beginning. * Contrary to `\mark`, the 'a 2'

Re: printing "a 2" at the beginning of staves automatically,Re: printing "a 2" at the beginning of staves automatically

2022-05-21 Thread Werner LEMBERG
> while it is probably not the best way to do it, here is a > pragmatical solution to the problem. Thanks a lot! Will try it soon. Werner

Re: printing "a 2" at the beginning of staves automatically

2022-05-21 Thread Kieren MacMillan
Hi Valentin, This is a really nice bit of "progress not perfection" code. Thank you! In my scores — especially opera and musical theatre — there’s a very clear set of rules which determines whether the “instrument name” (often the character who’s singing) appears at the beginning of a system, w

Re: printing "a 2" at the beginning of staves automatically

2022-05-21 Thread Valentin Petzel
Hello Werner, while it is probably not the best way to do it, here is a pragmatical solution to the problem. Cheers, Valentin Am Samstag, 21. Mai 2022, 13:38:24 CEST schrieb Werner LEMBERG: > Let's assume that I have 40 bars of flute 1 and 2 in a single staff of > a full score. At the very beg

Re: printing "a 2" at the beginning of staves automatically

2022-05-21 Thread Kieren MacMillan
Hi Werner, > Has anyone already set up such a thing? This is exactly the use-case for a Staff_name_engraver. =) I’ve been trying to learn how to code engravers in largest part so I can build exactly that thing for my opera and musical theatre scores! I already have what I think is a good unde

printing "a 2" at the beginning of staves automatically

2022-05-21 Thread Werner LEMBERG
Let's assume that I have 40 bars of flute 1 and 2 in a single staff of a full score. At the very beginning of these bars I write "a 2", and I want this remark repeated at the beginning of every staff where this is still true. [Obviously I'm not using `\partCombine` :-)] Has anyone already set