lilypond-user
[Top][All Lists]
Advanced

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

Re: Drawing wavy line across the bars


From: Dmitry
Subject: Re: Drawing wavy line across the bars
Date: Sat, 08 Apr 2017 01:22:30 +0300

Andrew, thanks a lot for the snippet! As a quick workaround, it works like charm (see below for more general thoughts).

As for the "exercise", here we go:

\version "2.19.58"

{
 \override TextScript.extra-offset = #'(0 . -3.2)
  s1 ^\markup { \general-align #Y #CENTER \whiteout Foo \override #'(height . 0.6) \draw-squiggle-line #3 #'(36 . 0) ##t }
  s
}



Without \general-align, the text would have been misaligned against the wave. Also, the \override command is useful for controlling line height.

Simon, Andrew,

While this is a perfect ad-hoc solution, one would definitely expect something different from a professional music engraving system.

As Simon noted, this solution doesn't adapt to the layout, among other issues. What I'd certainly like to see here:
- a very simple command that would accept a duration;
- a reasonable set of defaults (two modes: staff-centered or between the staves; predefined wave shape etc.) and a mechanism to override some of them;
- automatic handling of all the low-level stuff like text offsets, alignment etc.

I don't think that custom grob + event type + engraver are overkill. Moreover, I'm almost sure one day I'll have to create something like that for my own needs. Do you think this could be a demanded feature and a candidate for merging into upstream?

Also couldn't we introduce a generic mechanism for filling bars? There have been several ad-hoc solutions around for slash notes, so why not finally having a simple unified approach, like e.g. the \fill command, what do you think?

Cheers,
Dmitry

Hi Simon,

Of course, yes, but overkill surely. Let's see what the OP really wants. Not hard to do this manually for a typical jazz piece.

Andrew


On 2 April 2017 at 23:18, Simon Albrecht <address@hidden> wrote:
Well, it’s a start. It could also be made easier accessible using a music function, but still the extents will have to be specified manually, don’t adapt to layout and can’t be broken. In order to input a duration and have it handled elegantly, you would indeed need an engraver and a custom grob and event type. I’m sorry I can’t help there; there’s one example of a custom Scheme engraver in the regression tests and there are several examples to be found in the list archives as well as probably in the LSR.


reply via email to

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