Re: Building identifiers algorithmically
"Trevor Daniels" writes: > Now while this works it seems rather clunky, so I'm wondering if there > is a more elegant way of doing this. Symbols look like they might > help, but so far I've failed to make anything work. I've also failed > with macros, but that's likely because I don't understand them yet. When a function is evaluated, its arguments are read, evaluated, and the function is called with the unevaluated arguments, and the result of that call is used. When a macro is evaluated, its arguments are read, the macro is called with the unevaluated arguments, and the result of that call is evaluated before use. It's just a matter of where the evaluation happens. With a function, it is before the call, with a macro, it is after the call. That's all there is to it. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Building identifiers algorithmically
On Sun, 2015-03-22 at 08:01 +0100, David Kastrup wrote: > "Trevor Daniels" writes: > > > Now while this works it seems rather clunky, so I'm wondering if there > > is a more elegant way of doing this. Symbols look like they might > > help, but so far I've failed to make anything work. I've also failed > > with macros, but that's likely because I don't understand them yet. > > When a function is evaluated, its arguments are read, evaluated, and the > function is called with the unevaluated I guess you meant evaluated here??? Richard > arguments, and the result of > that call is used. > > When a macro is evaluated, its arguments are read, the macro is called > with the unevaluated arguments, and the result of that call is > evaluated before use. > > It's just a matter of where the evaluation happens. With a function, it > is before the call, with a macro, it is after the call. That's all > there is to it. > ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Building identifiers algorithmically
Richard Shann writes: > On Sun, 2015-03-22 at 08:01 +0100, David Kastrup wrote: >> "Trevor Daniels" writes: >> >> > Now while this works it seems rather clunky, so I'm wondering if there >> > is a more elegant way of doing this. Symbols look like they might >> > help, but so far I've failed to make anything work. I've also failed >> > with macros, but that's likely because I don't understand them yet. >> >> When a function is evaluated, its arguments are read, evaluated, and the >> function is called with the unevaluated > > I guess you meant evaluated here??? Whoever was sitting at my keyboard better would have meant "evaluated". >> arguments, and the result of >> that call is used. >> >> When a macro is evaluated, its arguments are read, the macro is called >> with the unevaluated arguments, and the result of that call is >> evaluated before use. >> >> It's just a matter of where the evaluation happens. With a function, it >> is before the call, with a macro, it is after the call. That's all >> there is to it. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Ghostscript 9.15
I've succeed to upgrade GUB's ghostscript to 9.15 in this branch. https://github.com/trueroad/gub/tree/ghostscript-9.15 I've succeed GUB's ``make lilypond'' by ghostscript-9.15. All lilypond installers have been build. In mingw (Windows): Ghostscript can handle unicode filenames. I've tested lilypond installer and lilypond. They work fine. Correct PDF is generated. In linux-64, linux-x86, linux-ppc, freebsd-64, freebsd-x86, darwin-x86: I've tested lilypond installer and lilypond. They work fine. Correct PDF is generated. In darwin-ppc (PowerPC Mac): It is untested. I can't prepare PowerPC Mac. Would you pull this branch for next lilypond developer build? ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Remove redundant (and) in ly/init.ly (issue 209320043 by lilyli...@googlemail.com)
Patch counted down - please push If this is not ready to go please can you set the tracker accordingly? If nothing is changed for the next countdown (25th March) I'll set the tracker to 'needs_work'. James https://codereview.appspot.com/209320043/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
PATCHES: Countdown for March 25th 2015
Hello, Here is the current patch countdown list. The next countdown will be on March 25th. You can always view the most current countdown list here: http://code.google.com/p/lilypond/issues/list?q=Patch%3Apush%2Ccountdown%2Creview%2Cnew%2Cwaiting&colspec=Patch%20Owner%20ID%20Summary&sort=patch PUSH: David Kastrup: Patch: Replace most uses of scm_{from,to}_locale_* with fixed encodings http://code.google.com/p/lilypond/issues/detail?id=4325 David Kastrup: Patch: Don't create Bottom to announce TimeSignatureEvent http://code.google.com/p/lilypond/issues/detail?id=4324 Trevor Daniels: The satb.ly template fails when DescantMusic contains no notes http://code.google.com/p/lilypond/issues/detail?id=4323 Urs Liska: Patch: Remove redundant (and) in ly/init.ly http://code.google.com/p/lilypond/issues/detail?id=4313 COUNTDOWN: Urs Liska: Patch: web: productions: Update Aurélien's Rosenkavalier http://code.google.com/p/lilypond/issues/detail?id=4327 James Lowe: Patch: Web: Introduction.itexi - updated 'Productions' http://code.google.com/p/lilypond/issues/detail?id=4322 WAITING: Urs Liska: Patch: Issue 3916: Add \alternatingTimeSignatures http://code.google.com/p/lilypond/issues/detail?id=3918 Mike Solomon: Patch: Prevents vertical axis groups with empty skylines http://code.google.com/p/lilypond/issues/detail?id=3156 Mike Solomon: Patch: Removes the translate_axis call from axis-group-interface outside-staff positioning. http://code.google.com/p/lilypond/issues/detail?id=3134 David Kastrup: Patch: Implement music functions in Scheme rather than C++ http://code.google.com/p/lilypond/issues/detail?id=2716 Thank you, James ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Ghostscript 9.15
Masamichi HOSODA writes: > I've succeed to upgrade GUB's ghostscript to 9.15 in this branch. > https://github.com/trueroad/gub/tree/ghostscript-9.15 > > I've succeed GUB's ``make lilypond'' by ghostscript-9.15. > All lilypond installers have been build. > > In mingw (Windows): > Ghostscript can handle unicode filenames. > I've tested lilypond installer and lilypond. They work fine. > Correct PDF is generated. > > In linux-64, linux-x86, linux-ppc, freebsd-64, freebsd-x86, darwin-x86: > I've tested lilypond installer and lilypond. They work fine. > Correct PDF is generated. Have you checked ligatures? I think we were able to correlate our ligature problems (don't know the issue right now) to the use of 64bit architecture. It may be related to GhostScript. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Weird issue with dotted-list-notation
Hi all, I'm suffering from a weird problem which I think is related to the dotted-list notation. It is very annoying because it blocks an important merge on the way towards a unified library infrastructure. Unfortunately I can't produce a minimal working example, as it seems that the problem is buried in the multiple dependencies my function has. But I can easily point you to the actual code. Well, I do have a minimal example outlining what I want to do, but "unfortunately" this works exactly as expected: \version "2.19.16" testDotList = #(define-void-function (parser location opts path) ((ly:context-mod?) list?) (for-each (lambda (p) (display p) (newline)) path)) \testDotList path.to.whatever \testDotList \with { optionOne = ##t optionTwo = ##f } path.to.something.else \relative {c' } There is a function taking an optional context-mod and a list as arguments, followed by two different calls to it. Of course the example doesn't do anything useful, but I mainly wanted to show the function's signature and the calls. The actual code is in openLilyLib, on a development branch: The function useModules is defined in https://github.com/openlilylib/openlilylib/blob/general-interface/ly/_internal/module-handling.ily starting on line 233. The example of a call I'm going to discuss is in https://github.com/openlilylib/openlilylib/blob/general-interface/ly/scholarly/usage-examples/diplomatic-line-breaks.ly (If you should have stumbled over this in an archive and the links are not working anymore this means the branch has been merged). To access the code in its real form do the following - update openlilylib with git pull - checkout the general-interface branch - open the files - ly/_internal/module-handling.ily - ly/scholarly/usage-examples/diplomatic-line-breaks.ly - make sure both the openlilylib root and the ly directory inside are in LilyPond's search path. When you can compile the second file you're good to go. As it is the file compiles fine, but when I comment out line 13 (the pointless "ly:message") the compilation results in errors starting with :1:1 <0>: error: unknown escaped string: `\include' which can be tracked down to line 284 of module-handling.ily. If I insert a music expression between the call to \useModule and the \markup I get loads of errors starting with openlilylib/ly/scholarly/diplomatic-line-breaks.ily:3:1 <0>: error: syntax error, unexpected \header If I prepend the music expression with a \relative clause I get yet other errors, starting with openlilylib/ly/scholarly/diplomatic-line-breaks.ily:3:1 <0>: error: syntax error, unexpected \header, expecting (backed-up?) So the function behaves (breaks) differently depending on what comes after it. If I uncomment the ly:message line or insert e.g. a #(define foo 'bar) between \useModule and the music expression or the markup everything works as expected again. So this is the first indicator that somehow LilyPond or Guile don't reliably determine when the list? argument has finished. This assumption is backed up by trying to change the dotted-list notation to regular Scheme list notation. If I change line 10 to \useModule #'(scholarly diplomatic-line-breaks) everything works as expected, regardless of what comes after that. So I don't know: - is there anything in the implementation of useModules that could (validly) cause something in the list interpretation to go wrong that way? - is there an issue with the list? predicate itself? - is there an issue with the LilyPond parser not being able to reliably processing the input in the function call? Any ideas or solutions would be greatly appreciated. The workaround to simply add some Scheme expression after the list is inacceptable as it will be exposed to the end user. And (as said) this bug is blocking an important merge. TIA Urs ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Fix issue 4040: Dots ignoring shifted ledger lines (issue 220090043 by paulwmor...@gmail.com)
Reviewers: , Message: Please review, thanks! -Paul Description: Fix issue 4040: Dots ignoring shifted ledger lines includes the following two commits: add test staff-ledger-positions-dotted-notes.ly tests positioning of dots on dotted notes with custom ledger line positions (issue 4040) staff-symbol.cc: on_line and custom ledger lines make Staff_symbol::on_line work properly with custom ledger line positions Please review this at https://codereview.appspot.com/220090043/ Affected files (+47, -28 lines): A input/regression/staff-ledger-positions-dotted-notes.ly M lily/staff-symbol.cc Index: input/regression/staff-ledger-positions-dotted-notes.ly diff --git a/input/regression/staff-ledger-positions-dotted-notes.ly b/input/regression/staff-ledger-positions-dotted-notes.ly new file mode 100644 index ..31e10acb3d1bd5546a95a69252ae102b5a4113ce --- /dev/null +++ b/input/regression/staff-ledger-positions-dotted-notes.ly @@ -0,0 +1,16 @@ +\header { + + texidoc = "When the vertical positions of ledger lines have been +customized by setting the @code{ledger-positions} property of the +StaffSymbol, and a dotted note falls on a ledger line, the dot is shifted +up to avoid the ledger line (just as with uncustomized ledger lines)." +} + +\version "2.19.17" + +\new Staff \relative c' { + \override Staff.StaffSymbol.line-positions = #'(-3 0 3) + \override Staff.StaffSymbol.ledger-positions = #'(-3 0) + \override Staff.StaffSymbol.ledger-extra = #1 + f,4. g a b c d g' a b c d e +} Index: lily/staff-symbol.cc diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index 6ae66d85c1880bb0dd817c70389abc43aff262a5..f4b18dfd78ad67e5e2c067332f36b0c130cd5605 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -316,34 +316,9 @@ Staff_symbol::height (SCM smob) bool Staff_symbol::on_line (Grob *me, int pos, bool allow_ledger) { - SCM line_positions = me->get_property ("line-positions"); - if (scm_is_pair (line_positions)) -{ - Real min_line = HUGE_VAL; - Real max_line = -HUGE_VAL; - for (SCM s = line_positions; scm_is_pair (s); s = scm_cdr (s)) -{ - Real current_line = scm_to_double (scm_car (s)); - if (pos == current_line) -return true; - if (current_line > max_line) -max_line = current_line; - if (current_line < min_line) -min_line = current_line; - -} - - if (allow_ledger) -{ - if (pos < min_line) -return (( (int) (rint (pos - min_line)) % 2) == 0); - if (pos > max_line) -return (( (int) (rint (pos - max_line)) % 2) == 0); -} - - return false; -} - else + // standard staff lines (any line count) and standard ledger lines + if (!scm_is_pair (me->get_property ("line-positions")) + && !scm_is_pair (me->get_property ("ledger-positions"))) { int const line_cnt = line_count (me); bool result = abs (pos + line_cnt) % 2 == 1; @@ -353,6 +328,34 @@ Staff_symbol::on_line (Grob *me, int pos, bool allow_ledger) } return result; } + + // staff lines (custom or standard) + vector lines = Staff_symbol::line_positions (me); + for (vector::const_iterator i = lines.begin (), + e = lines.end (); + i != e; + ++i) +{ + if (pos == *i) +return true; +} + + // ledger lines (custom or standard) + if (allow_ledger) +{ + vector ledgers = Staff_symbol::ledger_positions (me, pos); + if (ledgers.empty ()) +return false; + for (vector::const_iterator i = ledgers.begin (), + e = ledgers.end (); + i != e; + ++i) +{ + if (pos == *i) +return true; +} +} + return false; } Interval ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel