lilypond-user
[Top][All Lists]
Advanced

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

Re: Music functions and markup


From: Thomas Morley
Subject: Re: Music functions and markup
Date: Wed, 21 Dec 2016 23:59:23 +0100

2016-12-21 16:30 GMT+01:00 Br. Samuel Springuel <address@hidden>:
> 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}
> }
>
> --

\version "2.19.53"
\language "english"

hold = #(define-music-function (note) (ly:music?)
     #{
       $note \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}
}

Works here, at least for he given example.

Cheers,
  Harm



reply via email to

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