[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Stems push things away
From: |
Thomas Morley |
Subject: |
Re: Stems push things away |
Date: |
Sun, 24 Jan 2021 12:31:08 +0100 |
Am Sa., 23. Jan. 2021 um 02:59 Uhr schrieb Brian Bartling
<brian.bartling23@gmail.com>:
>
> Thank you, Jean. That does fix this example. I still suspect the root cause
> of my problem lies in how the lengths and positions of stems that are
> attached to beams are calculated. I'm guessing that your idea of removing the
> Stem_engraver and the Note_spacing_engraver is somehow connected to this
> comment inside Note_spacing::get_spacing:
>
> /*
> Ugh. If Stem is switched off, we don't know what the
> first note head will be.
> */
>
> The only problem is, there are still spots where I detect this problem where
> things outside-staff are being pushed away, even when I remove the
> Stem_engraver and the Beam_engraver. After experimenting a bit more, I found
> that I was able to fix my problem completely with these two commands:
>
> \override Beam.quantized-positions = #'(0 . 0) (I noticed this actually
> takes an interval instead of a boolean)
> \override Stem.length = #0
>
> The default definition of Stem.length is ly:stem::calc-length, and this
> function throws an error if you change the definition of
> Beam.quantized-positions. Again, though, it's surprising that all of these
> functions are still running even though I shut off stems and beams. I'm not
> really sure why.
>
> Thanks again!
> Brian
>
> On Fri, Jan 22, 2021 at 12:38 PM Jean Abou Samra <jean@abou-samra.fr> wrote:
>>
>> > Hello,
>> >
>> > Sometimes stems push things that are outside-staff further outside,
>> > even with things like TabStaff, which removes the Stem stencil. Take
>> > this, for example:
>> >
>> > \version "2.23.0"
>> >
>> > \new TabStaff \with {
>> > \revert Stem.stencil
>> > \revert TextScript.stencil
>> >
>> > \consists "Timing_translator"
>> > % \override Beam.quantized-positions = ##f
>> > }{
>> > \time 2/4
>> > << { a,8^A a'^B } \\ { c''4 r4 } >>
>> > }
>> >
>> > The B is significantly higher than the A, because the calculated stem
>> > sticks outside the staff. This happens even when the stem stencil
>> > isn't reverted, but I reverted it to show what I think is going on. It
>> > happens without the Timing_translator as well, though it's less
>> > pronounced.
>> >
>> > I would like to completely shut off the internal stem calculation in
>> > order to get the A and the B on the same level, but I can't figure out
>> > how. I was able to shut off the calculation for stem lengths by
>> > setting Beam.quantized-positions to false, but this results in
>> > lilypond errors.
>> >
>> > Thanks for the help!
>> > Brian Bartling
>>
>> Hi,
>>
>> Maybe something like this? Don't ask me why it works, I have no idea!
>>
>> \version "2.23.0"
>>
>> \layout {
>> \context {
>> \TabVoice
>> \remove "Stem_engraver"
>> \remove "Note_spacing_engraver"
>> }
>> \context {
>> \TabStaff
>> \revert TextScript.stencil
>> }
>> }
>>
>> \new TabStaff {
>> \time 2/4
>> << { a,8^AAAA a'^B } \\ { c''4 r4 } >>
>> }
>>
>> Best,
>> Jean
>>
Hi Brian,
why do you do
\consists "Timing_translator"
Without it
\new TabStaff \with {
\revert TextScript.stencil
}{
\time 2/4
<< { a,8^A a'^B } \\ { c''4 r4 } >>
}
works as expected.
Cheers,
Harm