lilypond-auto
[Top][All Lists]
Advanced

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

Re: [Lilypond-auto] Issue 4366 in lilypond: absolute entry mode with les


From: lilypond
Subject: Re: [Lilypond-auto] Issue 4366 in lilypond: absolute entry mode with less typing
Date: Sun, 10 May 2015 04:49:21 +0000


Comment #6 on issue 4366 by address@hidden: absolute entry mode with less typing
https://code.google.com/p/lilypond/issues/detail?id=4366

It should stay on review to give people a chance to try it, which they can do by putting the definitions below at the top of their LilyPond input.

There is the usual question about naming, and which syntax \absolute 2 or \absolute c'' to use to indicate the home octave. There is one open question on behavior, whether the home-octave should affect a \relative or \absolute block nested inside the music.
  \fixed c' { c4 e g c \relative c' {c4 e g c}}
  \absolute c' { c4 e g c \relative c' {c4 e g c}}

absolute =
#(define-music-function (parser location pitch music)
   ((ly:pitch?) ly:music?)
   (_i "Make @var{music} absolute.")
   (if pitch
     (ly:music-transpose music
        (ly:make-pitch (1+ (ly:pitch-octave pitch)) 0 0)))
   (make-music 'UnrelativableMusic 'element music))

fixed =
#(define-music-function (parser location pitch music)
   ((ly:pitch?) ly:music?)
(_i "Use the octave of @var{pitch} as the default octave for @var{music}.")
   (if pitch
       (let* ((shift (ly:make-pitch (1+ (ly:pitch-octave pitch)) 0 0))
              (unshift (ly:pitch-negate shift)))
          (map (lambda (m) (ly:music-transpose m unshift))
               (extract-named-music music
                 '(UnrelativableMusic RelativeOctaveMusic)))
          (ly:music-transpose music shift)))
   (make-music 'UnrelativableMusic 'element music))


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings



reply via email to

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