gregorio icon indicating copy to clipboard operation
gregorio copied to clipboard

Multiple lines of text

Open eroux opened this issue 9 years ago • 18 comments

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

example-lilypond

multiplelineswithrules

This is quite a lot of work...

eroux avatar May 06 '15 07:05 eroux

How do you see this notated in gabc?

henryso avatar May 06 '15 12:05 henryso

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...

eroux avatar May 06 '15 12:05 eroux

Lilypond has two ways of generating lyrics.

  1. You specify durations for each syllable and Lilypond placed them according to those durations.
  2. 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.

henryso avatar May 06 '15 13:05 henryso

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.

henryso avatar May 06 '15 13:05 henryso

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.

eroux avatar May 06 '15 13:05 eroux

Will this feature shortly available?

kbartek7 avatar Nov 18 '15 23:11 kbartek7

I think it's safe to say no.

henryso avatar Nov 18 '15 23:11 henryso

Another example (from #707 ): Antiphonale Monasticum p.1222

eroux avatar Dec 13 '15 17:12 eroux

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.

rpspringuel avatar Dec 17 '15 21:12 rpspringuel

Another example:

ferretti001

eroux avatar Jan 07 '16 08:01 eroux

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....

eroux avatar Jan 07 '16 08:01 eroux

How about separating each part with | so that you might write vi|De(g)ta|us(h) to get

vi-  ta
De-  us

Nokel81 avatar Jul 10 '19 01:07 Nokel81

If I wanted to play around with the generation, where in the code should I start to explore? @rpspringuel

Nokel81 avatar Jul 16 '19 15:07 Nokel81

What do you mean by "the generation"? There's three representations and two translations steps involved here. The representations are:

  1. gabc syntax
  2. gtex syntax
  3. 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.

rpspringuel avatar Jul 16 '19 18:07 rpspringuel

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

Nokel81 avatar Jul 16 '19 18:07 Nokel81

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.

rpspringuel avatar Jul 16 '19 18:07 rpspringuel

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.

Nokel81 avatar Jul 16 '19 18:07 Nokel81

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:

Main.pdf

rpspringuel avatar Jul 16 '19 18:07 rpspringuel