[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Markup TextSpanner and format together ?
From: |
Allan Spagnol Comar |
Subject: |
Markup TextSpanner and format together ? |
Date: |
Thu, 6 Apr 2006 07:50:13 -0300 |
Hi All,
I am needing some help from a expert guy on the list. I am using a
script sended in this list to make guitar barre, the script is:
barre = #(define-music-function (barre location str music) (string? ly:music?)
(let ((spanned-music
(let ((first-element #f)
(last-element #f)
(first-found? #f))
(music-map (lambda (m)
(if (eqv? (ly:music-property m
'name) 'EventChord)
(begin
(if (not first-found?)
(begin
(set! first-found? #t)
(set! first-element m)))
(set! last-element m)))
m)
music)
(if first-found?
(begin
(set! (ly:music-property first-element 'elements)
(cons (make-music 'TextSpanEvent
'span-direction -1)
(ly:music-property
first-element 'elements)))
(set! (ly:music-property last-element 'elements)
(cons (make-music 'TextSpanEvent
'span-direction 1)
(ly:music-property last-element
'elements)))))
music)))
(make-music 'SequentialMusic
'origin location
'elements (list #{
\once \override Voice . TextSpanner #'edge-text =
#$(cons (format "C~a" str) "")
\once \override Voice . TextSpanner #'direction = #1
\once \override Voice . TextSpanner
#'edge-height = #'(0 . 0.5)
\once \override Voice . TextSpanner #'padding = #3
\once \override Voice . TextSpanner
#'enclose-bounds = #1
\once \override Voice . TextSpanner
#'dash-fraction = #0.9
\once \override Voice . TextSpanner
#'dash-period = #1
#}
spanned-music))))
I need to change the
\once \override Voice . TextSpanner #'edge-text = #$(cons (format "C~a" str) "")
by a text spanner containing
\override Voice . TextSpanner #'edge-text = #(cons ( markup
(#:musicglyph "timesig.C22") #:normal-text #:vcenter "1" ) "")
where on the place of the "1" must enter the format of the script. I
tried a lot of forms and could not get it to work. Does someone knows
how I can do that ?
Thanks, Allan
--
An application asked:
"Requeires Windows 9x, NT4 or better",
so I´ve installed Linux
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Markup TextSpanner and format together ?,
Allan Spagnol Comar <=