Re: AccidentalCautionary in NullVoice
Dan Eble dan at faithful.be writes: On Feb 9, 2014, at 21:19 , Dan Eble dan at faithful.be wrote: Here is a work-around for https://code.google.com/p/lilypond/issues/detail?id=3834 NullVoice looks like a long list of workarounds. Now that Janek has independent Lyrics aligned as of version 2.19.9, entering with durations { La2. di4 da1 } works pretty well, and NullVoice need only watch for slurs, etc., and signal melismata. Try \layout { \context { \name NullVoice \type Engraver_group \description For aligning lyrics without printing notes \alias Staff \alias Voice \consists Tie_engraver \consists Beam_engraver \consists Slur_engraver % maybe a single scheme engraver to signal melismata }} ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Remove thin-kern property. (issue 105560044 by markpole...@gmail.com)
Reviewers: , Message: Hi, I'm proposing to get rid of the BarLine.thin-kern property with this patch, so if you're opposed, let me know. You can see my comments/rationale here: http://code.google.com/p/lilypond/issues/detail?id=3995 Thanks, Mark Description: This removes the thin-kern property, and adds a convert-ly rule to convert `thin-kern' to `kern', since kern does what thin-kern claimed to do anyway, and thin-kern (AFAICT) does nothing. See http://code.google.com/p/lilypond/issues/detail?id=3995 Please review this at https://codereview.appspot.com/105560044/ Affected files (+11, -9 lines): M python/convertrules.py M scm/bar-line.scm M scm/define-grob-interfaces.scm M scm/define-grob-properties.scm M scm/define-grobs.scm Index: python/convertrules.py diff --git a/python/convertrules.py b/python/convertrules.py index 5eb2a75bfc4f17bbcea91068518c2e928b502d99..aeb9384a5529423e8e7f279e8ce41183993d7769 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -3450,7 +3450,7 @@ def conv (str): if m.group (1): return m.group (0) x = m.group (2) + m.group (4) - + if m.group (3): x = x + re.sub (r(\s*)( + symbol_list + ), fn_path_replace, m.group (3)) @@ -3718,6 +3718,11 @@ def conv(str): str = re.sub (r'\blocalKeySignature\b', 'localAlterations', str) return str +@rule ((2, 19, 10), thin-kern - kern) +def conv(str): +str = re.sub (r'\bthin-kern\b', 'kern', str) +return str + # Guidelines to write rules (please keep this at the end of this file) # # - keep at most one rule per version; if several conversions should be done, Index: scm/bar-line.scm diff --git a/scm/bar-line.scm b/scm/bar-line.scm index ff2d3f29b4a35d30cee581fa8f31ac096b06acb5..77c41f5cc04973c85c092e03ad6d96a98618b2ef 100644 --- a/scm/bar-line.scm +++ b/scm/bar-line.scm @@ -440,14 +440,14 @@ is not used within the routine. the segno sign is drawn over the double bar line; otherwise, it draws the span bar variant, i.e. without the segno sign. (let* ((line-thickness (layout-line-thickness grob)) - (thinkern (* (ly:grob-property grob 'thin-kern 1) line-thickness)) + (kern (* (ly:grob-property grob 'kern 1) line-thickness)) (thin-stil (make-simple-bar-line grob extent)) (double-line-stil (ly:stencil-combine-at-edge thin-stil X LEFT thin-stil -thinkern)) +kern)) (segno (ly:font-get-glyph (ly:grob-default-font grob) scripts.varsegno)) (stencil (ly:stencil-add @@ -459,7 +459,7 @@ draws the span bar variant, i.e. without the segno sign. (cons 0 0))) (ly:stencil-translate-axis double-line-stil -(* 1/2 thinkern) +(* 1/2 kern) X stencil)) Index: scm/define-grob-interfaces.scm diff --git a/scm/define-grob-interfaces.scm b/scm/define-grob-interfaces.scm index 4ffd761607c788feef67edba4b1b1e5522bf78fb..7e5fa2283f29678d788ba9cc7d92eb2ea7d4536a 100644 --- a/scm/define-grob-interfaces.scm +++ b/scm/define-grob-interfaces.scm @@ -59,7 +59,6 @@ found in @file{scm/bar-line.scm}. has-span-bar kern rounded - thin-kern thick-thickness)) (ly:add-interface Index: scm/define-grob-properties.scm diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index 24e8e3298abeb0d93607832d0d1422b757e83c8d..be82bd1c0c3061777bbb8e4f37457d09d9267231 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -531,8 +531,8 @@ slur quants to this position, and print the respective scores.) ;;; (keep-inside-line ,boolean? If set, this column cannot have objects sticking into the margin.) - (kern ,ly:dimension? Amount of extra white space to add. For -bar lines, this is the amount of space after a thick line.) + (kern ,ly:dimension? The space between bar lines in any type +of double bar) (knee ,boolean? Is this beam kneed?) (knee-spacing-correction ,number? Factor for the optical correction amount for kneed beams. Set between @code{0} for no @@ -969,7 +969,6 @@ should use @code{LEFT}.) @code{line-thickness}.) (thickness ,number? Line thickness, generally measured in @code{line-thickness}.) - (thin-kern ,number? The space after a hair-line in a bar line.) (tie-configuration ,list? List of @code{(@var{position} . @var{dir})} pairs, indicating the desired tie configuration, where @var{position} is the offset from the center of the staff in staff Index: scm/define-grobs.scm diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index ddacbcb7ec1131864197462b77ef59f7dca37b4b..c6dbd325d862ab42bc1efe35a610410dfdcb950f
Re: Remove thin-kern property. (issue 105560044 by markpole...@gmail.com)
On 2014/07/06 06:46:53, Mark Polesky wrote: Hi, I'm proposing to get rid of the BarLine.thin-kern property with this patch, so if you're opposed, let me know. You can see my comments/rationale here: http://code.google.com/p/lilypond/issues/detail?id=3995 Thanks, Mark I don't see any reason to maintain two different types of kern that are never used independently, so LGTM. https://codereview.appspot.com/105560044/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Issue 3996: Clarify 'thickness and 'line-thickness property docstrings. (issue 104550043 by markpole...@gmail.com)
https://codereview.appspot.com/104550043/diff/20001/scm/define-grob-properties.scm File scm/define-grob-properties.scm (right): https://codereview.appspot.com/104550043/diff/20001/scm/define-grob-properties.scm#newcode589 scm/define-grob-properties.scm:589: @code{Staff.StaffSymbol.thickness}).) The decriptions are very instructive, but I find it quite strange that 'line-thickness' does not refer to grobs made of lines, but rather to a pen diameter or a contour thickness, whereas 'thickness' mostly refers to what I'd call 'line-thickness'. But this is not in the primary scope of your patch, so LGTM. https://codereview.appspot.com/104550043/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: AccidentalCautionary in NullVoice
On Jul 6, 2014, at 02:19 , Keith OHara k-ohara5...@oco.net wrote: Dan Eble dan at faithful.be writes: On Feb 9, 2014, at 21:19 , Dan Eble dan at faithful.be wrote: Here is a work-around for https://code.google.com/p/lilypond/issues/detail?id=3834 NullVoice looks like a long list of workarounds. Now that Janek has independent Lyrics aligned as of version 2.19.9, entering with durations { La2. di4 da1 } works pretty well, and NullVoice need only watch for slurs, etc., and signal melismata. It sounds like you are saying the issue with spurious accidental cancellations is fixed in 2.19.9 and the ticket just needs to be updated. That’s great but... Entering lyrics with durations is inconvenient. The effort overlaps with entering a melody (providing another opportunity for time-wasting tyops) and prevents reusing the same lyrics for other melodies with different rhythms. If NullVoice in 2.20 requires me to enter durations on lyrics, I will instead revert to avoiding the part combiner. Thanks, — Dan ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Remove thin-kern property. (issue 105560044 by markpole...@gmail.com)
On 2014/07/06 06:46:53, Mark Polesky wrote: Hi, I'm proposing to get rid of the BarLine.thin-kern property with this patch, so if you're opposed, let me know. You can see my comments/rationale here: http://code.google.com/p/lilypond/issues/detail?id=3995 Thanks, Mark I disagree! 'kern and 'thin-kern _are_ used differently. Look at the output from: \version 2.19.8 \paper { ragged-right = ##f } { a'1 \mark default \bar :|.S b' \once \override Staff.BarLine #'kern = #10 \mark 'kern 10 \bar :|.S c' \once \override Staff.BarLine #'thin-kern = #10 \mark 'thin-kern 10 \bar :|.S d' \once \override Staff.BarLine #'kern = #10 \once \override Staff.BarLine #'thin-kern = #10 \mark \markup \column { 'kern 10 'thin-kern 10 } \bar :|.S e' } More: http://code.google.com/p/lilypond/issues/detail?id=3995 https://codereview.appspot.com/105560044/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Remove thin-kern property. (issue 105560044 by markpole...@gmail.com)
On 2014/07/06 11:52:56, thomasmorley651 wrote: I disagree! 'kern and 'thin-kern _are_ used differently. Look at the output from: Harm, what am I missing? To my eye (compiling this with the latest snapshot), your example shows that thin-kern does nothing. - Mark https://codereview.appspot.com/105560044/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Issue 3991: \magnifyMusic - reluctantly surrender to issues 3987 and 3990. (issue 101690043 by markpole...@gmail.com)
https://codereview.appspot.com/101690043/diff/40001/scm/music-functions.scm File scm/music-functions.scm (right): https://codereview.appspot.com/101690043/diff/40001/scm/music-functions.scm#newcode2452 scm/music-functions.scm:2452: (lambda (x) x))) On 2014/07/05 14:17:23, pwm wrote: Can be simplified: (lambda (x) x) is the same as x Uh, no? (lambda (x) x) is the same as the function `identity'. It most definitely is the same as x only in extraordinary circumstances. https://codereview.appspot.com/101690043/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Issue 3991: \magnifyMusic - reluctantly surrender to issues 3987 and 3990. (issue 101690043 by markpole...@gmail.com)
On 2014/07/05 16:58:38, Mark Polesky wrote: On 2014/07/05 14:17:23, pwm wrote: Happened to see another little simplification. ... Can be simplified: (lambda (x) x) is the same as x Not in this case; guile would complain about unbound variable x. I could have used the guile function `identity', but I opted not to since it's not documented in the guile manual. It is not documented in the GUILEv1 manual, but it *is* documented in the GUILEv2 manual, so it is not going to go away. https://codereview.appspot.com/101690043/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Remove thin-kern property. (issue 105560044 by markpole...@gmail.com)
On 2014/07/06 12:53:55, Mark Polesky wrote: On 2014/07/06 11:52:56, thomasmorley651 wrote: I disagree! 'kern and 'thin-kern _are_ used differently. Look at the output from: Harm, what am I missing? To my eye (compiling this with the latest snapshot), your example shows that thin-kern does nothing. - Mark Look at the underlaying double-bar-line. I'll post an image, with a colored double-bar on the tracker. https://codereview.appspot.com/105560044/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Issue 3942: Scale slurs and ties when using \magnifyMusic. (issue 103890046)
Yeah, I know. Late again. I was really having problems catching up with various things. https://codereview.appspot.com/103890046/diff/360001/ly/music-functions-init.ly File ly/music-functions-init.ly (right): https://codereview.appspot.com/103890046/diff/360001/ly/music-functions-init.ly#newcode645 ly/music-functions-init.ly:645: Stem.thickness This is madness. Stem.thickness and its ilk don't make sense as symbols at all: unique symbols come at a cost. You cannot use those here anyway without converting the symbol to a string, splitting the string at ., and convert back to symbols again. There is no point in not writing (Stem thickness) (Slur line-thickness) (Slur thickness) and so on in the first place and it's not like it would be more verbose. The LilyPond expression Stem.thickness _is_ represented in Scheme by '(Stem thickness). You can write $(define-void-function (parser location sl) (symbol-list?) (write sl)) Stem.thickness and you can also write \override #'(Stem thickness) = 5 So there is no point in creating some LilyPond/Scheme hybrid in between. https://codereview.appspot.com/103890046/diff/360001/ly/music-functions-init.ly#newcode679 ly/music-functions-init.ly:679: Slur.details.region-size I doubt you even have a chance of making this work. Overriding and reverting bulks of *nested* properties does not work reliably. https://codereview.appspot.com/103890046/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Remove thin-kern property. (issue 105560044 by markpole...@gmail.com)
Am 06.07.2014 13:52, schrieb thomasmorle...@gmail.com: On 2014/07/06 06:46:53, Mark Polesky wrote: Hi, I'm proposing to get rid of the BarLine.thin-kern property with this patch, so if you're opposed, let me know. You can see my comments/rationale here: http://code.google.com/p/lilypond/issues/detail?id=3995 Thanks, Mark I disagree! D'oh – I should have known better, having written the code for the segno bar line. Marc ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: AccidentalCautionary in NullVoice
Dan Eble dan at faithful.be writes: It sounds like you are saying the issue with spurious accidental cancellations is fixed in 2.19.9 No, NullVoice still has those problems, because it still creates invisible note-heads, and applies various workarounds so that the note-heads don't have any effect except for positioning Lyrics. 2.19.9 positions Lyrics better if you enter Lyrics with durations, no longer needing the note-heads for positioning. This opens the door to avoid the problems in NullVoice. Entering lyrics with durations is inconvenient. So we want to get durations from music in a NullVoice. What I posted earlier was a suggested re-definition of NullVoice that does only what is needed. I see now that my suggestion does not align lyrics to moments between printed note columns (which is done if you enter lyrics with durations) so we would have to include a Rhythmic_column_engraver and convince it to produce note-columns even when there are zero note heads. ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: AccidentalCautionary in NullVoice
Dan Keith, NullVoice was my idea, for better or worse. I implemented it without entirely understanding what I was doing, and I probably pushed it in too fast, without sufficient testing. I wanted to offer users *something* to use. Anyway, a good place to start fixing it would be to compile a suite of regression tests, cobbling together example code from all the complaints on the user list, and then fixing bugs one at a time if need be. Keith, if you or anyone else has improvements to offer (not just additions, but also deletions, to the engraver), don't hesitate to modify the code base, since it's pretty hackish as it stands, I admit. Sorry it's such a mess. I probably don't have time time to fix it right now though. Mark ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Remove thin-kern property. (issue 105560044 by markpole...@gmail.com)
On 2014/07/06 11:52:56, thomasmorley651 wrote: I disagree! 'kern and 'thin-kern _are_ used differently. Okay, so then it's just a question of clarifying the misleading docstrings. How about this? kern The space between individual elements in any compound bar line. thin-kern The space between the two thin lines of the segno bar line symbol. I've updated the patch accordingly. https://codereview.appspot.com/105560044/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Manual bar number visibility
I’ve been using the following functions for a while (maybe since 2.12?) but now I’m trying to update to 2.18 and they’ve stopped working. I suppose the problem is directly related to this warning: warning: cannot find property type-check for `visibleBarNumbers' (translation-type?). perhaps a typing error? warning: skipping assignment but I’m not sure what to do about that. Any ideas? \barNumber adds the current or next bar number to a set (visibleBarNumbers) which is later checked by the BarNumber break-visibility callback. Numbers in the set are printed. barNumber = #(define-music-function (parser location) () (let ((m (make-music 'ApplyContext))) (define (force-bar-number ctx) (let* ((barnum-table (ly:context-property ctx 'visibleBarNumbers))) (if (not (hash-table? barnum-table)) ; first use in this score? (begin ; create the set of visible bar numbers (set! barnum-table (make-hash-table 16)) (ly:context-set-property! ctx 'visibleBarNumbers barnum-table))) (let* ((barnum (ly:context-property ctx 'currentBarNumber)) (measurePos (ly:context-property ctx 'measurePosition)) (measureLen (ly:context-property ctx 'measureLength)) (mid-measure (and (ly:moment? ZERO-MOMENT measurePos) (ly:moment? measurePos measureLen (if mid-measure (set! barnum (1+ barnum))) (hash-set! barnum-table barnum #t) ))) (set! (ly:music-property m 'procedure) force-bar-number) (context-spec-music m 'Score))) manualBarNumbersOn = #(define-music-function (parser location) () (define (set-properties ctx) (let () ; this special formatter is necessary for string-number to ; work in the visibility callback below (define (bar-number-formatter barnum measure-pos alt-number ctx) (number-string barnum)) (define (bar-number-break-visibility-callback grob) (let ((barnum-table (ly:context-property ctx 'visibleBarNumbers)) (barnum (string-number (ly:grob-property grob 'text (if (and (hash-table? barnum-table) (hash-ref barnum-table barnum)) end-of-line-invisible begin-of-line-visible ))) (ly:context-set-property! ctx 'barNumberFormatter bar-number-formatter) (ly:context-pushpop-property ctx 'BarNumber 'break-visibility bar-number-break-visibility-callback) )) (context-spec-music (make-apply-context set-properties) 'Score)) Thanks, — Dan ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Issue 3942: Scale slurs and ties when using \magnifyMusic. (issue 103890046)
On 2014/07/06 14:04:07, dak wrote: ly/music-functions-init.ly:645: Stem.thickness This is madness. Stem.thickness and its ilk don't make sense as symbols at all Okay ly/music-functions-init.ly:679: Slur.details.region-size I doubt you even have a chance of making this work. Overriding and reverting bulks of *nested* properties does not work reliably. Okay Since this patch has already been pushed, I'm moving the discussion to the new patch here: http://codereview.appspot.com/110840044 https://codereview.appspot.com/103890046/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel