After last night's emails I realised that the _real_ problem I was having was with the fact that the bars were ticking away according to an irrelevant time signature. It turns out that I was able to solve quite a few of my longstanding issues by attacking that directly. I'm actually pretty happy with the result (though there's still one particularly clunky thing and a couple somewhat annoying error messages I don't fully understand), and wanted to share it and ask some questions about it.
First, let me lay out what it does. I'm setting some church chants in a more or less modern notation, with modern note heads but no stems or flags, and on a modern staff. There are bars, but they separate phrases rather than measures. And I wanted to include running translation that was synched by phrase rather than by note. (This last problem was the one I solved first, and proved to be the way to bootstrap the other stuff.) Attached are the two files that set all this up. The header file is for including at the top of the .ly file, and defines a number of useful commands. The footer file is for including inside the \score; it turns off some of the engravers. After you've included these files, you write out your melody, enclosing every chunk of it with a \phrase{ ... } marker, and following each with a bar command (e.g. \divisioMinima). The bar commands have the same names as the ones in gregorian-init but are only distant relatives: rather than breaths, they are actually bar lines with the stencil changed. Which means they space themselves very nicely. The flipside of this is that if you have a phrase boundary where you don't want a bar line you *must* say \noBar. You also can't have any notes that aren't part of a \phrase or the bars get all out of sync. The lyrics you set just as usual, but the phrase translations you put in a \phraseLyrics (or \italPhraseLyrics) and just include each individual phrase in quotes. That part looks clean and is pretty cool. Also attached is a sample file that makes use of the main features. Here are the questions. First, the way that I aligned the phrase text was to make an invisible note that's exactly as long as the phrase, and make the phrase text the lyric for that note. That strikes me as horribly clunky, but I couldn't figure out any other way to peg the lyric to a length of time in a Voice. Is there a better way? Second, and related, if you compile that you'll notice a bajillion complaints about a weird minimum distance. That's because I falsed the stencil for the dummy note; if I let the dummy notes be visible, then all I get is a couple of clashing note columns. Why is that? Is there any way to make the errors go away? Third, and completely unrelated, I think, is that I tried simply removing the Stem_engraver, but that also made the program spit out a bunch of error messages ("programming error: no stem for note column") *and* it screws up the slurs so that they are touching the note heads, for some reason. So instead, I have to override the stem's stencil to be #f. But, shouldn't removing the stem engraver be the right thing to do here? Why would not having a stem cause the slurs to draw incorrectly, when they're not even touching where the stems would be? Actually, also a fourth question, though I suspect the answer is "you can't": I'd like the left edges of the Latin and the translations to be aligned. I tried adding a \once \override to the beginning of each phrase to make the first lyric left-aligned, but that made the music move into an awkward spacing... what I really want is just to move the phrase translation over to line up with the left edge of the first lyric (which would itself remain centred on its note). It seems unlikely, but is there any hope of that? -- -=-Don [EMAIL PROTECTED]<http://www.blahedo.org/>-=- _Quod erat demonstratum_: Latin for "I told you so." --The Java Handbook
\version "2.10.0" \include "english.ly" verse = { \set stanza = "℣." } %V/ response = { \set stanza = "℟." } %R/ join = { \set stanza = "❋" } %* noBar = { \once \override Staff.BarLine #'stencil = ##f } divisioMinima = { \once \override Staff.BarLine #'stencil = #ly:breathing-sign::divisio-minima \once \override Staff.BarLine #'Y-offset = #2 } divisioMaior = { \once \override Staff.BarLine #'stencil = #ly:breathing-sign::divisio-maior } divisioMaxima = { \once \override Staff.BarLine #'stencil = #ly:breathing-sign::divisio-maxima } finalis = { \once \override Staff.BarLine #'stencil = #ly:breathing-sign::finalis } phrase = #(define-music-function (parser location music) (ly:music?) (let* ((mus-len (ly:music-length music)) (dummy-notes #{ \notemode{ \relative c'' {c1} } #} )) (ly:music-compress dummy-notes mus-len) #{ #(set-time-signature (ly:moment-main-numerator $mus-len) (ly:moment-main-denominator $mus-len)) << \context Voice = "phrases" { \override NoteHead #'stencil = ##f \override Stem #'stencil = ##f $dummy-notes } { $music } >> #} )) phraseLyrics = #(define-music-function (parser location lyrics) (ly:music?) #{ \context Lyrics = "phraseLyrics" \lyricsto "phrases" \lyricmode { \override LyricText #'self-alignment-X = #-1 $lyrics } #}) italPhraseLyrics = #(define-music-function (parser location lyrics) (ly:music?) #{ \phraseLyrics \lyricmode { \override LyricText #'font-shape = #'italic \override LyricText #'font-size = #-0.5 $lyrics } #})
\midi { } \layout { indent = #0 \context { \Staff \remove "Time_signature_engraver" autoBeaming = ##f } \context { \Voice %\remove "Stem_engraver" } \context { \Score \remove "Bar_number_engraver" } }
\version "2.10.33" \include "plainchant-head.ly" \score { << \new Staff {<< \context Voice="mel" \relative c'' { \override Staff.Stem #'stencil = ##f \phrase { b4 b2( a2) } \divisioMinima \phrase { b4 b2( a2) } \divisioMinima \phrase { g4 a b b b b b b a b2 } \divisioMaxima \phrase { g4 a b b b b b a2 c4 b b a g2 } \divisioMaxima \phrase { g4 a b b b a b2 } \divisioMaxima \phrase { g4 a b b2 b4 b b a c b a b a g2 } \divisioMaxima \phrase { e4 g( a) a a b a( g) g2( a2) } \finalis } >>} \new Lyrics \lyricsto "mel" \lyricmode { Sanc -- tus, \join Sanc -- tus, Sanc -- tus Dó -- mi -- nus De -- us Sá -- ba -- oth. \break %XXX Ple -- ni sunt cæ -- li et ter -- ra gló -- ri -- a tu -- a. Ho -- sán -- na in ex -- cél -- sis. %\break %XXX Be -- ne -- díc -- tus qui ve -- nit in nó -- mi -- ne Dó -- mi -- ni. %\break %XXX Ho -- sán -- na in ex -- cél -- sis.__ } \italPhraseLyrics \lyricmode { "Holy," "Holy," "Holy Lord God of hosts." "Heaven and earth are full of your glory." "Hosanna in the highest." "Blessed [is] He that comes in the name of the Lord." "Hosanna in the highest." } >> \include "plainchant-foot.ly" }
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user