5

I want B note to have its stem going up most of the time so I don't need to use every time \stemUp and \stemNeutral commands. Is that possible? Thank you.

1 Answer 1

5

Use \override Stem.neutral-direction = #UP as given in the first snippet here: https://lilypond.org/doc/v2.23/Documentation/notation/inside-the-staff#stems

7
  • 1
    Is #UP different to #up in any way? Capital letters looks/feels nicer for some reason, but it's not what they use in the documentation (in that snippet). Oct 14, 2022 at 11:11
  • 1
    @ElementsinSpace They are both naught but syntax candy for 1. You can see this by executing #(display UP) or #(display up). Similarly DOWN stands for -1. LEFT and RIGHT are also syntax candy for -1 and 1. So you could also say \override Stem.neutral-direction = #RIGHT if you want :). This is a direction value (what in Lilypond code is called drul (down/right/up/left) value), the interpretation for which depends on the axis in question.
    – Lazy
    Oct 14, 2022 at 11:45
  • @ElementsinSpace Also if we talk about axes: X is syntax candy for 0 and Y is syntax candy for 1. So we could in fact even write \override Stem.neutral-direction = #(/ (- Y LEFT) 2) or something, if you intend to annoy everyone trying to read your code :)
    – Lazy
    Oct 14, 2022 at 11:51
  • So, lowercase letters are being used in the snippet because it's slightly more "human friendly". Whereas, you're using uppercase letters because it's slightly more explicit that these terms are just monikers for low level integers. Right? Oct 14, 2022 at 15:28
  • 1
    @ElementsinSpace Nah, I’m using uppercase versions because I’m used to it, and it is consistent with things like X. This way everything that is uppercase can be seen as a constant, everything else would be a function.
    – Lazy
    Oct 14, 2022 at 21:17

Your Answer

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

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