gregorio
gregorio copied to clipboard
Multiple lines of text
This long-awaited feature will add the possibility for users to associate multiple lines of text (with all their syllables aligned) with one line of notes.
It would contain the following features:
- possibility to have syllables centered, left-aligned or right-aligned (different for each syllable)
- possibility to insert small horizontal lines between text lines
- as many text lines as user wants
- possibility of line numbering
- possibility of curly brace at the end of the lines
- possibility of vertical rules between syllables
This is quite a lot of work...
How do you see this notated in gabc?
good question... I guess the two different approaches would be
ma(e)gni(gh)fi(h)cat(h) (h) (hr) (hr) (hr) [sync1,leftline]spi(hg)
& line: nonumber, aligned:left,
Et[l] ex[l]sultavit spi[sync1]
and
ma[1:Et,2:Qui](e)gni[1:ex,2:a](gh)ficat[1:sultavit,2:respexit](h) (h) (h) (hr) (hr) (hr) spi[1:an,2:ma](hg)
it's just to show the global idea: one line per line, or just one line... We should also take a look at how Lilypond and ABC handle this.
In any case, that's not something to focus on now, it's for when there will be less urgent priorities...
Lilypond has two ways of generating lyrics.
- You specify durations for each syllable and Lilypond placed them according to those durations.
- You tell Lilypond that the lyrics go according to a specific voice. Lilypond then matches up each syllable to a note in the voice.
Either can be used to provide multiple lyrics, which can be placed at any point in the score, even separated.
I think putting the text inline (the second of your suggestions) makes it pretty difficult to read (it's already a little unwieldy when styling), so I'm more inclined to the former, only I might simplify it a bit:
Et# ex#sultavit spi#
You would skip a syllable with ##
, etc.
I would also suggest having as much configuration (i.e., nonumber) as possible in TeX. I like the idea of the square brackets in the first line of text. Things like alignment can go there too.
ABC handles lyrics with the w:
and W:
tags. The w:
tag places lyrics under the staves and you use special characters like ~
, -
, *
, and _
to control how it places syllables. The W:
tag simply dumps lyrcs at the bottom of the score with no need for spacing syllables.
Indeed, at first I thought that many configurations should go in gabc, but when I see the difficulty I had to make this post above with the example, that will be simply too complex to parse... so indeed, TeX configuration is best.
Will this feature shortly available?
I think it's safe to say no.
Another example (from #707 ):
On the notation front, I think it may be easier to adapt the gly notation that @igneus just announced to this than our current gabc notation. We might, therefore, want to consider incorporating that notation into the base program as an interim step.
Of course, I'm not likely the one taking on that project, so feel free to ignore me if you so choose.
Another example:
The direction it's taking is not to involve Gregorio too much in this but give users LaTeX templates they can use, the only thing Gregorio might do is writing the sizes of the different areas to the aux file, but more on this later....
How about separating each part with |
so that you might write vi|De(g)ta|us(h)
to get
vi- ta
De- us
If I wanted to play around with the generation, where in the code should I start to explore? @rpspringuel
What do you mean by "the generation"? There's three representations and two translations steps involved here. The representations are:
- gabc syntax
- gtex syntax
- printed score
1 is translated into 2 by the command line tool, whose source is in src
2 is translated into 3 by the TeX code in the files in tex. Of particular import here is \GreSyllable
.
I think I mean 1 -> 2
because I figure that is where the location of the lyrics is placed. I am thinking of tinkering around to see how to output a satisfactory multi-lyric score by hand and then work backwards
Again, depends on what you mean by "the location of the lyrics is placed":
The association of the lyrics syllable with a particular set of notes happens in 1.
The translation of 1 to 2 involves the identification of the vowel of the syllable so that the syllable can be divided into three parts: first (everything before the vowel), middle (the vowel), and end (everything after the vowel). Also involved here is the identification of the necessary neumes needed to represent the given sequence of notes.
2 has to represent the results of the previous translation
The translation from 2 to 3 uses the information given to determine the actual location of the text and notes on the page. This is the step that actually "places" things on the page, but it's only possible because of the information provided by the steps further up the chain. For instance, given default alignment rules, the text alignment point is the middle of the vowel in the syllable while the notes alignment point is the middle of the first neume. Both of these pieces of information were determined in the translation from 1 to 2.
So does the current # 2 representation not have any notion of multiple syllables per neume? I guess another question would be if the translation from 2->3 assumes only one syllable per neume as well.
Currently there is no concept of multiple syllables (vertically) per neume in any representation and all translation steps assume that.
Here's and example of the current representations:
name: test;
%%
(c4) vi(g)ta(h)
Fairly simple, just a clef, and a single word of two syllables. This is translated by the command-line tool into:
% File generated by gregorio 5.2.0
\GregorioTeXAPIVersion{5.2.0}%
% Name: test
\GreBeginHeaders %
\GreHeader{name}{test}%
\GreEndHeaders %
\GreBeginScore{904af4e195a4e665cfe4bee29e9565b6b00bce56}{10}{9}{0}{0}{}{4}{\GreInitialClefPosition{4}{0}}%
\GreSetLargestClef{c}{4}{3}{c}{0}{3}%
\GreScoreOpening{%
}{%
\GreSetInitialClef{c}{4}{3}{c}{0}{3}{1}%
}{%
}{\GreSyllable}{\GreSetFirstSyllableText{v}{i}{}{{}{\GreFirstWord{\GreFirstSyllable{\GreFirstSyllableInitial{i}}}}{}}{{\GreFirstWord{\GreFirstSyllable{\GreFirstSyllableInitial{v}}}}{\GreFirstWord{\GreFirstSyllable{i}}}{}}{}}{}{\GreFirstWord}{0}{\GreSetNextSyllable{\GreFirstWord{t}}{\GreFirstWord{a}}{}{\GreFirstWord{t}}{\GreFirstWord{a}}}{}{0}{}{%
\GreSyllableNoteCount{1}%
\GreGlyph{\GreCPPunctum}{9}{\GreNextCustos{10}{}}{0}%
{%
\GreGlyphHeights{9}{9}%
}{}{}%
}%
\GreSyllable{\GreSetThisSyllable{\GreFirstWord{t}}{\GreFirstWord{a}}{}{\GreFirstWord{t}}{\GreFirstWord{a}}}{}{\GreFirstWord}{1}{\GreSetNextSyllable{}{}{}{}{}\GreLastOfLine}{}{16}{}{%
\GreSyllableNoteCount{1}%
\GreLastOfScore\GreGlyph{\GreCPPunctum}{10}{\GreNextCustos{9}{}}{0}%
{%
\GreGlyphHeights{10}{10}%
}{}{}%
}%
%
\GreEndScore %
\endinput %
Which the TeX makes look like this: