# Publishing a package for song lyrics overhead projection

16 views

### Tanguy Ortolo

Sep 22, 2022, 10:07:25 AM (9 days ago) Sep 22
to
Hello all,

I have written a package that provides a simple environment for
inserting song lyrics in a Beamer slideshow, meant for overhead
projection in a church service. It uses the verse environment from the
verse package for formating lyrics of songs with a verse, chorus, verse,
chorus… structure or a chorus, verse, chorus, verse, chorus… structure.

By the way, in the following, and in all the package and its doc, I use
the terms refrain and couplet rather than chorus and verse, which are
way too ambiguous.

The design goals were to provide a simple user interface and to produce
very simple slides with overlay, containing just text lyrics, with
nothing fancy that could add distraction.

To expand on the user interface, an example of use would be:

latex
\begin{frame}
\begin{song}{2}
\longest{Light she was, and like a fairy,}
\begin{couplet}
In a cavern, in a canyon, \\
Excavating for a mine. \\
Dwelt a miner, forty-niner, \\
And his daughter, Clementine. \\
\end{couplet}
\begin{refrain}
Oh my darling, oh my darling, \\
Oh my darling Clementine, \\
You are lost and gone forever, \\
Dreadful sorry, Clementine. \\
\end{refrain}
\begin{couplet}
Light she was, and like a fairy, \\
And her shoes were number nine, \\
Herring boxes, without topses, \\
Sandals were for Clementine. \\
\end{couplet}
\begin{couplet}
[…]
\end{couplet}
\end{song}
\end{frame}


That would result in a frame initially showing the first couplet and the
refrain, with an overlay showing the second couplet instead (and still
the refrain), and so on.

The implementation is available at
<https://git.ortolo.eu/songproj.git/tree>.

As you may see, I have made use of LaTeX3 syntax and programming
interface, which I found very useful, far less guru-style than raw TeX
constructs.

I now have a couple of questions before publishing this to CTAN :
* Would there be a better name than "songproj"? Perhaps songbeam?
* Since the song environment my package defines is only usable in a
Beamer frame, perhaps it should be a class rather than a package?
* Does my use of globally set variables feel very wrong?

Of course, any constructive remark or advise would be welcome, even
outside of these questions. :-)

--
Tanguy

### Axel Berger

Sep 22, 2022, 10:41:45 AM (9 days ago) Sep 22
to
Tanguy Ortolo wrote:
> * Since the song environment my package defines is only usable in a
> Beamer frame, perhaps it should be a class rather than a package?

No, beamer is the class and imho it should stay such unless there are
very big and very general changes. You ought to call your package a
theme, not a style, and adhere to the very slightly different form if
you can. If you find that too difficult, as I do, never mind.

--
/¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067
\ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069
X in | D-50829 Köln-Ossendorf http://berger-odenthal.de
/ \ Mail | -- No unannounced, large, binary attachments, please! --

### Peter Flynn

Sep 22, 2022, 6:38:41 PM (9 days ago) Sep 22
to
On 22/09/2022 16:07, Tanguy Ortolo wrote:

[...very interesting...]

> By the way, in the following, and in all the package and its doc, I use
> the terms refrain and couplet rather than chorus and verse, which are
> way too ambiguous.

Except that a couplet is a very specific verse form of two lines only,
so you may encounter misunderstandings from users.

I'm curious as to what the ambiguity is in verse and chorus?

In some churches it would be verse and refrain, but very few hymns have
refrains, so they'd have to be optional. But some do have a doxology,
which is like a refrain but occurs once only, after the last verse.

Peter

### Tanguy Ortolo

Sep 23, 2022, 4:13:41 AM (9 days ago) Sep 23
to
Peter Flynn, 2022-09-23 00:38+0200:
> On 22/09/2022 16:07, Tanguy Ortolo wrote:
>> By the way, in the following, and in all the package and its doc, I use
>> the terms refrain and couplet rather than chorus and verse, which are
>> way too ambiguous.
>
> Except that a couplet is a very specific verse form of two lines only,
> so you may encounter misunderstandings from users.
>
> I'm curious as to what the ambiguity is in verse and chorus?

Well, in the context of poetry, “verse” can mean:
- poetry (as in \usepackage{verse}, \begin{verse}\end{verse});
- a group of lines in a poem or song;
- a group of lines in a song that is not the chorus;
- a single line in a poem, song or psalm.

So, a song is a form of verse, that contains groups of verses that
constitute verses, one of which is repeated and is named the chorus, and
the other verses are named the verses. Does that sound ambiguous enough?
:-D

Anyway, I cannot define a verse environment because this is already
defined by the verse package which I am using. I chose to keep the word
we use in French, « couplet », which has the advantage of having a
single meaning. Unfortunately, as you pointed out, it has a different
meaning in English, so I will have to explain it better.

Another possibility would be to use “stanza”, but this is ambiguous as
well, as it can also mean a group of lines in a poem or song, so the
chorus is also a stanza!

As for “chorus”, it has far less meanings so I could use that term. In
fact, it looks like it only has the expected meaning in the context of a
song and would therefore carry no ambiguity.

> In some churches it would be verse and refrain, but very few hymns have
> refrains, so they'd have to be optional. But some do have a doxology,
> which is like a refrain but occurs once only, after the last verse.

Well, most songs we use in French catholic churches have are constituted
of a verses of ~4 verses (aaaargh, verses of verses, what is the proper
way to say that in English?), alternating with a chorus of ~4 verses as
well. This is a structure similar to that of /Oh my darling Clementing/
which I used as an example (of course we do not sing that during the
Mass! :-D ).

Psalms are used with an antiphon, that is either read or sung before the
psalm, or used between each stanza, since their verses have been grouped
in stanzas for singing them. In that case, they follow the same
alternating structure as a song.

Songs and prayers that are part of the ordinary of the Mass have a
different structure indeed, but they are specific enough, and often
reused so it felt good enough to just write regular Beamer markup. For
instance, we are often using songs of an ordinary named « Messe de Saint
Jean », or the « Messe de la Trinité », or a couple of other ones. That
would not be too difficult to markup once and for all.

Thanks for the explanation of English terms!

--
Tanguy

### Tanguy Ortolo

Sep 23, 2022, 4:15:14 AM (9 days ago) Sep 23
to
Axel Berger, 2022-09-22 16:43+0200:
> Tanguy Ortolo wrote:
>> * Since the song environment my package defines is only usable in a
>> Beamer frame, perhaps it should be a class rather than a package?
>
> No, beamer is the class and imho it should stay such unless there are
> very big and very general changes.

I thought so, thanks for confirming my impression.

> You ought to call your package a theme, not a style, and adhere to the
> very slightly different form if you can. If you find that too
> difficult, as I do, never mind.

Looking at the Beamer manual, this does not seem to fit the role of any
kind of theme, so I will probably keep it a regular package.

Thanks!

--
Tanguy

### jfh

Sep 23, 2022, 5:44:27 AM (9 days ago) Sep 23
to
"verses of ~4 verses " would usually be written in English as "verses of ~4 lines". I have heard Protestant clergy say when we were about to sing a hymn "Omit verse 4" if wanting us to sing verses 1,2,3,5, ... English-speaking Catholic clergy might well do the same but I do not speak from experience there.

### Tanguy Ortolo

Sep 23, 2022, 6:35:31 AM (9 days ago) Sep 23
to
jfh, 2022-09-23 11:44+0200:
> "verses of ~4 verses " would usually be written in English as "verses
> of ~4 lines". I have heard Protestant clergy say when we were about
> to sing a hymn "Omit verse 4" if wanting us to sing verses 1,2,3,5,...
> English-speaking Catholic clergy might well do the same but I do not
> speak from experience there.

Probably the same. Now, it things would be different if it was for a
psalm, where I think verse would have the meaning it has for biblical
text, therefore a line. I suppose a group of verses (lines) would be
refered to as a stanza.

Anyway, you can see the ambiguity, that is quite scary when you had no
such ambiguity in your native language, and you discover that in
English.

I think I will update my package to use the terms “chorus” and “stanza”.
After all, if I provide an environment for a chorus, it should be
undestandable that the stanza environment is for stanzas that are not
choruses.

What is annoying is that I have a notion of the number of stanzas per
slide, where stanza means any group of lines, chorus or regular stanza.
This is very confusing, maybe I should describe it as the number of
paragraphs per slide, even though it is a technically improper term?

This is to allow the presenter to show either:
- the chorus and current stanza at the same time;
- or, if that does not fit in a slide, the chorus, then a stanza, then
the chorus again, and so on.

I am planning to code the possibility to also show 4 whatever stanzas
per slide as well. Not 3, because I do not see any way to do that
in a smooth way.

--
Tanguy

### Axel Berger

Sep 23, 2022, 7:20:32 AM (9 days ago) Sep 23
to
Peter Flynn wrote:
> I'm curious as to what the ambiguity is in verse and chorus?

That one's easy. A verse can be (and mostly is) a single line or it is
what's "Strophe" in German.

A chorus is large'ish group of performers, i.e. alternating between
solist and chorus. It's often used synonymously to refrain.

### Holger Schieferdecker

Sep 26, 2022, 4:00:24 AM (6 days ago) Sep 26
to
Am 23.09.2022 um 10:13 schrieb Tanguy Ortolo:
> Anyway, I cannot define a verse environment because this is already
> defined by the verse package which I am using. I chose to keep the word
> we use in French, « couplet », which has the advantage of having a
> single meaning. Unfortunately, as you pointed out, it has a different
> meaning in English, so I will have to explain it better.

I didn't follow the whole discussion. But if you think "verse" would be
the best name for the environment you could use a prefixed variant like
"toverse" (using your initials). Or you use a prefix derived from the
package name.

I don't know the general attitude of users concerning prefixes.
Sometimes I have seen it for very common names of commands.

Holger

### Tanguy Ortolo

Sep 26, 2022, 10:25:21 AM (5 days ago) Sep 26
to
Thanks you all for your comments, I will finish my work on that package,
and after I have tested and used it for good during a service, I will
call it a v1.0.0 and publish it to CTAN.

--
Tanguy

### Peter Flynn

Sep 26, 2022, 10:39:07 AM (5 days ago) Sep 26
to
On 23/09/2022 10:44, jfh wrote:
> On Friday, September 23, 2022 at 8:13:41 PM UTC+12, Tanguy Ortolo wrote:
>> Peter Flynn, 2022-09-23 00:38+0200:
>>> I'm curious as to what the ambiguity is in verse and chorus?
>> Well, in the context of poetry, “verse” can mean:
>> - poetry (as in \usepackage{verse}, \begin{verse}\end{verse});
>> - a group of lines in a poem or song;
>> - a group of lines in a song that is not the chorus;
>> - a single line in a poem, song or psalm.

Thank you, that's very useful. But in the context of hymns, which I
think is what the thread started with, it's just #3, a group of lines
that is not the refrain (chorus); or in some environments where refrains
are very rare, #2, a group of lines. In the context of psalms, it's
predefined by the numbering of the verses, which is largely fixed.

>> So, a song is a form of verse, that contains groups of verses that
>> constitute verses, one of which is repeated and is named the chorus, and
>> the other verses are named the verses. Does that sound ambiguous enough?

Sounds pretty clear.

>> Anyway, I cannot define a verse environment because this is
>> already defined by the verse package which I am using.

Is there some condition that makes it different to use that definition?

>> Another possibility would be to use “stanza”, but this is ambiguous
>> as well, as it can also mean a group of lines in a poem or song, so
>> the chorus is also a stanza!

That is also the secular term, and probably out of scope.

>>> In some churches it would be verse and refrain,
>> Well, most songs we use in French catholic churches have are constituted
>> of a verses of ~4 verses (aaaargh, verses of verses, what is the proper
>> way to say that in English?),

Verses of four lines. I think this is common in lots of places.

>> alternating with a chorus of ~4 verses

Yep, lines.

>> well. This is a structure similar to that of /Oh my darling Clementing/
>> which I used as an example (of course we do not sing that during the
>> Mass! :-D ).

:-) The only hymn structures I have come across are:

1. sequence of verses
2. sequence of recurring {verse, refrain}...
3. sequence of verses plus doxology at the end
4. a "sandwich" of #1 + #2 + #1, where the tune changes for #2
5. one of the above preceded by an introit, very rare

But the structure of a verse is hugely varied. Four lines is common, but
many have six or eight, and some exist with three or five or seven; and
the meter is, like poetry, also very varied. English-language hymn books
often have a notation at the start giving the meter, and an index of
meters at the end so that you can find other tunes that will fit the
same words.

>> Psalms are used with an antiphon,

This is a very popular form in many churches since Fr Gelineau, and was
adopted in the post-Vatican II changes.

>> Songs and prayers that are part of the ordinary of the Mass have a
>> different structure indeed, but they are specific enough, and often
>> reused so it felt good enough to just write regular Beamer markup.

I think there are copies of the Ordinary available for download in LaTeX
(at least, I thought I saw them somewhere, along with the notation for
Liber Usualis).

> I have heard Protestant clergy say when we were about to sing a hymn
> "Omit verse 4" if wanting us to sing verses 1,2,3,5, ...

That is quite common, especially as many hymns run to 10 or 12 verses or
even more. Also the other way round, as in "We'll sing verses 1, 2, and
6". Choirs are well used to this, and familiar with the patterns,

> English-speaking Catholic clergy might well do the same but I do not
> speak from experience there.

It's much rarer because hymn-singing in the Anglican fashion is less
common in Catholic churches, where hymn books are not often provided.

Peter

### Tanguy Ortolo

Sep 27, 2022, 4:59:13 AM (5 days ago) Sep 27
to
Peter Flynn, 2022-09-26 16:38+0200:
>> On Friday, September 23, 2022 at 8:13:41 PM UTC+12, Tanguy Ortolo wrote:
>>> Anyway, I cannot define a verse environment because this is
>>> already defined by the verse package which I am using.
>
> Is there some condition that makes it different to use that definition?

I do not understand your question, I am afraid. I was juste stating that
I cannot befine a verse environment, because there is already a verse
environment, provided by the verse package I am using to implement all
this.

So, as Holger suggested, I could define something like a songverse
or spverse environment. But not a verse environment.

>>> Another possibility would be to use “stanza”, but this is ambiguous
>>> as well, as it can also mean a group of lines in a poem or song, so
>>> the chorus is also a stanza!
>
> That is also the secular term, and probably out of scope.

I will still be using it anyway, in the documentation: my song
environment has one mandatory argument, that indicates the number of
stanzas (incl. verse and chorus) to display on each slide. For instance,
when asked to show two stanzas, if the song has a chorus and starts with
it, it will show the chorus and the first verse on a slide, then the
chorus and the second verse, and so on. With the same instruction, if
the song only has verses but no chorus, it will show the first two
verses on a slide, then the two next ones, and so on.

> :-) The only hymn structures I have come across are:
>
> 1. sequence of verses
> 2. sequence of recurring {verse, refrain}...

Possibly starting with the chorus.

> 3. sequence of verses plus doxology at the end

Then I probably need to support that as well. Even if it is not that
useful in my local church, it would be useful to others. I will probably
not name it a doxology though, because a final group of lines could be
used for something that is technically not a doxology, where it would
feel weird to write it into such an environment.

Would the term “final” be understandable enough?

> 4. a "sandwich" of #1 + #2 + #1, where the tune changes for #2

Could you expand on that?

> 5. one of the above preceded by an introit, very rare

Similar to a doxology, but at the beginning rather than the end. That
would be a nice thing to implement as well. Would the term “intro” be
suitable enough?

>>> Psalms are used with an antiphon,
>
> This is a very popular form in many churches since Fr Gelineau, and was
> adopted in the post-Vatican II changes.

Thanks for the information. The good thing is that, when the antiphon is
repeated between stanzas, it fits into the chorus + verse structure. And
when it is not, it fits into the introit + verses (+ doxology).

>> English-speaking Catholic clergy might well do the same but I do not
>> speak from experience there.
>
> It's much rarer because hymn-singing in the Anglican fashion is less
> common in Catholic churches, where hymn books are not often provided.

Well in any case, the point of projecting lyrics is not to rely on books
or sheets of paper. So, the instruction to include only verses x, y and
z is for the presenter, and therefore, something I implement in my song
environment. :-)

One thing that would be cool, but that I really no not feel like
implementing, would be to support verse index specifications such as:
-3,5,7-8,10- that would expand to 1,2,3,5,7,8,10,11… (to the end of the
song, as you pronably guessed). Like page selectors in printing
software.

Or maybe I will implement it, just for fun. LaTeX3 interfaces are a nice
thing to play with. :-)

--
Tanguy

### Peter Flynn

Sep 27, 2022, 5:07:37 PM (4 days ago) Sep 27
to
On 27/09/2022 10:59, Tanguy Ortolo wrote:
> Peter Flynn, 2022-09-26 16:38+0200:
>>> On Friday, September 23, 2022 at 8:13:41 PM UTC+12, Tanguy Ortolo wrote:
>>>> Anyway, I cannot define a verse environment because this is
>>>> already defined by the verse package which I am using.
>>
>> Is there some condition that makes it different to use that definition?
>
> I do not understand your question, I am afraid.

Sorry, my fault. I phrased it badly. I just wondered why you needed to
define a new environment...but you have answered that here, thank you.

> I will still be using it anyway, in the documentation: my song
> environment has one mandatory argument, that indicates the number of
> stanzas (incl. verse and chorus) to display on each slide.
[...]
> Possibly starting with the chorus.

That's true, I had forgotten those.

> Would the term “final” be understandable enough?

Sure.

>> 4. a "sandwich" of #1 + #2 + #1, where the tune changes for #2
> Could you expand on that?
A set of verses in one form (lines, meter)
Followed by a set of verses in a different form
Followed by a set of verses in the first form.

An well-known Anglican example is CF Alexander's translation of St
Patrick's hymn usually indexed as "I bind unto myself today", eg English
Hymnal #212.
> Similar to a doxology, but at the beginning rather than the end. That
> would be a nice thing to implement as well. Would the term “intro” be
> suitable enough?

Sounds good.

> Thanks for the information. The good thing is that, when the antiphon is
> repeated between stanzas, it fits into the chorus + verse structure. And
> when it is not, it fits into the introit + verses (+ doxology).

Very good point. But there is a whole world of metrical psalms out there
in the Protestant churches, who developed them into hymn structure.

> Well in any case, the point of projecting lyrics is not to rely on books
> or sheets of paper.

Yep. Independence from the printed edition is something which priests
have often sought, not always, alas, on valid doctrinal or theological
grounds.

> Or maybe I will implement it, just for fun. LaTeX3 interfaces are a nice
> thing to play with.

Comma-separated selectors work in xkeyval, don't they?

Peter

### Tanguy Ortolo

Sep 28, 2022, 3:57:27 AM (4 days ago) Sep 28
to
Peter Flynn, 2022-09-27 23:07+0200:
>>> 4. a "sandwich" of #1 + #2 + #1, where the tune changes for #2
>> Could you expand on that?
> A set of verses in one form (lines, meter)
> Followed by a set of verses in a different form
> Followed by a set of verses in the first form.
>
> An well-known Anglican example is CF Alexander's translation of St
> Patrick's hymn usually indexed as "I bind unto myself today", eg English
> Hymnal #212.

Thank you. For what I could see, it has one first stanza, then a couple
of longer stanzas that have the same melody, then a specific stanza with
a different melody, and finally a couple of stanzas with the main
melody. If I was to display it, I think I would simply show one stanza
at a time.

I do not see another relevant way to format such lyrics into a
slideshow, and I would tend to think that, lyrically speaking (the
melody is something else, but it is not my point to display the score),
such songs can be considered as following a simple verse + verse + verse
+ verse… structure.

Although, maybe I could define an environment for marking a verse as
“special”, so it would be formated differently. The exact formating, or
formating options of “special” stanzas, such as intro, chorus, special
verse or final, is something I need to work on. There are multiple
possibilities, such as \emph or Beamer's \structure.

>> Thanks for the information. The good thing is that, when the antiphon is
>> repeated between stanzas, it fits into the chorus + verse structure. And
>> when it is not, it fits into the introit + verses (+ doxology).
>
> Very good point. But there is a whole world of metrical psalms out there
> in the Protestant churches, who developed them into hymn structure.

So what would be a hymn structure? I thought that meant alternating verse and
chorus, but I am not too sure now. :-)

>> Well in any case, the point of projecting lyrics is not to rely on books
>> or sheets of paper.
>
> Yep. Independence from the printed edition is something which priests
> have often sought, not always, alas, on valid doctrinal or theological
> grounds.

That said, I may want to include an option to show verse numbers. They
can be useful for people that want to remember what they sing. And also
for the person that leads the song, as they are following the song using
printed lyrics or score.

--
Tanguy