5

I'm rewriting (with Lilypond) an old copy of Händel's Allemande HWV 437 and I can not recreate the orignial position of the trill symbol. In the original the ornament begins with the note 'b', yet Lilypond centres the trill symbol above the note, which I find less beatiful. The syntax I'm using is b'8.\prallprall.

Is there a way to either shift the ornament or at least fake this zigzag-line for example using \markup?

Original Lilypond

1 Answer 1

8

A good way to do it would be to simulate it using \markup, as you propose. Something like c^\markup{\left-align \musicglyph #"scripts.prallprall"} should do the trick.

Another way would be moving the prall by setting the extra-offset property. Pretty much any object that is drawn somewhere in the score has this property, and it works like this: after all the positions are calculated, the object is moved by the amount specified in this property.

So you could do it by putting \once\override Script.extra-offset = #'(1 . 0) just in front of the offending note.

There's a more convenient way, however, and that is the \tweak command. It essentially applies a change to the very next object specified in the source code, so in this instance, we can do something like c-\tweak extra-offset #'(1 . 0) \prallprall.


Out of those two ways, I like the markup more because it's not so "context-dependent". Hacking things with extra-offset is always possible but it's best done as a "finishing touch" on an already finished score. Otherwise, the things will move around and an offset that was good in one position will be awful in another. The positioning of the markup will be correctly calculated by Lilypond wherever it is.

4
  • Thank you very much. I tried the tweak option earlier, but missed the - and it failed. extra-offset failed as well, because I did put it in front of the \prallprall instead of the note. (Both my mistakes) Your markup-example unfortunately results in an error, but since the two other solutions work very well, I'm happy with the result.
    – Peder
    Apr 4, 2022 at 14:09
  • @Peder: It's weird that the markup example results in an error; for me it is working correctly. What kind of error is it? For instance, in this lilybin: lilybin.com/pa1207/1 , it does what it should do.
    – Ramillies
    Apr 4, 2022 at 19:03
  • I just tried it again, and now it works. I don't remember yesterday's error message, but I believe Lilypond complained about a lyrics context, which I didn't even use. Maybe once again I inserted the command on a slightly incorrect position.
    – Peder
    Apr 5, 2022 at 5:51
  • I had the problem with staccato wedges in two-part music (using << {…} \\ {…} >>). They were very close to the stem, so not noticeable as separate objects, and I wanted them centered over/under the note head, not the stem. c-\tweak extra-offset #'(-0.6 . 0.4) \staccatissimo did the trick (I didn’t get the \markup solution to work in this case).
    – Anonymous
    Oct 25, 2022 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.