[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    make-text-markup to use flat symbol instead of lowercase "b"
From:       keith Luke <kkll00b () gmail ! com>
Date:       2014-10-30 20:48:08
Message-ID: CACvd4pOMfjz2V1_RrQx2J+QQSt90NBRF_B0s+xq0Q5Lv=XcZ0A () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I found the following in LSR:

% fix accidentals with some Scheme (using the current font's symbols)

#(define (my-chord-name->pop-markup pitch lowercase?)

(let* ((alt (ly:pitch-alteration pitch)))

(make-line-markup

(list

(make-simple-markup

(conditional-string-downcase

(vector-ref #("C" "D" "E" "F" "G" "A" "B") (ly:pitch-notename pitch))

lowercase?))

;; If it's natural, do nothing

(if (= alt 0)

(make-line-markup (list empty-markup))

(if (= alt FLAT)

;; Otherwise, handle adding the flat symbol

(make-line-markup

(list

(make-hspace-markup 0.3)

(make-small-markup (make-raise-markup 0.7

(make-text-markup "b")))))

;; or handle adding the sharp symbol

(make-line-markup

(list

(make-hspace-markup 0.1)

(make-small-markup (make-raise-markup 0.7

(make-text-markup "#")))))))))))

How can I change  (make-text-markup "b")  to use the flat symbol instead of
lowercase "b"
and (make-text-markup "#") to use the sharp symbol instead of the pound
sign?

Thanks,

Keith Luke

[Attachment #5 (text/html)]

<div dir="ltr"><div><div><div><div>I found the following in LSR:<br><br><div \
style="margin-left:40px"><span style="color:rgb(11,83,148)">% fix accidentals with \
some Scheme (using the current font&#39;s symbols)</span> </div><p style="margin:0px \
0px 0px 40px;text-indent:0px"><span style="color:rgb(11,83,148)">#(define \
(my-chord-name-&gt;pop-markup pitch lowercase?)</span></p><div \
style="margin-left:40px"> </div><p style="margin:0px 0px 0px \
40px;text-indent:0px"><span style="color:rgb(11,83,148)">  (let* ((alt \
(ly:pitch-alteration pitch)))</span></p><div style="margin-left:40px"> </div><p \
style="margin:0px 0px 0px 40px;text-indent:0px"><span style="color:rgb(11,83,148)">  \
(make-line-markup</span></p><div style="margin-left:40px"> </div><p style="margin:0px \
0px 0px 40px;text-indent:0px"><span style="color:rgb(11,83,148)">    \
(list</span></p><div style="margin-left:40px"> </div><p style="margin:0px 0px 0px \
40px;text-indent:0px"><span style="color:rgb(11,83,148)">      (make-simple-markup \
</span></p><div style="margin-left:40px"> </div><p style="margin:0px 0px 0px \
40px;text-indent:0px"><span style="color:rgb(11,83,148)">       \
(conditional-string-downcase</span></p><div style="margin-left:40px"> </div><p \
style="margin:0px 0px 0px 40px;text-indent:0px"><span style="color:rgb(11,83,148)">   \
(vector-ref #(&quot;C&quot; &quot;D&quot; &quot;E&quot; &quot;F&quot; &quot;G&quot; \
&quot;A&quot; &quot;B&quot;) (ly:pitch-notename pitch))</span></p><div \
style="margin-left:40px"> </div><p style="margin:0px 0px 0px \
40px;text-indent:0px"><span style="color:rgb(11,83,148)">        \
lowercase?))</span></p><div style="margin-left:40px"> </div><p style="margin:0px 0px \
0px 40px;text-indent:0px"><span style="color:rgb(11,83,148)">      ;; If it&#39;s \
natural, do nothing</span></p><div style="margin-left:40px"> </div><p \
style="margin:0px 0px 0px 40px;text-indent:0px"><span style="color:rgb(11,83,148)">   \
(if (= alt 0)</span></p><div style="margin-left:40px"> </div><p style="margin:0px 0px \
0px 40px;text-indent:0px"><span style="color:rgb(11,83,148)">        \
(make-line-markup (list empty-markup))</span></p><div style="margin-left:40px"> \
</div><p style="margin:0px 0px 0px 40px;text-indent:0px"><span \
style="color:rgb(11,83,148)">        (if (= alt FLAT)</span></p><div \
style="margin-left:40px"> </div><p style="margin:0px 0px 0px \
40px;text-indent:0px"><span style="color:rgb(11,83,148)">          ;; Otherwise, \
handle adding the flat symbol</span></p><div style="margin-left:40px"> </div><p \
style="margin:0px 0px 0px 40px;text-indent:0px"><span style="color:rgb(11,83,148)">   \
(make-line-markup</span></p><div style="margin-left:40px"> </div><p style="margin:0px \
0px 0px 40px;text-indent:0px"><span style="color:rgb(11,83,148)">            \
(list</span></p><div style="margin-left:40px"> </div><p style="margin:0px 0px 0px \
40px;text-indent:0px"><span style="color:rgb(11,83,148)">              \
(make-hspace-markup 0.3)</span></p><div style="margin-left:40px"> </div><p \
style="margin:0px 0px 0px 40px;text-indent:0px"><span style="color:rgb(11,83,148)">   \
(make-small-markup (make-raise-markup 0.7</span></p><div style="margin-left:40px"> \
</div><p style="margin:0px 0px 0px 40px;text-indent:0px"><span \
style="color:rgb(11,83,148)">                (<span \
style="background-color:rgb(255,255,0)">make-text-markup \
&quot;b&quot;</span>)))))</span></p><div style="margin-left:40px"> </div><p \
style="margin:0px 0px 0px 40px;text-indent:0px"><span style="color:rgb(11,83,148)">   \
;; or handle adding the sharp symbol</span></p><div style="margin-left:40px"> \
</div><p style="margin:0px 0px 0px 40px;text-indent:0px"><span \
style="color:rgb(11,83,148)">          (make-line-markup</span></p><div \
style="margin-left:40px"> </div><p style="margin:0px 0px 0px \
40px;text-indent:0px"><span style="color:rgb(11,83,148)">            \
(list</span></p><div style="margin-left:40px"> </div><p style="margin:0px 0px 0px \
40px;text-indent:0px"><span style="color:rgb(11,83,148)">              \
(make-hspace-markup 0.1)</span></p><div style="margin-left:40px"> </div><p \
style="margin:0px 0px 0px 40px;text-indent:0px"><span style="color:rgb(11,83,148)">   \
(make-small-markup (make-raise-markup 0.7</span></p><div style="margin-left:40px"> \
</div><p style="margin:0px 0px 0px 40px;text-indent:0px"><span \
style="color:rgb(11,83,148)">                (<span \
style="background-color:rgb(255,255,0)">make-text-markup \
&quot;#&quot;</span>)))))))))))</span></p><br></div>How can I change   \
(make-text-markup &quot;b&quot;)   to use the flat symbol instead of lowercase \
&quot;b&quot;<br></div>and (make-text-markup &quot;#&quot;) to use the sharp symbol \
instead of the pound sign?<br><br></div>Thanks,<br><br></div>Keith Luke<br></div>



_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic