lilypond-user
[Top][All Lists]
Advanced

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

Re: Fixed measure width for chord charts.


From: Richard Shann
Subject: Re: Fixed measure width for chord charts.
Date: Fri, 29 Aug 2014 15:36:24 +0100

On Fri, 2014-08-29 at 16:00 +0200, Jacques Menu wrote:
> Hello Richard,
> 
>             \set Score.bars-per-line-engraver '(4))
Thanks - 
I can't get that to compile, and indeed I can't track down
bars-per-line-engraver in the 2.18 docs, but I see it in snippets (see
below).
This anyway appears to address the question of avoiding manually
inserting the line breaks, which will be nice, but the question I am
asking is how to force equal bar lengths (in mm) across the line, so
that bar lines will align down the page.

This doesn't have to avoid collisions in conventional scores - it is
just for chord charts.

Below is the snippet I found defining a bars-per-line-engraver thing,
FWIW
Richard
#(define ((bars-per-line-engraver bar-list) context)
  (let* ((working-copy bar-list)
         (total (1+ (car working-copy))))
    `((acknowledgers
       (paper-column-interface
        . ,(lambda (engraver grob source-engraver)
             (let ((internal-bar (ly:context-property context
'internalBarNumber)))
               (if (and (pair? working-copy)
                        (= (remainder internal-bar total) 0)
                        (eq? #t (ly:grob-property grob 'non-musical)))
                   (begin
                     (set! (ly:grob-property grob
'line-break-permission) 'force)
                     (if (null? (cdr working-copy))
                         (set! working-copy bar-list)
                         (begin
                           (set! working-copy (cdr working-copy))))
                           (set! total (+ total (car
working-copy))))))))))))



> 
> JM
> 
> Am 29.08.2014 um 13:20:57 schrieb Richard Shann <address@hidden>:
> 
> > I have been developing LilyPond code to enable the generation of "Chord
> > Charts" such as the one attached here.
> > They differ from conventional music notation by being short, comprising
> > only Chord Symbols with one or two chord durations, and, ideally, a
> > fixed measure spacing, usually four to a line.
> > Various tweaks have been applied in this example to suit very small
> > displays.
> > The remaining outstanding difficulty is controlling the measure width -
> > ideally all the bar lines would align vertically down the screen (the
> > chord symbols would be made smaller if they didn't fit).
> > I have set
> > 
> > \set Score.proportionalNotationDuration = #(ly:make-moment 1/4)
> > 
> > which helps make the measures more even in width, but not entirely.
> > 
> > Can anyone suggest something that would essentially turn off the fancy
> > spacing algorithms that are running? Or perhaps point me to some scheme
> > code governing the spacing which I could tweak?
> > 
> > Richard
> > 
> > 
> > 
> > <AsTimeGoesByV2.ly><AsTimeGoesBy.png>_______________________________________________
> > lilypond-user mailing list
> > address@hidden
> > https://lists.gnu.org/mailman/listinfo/lilypond-user
> 





reply via email to

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