1. 31 Jul, 2021 1 commit
    • Jean Abou-Samra's avatar
      Don't duplicate class-specific interfaces in copy constructors · 0f57cf61
      Jean Abou-Samra authored
      This removes code mistakenly added in 83faf57e.
      The grob we are copying already has the interfaces related to its class.  There
      is no reason to add them again. The effect can be seen on
        \override Staff.Clef.after-line-breaking =
          #(lambda (grob)
             (pretty-print (ly:grob-interfaces grob)))
      which before this would print
  2. 30 Jul, 2021 1 commit
    • Dan Eble's avatar
      Quote_iterator simplification · 8b458ab6
      Dan Eble authored
      Track the relevant span in the event vector using a conventional
      left-closed, right-open interval.  Adjust binsearch_scm_vector() to
      mimic std::lower_bound.  Ignore grace notes leading into unquoted music
      by choosing an appropriate threshold moment rather than choosing a later
      moment and walking back.
      Check the result of unsmob<Moment> before dereferencing and issue a
      programming_error if a non-Moment is found in the event vector.
      Avoid calling process() before processing is due for the wrapped music.
  3. 29 Jul, 2021 3 commits
  4. 27 Jul, 2021 1 commit
  5. 26 Jul, 2021 1 commit
  6. 23 Jul, 2021 2 commits
  7. 22 Jul, 2021 1 commit
    • Jean Abou-Samra's avatar
      Add a time-based version of \parenthesize · d5d8651f
      Jean Abou-Samra authored
      \parenthesize can now work either on a music event or on a grob path,
      just like \footnote.  This makes it possible to parenthesize grobs
      that do not find a cause in events, such as clefs.
      The implementation just applies a propertyTweak.  This preserves the
      behavior of parenthesizing every element of a chord.
      An unfortunate side effect is that something like
      \lyricmode { \parenthesize aaah } no longer works since "aaah" is taken
      as a grob path.  This is easily worked around using
      \lyricmode { \parenthesize LyricText aaah }.
  8. 20 Jul, 2021 2 commits
  9. 18 Jul, 2021 8 commits
    • Jean Abou-Samra's avatar
      Doc: remove outdated warning about footnotes · 3c0cbade
      Jean Abou-Samra authored
      For safety, add corresponding regression tests.
    • Jean Abou-Samra's avatar
      Add regression test for ly:engraver-make-(item|spanner) · aa460c6a
      Jean Abou-Samra authored
      This is possible now that there are actually grob types
      that are not restricted to a single class, as enabled
      a few commits back.
    • Jean Abou-Samra's avatar
    • Jean Abou-Samra's avatar
      Footnotes and balloons as sticky grobs · 15362f34
      Jean Abou-Samra authored
      This unifies FootnoteItem and FootnoteSpanner as well as
      BalloonTextItem and BalloonTextSpanner using the new handling
      of sticky grobs.
    • Jean Abou-Samra's avatar
      Control points and polygons as sticky grobs · 999f01cd
      Jean Abou-Samra authored
      This moves engraver-make-sticky-grob from define-grobs.scm to a public
      function exported from C++, ly:make-sticky-grob. It now creates items
      or spanners from the same grob definition as enabled by previous commits.
      Control points and polygons are the first use.
    • Jean Abou-Samra's avatar
      Renamings in preparation for generalizing sticky grobs · 2018b49b
      Jean Abou-Samra authored
      Change attached-spanner-interface to sticky-grob-interface and
      underlying-spanner to sticky-host.
    • Jean Abou-Samra's avatar
      Allow engravers to decide about grob classes · 83faf57e
      Jean Abou-Samra authored
      This is a conceptual shift: the class of a grob (Item, Spanner,
      Paper_column, System) is no longer always determined by its
      type (NoteHead, ...).  Engravers have the option to decide what
      class to create the grob with.  This means that the same grob
      definition in define-grobs.scm can be used to make both items
      and spanners.
      The allowed classes are stored in the meta.classes field of
      grob definitions.  If there is just one class in the list,
      ly:engraver-make-grob can be used, and it chooses this
      class.  By contrast, if there are two or more entries in
      meta.classes, engravers must specify the class by using
      either ly:engraver-make-item or ly:engraver-make-spanner
      instead of ly:engraver-make-grob.  The C++ macros make_item,
      make_spanner and make_column work the same internally
      as ly:engraver-make-item and ly:engraver-make-spanner:
      create a grob with the class corresponding to the name
      of the macro, and check that this class does belong to
      the meta.classes property of the newly created grob.
      (Note that ly:engraver-make-column is not provided,
      since creating paper columns from custom engravers is
      not supported.)
      For simplicity and compatibility, grob definitions may contain a
      meta.class field.  It should be just a symbol representing one of
      the available classes.  In this case, the meta.classes field is
      set to a one-element list containing this symbol.  This is done
      upon completizing the grob definition.  In further commits, the
      possibility of meta.classes introduced by this commit gets used
      by a some grobs, but the wide majority still just declares meta.class.
      This change implies that the interface that characterizes a class
      (e.g., item-interface) is no longer added when completizing grob
      definitions during initialization, but when instantiating grobs.
      This requires an adaptation to the acknowledging cycle since it
      relied on the assumption that the same grob name would lead to the
      same set of interfaces. Now, the hash table entry is indexed by
      the (grob-name . grob-class) pair. Thus, class_name () needs be
      public for grob classes, and hashq-create-handle! must be replaced
      with hash-create-handle!.
      The documentation generation scripts are updated to display the
      allowable classes now that they are no longer implied by the
      set of interfaces found in the completized grob definition.
      \alterBroken can no longer detect just from the name of the
      grob that it is not a spanner. The warning is moved to
    • Jean Abou-Samra's avatar
      Remove class-specific interfaces from grob definitions · 24063d2e
      Jean Abou-Samra authored
      They are added automatically.
  10. 17 Jul, 2021 2 commits
    • Dan Eble's avatar
      Fix Interval_t<double>::length () · 8c66fa8a
      Dan Eble authored
      length () now returns NaN instead of 0 for intervals
      (-infinity, -infinity) and (infinity, infinity).
    • Dan Eble's avatar
      Interval_t<T> maintenance and testing · b00da6b0
      Dan Eble authored
      length() no longer requires T to be implicitly convertible from an int.
      Add left() and right() methods for unchecked access to the endpoints.
      Add longest() for one-step creation of an interval of maximum extent.
      Add to_string(Interval_t<T>).
      Add some unit tests.  They are far from complete.
  11. 15 Jul, 2021 1 commit
    • Dan Eble's avatar
      here_defined and where_defined macros · f5cac0cc
      Dan Eble authored
      Define macros for here_defined and where_defined operations like other
      property operations.
      Make the value argument optional to clean up callers that declared a
      dummy variable just because it was required.
  12. 14 Jul, 2021 2 commits
    • Jonas Hahnfeld's avatar
      Avoid keeping modules alive for too long · b0232579
      Jonas Hahnfeld authored
      Commit 1e789f64 ("Reset modules after each file with Guile 2.x")
      had a minor flaw because the variable global-modules could keep the
      modules alive after calling (set-module-submodules!). Just remove
      the variable that is used only once in session-save.
    • Jonas Hahnfeld's avatar
      Filter finalized smobs out of undeads · 0a824685
      Jonas Hahnfeld authored
      Guile puts the garbage collector into "Java finalization" mode. This
      means to-be-finalized objects are marked to keep dependent objects
      around until the next collection, in case the finalizer puts them
      into a global variable and makes them live again. Just ignore these
      cases since the smob is gone from our point of view.
      Allow the usage of debug-gc-object-lifetimes on Guile 2, but keep
      it disabled by default until all issues are resolved.
  13. 13 Jul, 2021 3 commits
    • Jean Abou-Samra's avatar
      Base accidental rules on global timing, not measure position · 2151499a
      Jean Abou-Samra authored
      measurePosition stops increasing during a cadenza.  It is thus
      unreliable for determining automatic accidentals, which
      (unlike, e.g., automatic beams) should only depend on measure
      boundaries, not on the measures' inner structure.  Issue #6153
      was caused by incorrect detection of consecutive notes due to
      this.  Use the context's current moment instead.  This also
      fixes a similar problem with partials: the function was called
      with the bare measurePosition, but the locations stored in
      localAlterations had a version that is normalized by adding
      a multiple of the measure length to make it positive.
      The current moment is not passed to the functions as the measure
      position used to be since it can be easily retrieved with
      Closes #6153.
    • Jean Abou-Samra's avatar
      Systematic regression test coverage for accidental styles · a9350486
      Jean Abou-Samra authored
      Some were already tested, some were not.  Don't remove the old
      tests (they could contain valuable edge cases), but add one regression
      test to cover all styles at once.  It is just made with the example
      that the documentation uses.
    • Jean Abou-Samra's avatar
      Remove redundant function ly:context-now · 05e39b2d
      Jean Abou-Samra authored
      It does exactly the same as ly:context-current-moment.  The latter
      name is kept on the ground of it being the most explicit and the
      de facto favorite name of the two.
  14. 10 Jul, 2021 4 commits
    • Dan Eble's avatar
      Hide Smob_core::count · 338ec61c
      Dan Eble authored
      Having count in scope in a translator wasted some of my time by allowing
      code with a typo to compile.
    • Dan Eble's avatar
      Split mark events into two classes · 696a758d
      Dan Eble authored
      One class represents a true rehearsal mark and the other represents the
      (ab)use of a RehearsalMark grob to position arbitrary markup.
      For true rehearsal marks, limit the 'label property to an index.  Set
      'text directly for ad-hoc marks.
      Mark_engraver still listens for a common mark event, but enhancements
      are planned.
      This is a more conservative version of the patch in Issue #5301.
    • Dan Eble's avatar
      Self_alignment_interface maintenance · cf336785
      Dan Eble authored
      Use LY_ASSERT_SMOB instead of assuming that unsmob will work.
      Overload functions so that C++ callers do not have to deal in SCM types.
    • Dan Eble's avatar
  15. 08 Jul, 2021 1 commit
  16. 04 Jul, 2021 4 commits
  17. 03 Jul, 2021 3 commits