lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting Gregorian chant: Note spacing for two note neumes seem to de


From: Matthew Fong
Subject: Re: Setting Gregorian chant: Note spacing for two note neumes seem to depend on length of lyric text
Date: Mon, 5 Oct 2020 10:35:29 -0700

Hello Aaron,

Thank you for your help. That does make sense to me and works out quite well -- I don't yet have a grasp how various commands and settings are actually working in LilyPond. I found another example in the LilyPond documentation that shows the internal representation. Where do I find this for input I want to inspect further?

I tested your syllable function with tweaks (like changing a notehead to a quilisma), and expressive marks like a tenuto. It appears the current code doesn't handle them (this is getting into advanced territory much more quickly than I expected).
Sample input I attempted: \syllable { a' \noteQuilisma c'' b'_\tenuto }

where
noteQuilisma =
#(define-music-function (note) (ly:music?)
#{
\tweak NoteHead.stencil #ly:text-interface::print
\tweak NoteHead.text \markup { 
\scale #'(0.24 . 0.24)
\override #'(filled . #t)
\path #0.0 #quilismaPathGreciliae
}
\tweak NoteHead.X-offset #0
\tweak Stem.stencil ##f
#note
#}
)


Many thanks,
mattfong

On Mon, Oct 5, 2020 at 9:50 AM Aaron Hill <lilypond@hillvisions.com> wrote:
(Adding mailing list back to thread...)

On 2020-10-05 9:07 am, Matthew Fong wrote:
> I'm dissecting your syllable code and have a question for you: How do I
> create a similar list using a slur instead of a melisma? I found this
> documentation, but not sure how to use it
> http://lilypond.org/doc/v2.19/Documentation/internals/slurevent

SlurEvents end up as articulations of a NoteEvent, whereas the \melisma
command is essentially shorthand for \set melismaBusy = ##t.  See below
for how both can be handled.


> I understand that using a melisma is quite handy, but for clarity for
> the
> singer, adding slurs is another strong visual indicator of the
> grouping.

With that in mind, the function I provided can be enhanced to support
both unslurred and slurred melismata:

%%%%
\version "2.20.0"

syllable =
#(define-music-function
   (style pitches)
   ((symbol? #f) ly:music?)
   (let* ((pitches (music-pitches pitches))
          (count (length pitches)))
     (make-sequential-music
       (append-map
         (lambda (index pitch)
           (let* ((denom 5) ;; NOTE: Adjust this as needed. <<==
                  (initial? (= index 1))
                  (final? (= index count))
                  (numer (if final? (- denom (1- count)) 1))
                  (music '()))
             (set! music
               (list (make-music 'NoteEvent
                 'pitch pitch
                 'duration (ly:make-duration 2 0 numer denom))))
             (if (or initial? final?)
               (if (eq? style 'slurred)
                 (ly:music-set-property! (car music) 'articulations
                   (list (make-span-event 'SlurEvent
                           (if initial? START STOP))))
                 (set! music (append music (list
                   (if initial? melisma melismaEnd))))))
             music))
         (iota count 1)
         pitches))))

{ \time 1/4 \hide Staff.BarLine \omit Stem
   \syllable { a' c'' b' }
   \syllable { a' b' }
   \syllable slurred { a' c'' a' b' }
   \syllable { b' } }
\addlyrics { lor -- em i -- psum }
%%%%

Note that if you wanted the default behavior to be slurred, change the
type predicate from (symbol? #f) to (symbol? 'slurred).  Then you can
simply specify any other symbol (such as "unslurred") to opt for the
original \melisma/\melismaEnd approach.

I could see LigatureBrackets as another option, although their handling
is even more peculiar.


-- Aaron Hill

reply via email to

[Prev in Thread] Current Thread [Next in Thread]