[frogs] How can I obtain articulation informations? |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
- To: "frogs@xxxxxxxxxxx" <frogs@xxxxxxxxxxx>
- Subject: [frogs] How can I obtain articulation informations?
- From: Marc Hohl <marc@xxxxxxxxxx>
- Date: Sun, 30 May 2010 22:06:53 +0200
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1275250015; l=1755; s=domk; d=hohlart.de; h=Content-Transfer-Encoding:Content-Type:Subject:To:MIME-Version:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=xxt7bgdKXM1vIa1/1M3CASEQys0=; b=x60oAFn7Bj5ANGd1dG/Vb5+MF8jsewcQ/p55mraZdZNcrXjL4fz0H7p4LE2Wh/RL6Ns /tn5ZdSvlsGfLWcMNlHvtrEbyyUDokAvV2uiLwg8XnvjX/HoGowa/mK5U0Cc+I3W1IbuM 07CnWEYQ9Xg3HHhAN/an+MQVI6W0gfNuRi0=
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!