lilypond-devel
[Top][All Lists]
Advanced

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

Re: Let \displayLilyMusic print even repeated durations (issue 206770043


From: dak
Subject: Re: Let \displayLilyMusic print even repeated durations (issue 206770043 by address@hidden)
Date: Wed, 25 Feb 2015 08:25:44 +0000

Reviewers: Keith,


https://codereview.appspot.com/206770043/diff/1/scm/define-music-display-methods.scm
File scm/define-music-display-methods.scm (left):

https://codereview.appspot.com/206770043/diff/1/scm/define-music-display-methods.scm#oldcode522
scm/define-music-display-methods.scm:522: (duration->lily-string
(ly:music-property note 'duration)
On 2015/02/25 06:11:55, Keith wrote:
maybe
  #:force-duration (null? (ly:music-property note 'articulations))
but there are too many other places to put analogous checks.

It's also sort of pointless since many notes will be without
articulation, and thus this will leave the duration off only in limited
circumstances.  Does not seem worth the irregularity.

https://codereview.appspot.com/206770043/diff/1/scm/define-music-display-methods.scm#oldcode529
scm/define-music-display-methods.scm:529: ;; FIXME: { c4 c4 4 4 } must
not be output as { c4 c 4 4 }
On 2015/02/25 06:11:55, Keith wrote:
maybe output  {c4 c {}4 {}4 }
thinking that bare durations are the new feature that causes the
incompatibility
so let them be ugly in \displayLilyMusic

Uh, that music does not correspond to the expression in any meaningful
way.  One might think about {c4 c <>4 <>4 } perhaps, but to make that
work, one would need to mess with the close correspondence between
Scheme and Lily again, requiring parser changes that make it harder for
the user to guess the Lily/Scheme relation.

I also disagree that "bare durations [...] [cause] the incompatibility".
 This definitely could be tackled by adding yet more hidden state to be
dragged along the expression.

This code was bothersome to maintain and use before and it was more or
less a tossup whether the first note got a duration or not.

The bare durations just were the proverbial straw breaking the camel's
back.  This is better handled in Frescobaldi or Emacs since it reflects
an input feature rather than a music feature.

Description:
Let \displayLilyMusic print even repeated durations

\displayLilyMusic { c4 c c c } now produces { c4 c4 c4 c4 } in order to
better match the content of the music rather than the shortest possible
input representation.

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

Affected files (+116, -131 lines):
  M input/regression/display-lily-tests.ly
  M scm/define-music-display-methods.scm
  M scm/display-lily.scm
  M scm/music-functions.scm





reply via email to

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