Am Mo., 8. Aug. 2022 um 16:35 Uhr schrieb Mark Knoop <m...@opus11.net>: > > Following on from this old thread... > > https://lists.gnu.org/archive/html/lilypond-user/2019-10/msg00405.html > > ... I'm using Harm's fantastic code to align/attach Stems to a Glissando line. > > However, I've come across a problem with the code which in relation to > MultiMeasureRests. Namely, writing a MMR which will appear on the same system > as the Glissando (or some other situations) results in an error: > > ERROR: In procedure ly:item-get-column: Wrong type argument in position 1 > (expecting Item): #<Grob Spanner > > > Attached is Harm's original code with a few lines added to the example (at > line 595) which demonstrate the problem. > > Many thanks, > > Mark > > > -- > Mark Knoop
Hi Mark, `ly:item-get-column' used in bultin `grob::when' sometimes causes the problem, if blindly thrown at all system's elts, as I do in said coding. It's fixable by prefiltering for NoteColumns, i.e. line 102ff should read: ;; Filter for every inner (skipped) NoteColumn (inner-ncs (filter (lambda (elt) (let (;; Going for `ly:grob-relative-coordinate´ disturbs ;; vertical spacing, thus we sort/filter using ;; `grob::when´ (elt-when (grob::when elt))) (and (ly:grob-property elt 'glissando-skip #f) (ly:moment<? left-bound-when elt-when) (not (moment<=? right-bound-when elt-when))))) (filter (lambda (elt) (grob::has-interface elt 'note-column-interface)) (ly:grob-array->list sys-elts-array)))) That said, meanwhile I don't like the whole approach anymore... The need to recreate things LilyPond already has done is an alarm sign. Maybe there are other still uncovered bugs. Alas, I don't have a working alternative :( HTH a bit, Harm