Skip to content

Commit

Permalink
Fix issue #14
Browse files Browse the repository at this point in the history
Added `\ekmStartTrillSpanScript` to specify any text (EXTEXT) instead of the tr symbol like an ornament with `\ekmScript`, e.g. making use of a ligature with

    \ekmStartTrillSpanScript #-1 #'(#xE262 #xE566)

Else, for a proper vertical positioning with tr, the standard accidentals for chord symbols U+ED60 ... should be used, e.g.

    \ekmStartTrillSpanScript
      #-1
      #(markup #:concat
        (#:ekm-char #xE566
         #:hspace 0.2
         #:fontsize -3 #:ekm-char #xED62
         #:hspace 0.2))

For "real" accidental glyphs, a general positioning is tricky.
  • Loading branch information
tr-igem authored Jan 14, 2025
1 parent 4bc0ccb commit 1e796f9
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions ly/esmufl.ily
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%% Esmuflily - Support for SMuFL/Ekmelos
%% Copyright (c) 2020-2024 Thomas Richter
%% Copyright (c) 2020-2025 Thomas Richter
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
Expand All @@ -21,7 +21,7 @@
%%
%%
%% File: esmufl.ily
%% Latest revision: 2024-10-16
%% Latest revision: 2025-01-14
%%

\version "2.24.0"
Expand Down Expand Up @@ -1722,9 +1722,10 @@ ekmScriptSmall =

#(define (ekm-trillspan grob)
(let* ((ext (ly:stencil-extent (ly:grob-property grob 'stencil) X))
(tr (ekm-cchar grob 0 #xE566))
(tr (ly:grob-property grob 'text #xE566))
(tr (ekm-ctext grob 0 tr))
(tr (ly:stencil-translate-axis tr (car ext) X))
(tempo (ly:grob-property grob 'text))
(tempo (ly:grob-property grob 'zigzag-width))
(seg (- #xEAA4 (if (integer? tempo) (min 4 (max -4 tempo)) 0))))
(ly:grob-set-property! grob 'stencil
(ly:stencil-combine-at-edge
Expand All @@ -1743,7 +1744,15 @@ ekmStartTrillSpan =
(integer?)
(make-music 'TrillSpanEvent
'span-direction START
'tweaks `((text . ,tempo))))
'tweaks `((zigzag-width . ,tempo))))

ekmStartTrillSpanScript =
#(define-event-function (tempo txt)
(integer? ekm-extext?)
(make-music 'TrillSpanEvent
'span-direction START
'tweaks `((zigzag-width . ,tempo)
(text . ,txt))))


%% Trill pitch
Expand Down

0 comments on commit 1e796f9

Please sign in to comment.