Thank you so much; these both work wonderfully.

*Benjamin Bloomfield*

On Fri, Feb 10, 2017 at 7:04 PM, Klaus Blum <benbigno...@gmx.de> wrote:

> Benjamin Bloomfield wrote
> > I'm trying to figure out how to tweak the size of the sharp and flat
> > symbol that displays when the chord name has one in it.  Those symbols
> are
> > slightly taller than the capitals in my font, and I'd like to get them
> > even.
>
> Maybe there's an easier way, but here's a first solution. It's a quick
> modification of
> http://www.lilypondforum.de/index.php?topic=824.0
>
> %
> ------------------------------------------------------------
> ----------------------
> #(define (note-name->international-markup pitch lowercase?)
>    (let* (
>            (name (ly:pitch-notename pitch))
>            (alt (ly:pitch-alteration pitch))
>            (hspace (vector-ref #(0.15 0.15 0.05 0.05 0.15) (+ (* alt 2)
> 2)))
>            (raise (vector-ref #(0.6 0.6 0.65 0.8 0.7) (+ (* alt 2) 2)))
>            )
>
>      (if (>= alt 0)
>          (make-line-markup
>           (list
>            (make-simple-markup
>             (if lowercase?
>                 (vector-ref #("c" "d" "e" "f" "g" "a" "b") name)
>                 (vector-ref #("C" "D" "E" "F" "G" "A" "B") name)
>                 )
>             )
>            (if (= alt 0)
>                ;; If it's natural and not b, do nothing
>                (make-line-markup (list empty-markup))
>                ;; Else add alteration
>                (make-line-markup
>                 (list
>                  (make-hspace-markup hspace)
>                  (make-tiny-markup (make-raise-markup raise    ;
> make-tiny-markup instead of make-smaller-markup
>                                         (make-musicglyph-markup
>                                          (assoc-get alt
> standard-alteration-glyph-name-alist ""))))
>                  ))
>                )))
>          (make-line-markup
>           (list
>            (make-simple-markup
>             (if lowercase?
>                 (vector-ref #("c" "d" "e" "f" "g" "a" "b") name)
>                 (vector-ref #("C" "D" "E" "F" "G" "A" "B") name)
>                 )
>             )
>            (if (= alt 0)
>                ;; If it's natural and not b, do nothing
>                (make-line-markup (list empty-markup))
>                ;; Else add alteration
>                (make-line-markup
>                 (list
>                  (make-hspace-markup hspace)
>                  (make-tiny-markup (make-raise-markup raise    ;
> make-tiny-markup instead of make-smaller-markup
>                                         (make-musicglyph-markup
>                                          (assoc-get alt
> standard-alteration-glyph-name-alist ""))))
>                  ))
>                )))
>          )
>      )
>    )
>
> internationalChords = {
>   \set Staff.chordRootNamer = #note-name->international-markup
>   % \unset Staff.chordNoteNamer
> }
>
> \new ChordNames \chordmode {
>   as a ais bes b bis
>   \internationalChords
>   as a ais bes b bis
> }
> %
> ------------------------------------------------------------
> ----------------------
>
> Cheers,
> Klaus
>
>
>
> --
> View this message in context: http://lilypond.1069038.n5.
> nabble.com/chord-names-tp199985p199990.html
> Sent from the User mailing list archive at Nabble.com.
>
> _______________________________________________
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to