Skip to content

Commit

Permalink
J.S. Bach: Die Kunst der Fuge (BWV1080) - automatic page number in th…
Browse files Browse the repository at this point in the history
…e index using \page-ref

Signed-off-by: Davide Madrisan <[email protected]>
  • Loading branch information
madrisan committed Sep 3, 2024
1 parent ea9fe34 commit 3224cdc
Show file tree
Hide file tree
Showing 24 changed files with 54 additions and 25 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed

- J.S. Bach: Das wohltemperierte Klavier – number of voices of the fugues as in Bach's manuscript
- J.S. Bach: Die Kunst der Fuge (BWV1080) - automatic page number in the index using \page-ref

## [v56] - 2024-09-01

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
\include "macros.ly"

\label #'BriefNotesContrapunctusXIV

\markup \fill-line {
\center-column \abs-fontsize #14 \bold \with-color #middleGrey {
\null
Expand Down
55 changes: 30 additions & 25 deletions src/johann-sebastian-bach/die-kunst-der-fuge-BWV1080/index.ly
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@
}
}

#(define-markup-command (indexItem layout props linkpage title page infos)
(number? string? string? string?)
#(define-markup-command (indexItem layout props title pagelabel infos)
(string? symbol? string?)
"Format a block of the index"
(interpret-markup layout props
#{ \markup \column \abs-fontsize #11 {
\override #'(line-width . 95)
\line {
\hspace #3.2
\page-link #linkpage { \fill-with-pattern #1 #RIGHT . #title #page }
\with-link #pagelabel {
\fill-with-pattern #1 #RIGHT . #title \page-ref #pagelabel "000" "?"
}
}
\pad-around #1
\line \abs-fontsize #8 \italic \with-color #middleGrey {
Expand All @@ -29,7 +31,7 @@
\line {
\hspace #3.2
\page-link #3 {
\fill-with-pattern #1 #RIGHT . "List of Subjects" "2"
\fill-with-pattern #1 #RIGHT . "List of Subjects" \page-ref #'ListOfSubjects "000" "2"
}
}
}
Expand All @@ -38,33 +40,33 @@
\pad-around #2
\abs-fontsize #12 \smallCaps \bold { \concat { \char ##x23AF " Contrapuncti" } }
}
\markup \indexItem #5 "Contrapunctus I" "4" "four-voice fugue on principal subject"
\markup { \indexItem #8 "Contrapunctus II" "7"
\markup \indexItem "Contrapunctus I" #'ContrapunctusI "four-voice fugue on principal subject"
\markup { \indexItem "Contrapunctus II" #'ContrapunctusII
"four-voice fugue on principal subject, accompanied by a “French” style dotted rhythm"
}
\markup { \indexItem #13 "Contrapunctus III" "12"
\markup { \indexItem "Contrapunctus III" #'ContrapunctusIII
"four-voice fugue on principal subject in inversion, employing intense chromaticism"
}
\markup { \indexItem #16 "Contrapunctus IV" "15"
\markup { \indexItem "Contrapunctus IV" #'ContrapunctusIV
"four-voice fugue on principal subject in inversion, employing counter-subjects"
}
\markup \indexItem #21 "Contrapunctus V" "20" "four-voice fugue with many stretto entries"
\markup { \indexItem #25 "Contrapunctus VI [per Diminutionem] in Stylo Francese" "24"
\markup \indexItem "Contrapunctus V" #'ContrapunctusV "four-voice fugue with many stretto entries"
\markup { \indexItem "Contrapunctus VI [per Diminutionem] in Stylo Francese" #'ContrapunctusVI
"four-voice fugue with many stretto entries a 4 in Stylo Francese"
}
\markup { \indexItem #32 "Contrapunctus VII per per Augmentationem et Diminutionem" "31"
\markup { \indexItem "Contrapunctus VII per per Augmentationem et Diminutionem" #'ContrapunctusVII
"fugue that uses augmented (doubling all note lengths) and diminished versions of the main subject and its inversion"
}
\markup { \indexItem #37 "Contrapunctus VIII" "36"
\markup { \indexItem "Contrapunctus VIII" #'ContrapunctusVIII
"triple fugue with three subjects, having independent expositions"
}
\markup { \indexItem #45 "Contrapunctus IX alla Duodecima" "44"
\markup { \indexItem "Contrapunctus IX alla Duodecima" #'ContrapunctusIX
"double fugue, with two subjects occurring dependently and in invertible counterpoint at the twelfth"
}
\markup { \indexItem #50 "Contrapunctus X alla Decima" "49"
\markup { \indexItem "Contrapunctus X alla Decima" #'ContrapunctusX
"double fugue, with two subjects occurring dependently and in invertible counterpoint at the tenth"
}
\markup { \indexItem #55 "Contrapunctus XI" "54"
\markup { \indexItem "Contrapunctus XI" #'ContrapunctusXI
"triple fugue, employing the three subjects of Contrapunctus VIII in inversion"
}
\markup \column \abs-fontsize #11 {
Expand All @@ -73,12 +75,13 @@
\hspace #3.2
\page-link #63 {
\pad-markup #0.5 {
\fill-with-pattern #1 #RIGHT . "Contrapunctus XII [rectus]" "62"
\fill-with-pattern #1 #RIGHT . "Contrapunctus XII [rectus]"
\page-ref #'ContrapunctusXIIrectus "000" "?"
}
}
}
}
\markup { \indexItem #66 "Contrapunctus XII inversus" "65"
\markup { \indexItem "Contrapunctus XII inversus" #'ContrapunctusXIIinversus
"mirror fugues, in which a piece is notated once and then with voices and counterpoint completely inverted"
}
\markup \column \abs-fontsize #11 {
Expand All @@ -87,15 +90,16 @@
\hspace #3.2
\page-link #69 {
\pad-markup #0.5 {
\fill-with-pattern #1 #RIGHT . "Contrapunctus XIII [rectus]" "68"
\fill-with-pattern #1 #RIGHT . "Contrapunctus XIII [rectus]"
\page-ref #'ContrapunctusXIIIrectus "000" "?"
}
}
}
}
\markup { \indexItem #73 "Contrapunctus XIII inversus" "72"
\markup { \indexItem "Contrapunctus XIII inversus" #'ContrapunctusXIIIinversus
"mirror fugues, in which a piece is notated once and then with voices and counterpoint completely inverted"
}
\markup { \indexItem #77 "Contrapunctus XIV" "76"
\markup { \indexItem "Contrapunctus XIV" #'ContrapunctusXIV
"four-voice triple fugue (not completed by Bach, but likely to have become a quadruple fugue: see below)"
}

Expand All @@ -104,7 +108,8 @@
\line {
\hspace #3.2
\page-link #86 {
\fill-with-pattern #1 #RIGHT . "Brief notes on the completion of Contrapunctus XIV" "85"
\fill-with-pattern #1 #RIGHT . "Brief notes on the completion of Contrapunctus XIV"
\page-ref #'BriefNotesContrapunctusXIV "000" "?"
}
}
}
Expand All @@ -114,15 +119,15 @@
\abs-fontsize #12 \smallCaps \bold { \concat { \char ##x23AF " Canoni" } }
}

\markup { \indexItem #91 "Canon in Hypodiapason (Canon alla Ottava)" "90"
\markup { \indexItem "Canon in Hypodiapason (Canon alla Ottava)" #'CanonI
"canon in imitation at the octave"
}
\markup { \indexItem #95 "Canon alla Decima [in] Contrapunto alla Terza" "94"
\markup { \indexItem "Canon alla Decima [in] Contrapunto alla Terza" #'CanonII
"canon in imitation at the tenth"
}
\markup { \indexItem #98 "Canon alla Duodecima in Contrapunto alla Quinta" "99"
\markup { \indexItem "Canon alla Duodecima in Contrapunto alla Quinta" #'CanonIII
"canon in imitation at the twelfth"
}
\markup { \indexItem #103 "Canon [in Hypodiatesseron] per augmentationem in Contratio Motu" "102"
\markup { \indexItem "Canon [in Hypodiatesseron] per augmentationem in Contratio Motu" #'CanonIV
"canon in which the following voice is both inverted and augmented"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ commonSettings = {

CommonSubjectI = {
\commonSettings
\label #'ListOfSubjects
| d'2^\markup \abs-fontsize #8 \italic { "main subject in « The Art of Fugue »" }
a'
| f d | cis d4 e | f2~ f8 g f e | d4 s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Global = {

Soprano = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusI
| R1*4
%5
| \highlightSubjectFirst { a2^\markup \subject #'(0 . 0) #1 d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Global = {

Soprano = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusII
| \override MultiMeasureRest.staff-position = #0
R1*8
| s1*4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Global = {

Soprano = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusIII
| \override MultiMeasureRest.staff-position = #0
R1*4
| s1*4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Global = {

Soprano = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusIV
%1
| \highlightSubjectFirstInv { a2^\markup \scale #'(1 . -1) \subject #'(-0.5 . 0) #1 d,
| f a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Global = {

Soprano = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusV
| s1*6
| \highlightSubjectFirst { d2^\markup \subject #'(0 . 0) #1 a'4. g8
| f4. e8 d2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Global = {

Soprano = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusVI
%1
| R1
| \highlightSubjectFirstInv { a'4^\markup \scale #'(1 . -1) \subject #'(2.5 . 0) #1 d,8. e16 f8. g16 a4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Global = {

Soprano = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusVII
%1
| R1
| \highlightSubjectFirstInv { a'2^\markup \scale #'(1 . -1) \subject-augmentatio #'(2.5 . 0) #1 "+"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Global = {

Soprano = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusVIII
| \override MultiMeasureRest.staff-position = #0
R1*10
| r2 \highlightSubjectFirst { d^\markup \subject #'(-1 . 0) #1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Global = {

Sopran = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusIX
| R1*7
| \highlightSubjectFirst { r4^\markup \subject #'(1.8 . 0) #1 a a'2~
| a4 gis8 fis e d c b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Global = {

Sopran = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusX
\stemUp\tieDown
| R1*5
| \override MultiMeasureRest.staff-position = #4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Global = {

Sopran = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusXI
| R1*4 %1 to 4
%5
| \highlightSubjectFirst { r4^\markup \subject #'(2 . 0) #1 a e' d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Global = {

Sopran = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusXIIrectus
\showStaffSwitch
| \override MultiMeasureRest.staff-position = #0
R1*3/2*9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Global = {

Sopran = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusXIIinversus
%1
| \highlightSubjectFirstInv { a2^\markup \scale #'(1 . -1) \subject #'(-0.5 . 0) #1 d,1
| f2 a1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Global = {

Sopran = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusXIIIrectus
\override TupletBracket.bracket-visibility = ##f
\override TupletNumber.transparent = ##t
\partial 4 r4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Global = {

Sopran = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusXIIIinversus
\override TupletBracket.bracket-visibility = ##f
\partial 4 \highlightSubjectFirst { d4^\markup \subject #'(-0.8 . 0) #1
%1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Global = {

Sopran = \context Voice = "one" \relative c'' {
\voiceOne
\label #'ContrapunctusXIV
| \override MultiMeasureRest.staff-position = #0
R1*15
| d2\rest \highlightSubjectFirst { a^\markup \subject #'(-0.8 . 0) #1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Global = {

Upper = \context Voice = "one" \relative c'' {
\voiceOne
\label #'CanonI
\stemNeutral
\override MultiMeasureRest.staff-position = #0
\override Rest.staff-position = #0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Global = {

Sopran = \context Voice = "one" \relative c'' {
\voiceOne
\label #'CanonII
\stemNeutral
\override Rest.staff-position = #0
| \override MultiMeasureRest.staff-position = #0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Global = {

Sopran = \context Voice = "one" \relative c'' {
\voiceOne
\label #'CanonIII
\override Rest.staff-position = #0
\override TupletBracket.bracket-visibility = ##f
| \override MultiMeasureRest.staff-position = #0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Global = {

Sopran = \context Voice = "one" \relative c'' {
\voiceOne
\label #'CanonIV
\stemNeutral
\override MultiMeasureRest.staff-position = #0
\override Rest.staff-position = #0
Expand Down

0 comments on commit 3224cdc

Please sign in to comment.