I did some experiments and it turns out that most of the
features people have requested for figured bass is actually
supported in Lilypond if you use a lyrics line. 

Take a look at the following example. It illustrates how 
the figures can be typeset using both text scripts and 
lyric lines. Some things to note:

- There's a bug in the script handling, ^"ABC"^"DEF" 
  collapses into a single line. I tried with 1.3.57 which
  worked fine.

- You could (in principle) have <5 6> in a lyrics line,
  but you have to add some clumsy details to get the 
  context handling correct.

- The syntax is very clumsy with all the quotation marks.
  However I don't see a way around that even if we implement
  more specific support for figured bass, since we need to 
  separate the figures from the durations.

- Another disadvantage of using lyric lines is that it's
  much easier to get lost in the input file when entering
  and correcting the figures.

- I didn't use \addlyrics since only a fraction of the notes
  have figures and some notes have 

>8>8>8>8>8>8>8>8>8>8 figuredbass.ly 8<8<8<8<8<8<8<8<8<8<8<8<8<
\header{
title =  "Extract from Rosenkranzsonata II";
composer =         "Heinrich Ignaz Franz Biber";
enteredby =         "Mats Bengtsson";
copyright =          "Public Domain ";
subtitle = "Mary's Visit to Elizabeth";
%latexheaders = "tuning.tex";
}

\version "1.3.77";

BCwithfigures = \notes\relative c {
\clef "bass";
\time 2/2;
\key a \major;

a4. b8 cis d e4 |
cis_"6" gis a a' |
fis_"6" cis d a8 gis |
fis2_"7 6" e_"\\textsharp \ 4"_"7 6" |
e'_"4 \\textsharp" cis4_"6" gis |
a b cis2 |
d4 a'8 gis fis2_"7 6" |
e_"\\textsharp \ 4 \\textsharp"_"7 6 5" fis_"\\textsharp 6" |
e4. fis8 gis a b4_"\\textsharp" |
gis_"6" dis e e'8 d |
cis4_"6" gis a d |
gis,_"5"_"6" a fis_"6" e |
d8 cis b4_"6" a4. cis8 |
d4. d,8 e4 e' |
cis_"6" fis e2_"4 \\textsharp" |
a,1^\fermata |
}

BC = \notes\relative c {
\clef "bass";
\time 2/2;
\key a \major;

a4. b8 cis d e4 |
cis gis a a' |
fis cis d a8 gis |
fis2 e |
e' cis4 gis |
a b cis2 |
d4 a'8 gis fis2 |
e fis |
e4. fis8 gis a b4 |
gis dis e e'8 d |
cis4 gis a d |
gis, a fis e |
d8 cis b4 a4. cis8 |
d4. d,8 e4 e' |
cis fis e2 |
a,1^\fermata |
}

figures = \lyrics{
\time 2/2;

_1 | "6" |
"6" | "7"4 "6" < { "7" "6" } \context Lyrics = fII { "\\textsharp" "4"
} > |
"4" "\\textsharp" "6"2 | _1 | 
_2 "7"4 "6" |  
<{ "7" "6"8 "5" }
   \context Lyrics = fII { "\\textsharp"4 "4"8 "\\textsharp" }  > 
   "5"4 "6" |
_2. "\\textsharp"4 | "6"1 |
"6" |  <{ "6"2 } \context Lyrics = fII { "5" } > "6" |
_4 "6"2. | _1 |
"6"2 "4"4 "\\textsharp" | _1
}

\score{
  \BCwithfigures
  \header{
    piece = "Figures as text scripts";
  }
}

\score{
  <\context Staff = BC \BC
   \context Lyrics = figures \figures>
  \paper{
    \translator{\BarNumberingStaffContext
      timeSignatureStyle = "C";
      textScriptPadding = 6;
    }
  }
  \header{
    piece = "Figures as lyrics line";
  }
}
>8>8>8>8>8>8>8>8>8>8 end of figuredbass.ly 8<8<8<8<8<8<8<8<8<8<8<8<8<

Comments or suggestions?
Can someone come up with an input syntax for a future 
figured bass engraver that's much better than what's
offered today?


      /Mats

Reply via email to