Jan Warchol wrote "I don't know how it could be done, and i strongly
recommend not doing
this. Separating different types of content is in my opinion very
beneficial"

I agree that separating content is useful.  As you point out, it allows one
to easily recombine it in various formats.  It's just that I prefer to have
the computer do the work whenever possible.  Let me see if I can clarify
what I mean by that.

Conceptually, I could write a preprocessor that would use special comment
prefixes '%!T' and '%!!T' to take input like

%!T  These are lyr- rics
%!!T do8  re mi fa

%!T  and a few more.
%!!T sol la ti do

and output the music and the lyrics in separate variable assignments

\tenormelody = \relative do { do8 re mi fa sol la ti do }
\tenorlyric   =  \lyricmode  { These are ly-rics and a few more }

and then use these in your template, right?  I can code that up in Python in
a heartbeat, but it's an unappealing solution for obvious reasons.   Hence
the query about how to do it with LilyPond and Scheme.

Cheers,
Mike


On Wed, Dec 15, 2010 at 1:52 AM, Jan Warchoł <
lemniskata.bernoulli...@gmail.com> wrote:

> Hi,
>
> 2010/12/14 Michael Ellis <michael.f.el...@gmail.com>:
> > Is there a clean way to enter a phrase followed by the corresponding
> notes
> > in a \relative block?  The example given in the docs,
> >
> > {
> >   \time 3/4
> >   \relative c' { c2 e4 g2. }
> >   \addlyrics { play the game }
> > }
> >
> > is fine for a small example, but it gets messy for longer music.   I do a
> > lot of transcribing choral parts out of printed scores and would like to
> be
> > able to keep the lyrics together with the music in chunks of a few bars
>
> I don't know how it could be done, and i strongly recommend not doing
> this. Separating different types of content is in my opinion very
> beneficial, for example i use the following template for choral music
> and i find it very logically structured, clear to read and easy to
> maintain (for example i can easily change an existing piece to be
> written on two staves instead of four just by changing structure in
> "choir" block):
>
> \version "2.12.3"
> \pointAndClickOff
> \header {
>        title = ""
>        subtitle = ""
>        poet = "słowa: "
>        composer = "muzyka: "
>        arranger = "opracowanie: "
> }
> global = {
>        \autoBeamOff
>        \key
>        \time
> }
> scoretempomarker = {
>        \tempo
>        \set Score.tempoHideNote = ##t
> }
> %--------------------------------MUSIC--------------------------------
> sopranomelody = \relative c'' {
>
>        \bar "|."
> }
> altomelody = \relative f' {
>
>        \bar "|."
> }
> tenormelody = \relative c' {
>
>        \bar "|."
> }
> bassmelody = \relative f {
>
>        \bar "|."
> }
> akordy = \chordmode {
>
> }
> %--------------------------------LYRICS--------------------------------
> sopranotext =  \lyricmode { \set stanza = "1. "
>
> }
> altotext =  \lyricmode { \set stanza = "1. "
>
> }
> tenortext =  \lyricmode { \set stanza = "1. "
>
> }
> basstext =  \lyricmode { \set stanza = "1. "
>
> }
> stanzas = \markup {
> }
> %--------------------------------THE BIG STRUCTURE
> VARIABLE--------------------------------
>
> choirpart = {
>        \new ChoirStaff <<
>                \scoretempomarker
>                \new ChordNames { \germanChords \akordy }
>                \new Staff = soprano {
>                        \clef treble
>                        \set Staff.instrumentName = "S "
>                        \set Staff.shortInstrumentName = "S "
>                        \new Voice = soprano {
>                                \global
>                                \set Voice.midiInstrument = "clarinet"
>                                \sopranomelody
>                        }
>                }
>                \new Lyrics = sopranolyrics \lyricsto soprano \sopranotext
>
>                \new Staff = alto {
>                        \clef treble
>                        \set Staff.instrumentName = "A "
>                        \set Staff.shortInstrumentName = "A "
>                        \new Voice = alto {
>                                \global
>                                \set Voice.midiInstrument = "english horn"
>                                \altomelody
>                        }
>                }
>                \new Lyrics = altolyrics \lyricsto alto \altotext
>
>                \new Staff = tenor {
>                        \clef "treble_8"
>                        \set Staff.instrumentName = "T "
>                        \set Staff.shortInstrumentName = "T "
>                        \new Voice = tenor {
>                                \global
>                                \set Voice.midiInstrument = "english horn"
>                                \tenormelody
>                        }
>                }
>                \new Lyrics = tenorlyrics \lyricsto tenor \tenortext
>
>                \new Staff = bass {
>                        \clef bass
>                        \set Staff.instrumentName = "B "
>                        \set Staff.shortInstrumentName = "B "
>                        \new Voice = bass {
>                                \global
>                                \set Voice.midiInstrument = "clarinet"
>                                \bassmelody
>                        }
>                }
>                \new Lyrics = basslyrics \lyricsto bass \basstext
>        >>
> }
>
> %---------------------------------MIDI---------------------------------
> \score {
>        \unfoldRepeats \choir
>        \midi {
>                \context {
>                        \Staff \remove "Staff_performer"
>                }
>                \context {
>                        \Voice
>                                \consists "Staff_performer"
>                                \remove "Dynamic_performer"
>                }
>        }
> }
>
> %--------------------------------LAYOUT--------------------------------
> \score {
>        \choir
>        \layout {
>                indent = 0\cm
>                \context {
>                        \Staff \consists "Ambitus_engraver"
>                }
>        }
> }
>
> \stanzas
>
> (if anyone wants to use this template, feel free to do it).
>
> cheers,
> Janek
>
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to