lilypond-user
[Top][All Lists]
Advanced

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

Music functions and markup


From: Br. Samuel Springuel
Subject: Music functions and markup
Date: Wed, 21 Dec 2016 10:30:17 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

I'm typesetting a bunch of chant in modern notation (i.e. stemless without timing, etc.). These pieces are being pulled from different sources which have different conventions for a hollow note. In some cases it's a stemless half-note, in others a whole note, and in still others a breve (with either one or two lines). Now, while I'm going to want a consistent look for these in the final project, I don't yet know which convention we're going to settle on and thus need to be able to change things rather easily.

To that end I developed a function which takes a single note as its argument and applies a specific duration to it. By defining this function in the project format file (which is included in every score in the project) and using the function to indicate the hollow notes instead of explicit durations, I can change the look of all such notes simply by changing the duration in the function.

However, I've run into a problem in that some of these notes have markup attached to them and the function doesn't like that. It wants a plain pitch. Is there a way that I can modify the function so that it doesn't revolt when markup is attached to the note it is supposed to apply to or insert the markup in the same place so that it isn't attached to the note?

Snippet follows (note, doesn't compile in current state because of markup):

\version "2.19.53"
\language "english"

hold = #(define-music-function (note) (ly:pitch?)
     #{
       $note 2 % or 1 or \breve
     #})

global = { \key c \major \omit Stem \set Score.timing = ##f }

music = { \hold b-flat'^\markup {Cantor} a' g' f' \bar "|" }

\new Staff \with {
    \remove "Time_signature_engraver" } {
        \new Voice = "mel" {\voiceOne \global \music}
}

--
✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ



reply via email to

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