Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break
--- On Thu, 10/8/09, David Nalesnik dnale...@umail.iu.edu wrote: From: David Nalesnik dnale...@umail.iu.edu Subject: Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break To: Jonathan Wilkes jancs...@yahoo.com Date: Thursday, October 8, 2009, 2:55 AM Hi Jonathan, I like this revision of the NR. I have always opted to put these accidentals in, but I can certainly see why someone would want to suppress them (read: awkward-looking ties!) Also, looking through scores lately with a new eye has shown me that actual practice is not all that consistent, as you say. Even in scores that generally repeat accidentals at the start of the line, there are occasional inconsistencies. And I have a Henle edition of Chopin mazurkas which suppresses them, in contrast to other Henle scores (relative simplicity of the music?). Another Henle edition of Brahms piano pieces repeats the accidentals fairly consistently, but not when the affected notes are used immediately after the tied note (avoiding an awkward-looking repetition, I suppose.) The Chopin edition dates to well before Henle switched to Finale, but I suspect that some of these omitted accidentals are due to notation software. Then again, I have a BooseyHawkes collection of new piano music, which suppresses them everywhere...except in pieces by Wolfgang Rihm. I wrote earlier because I had a moment of terror thinking that a neat feature of LilyPond would be gone forever. I realize now that, whichever way the defaults go, an easy override will be in sight! --David I think some of my initial inclinations about notational conventions come from having done things the wrong way 100 times and gotten used to it. As long as the options are clear from the NR, I think Lilypond's default behavior on this issue is probably the correct one. -Jonathan On Sat, Oct 3, 2009 at 12:21 AM, Jonathan Wilkes jancs...@yahoo.com wrote: --- On Sat, 10/3/09, David Nalesnik dnale...@umail.iu.edu wrote: From: David Nalesnik dnale...@umail.iu.edu Subject: Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break To: Joe Neeman joenee...@gmail.com Cc: Jonathan Wilkes jancs...@yahoo.com, lilypond-user lilypond-user@gnu.org Date: Saturday, October 3, 2009, 5:46 AM Hi, According to Gardner Read: It is not necessary to repeat the accidental before a tied note . . . The one exception to this general rule occurs when the note or notes affected by the accidental and tied over the barline come at the end of a system or at the bottom of the page. It is helpful to the performer if the accidental is repeated . . . (Music Notation, p.131) I know I have spent a lot of time adding these accidentals in Finale (and redoing them whenever the layout changed), and I very much appreciate that 2.12.2 takes care of them automatically! Hi David, Thanks for that quote; I don't currently have access to Read's manual. Well, I still have my Beethoven sonatas out from my last posting on here, and those tied accidentals after line breaks are a lot more common than I thought. In the Schenker edition, they're inconsistent: sometimes an accidental is parenthesized, sometimes its suppressed, but more often than not they're there. In Henle they seem to always be printed (and beautiful). However, I've got a Peters edition score where they're always suppressed (it's also a modern score, and I wonder if that's where the difference stems from). Here's an idea: how about just showing the behavior of 'hide-tied-accidental-after-break in NR 1.1.1, under the heading Accidentals, in the example that follows this sentence: Accidentals on tied notes are only printed at the beginning of a new system. [add this] These accidentals may also be suppressed. [see attached] Currently, 'hide-tied-accidental-after-break is only listed in NR A.14. In fact, I remember seeing it there when I was entering a score, and spending 10 very confused minutes trying to figure out why the heck \override Tie #'hide-tied-accidental-after-break = ##t wouldn't work! (Yes, I know it's a property of Accidental now). -Jonathan ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break
On Thu, 2009-10-01 at 13:53 -0700, Jonathan Wilkes wrote: On Saturday 30 May 2009 10:23:31 pm Werner LEMBERG wrote: shortest note playing here.) (shortest-starter-duration ,ly:moment? The duration of the shortest note that starts here.) + (hide-tied-accidental-after-break ,boolean? If set, an accidental +that appears on a tied note after a line break will not be displayed) (side-axis ,number? If the value is @code{#X} (or addr...@hidden@code{0}), the object is placed horizontally next to the other object. If the value is @code{#Y} addr...@hidden@code{1}, it is Joe, items in define-grob-properties.scm are sorted alphabetically. Please move it to the right location. Oops, I had originally named it show-tied-accidental-after-break. Thanks, Joe Hi Joe, I have a quick question about this property you've added (which is wonderful, btw): 1) Should tied accidentals after line breaks be suppressed by default? I don't know; that was the previous default value, so I left it the same. I don't mind particularly if someone wants to change it. I've looked through some scores, and even thought there's more examples than I thought there would be that show tied accidentals after breaks (mainly orchestral scores, and mainly 20th century pieces from the 70s) it seems in the vast majority of cases they aren't shown. On a related note, I like your original property name above, but I guess it would cause problems to change it now. Again, I won't object if someone else wants to change it (as long as there's a convert-ly rule). Joe ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break
Hi, According to Gardner Read: It is not necessary to repeat the accidental before a tied note . . . The one exception to this general rule occurs when the note or notes affected by the accidental and tied over the barline come at the end of a system or at the bottom of the page. It is helpful to the performer if the accidental is repeated . . . (Music Notation, p.131) I know I have spent a lot of time adding these accidentals in Finale (and redoing them whenever the layout changed), and I very much appreciate that 2.12.2 takes care of them automatically! On Fri, Oct 2, 2009 at 9:12 PM, Joe Neeman joenee...@gmail.com wrote: On Thu, 2009-10-01 at 13:53 -0700, Jonathan Wilkes wrote: On Saturday 30 May 2009 10:23:31 pm Werner LEMBERG wrote: shortest note playing here.) (shortest-starter-duration ,ly:moment? The duration of the shortest note that starts here.) + (hide-tied-accidental-after-break ,boolean? If set, an accidental +that appears on a tied note after a line break will not be displayed) (side-axis ,number? If the value is @code{#X} (or addr...@hidden@code{0}), the object is placed horizontally next to the other object. If the value is @code{#Y} addr...@hidden@code{1}, it is Joe, items in define-grob-properties.scm are sorted alphabetically. Please move it to the right location. Oops, I had originally named it show-tied-accidental-after-break. Thanks, Joe Hi Joe, I have a quick question about this property you've added (which is wonderful, btw): 1) Should tied accidentals after line breaks be suppressed by default? I don't know; that was the previous default value, so I left it the same. I don't mind particularly if someone wants to change it. I've looked through some scores, and even thought there's more examples than I thought there would be that show tied accidentals after breaks (mainly orchestral scores, and mainly 20th century pieces from the 70s) it seems in the vast majority of cases they aren't shown. On a related note, I like your original property name above, but I guess it would cause problems to change it now. Again, I won't object if someone else wants to change it (as long as there's a convert-ly rule). Joe ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break
--- On Sat, 10/3/09, David Nalesnik dnale...@umail.iu.edu wrote: From: David Nalesnik dnale...@umail.iu.edu Subject: Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break To: Joe Neeman joenee...@gmail.com Cc: Jonathan Wilkes jancs...@yahoo.com, lilypond-user lilypond-user@gnu.org Date: Saturday, October 3, 2009, 5:46 AM Hi, According to Gardner Read: It is not necessary to repeat the accidental before a tied note . . . The one exception to this general rule occurs when the note or notes affected by the accidental and tied over the barline come at the end of a system or at the bottom of the page. It is helpful to the performer if the accidental is repeated . . . (Music Notation, p.131) I know I have spent a lot of time adding these accidentals in Finale (and redoing them whenever the layout changed), and I very much appreciate that 2.12.2 takes care of them automatically! Hi David, Thanks for that quote; I don't currently have access to Read's manual. Well, I still have my Beethoven sonatas out from my last posting on here, and those tied accidentals after line breaks are a lot more common than I thought. In the Schenker edition, they're inconsistent: sometimes an accidental is parenthesized, sometimes its suppressed, but more often than not they're there. In Henle they seem to always be printed (and beautiful). However, I've got a Peters edition score where they're always suppressed (it's also a modern score, and I wonder if that's where the difference stems from). Here's an idea: how about just showing the behavior of 'hide-tied-accidental-after-break in NR 1.1.1, under the heading Accidentals, in the example that follows this sentence: Accidentals on tied notes are only printed at the beginning of a new system. [add this] These accidentals may also be suppressed. [see attached] Currently, 'hide-tied-accidental-after-break is only listed in NR A.14. In fact, I remember seeing it there when I was entering a score, and spending 10 very confused minutes trying to figure out why the heck \override Tie #'hide-tied-accidental-after-break = ##t wouldn't work! (Yes, I know it's a property of Accidental now). -Jonathan % % Start cut--pastable-section % \paper { indent = 0\mm line-width = 160\mm - 2.0 * 0.4\in ragged-right = ##t force-assignment = # line-width = #(- line-width (* mm 3.00)) } \layout { } \relative c'' { % % ly snippet contents follows: % \sourcefileline 379 cis1 ~ cis ~ \break cis \override Accidental #'hide-tied-accidental-after-break = ##t cis ~ \break cis % % end ly snippet % } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break
On Saturday 30 May 2009 10:23:31 pm Werner LEMBERG wrote: shortest note playing here.) (shortest-starter-duration ,ly:moment? The duration of the shortest note that starts here.) + (hide-tied-accidental-after-break ,boolean? If set, an accidental +that appears on a tied note after a line break will not be displayed) (side-axis ,number? If the value is @code{#X} (or addr...@hidden@code{0}), the object is placed horizontally next to the other object. If the value is @code{#Y} addr...@hidden@code{1}, it is Joe, items in define-grob-properties.scm are sorted alphabetically. Please move it to the right location. Oops, I had originally named it show-tied-accidental-after-break. Thanks, Joe Hi Joe, I have a quick question about this property you've added (which is wonderful, btw): 1) Should tied accidentals after line breaks be suppressed by default? I've looked through some scores, and even thought there's more examples than I thought there would be that show tied accidentals after breaks (mainly orchestral scores, and mainly 20th century pieces from the 70s) it seems in the vast majority of cases they aren't shown. On a related note, I like your original property name above, but I guess it would cause problems to change it now. -Jonathan ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break
Joe Neeman joenee...@gmail.com writes: [...] p.s. Despite [As a result of?] banging my head against this particular wall, I think I learned a little about Scheme + Lilypond... that's some consolation! =) If it's any additional consolation, your approach would have been perfectly ok were it not for the idiosyncrasies of Accidental. Wouldn't it make more sense then first to apply his approach, and then make sure that it actually works as intended? It would appear to me that this would cause fewer surprises and maintenance headaches in future. It would appear that his approach was foiled by kinks in the current implementation, and the long-term solution should prefer getting rid of kinks rather than adding new ones. Note that I don't have any actual knowledge of the code: it is just that this conversation sets off my alarm bells. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break
Hi all, Earlier (on -user), I wrote: Last month, there was a quick exchange about hiding accidental(s) on tied note(s) after a line break: http://lists.gnu.org/archive/html/lilypond-user/2009-04/ msg00949.html I am running into the same issue right now, and I see why others have been frustrated by it... =\ 1. Does anybody have an automatic way to get this to work as expected*? Maybe a callback function a la the broken slur example? I've been trying to put together a callback function (riffing on the broken slur and tie examples), but since Accidental doesn't get broken itself — although the Tie attached to the note the Accidental belongs to must [right?] — the necessary alteration to the code is beyond my Scheme-fu. Any helpers out there? I've got a little PayPal balance to spend, if that moves the issue up the priority list any... ;) Thanks, Kieren. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break
The saga continues... =) I've hacked the Tie callback to try to adjust the Accidental property. Coloring the Accidental works fine: % \version 2.12.2 #(define (tie-callback tiegrob) (let* ( ; have we been split? (orig (ly:grob-original tiegrob)) ; if yes, get the split pieces (our siblings) (siblings (if (ly:grob? orig) (ly:spanner-broken-into orig) '() ))) (if (and (= (length siblings) 2) (eq? (car (last-pair siblings)) tiegrob)) (ly:grob-set-property! (ly:grob-object (ly:spanner-bound tiegrob RIGHT) 'accidental-grob) 'color red testMusic = \relative { \override Tie #'after-line-breaking = #tie-callback cis'2 cis! ~ \break cis } \score { \testMusic } % But when I try (ly:grob-set-property! (ly:grob-object (ly:spanner-bound tiegrob RIGHT) 'accidental-grob) 'break-visibility #(#f #f #f)) nothing happens. Am I even close to on the right track? Thanks, Kieren. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break
On Saturday 30 May 2009 07:41:51 pm Kieren MacMillan wrote: The saga continues... =) I've hacked the Tie callback to try to adjust the Accidental property. Coloring the Accidental works fine: % \version 2.12.2 #(define (tie-callback tiegrob) (let* ( ; have we been split? (orig (ly:grob-original tiegrob)) ; if yes, get the split pieces (our siblings) (siblings (if (ly:grob? orig) (ly:spanner-broken-into orig) '() ))) (if (and (= (length siblings) 2) (eq? (car (last-pair siblings)) tiegrob)) (ly:grob-set-property! (ly:grob-object (ly:spanner-bound tiegrob RIGHT) 'accidental-grob) 'color red testMusic = \relative { \override Tie #'after-line-breaking = #tie-callback cis'2 cis! ~ \break cis } \score { \testMusic } % But when I try (ly:grob-set-property! (ly:grob-object (ly:spanner-bound tiegrob RIGHT) 'accidental-grob) 'break-visibility #(#f #f #f)) nothing happens. Am I even close to on the right track? Not really, although your approach should work in most cases. For Accidentals, though, the code that places a tied accidental after a line break isn't accessible from scheme (it lives in lily/accidental.cc, in the print function). Anyway, here's a patch (to be applied with git am) that implements a new property, 'hide-tied-accidental-after-break, in the Accidental grob. I'll apply it soonish unless there are complaints. Cheers, Joe From 057d39e33c669dacc98833bbc766d8ca693f084a Mon Sep 17 00:00:00 2001 From: Joe Neeman joenee...@gmail.com Date: Sat, 30 May 2009 19:14:42 -0700 Subject: [PATCH] Make tied accidentals after line breaks configurable. --- input/regression/accidental-tie-overridden.ly | 23 +++ lily/accidental.cc| 11 +++ scm/define-grob-properties.scm|2 ++ 3 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 input/regression/accidental-tie-overridden.ly diff --git a/input/regression/accidental-tie-overridden.ly b/input/regression/accidental-tie-overridden.ly new file mode 100644 index 000..3d21a79 --- /dev/null +++ b/input/regression/accidental-tie-overridden.ly @@ -0,0 +1,23 @@ +\version 2.12.0 + +\header { + texidoc = The presence of an accidental after a broken tie can be +overridden. +} +\layout { + ragged-right = ##t +} + +mus = \relative c' { + \override Accidental #'hide-tied-accidental-after-break = ##t + f1~ + f2~f4 % ~ f8 + fis8 gis8 ~ + \break + gis1 +} + + + \new NoteNames \mus + \new Voice { \key g \major \mus } + diff --git a/lily/accidental.cc b/lily/accidental.cc index 0e81a6b..a017cf8 100644 --- a/lily/accidental.cc +++ b/lily/accidental.cc @@ -67,7 +67,8 @@ Accidental_interface::pure_height (SCM smob, SCM start_scm, SCM) if (to_boolean (me-get_property (forced)) || !unsmob_grob (me-get_object (tie)) - || rank == start + 1) /* we are at the start of a line */ + || (rank == start + 1 /* we are at the start of a line */ + !to_boolean (me-get_property (hide-tied-accidental-after-break { Stencil *s = unsmob_stencil (get_stencil (me)); if (s) @@ -163,8 +164,9 @@ Accidental_interface::print (SCM smob) Grob *me = unsmob_grob (smob); Grob *tie = unsmob_grob (me-get_object (tie)); - if (tie !tie-original () - !to_boolean (me-get_property (forced))) + if (tie + (to_boolean (me-get_property (hide-tied-accidental-after-break)) + || (!tie-original () !to_boolean (me-get_property (forced) { me-suicide (); return SCM_EOL; @@ -218,8 +220,9 @@ ADD_INTERFACE (Accidental_interface, alteration avoid-slur forced + glyph-name-alist + hide-tied-accidental-after-break parenthesized restore-first - glyph-name-alist tie ); diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index f3a2b6a..bbd6ae3 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -667,6 +667,8 @@ space for the shortest duration. This is expressed in shortest note playing here.) (shortest-starter-duration ,ly:moment? The duration of the shortest note that starts here.) + (hide-tied-accidental-after-break ,boolean? If set, an accidental +that appears on a tied note after a line break will not be displayed) (side-axis ,number? If the value is @code{#X} (or equivalen...@tie{}@code{0}), the object is placed horizontally next to the other object. If the value is @code{#Y} o...@tie{}@code{1}, it is -- 1.6.0.4 ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break
Hi Joe, Not really =\ the code that places a tied accidental after a line break isn't accessible from scheme (it lives in lily/accidental.cc, in the print function). Ah... here's a patch (to be applied with git am) that implements a new property, 'hide-tied-accidental-after-break, in the Accidental grob. Thanks! Kieren. p.s. Despite [As a result of?] banging my head against this particular wall, I think I learned a little about Scheme + Lilypond... that's some consolation! =) ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break
On Saturday 30 May 2009 08:10:46 pm Kieren MacMillan wrote: Hi Joe, Not really =\ the code that places a tied accidental after a line break isn't accessible from scheme (it lives in lily/accidental.cc, in the print function). Ah... here's a patch (to be applied with git am) that implements a new property, 'hide-tied-accidental-after-break, in the Accidental grob. Thanks! Kieren. p.s. Despite [As a result of?] banging my head against this particular wall, I think I learned a little about Scheme + Lilypond... that's some consolation! =) If it's any additional consolation, your approach would have been perfectly ok were it not for the idiosyncrasies of Accidental. Cheers, Joe ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: [Issue?] hiding Accidental(s) on tied note(s) after a line break
shortest note playing here.) (shortest-starter-duration ,ly:moment? The duration of the shortest note that starts here.) + (hide-tied-accidental-after-break ,boolean? If set, an accidental +that appears on a tied note after a line break will not be displayed) (side-axis ,number? If the value is @code{#X} (or equivalen...@tie{}@code{0}), the object is placed horizontally next to the other object. If the value is @code{#Y} o...@tie{}@code{1}, it is Joe, items in define-grob-properties.scm are sorted alphabetically. Please move it to the right location. Werner ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user