]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/test/transposition.ly
release commit
[lilypond.git] / input / test / transposition.ly
index f5e258305c8e13e3370c9f6fe98803311bd0edca..40028a208ecd0d9a9113fb7ddd8657f4e9cfcea8 100644 (file)
@@ -1,64 +1,55 @@
-%{
-Hi all,
 
-I have extend Mats' patches to allow accidental transposition:
-        \keysignature bes es fis;
-               = \transpose d =>
-        \keysignature gis;
+\version "2.1.30"
 
-As you can see in output the example file "test.ly" there are a few problems left:
-- key undo (already in the Todo)
-- "wrong" transposition: e.g. \transpose d of fis-major = gis-major (better as-major?).
-       The solution gis=as etc. would concern both note and key transposistion
+\header{ texidoc = "@cindex Transposition
+Transposing has also an effect key signature, if it is given using
+@code{\key}. If @code{keySignature} is set explicitly instead, 
+the key signature is not transposed."
 
-Eric
-%}
+     }
 
-\header{
-title =         "Test it";
-description =   "Transposition Test file";
-enteredby =     "Eric Bullinger";
-copyright =     "public domain";
-}
-
-
-\version "1.0.2";
+% should the explicitly set key signature transpose also? -HJJ
 
-vOne = \melodic \relative c''{
-        \clef"violin";
-        \key d;
-        \time 2/4 ;
+vOne = \notes \relative c''{
+        \clef"violin"
+        \key d \major
+        \time 2/4 
         d4 d |       
-        \key fis;
+        \key fis \major
         fis4 fis |         
-        \key es;
+        \key es \major
         c4 c |
 }
 
-vTwo = \melodic \relative c''\transpose d' { \vOne }
+vTwo = \notes \transpose c d { \vOne }
 
-vThree = \melodic \relative c''{
-        \clef"violin";
-        \keysignature fis cis;
-        \time 2/4 ;
+vThree = \notes \relative c''{
+        \clef"violin"
+%        keysignature fis cis
+       \set Staff.keySignature = #'((0 . 2)(3 . 2))
+        \time 2/4 
         d4 d |       
-        \keysignature bes es fis;
+%        keysignature bes es fis
+       \set Staff.keySignature = #'((3 . 2)(2 . -2)(6 . -2))
         fis4 fis |         
-        \keysignature fis cis gis dis ais eis;
+%        keysignature fis cis gis dis ais eis
+       \set Staff.keySignature = #'((2 . -2)(5 . -2)(1 . 2)(4 . 2)(0 . 2)(3 . 2))
         cis4 ais4 |
 }
 
-vFour = \melodic \relative c''\transpose d' \vThree
+
+vFour = \notes \transpose c d \vThree
 
 \score {
-  \type StaffGroup <
-         \vOne
-         \vTwo
-         \vThree
-         \vFour
-  >
-        \paper { linewidth= 130.\mm; }
+  \context StaffGroup <<
+         \new Staff \vOne
+         \new Staff \vTwo
+         \new Staff \vThree
+         \new Staff \vFour
+  >>
+        \paper { linewidth= 130.\mm raggedright = ##t }
 }
 
 
 
+