Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
% (defun c () (interactive) (find-sh "lilypond invention-04.ly"))
% (defun d () (interactive) (find-xpdfpage    "invention-04.pdf"))
% (defun u () (interactive) (find-angg-upload-links "LILYPOND/" "invention-04.ly"))

#(ly:set-option 'old-relative)
\header {
  enteredby = 	"Allen Garvin"
  maintainer = 	"Allen Garvin"
  maintainerEmail = "AGarvin@tribalddb.com"
  % copyright = 	"Public Domain"
  filename = 	"bach-invention-04.ly"
  title = 	"Invention 4"
  opus = 	"BWV 775"
  composer =	"Johann Sebastian Bach (1685-1750)"
  style =	"Baroque"
  source =	"Bach-Gesellschaft"
  lastupdated =	"2003/May/17"

  mutopiainstrument = "Harpsichord, Piano"
  mutopiatitle =      "Invention 4"
  mutopiacomposer =   "BachJS"
  mutopiaopus =       "BWV 775"

 footer    = "Mutopia-2008/06/15-67"
 tagline   = "Eduardo Ochs 06/feb/2015 12:25"
 copyright = "Eduardo Ochs 06/feb/2015 12:25"
}


\paper{
  top-margin    = 2.5\cm
  bottom-margin = 2.5\cm
}

\version "2.11.46"

voiceone =  \relative c' {
  \key d \minor
  \time 3/8

   d16-2[ e f-1 g a bes] |					% bar 1
   cis,-1[ bes'-4 a g f e-2] |					% bar 2
   f8-1[ a d] |							% bar 3
   g,[ cis e] |							% bar 4
   d16-2[ e f-1 g a bes] |					% bar 5
   \break
   cis,-1[ bes'-4 a g f e-2] |					% bar 6
   f-3[ d e f g a] |						% bar 7
   bes,-1[ a'-5 g f e d] |					% bar 8
   e-3[ c d e f g] |						% bar 9
   a,[ g' f e d c] |						% bar 10
   \break
   d-3[ e f d e f] |						% bar 11
   g,8 r r |							% bar 12
   c16-3[ d e c d e] |						% bar 13
   f,8 r bes-4 ~ |						% bar 14
   bes[ a g] |							% bar 15
   \break
   c16[ bes a g f e-2] |					% bar 16
   f-1[ g g8. f16] |						% bar 17
   f8[ c' c] |							% bar 18
   c4.-3\prall ~ |						% bar 19
   c ~ |							% bar 20
   \break
   c ~ |							% bar 21
   c16[ bes-2 a-1 g-3 f e] |					% bar 22
   c'[ d, e fis g-1 a] |					% bar 23
   bes[ a g f e d] |						% bar 24
   bes'[ c, d e f-1 g] |					% bar 25
   \pageBreak
   a[ b-1 c d e f] |						% bar 26
   gis,-1[ f'-5 e d c b] |					% bar 27
   c-3[ b d-4 c b a] |						% bar 28
   gis-4[ a gis fis e d] |					% bar 29
   c-2[ d-1 e fis gis a] |					% bar 30
   \break
   d,-1[ c'-4 b-3 a-1 gis-3 fis] |				% bar 31
   e[ fis gis a-1 b c] |					% bar 32
   fis,-1[ e'-5 d c b a] |					% bar 33
   gis-2[ a-1 b c d e] |					% bar 34
   a,[ f' e d c b] |						% bar 35
   \break
   a'[ gis fis e a8] ~ |					% bar 36
   a16[ d,-1 b8.\prall-2 a16] |					% bar 37
   a8.-2[ a16-3 bes c] |					% bar 38
   d,8[ fis a-3] |						% bar 39
   bes16[ g-1 a bes c d] |					% bar 40
   \break
   e,[ d' c bes a g] |						% bar 41
   a8[ f'16 e f8] |						% bar 42
   g,[ e'] r |							% bar 43
   d16-2[ e f-1 g a bes] |					% bar 44
   cis,-1[ bes'-4 a g f e-3] |					% bar 45
   f8[ d g,] ~ |						% bar 46
   \break
   g16[ d'-4 cis e a, cis!] |					% bar 47
   d[ b cis8.\prall d16] |					% bar 48
   d-5[ c! bes! a g f-3] |					% bar 49
   bes-5[ cis,-2 d-1 e f g-1] |					% bar 50
   a-2[ d f,8-1 e16\prall-2 d] |				% bar 51
  d4.\fermata \bar "|."						% bar 52
}

  
voicetwo =  \relative c {
  \key d \minor
  \time 3/8
  \clef "bass"

  r4. |								% bar 1
  r4. |								% bar 2
   d16_5[ e f g a bes_2] |					% bar 3
   cis,_5[ bes'_2 a_1 g f e] |					% bar 4
   f8_3[ a_2 d] |						% bar 5
   \break
   e,_5[ g_3 cis_1] |						% bar 6
   d,[ d' f,_4] |						% bar 7
   g[ a bes_1] |						% bar 8
   c,[ c' e,_4] |                  				% bar 9
   f[ g a] |                     				% bar 10
   \break
   bes16_3[ g a bes c d] |         				% bar 11
   e,[ d' c bes a_1 g_2] |           				% bar 12
   a[ f g a bes_2 c] |             				% bar 13
   d,[ c' bes a g_1 f] |           				% bar 14
   e[ c d e f g] |               				% bar 15
   \break
   a,[ g' f e d_1 c] |             				% bar 16
   d[ bes c8_1 c,] |               				% bar 17
   f16_3[ g a bes_3 c d] |           				% bar 18
   e,[ d' c bes a g] |           				% bar 19
   a[ bes c d e_2 f] |             				% bar 20
   \break
   g,[ f' e d c_1 bes] |           				% bar 21
   a[ bes c a bes c] |           				% bar 22
  fis,8 r r |                   				% bar 23
   g16_4[ a bes g a bes] |         				% bar 24
  e,8 r r |                     				% bar 25
   \pageBreak
   f8[ f'_1 d_2] |                   				% bar 26
   b_1[ gis_2 e_5] |                   				% bar 27
   a16_3[ gis a b c d_3] |           				% bar 28
   e4.\prall ~ |                 				% bar 29
   e ~ |                         				% bar 30
   \break
   e ~ |                         				% bar 31
   e ~ |                         				% bar 32
   e ~ |                         				% bar 33
   e8[ e'_1 d] |                   				% bar 34
   c[ b a] |                     				% bar 35
   \break
   d_3[ e f] |                     				% bar 36
   d_2[ e e,] |                    				% bar 37
   a16[ a,_5 bes!_3 c d ees_2] |       				% bar 38
   fis,_5[ ees'_2 d_1 c bes a] |       				% bar 39
   g8.[ g16_3 a bes] |             				% bar 40
   \break
   c,8_5[ g'_2 c_1] |                  				% bar 41
   f16_3[ g a b_3 cis d] |           				% bar 42
   e,[ d' cis b a_1 g_2] |           				% bar 43
   f8_3[ a d] |                    				% bar 44
   e,_4[ g cis] |                  				% bar 45
   d,16[ e f g a bes] |          				% bar 46
   \break
   cis,[ bes'_2 a_1 g f e_4] |         				% bar 47
   f[ g a8_1 a,_5] |                 				% bar 48
   bes8._3[ c16 bes a] |           				% bar 49
   g_5[ bes'_1 a g f e_5] |            				% bar 50
   f[ g a8_1 a,_3] |                 				% bar 51
  d,4.\fermata \bar "|."       					% bar 52
}

\score {
   \context GrandStaff << 
    \context Staff = "one" <<
      \voiceone
    >>
    \context Staff = "two" <<
      \voicetwo
    >>
  >>

  \layout{ }
  
  \midi {
    \context {
      \Score
      tempoWholesPerMinute = #(ly:make-moment 90 4)
      }
    }


}