lilypond-devel
[Top][All Lists]
Advanced

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

Re: Make make-relative able to deal with music rather than just pitches


From: dak
Subject: Re: Make make-relative able to deal with music rather than just pitches (issue 30890043)
Date: Fri, 22 Nov 2013 17:07:55 +0000

Reviewers: J_lowe,

Message:
On 2013/11/22 17:01:25, J_lowe wrote:

https://codereview.appspot.com/30890043/diff/1/input/regression/make-relative-music.ly
File input/regression/make-relative-music.ly (right):


https://codereview.appspot.com/30890043/diff/1/input/regression/make-relative-music.ly#newcode8
input/regression/make-relative-music.ly:8: well inside and outside of
@code{\\relative}."
This causes a make doc fail

--snip--
./0b/lily-d78c3e03.texidoc:2: Undefined control sequence.
l.2 function calls behave @q
                             {as expected} from the function's
arguments
?
./0b/lily-d78c3e03.texidoc:2: Emergency stop.
l.2 function calls behave @q
                             {as expected} from the function's
arguments
./0b/lily-d78c3e03.texidoc:2:  ==> Fatal error occurred, no output PDF
file pro
duced!
Transcript written on collated-files.log.
/usr/bin/texi2dvi: pdfetex exited with bad status, quitting.
--snip--

James

Man, it's hard to keep in mind just where we provide which of our
macros.  I'll do a fix.

Description:
Make make-relative able to deal with music rather than just pitches

I'm leaning towards letting this slip into 2.18 still.  The reason is
that make-relative in its current form is only useful for a quite
limited number of cases, can't be easily coded as a subcase of the new
behavior, and the convert-ly rule only covers the most important use
cases.

Due to its limited usefulness, it has not seen much exposure on the
mailing lists and is likely not in use much, so retaining the function
name and obliterating the old, less useful behavior, makes sense
before 2.18.  Afterwards, this would be harder.

Consists of commits (reverse order):

Add regtest for music argument semantics of make-relative macro


Run convert-ly on input/regression/make-relative.ly


convert-ly rule for new make-relative semantics accepting music
arguments

This only works when the "reference pitch" is the first or last of
the list.

Make make-relative able to deal with music rather than just pitches

The old behavior of make-relative was too cumbersome to use in many
cases.

This variant allows, for example:

withOctave =
  (ly:music?)
  (make-relative
   (music) music
   #{ \context Bottom << $music \transpose c c' $music >> #}))

\relative
\new Staff \withOctave {
  \partial 4. c'8 e g |
  c2 e,4 g |
  c,8 c' b a <g d'> <f c'> <e b'> <d a'> |
  <c g'>1 | \bar "|."
}

Please review this at https://codereview.appspot.com/30890043/

Affected files (+97, -26 lines):
  A input/regression/make-relative-music.ly
  M input/regression/make-relative.ly
  M python/convertrules.py
  M scm/music-functions.scm





reply via email to

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