lilypond-user
[Top][All Lists]
Advanced

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

Re: Music function for manual vertical placement of systems and staves


From: David Nalesnik
Subject: Re: Music function for manual vertical placement of systems and staves
Date: Sun, 3 Jun 2012 20:07:01 -0500

Hi Philip,

I tried to write a function along the following lines, but it didn't work:

SATBVert = #(define-music-function
           (parser location sysvert StoA AtoT TtoB)
           (number? number? number? number?)
 #{
   \overrideProperty #"Score.NonMusicalPaperColumn"
     #'line-break-system-details
       #'( (Y-offset . $sysvert)
           (alignment-distances . ($StoA $AtoT $TtoB)))
 #})

[...]
 
If someone could point me in the right direction -- a relevant example would
be great -- I would be very grateful.

To insert your arguments into the alist you're overriding, you can do something like this:

\version "2.15.39"

SATBVert = #(define-music-function
           (parser location sysvert StoA AtoT TtoB)
           (number? number? number? number?)
 #{
   \overrideProperty #"Score.NonMusicalPaperColumn"
     #'line-break-system-details
       #`((Y-offset . ,sysvert)
          (alignment-distances . (,StoA ,AtoT ,TtoB)))
 #})

(Note the backquote.  For more on this syntax, see
  http://www.gnu.org/software/guile/manual/html_node/_expression_-Syntax.html#_expression_-Syntax)

HTH,
David

reply via email to

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