lilypond-auto
[Top][All Lists]
Advanced

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

Re: [Lilypond-auto] Issue 4387 in lilypond: Patch: Let \relative work on


From: lilypond
Subject: Re: [Lilypond-auto] Issue 4387 in lilypond: Patch: Let \relative work on \transpose content as if it were untransposed
Date: Mon, 11 May 2015 18:00:25 +0000


Comment #3 on issue 4387 by address@hidden: Patch: Let \relative work on \transpose content as if it were untransposed
https://code.google.com/p/lilypond/issues/detail?id=4387

These regtest differences are _very_ interesting since they highlight a number of different reasons where \transpose might have been placed inside of \relative !

Let's go through them one by one:

accidental-placement.ly:

\context Voice \relative c'
{
  <d e! bes'!>4
  cis4
  c4
  \transpose c c' {
    <ges es'>
    <bis es gis>4
[...]

Weird. Why would one switch to absolute mode here in the middle of \relative? We have

commit 03450b2aa4d991de72a9ce57aff429c66f2172cc
Author: Han-Wen Nienhuys <address@hidden>
Date:   Sun Jul 21 21:40:40 2002 +0000

with the diff
diff --git a/input/regression/accidental-placement.ly b/input/regression/accidental-placement.ly
index 3653add..6011fcc 100644
--- a/input/regression/accidental-placement.ly
+++ b/input/regression/accidental-placement.ly
@@ -1,11 +1,21 @@
 \header {
     texidoc ="Accidentals are placed as closely as possible.
-Accidentals in corresponding octaves are aligned."
+Accidentals in corresponding octaves are aligned.
+The top accidental should be nearest to the chord. The
+flats in a sixth shoudl be staggered.  "
 }


 \score { \notes \context Voice \relative c' {
     cis4
+    c4
+ \transpose c'' {
+  <bis4 es gis>
+  <es! as!>
+  <gis! cis!>
+  <g! des!>
+  <ges! es'!>
+}
     <cis4 d es fis gis ases bes ces d dis >
     <bes'! fis!>
     <bes! cis!>

So here the regtest was extended, the extension was added completely in absolute mode (\transpose with old syntax). Why? Probably because the author had the _image_ before him, was at this time more comfortable spelling out his addition in absolute mode, and was not interested in disturbing the octaves of the following \relative mode.

It's less clear with beam-extreme.ly where we have the following diff in commit
commit cebb2444373e19ff9ad0319b6f95a49225a0bee0
Author: Han-Wen Nienhuys <address@hidden>
Date:   Sat Jun 1 11:34:21 2002 +0000

    biem fix

[...]
diff --git a/input/regression/beam-extreme.ly b/input/regression/beam-extreme.ly
index 2cdc7ae..754553c 100644
--- a/input/regression/beam-extreme.ly
+++ b/input/regression/beam-extreme.ly
@@ -14,18 +14,34 @@ extreme = \notes\relative c'' {
   [c16 c'' a f]
   \stemUp
   [c,,32 c'' a f]
-  r4
+
+  %%%%%%%
+  \stemBoth
+  \times 2/3{[d16 fis' d,]} \times 2/3{[cis g'' cis,,]}
+  a'16 cis a, g''' % Used to give a nice beam directed upwards.
+  \stemBoth
+
+  \transpose c' {
+         \stemDown [e'8 e e']
+      }
 }
+

There is first an addition in \relative mode, and _then_ an addition (in the same patch) in absolute mode. \transpose c' (a null transposition) is _definitely_ used instead of the non-existing \absolute here. Ending \relative early would have required another { } layer around the music: instead \transpose was used for getting absolute music _enclosed_ by the existing \relative block.

What about music-map.ly?

That's actually worst case for the proposal:

foobar =  \transpose c c' { c4\>-^ c4-^ c4\!-^ c4-^  }


\relative c''  \context Voice {
  \foobar

  << \applyMusic #(lambda (x) (music-map notes-to-skip x))
     \foobar
     { d8 d d d d d d d  } >>
}
input/regression/music-map.ly (END)

Here \transpose is used for placing absolute music into a music variable, and the music variable is then referenced as one part inside of a \relative block.

The only conceivable way to catch _that_ kind of usage with a convert-ly rule would be to replace every \transpose with \absolute \transpose in files containing at least one \relative. Ugh.

At any rate, our code base contains instances of \transpose used explicitly with the intent to protect the music inside from an outside \relative.

--
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]