lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling of objects near barlines


From: Thomas Morley
Subject: Re: Handling of objects near barlines
Date: Mon, 5 Oct 2015 23:30:32 +0200

2015-10-05 19:49 GMT+02:00 David Sumbler <address@hidden>:
> For a while I have been thinking about something which I feel could be a
> useful modification of Lilypond's behaviour.
>
> Lilypond defaults to standard choices for musical notation, which
> generally saves a lot of work - for instance, it assumes that when we
> write c4 we want a standard crotchet to appear on the page.  It saves a
> lot of time not having to specify that that is what we want, yet we can
> still change the appearance of the note into something else if we want
> to, with a bit of extra work.
>
> However, I have had a few problems with items near barlines lately, some
> of which I had help with from the list, and it occurs to me that
> Lilypond is being unnecessarily "helpful" in this area.
>
> Lilypond defaults to putting clef-change signs before the barline, key-
> and time-signature after the barline regardless of whether they are
> before or after a possible bar check marking.  For instance, the clef,
> key signature and time signature changes in the following all appear in
> their conventional positions, even though they are (perversely) written
> in reverse order, and with a bar check between two of the items.
>
> \version "2.19.24"
>
> \relative c'
> \displayMusic {
>   \key g \major c1 \time 3/4 \key f \major |
>   \clef "bass" c2. |
> }
>
> Even when we write the opposite, Lilypond still conforms to the standard
> practice - which is very nice of it, but unnecessary.  Lilypond is a
> practical tool, not an educational one, and people using it know the
> conventions and can just as easily type a key change etc. before or
> after the bar check.  Lilypond's insistence on orthodoxy does not save
> us any effort whatsoever.
>
> Now I realise that the bar checks are not generally required in
> Lilypond, and they don't really represent barlines anyway, even if they
> look like them.  But I think it would be useful if we could use them to
> aid the positioning of these various items.
>
> What I am suggesting is that if you don't use a bar check, then Lilypond
> would sensibly put items in their conventional positions.  But if you do
> use a bar check, and put the time change or whatever on the
> unconventional side of it, then Lilypond should respect that.  It would
> increase the versatility of the program without losing anything useful.
>
> And it is not necessarily because we are being perverse that we need to
> do these apparently strange things: sometimes it is to cope with a
> situation which is unusual but which Lilypond doesn't currently cope
> with.  For instance, one of my recent problems concerned a clef change
> during the "first-time bar" section of a repeated passage; this meant
> that at the start of the "second-time" bar it was necessary to have a
> clef sign to avoid ambiguity - but it made no sense to have it before
> the bar line (i.e. at the end of the first-time section): of necessity
> it needed to come after the barline, at the start of the second-time
> section.  If Lilypond had understood that
>
> | \clef "bass"
>
> meant that the clef sign should come after the barline, it would have
> saved me having to type
>
> \once \override Score.BreakAlignment #'break-align-orders =
> #(make-vector 3 '(staff-bar clef key-signature)) \clef "bass"
>
> I think it would also be useful, at least for those of us perverse
> enough to want to do such things, if we could actually anchor items to
> barlines, simply by attaching them to the bar check - I am thinking
> particularly about such things as dynamics (notably the \! to end a
> hairpin) and fermataMarkup.
>
> Perhaps this feature could be considered for a future version of
> Lilypond.  It would not inconvenience those users who don't see the
> desirability for it in any way.
>
> David

A BarCheck is per default nothing else than (make-music 'BarCheck).
You suggest that LilyPond depending on your typed order and the
presence or absence of a BarCheck should order items on the fly.

I've no idea, whether it's possible at all. But please consider that
some items have and should have _different_ order at line-end and
line-begin. How to deal with this situation, if the order should
depend on your typing? I can't see any way to make that work.

At least on the fly.

Though, you can re- and pre-define the pipe-symbol, replacing or
combining the BarCheck with other commands. See this (crazy) example:

\version "2.19.28"

"|" = {
  $(make-music 'BarCheck)
  \once \override Score.BreakAlignment #'break-align-orders =
    #(make-vector 3
      '(staff-bar time-signature clef key-signature key-cancellation))
  \once \override Score.TimeSignature.space-alist.clef =
    #'(extra-space . 2.0)
  \once \override Score.KeySignature.space-alist.key-cancellation =
    #'(extra-space . 0.2)
}

\relative c' {
  \key g \major
  c1
  \time 3/4
  \key f \major
  |
  \clef "bass"
  c2.
  |
}

No need to change the source code at all. ;)

N.b. For line-breaking situation the above (make-vector 3 '(...)) will
likely be not sufficient, you will have to spell out the lists three
times then.

Cheers,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]