[frogs] How can I obtain articulation informations?

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]


Hello all,

after answering Federicos request for the proper handling of ties and
harmonic angle brackets in tablature, I dived into scheme once more
after a long, long break...now I am stuck with a probably simple problem:

I work on the code for parentheses-item::calc-tabstaff-parenthesis-stencils in scm/tablature.scm:

(define-public (parentheses-item::calc-tabstaff-parenthesis-stencils grob)
 ;; the grob we want to parenthesize
 (let ((victim (ly:grob-array-ref (ly:grob-object grob 'elements) 0)))
   ;;(display (ly:event-property (event-cause victim) 'articulations))
   ;; check whether it's a note head
   (if (grob::has-interface victim 'note-head-interface)
       (begin
         ;; tweak appearance before retrieving
         ;; list of stencils '(left-paren right-paren)
         ;; get the font-size from victim (=TabNoteHead) to handle
         ;; grace notes properly
         (ly:grob-set-property! grob 'font-size
                                (ly:grob-property victim 'font-size))
         ;; calculate the padding:
         ;; if there are harmonic angle brackets, shift the parentheses
(let* ((articulation (ly:event-property (event-cause victim) 'articulations)))
                    (display "\n--> ")(display articulation))
                    ;; here I am stuck
         (ly:grob-set-property! grob 'padding 0)
         ;; apply whiteout to each element of the list
         (map stencil-whiteout
              (parentheses-item::calc-parenthesis-stencils grob)))
       (parentheses-item::calc-parenthesis-stencils grob))))


I get the list of articulations from victim and need to find out whether we have an 'HarmonicEvent: if yes, I choose a padding > 0 , otherwise I leave the padding = 0.

I grepped through the code and tried various constructs for about an hour now; can someone give me
a gentle push towards the obvious?

Thanks in advance,

Marc

---
----
Join the Frogs!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/