Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
% This file:
%   http://angg.twu.net/LILYPOND/invention-01.ly
%   http://angg.twu.net/LILYPOND/invention-01.ly.html
% Output:
%   http://angg.twu.net/LILYPOND/invention-01.pdf
% Modified from:
%   http://www.mutopiaproject.org/ftp/BachJS/BWV772/bach-invention-01/bach-invention-01.ly
% See: (find-es "lilypond" "inventions")
% 
% (defun c () (interactive) (find-sh "lilypond invention-01.ly"))
% (defun d () (interactive) (find-xpdfpage    "invention-01.pdf"))
% (defun u () (interactive) (find-angg-upload-links "LILYPOND/" "invention-01.ly"))
%
% (eepitch-shell)
% (eepitch-line "makeL")
% (eepitch-line "cd ~/TH/L/LILYPOND/; Scp-np invention-01.{ly,ly.html} $TWUP/LILYPOND/")
% (eepitch-line "cd ~/LILYPOND; Scp-np invention-01.pdf $TWUP/LILYPOND/")

\header{
   composer          = "Johann Sebastian Bach (1685-1750)"
   title             = "Invention 1"
   opus              = "BWV 772"
   
   mutopiatitle      = "Invention 1"
   mutopiacomposer   = "BachJS"
   mutopiaopus       = "BWV 772"
   mutopiainstrument = "Harpsichord, Piano"
   source            = "Bach-Gesellschaft"
   style             = "Baroque"
   copyright         = "Creative Commons Attribution-ShareAlike 3.0"
   maintainer        = "jeff covey"
   maintainerEmail   = "jeff.covey@pobox.com"
   maintainerWeb     = "http://pobox.com/~jeff.covey/"
   lastupdated       = "2006/08/21"
   footer = "Mutopia-2008/06/15-40"
   tagline           = "Eduardo Ochs"
   % tagline = \markup { ... }
}

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

\version "2.11.46"

voiceone =
\relative c' {
   r16  c-1[ d e]   f[ d e c]  g'8-2[ c-5 b-3_\prall c]      | % 1
   d16[ g, a b]  c[ a b g]  d'8-2[ g f-3^\prall g]           | % 2
   e16-1[ a-4 g f]  e[ g f a-4]  g[ f e d-2]  c[ e d f-4]    | % 3
   e[ d c b-2]  a[ c b d-4]  c[ b a g-3]  fis[ a g b]        | % 4
   a8[ d,]  c'8.-3[^\mordent d16-4]  b-2[ a-1 g-3 fis]  e[ g fis a]    | % 5
   g-1[ b a-2 c]  b-1[ d c-2 e]  d[ b32 c d16 g]  b,8-3[^\prall a16 g] | % 6
   g8-2 r r4 r16  g-1[ a b]  c[ a b g]                       | % 7
   fis8^\prall r r4 r16  a-1[ b c]  d[ b c a]                | % 8
   b8          r r4 r16  d-4[ c b]  a[ c b d]                | % 9
   c8          r r4 r16  e-4[ d-3 c-2]  b-1[ d-3 cis-2 e-4]  | % 10
   \pageBreak
   d8-3[ cis-2 d-1 e-2]  f[ a,-1 b! cis-4]                   | % 11
   d-5[ fis,-2 gis-3 a-1]  b-3[ c-4] d4-5 ~                  | % 12
   d16[ e, fis gis]  a[ fis gis e]  e'[ d c e]  d[ c b d]    | % 13
   c-1[ a'-4 gis b]  a[ e-1 f-4 d-2]  gis,[ f'-5 e d]  c8[ b16 a]        | % 14
   a16-1[ a'-4 g f]  e[ g f a] g2 ~                          | % 15
   g16[ e f g]   a[ f g e] f2 ~                              | % 16
   f16[ g-4 f e]   d[ f e g] f2 ~                            | % 17
   f16[ d e f]   g[ e f d] e2 ~                              | % 18
   e16[ c d e]  f[ d e c]  d-2[ e-1 f g]  a[ f g e]          | % 19
   f-2[   g-1 a b]  c[ a b g]  c8-5[ g-2]  e[ d16-2 c]       | % 20
   c-5[ bes-4 a g]  f[ a g bes]  a[ b c-5 e,-2]  d-1[ c' f,-2 b-4]         | % 21
   <c g e>1^\fermata\arpeggio                                | % 22
   \bar "|."
}

voicetwo =
\relative c {
   \clef "bass"
   r2          r16   c_4[ d e]  f[ d e c]                    | % 1
   g'8[ g,] r4 r16  g'_4[ a b]  c[ a b g]                    | % 2
   c8[ b_4 c d]  e[ g,_4 a b]                                | % 3
   c[ e,_4 fis g]  a[ b_2] c4 ~                              | % 4
   c16[ d,_4 e fis]  g[ e fis d]  g8[ b,_4 c d]              | % 5
   e_1[ fis_2 g_1 e_2]  b8.[ c16_3]  d8_1[ d,]               | % 6
   r16  g_4[ a b]  c[ a b g_5]  d'8_2[ g fis_3 g]            | % 7
   a16[ d,_4 e fis]  g[ e fis d_5]  a'8_2[ d c d] \clef "treble"     | % 8
   g,16[ g' f e]  d[ f e g]  f8[ e f d_5]                    | % 9
   e16_4[ a g f]  e[ g f a]  g8[ f g e_5]                    | % 10
   \pageBreak
   f16_4[ bes_2 a_3 g_4]  f_5[ a_3 g_4 bes_2]  a_1[ g_2 f_3 e_4]  d_5[ f e g] | % 11
   f_1[ e_2 d_3 c_4]  b_5[ d_3 c_4 e_2] \clef "bass" d_1[ c_2 b_3 a_4]  gis_5[ b_3 a_4 c_2] | % 12
   b8_1[ e,_5]  d'8._2[^\mordent e16_1]  c_2[ b_1 a_2 g!_3]  fis_4[ a_2 gis_3 b_1]   | % 13
   a_4[ c_2 b_3 d_1]  c_4[ e_2 d_3 f_1]  e8_2[ a,_5 e'_1 e,_5]                       | % 14
   a8_1[ a,] r4 r16  e''16[ d c]  b[ d cis e]                | % 15
   d2 ~  d16[ a_5 b_3 c]    d[ b c a]                        | % 16
   b2_3 ~  b16[ d c b]    a[ c b d]                          | % 17
   c2 ~  c16[ g_5 a_3 bes]  c[ a bes_2 g]                    | % 18
   a8[ bes_2 a g]  f[ d' c bes]                              | % 19
   a[ f' e d]    e16_1[ d,_5 e_3 f]  g_1[ e_3 f_2 d_4]       | % 20
   e8_3[ c_5 d_4 e_3]  f16_2[ d_3 e_4 f_2]  g8_1[ g,_3]      | % 21
   <c c,>1\arpeggio_\fermata                                 | % 22
   \bar "|."
}

\score {
   \context PianoStaff <<
      \set PianoStaff.connectArpeggios = ##t
      \context Staff = "one" << \voiceone >>
      \context Staff = "two" << \voicetwo >>
   >>
   
   \layout { }
   
  \midi {
    \context {
      \Score
      tempoWholesPerMinute = #(ly:make-moment 80 4)
      }
    }


}