Menu

#3445 \retrograde should move the notes to their new location when clef is changed

Duplicate
None
Enhancement
2016-08-16
2013-07-07
Anonymous
No

Originally created by: *anonymous

Originally created by: fedel...@gmail.com

Report:
http://lists.gnu.org/archive/html/bug-lilypond/2013-06/msg00082.html

% If a clef is changed in retrograde it only prints the new clef
% It does not move the notes to their new locations on the staff
% All notes here are the same pitch but during clef changes it is printed
% incorrectly

\relative c' {
  c1 % printed correctly
  \retrograde {
    c %printed correctly
    \clef treble
    c %printed as though in bass clef
    \clef treble
    c % Should be one ledger line above not below the staff in bass clef
    \clef bass
    c % Correctly printed in the assumed Treble clef
  }
}

Comment from Harm:

\retrograde was implemented in 2.13.x
See
http://lilypond.org/doc/v2.13/Documentation/changes-big-page.html

There you can read:
"A minimal composer toolkit of modal transformations is provided. A
motif may be transposed, inverted and/or converted to its retrograde
within any scale."
This should be read as: "A composer toolkit, with minimal functionality." ;)

In 2.17.-NR
http://lilypond.org/doc/v2.17/Documentation/notation/changing-multiple-pitches#retrograde
you can read
"Known issues and warnings
Manual ties inside \retrograde will be broken and generate warnings. ... "

Though not only Ties are broken. As the Nr-example shows Slurs are not
printed. Hairpins will return warnings, every simple \override will
lead to surprising results, setting clef-changes (much more complex,
than a simple \override), too.

So far I've tested.

So yes, \retrograde should be improved.
I'd call it an enhancement-request.

Discussion

  • David Kastrup

    David Kastrup - 2016-08-16
    • Description has changed:

    Diff:

    
    
    • status: Accepted --> Duplicate
    • assigned_to: David Kastrup
    • Needs: -->
    • Patch: -->
     
  • David Kastrup

    David Kastrup - 2016-08-16

    The described problem with defect slurs in the 2.17 NR was exposed by issue 2240 (it defected in-chord slurs previous to that) and has been fixed in issue 4009.

    Ties are fixed in issue 4956, so I am marking this as duplicate.

     
  • Simon Albrecht

    Simon Albrecht - 2016-08-16

    Sorry, but I’m not sure this is a duplicate. As per the title, this issue is about clef changes, and the other items were just mentioned by Harm in the discussion. Does your new implementation (as of 4956) provide a solution for clef changes as well?
    IIUC, this should be a palindrome and the two staves render the same music:

    :::TeX
    mus = {
      \clef treble 1
      \clef bass 1
      \clef treble 1
      \clef bass 1
      \clef treble 1
    }
    <<
      \new Staff \mus
      \new Staff \retrograde \mus
    >>
    
     

    Related

    Issues: #4956


    Last edit: Simon Albrecht 2016-08-16
  • David Kastrup

    David Kastrup - 2016-08-16

    No, this does not render as a palindrome since clef changes, like any property changes, now affect the previously preceding rather than following passage. That cannot be changed with reasonable effort as far as I can think of. But the bug report was about the vertical position of the clef changes getting messed up (due to the reversal of the property changes effected by the \clef command). The vertical positions are now again consistent with the clef. Putting clef changes in a retrograde passage, alas, will not be overly useful. But at least now the result is "just" an unsuitable clef, not musical nonsense.