]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/test/time-signature-double.ly: new file
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 5 Mar 2003 20:07:31 +0000 (20:07 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 5 Mar 2003 20:07:31 +0000 (20:07 +0000)
* input/regression/collision-head-chords.ly (texidoc): new file.

* lily/type-swallow-translator.cc: add note swallow translator

* input/test/time-signature-double.ly: new file.

* lily/type-swallow-translator.cc: add Rest_swallow_translator

* ly/engraver-init.ly (ChordNamesContext): add Rest_swallow_translator
(FiguredBassContext): idem.

ChangeLog
Documentation/user/lilypond.tely
Documentation/user/refman.itely
Documentation/user/tutorial.itely
input/regression/collision-2.ly
input/regression/collision-head-chords.ly [new file with mode: 0644]
input/test/time-signature-double.ly [new file with mode: 0644]
lily/type-swallow-translator.cc
ly/engraver-init.ly
scm/bass-figure.scm

index f5c4468c3c58415bbcffd6d52eabea24a18c87ce..cfe95d134e8164e97f5e718f42241854835558ca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2003-03-05  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * input/test/time-signature-double.ly: new file 
+
+       * input/regression/collision-head-chords.ly (texidoc): new file.
+
+       * lily/type-swallow-translator.cc: add note swallow translator 
+
+       * input/test/time-signature-double.ly: new file.
+
+       * lily/type-swallow-translator.cc: add Rest_swallow_translator
+
+       * ly/engraver-init.ly (ChordNamesContext): add Rest_swallow_translator
+       (FiguredBassContext): idem.
+
        * VERSION (MY_PATCH_LEVEL): 1.7.14 released
 
        * input/mutopia/W.A.Mozart/*.ly (romanze): markup syntax updates. 
index 640204fcf9255b014878f65c1b5453fb523d0681..b0b8ab3e91c8d5c7c0795245194d5a0749ec39f1 100644 (file)
@@ -76,7 +76,7 @@ Copyright 1999-2002 by the authors
 
 @chapter GNU LilyPond --- The music typesetter
 
-This is the user manual for GNU LilyPond 1.6.0.
+This is the user manual for GNU LilyPond 1.7.14.
 
 @cindex web site
 
index 6fa0bd454be655b87619e9a1c52489adad0616bb..4c30a5982c0e900c747f2259922ff1a308db89e9 100644 (file)
@@ -3071,6 +3071,9 @@ For entering quotes in Lyrics mode, use the following
 "\"God\"" is "`King'"
 @end example
 
+You can use empty syllables, e.g. @code{_4} or @code{" "4} to enter
+lyrics. This can confuse the LilyPond -- for example, this might put
+(empty) lyrics under rests. To remedy this, use @code{\skip}.
 
 
 @menu
@@ -3446,6 +3449,12 @@ add the note, then you can use @code{/+}@var{pitch}.
    \chords { c1 c/+g c/+f }
 @end lilypond 
 
+The chords mode is a mode similar to @code{\lyrics}, @code{\notes}
+etc.  Most of the commands continue to work, for example, @code{r} and
+@code{\skip} can be used to insert spaces, and @code{\property}  to
+change various settings.
+
+
 
 @refbugs
 
@@ -5286,6 +5295,16 @@ and once with exaggerated corrections.
     \paper { linewidth = -1. } }
 @end lilypond
 
+@cindex SpacingSpanner, overriding properties
+
+The @internalsref{SpacingSpanner}, is score wide, so its properties
+must be overriden from the @code{\paper} block, e.g.
+@example
+\paper @{ \translator  @{
+  \ScoreContext
+  SpacingSpanner \override #'spacing-increment = #3.0
+@} @}
+@end example
 
 
 @refbugs
index 24048a99bb5210b42d88d443eff09231f2019012..047f71dc60f0f7e0ec55b823d44093f19ffba283 100644 (file)
@@ -1091,6 +1091,8 @@ The complete file is listed here:
 @node A melody with chords 
 @section A melody with chords
 
+[TODO: show how to do fixed 4 measures to the line]
+
 In this section we show how to typeset a melody with chord
 accompaniment. This file is included as @file{input/tutorial/flowing.ly}.
 
index 9a433785009baa2ab8c392a1d47a3b7a918c8860..722f00b1b6872836affeac41c2634d43a2c1db5f 100644 (file)
@@ -1,13 +1,15 @@
 \version "1.7.6"
+\header {
+texidoc = "Collisions for single head notes. "
+}
 
 \score {
     \notes
 
-  \context Staff \notes <  
-      %% the f and g on 4th beat are exceptionally ugh.
-      \context Voice=i { \stemUp c4 d e f g2 g4 a | }
-      \context Voice=ii { \stemDown g4 f e g  g2 g2 } 
+  \context Staff \notes \transpose c c' <  
+       {  c4 d e f g2 g4 a | }  \\
+       { g4 f e g  g2 g2 } 
   >
 }
 
-%% new-chords-done %%
\ No newline at end of file
+%% new-chords-done %%
diff --git a/input/regression/collision-head-chords.ly b/input/regression/collision-head-chords.ly
new file mode 100644 (file)
index 0000000..e226524
--- /dev/null
@@ -0,0 +1,18 @@
+\version "1.7.14"
+\header {
+texidoc = "Note heads in collisions should be merged if
+they have the same positions in the extreme note heads.  
+"
+
+}
+
+
+\score {
+\notes  \relative c'' {
+c4 
+  < { c4 d4 <<c d>>8  <<c d>> <<c d>> } \\  { c4 c <<a b>>8 <<b c>> <<c d>>8 } >
+}
+\paper {linewidth = -1.0 } 
+}
+
+%% new-chords-done %%
diff --git a/input/test/time-signature-double.ly b/input/test/time-signature-double.ly
new file mode 100644 (file)
index 0000000..7d2cae5
--- /dev/null
@@ -0,0 +1,55 @@
+
+\header {
+
+
+texidoc= "Double time signatures are not supported
+explicitly, but can be faked by overriding formatting routines. "
+
+}
+\version "1.7.14"
+
+
+#(define (brew-double-time-sig grob)
+  (define (frac-to-mol font frac)
+    (let*
+       (
+        (d (fontify-text font (number->string (cdr frac))))
+        (n (fontify-text font (number->string (car frac))))
+        (c (ly:molecule-combine-at-edge d Y UP n 0.0))
+        )
+      (ly:molecule-align-to! c Y CENTER)
+      c
+    ))
+  
+  (let*
+      
+    (
+     (chain (Font_interface::get_property_alist_chain grob))
+     (font (ly:get-font grob chain))
+     (f1 '(6 . 4))
+     (musfont (ly:get-font grob (cons (list '(font-relative-size . 2) '(font-family . music)) chain)))
+     (plus (ly:molecule-translate-axis (ly:find-glyph-by-name musfont "scripts-stopped") 0.1 Y))
+     (f2 '(3 . 2))
+     (m1 (frac-to-mol font f1))
+     (m2 (frac-to-mol font f2))
+     )
+     
+    
+    (ly:molecule-combine-at-edge
+     (ly:molecule-combine-at-edge m1 X RIGHT plus 0.2)
+     X RIGHT m2  0.2)
+    
+    )
+)
+
+
+\score  { \notes \relative c'
+         {
+          \property Staff.TimeSignature \override #'molecule-callback = #brew-double-time-sig
+          \time 3/2
+          c2 c c 
+          
+          }
+
+         }
+         
index 42581746228fcdd28460f6b49527eebd7c7cd8c0..54593f54572bebe840e3d7b6ddf7e0e5df00f971 100644 (file)
@@ -19,6 +19,16 @@ public:
 };
 
 
+class Rest_swallow_translator : public virtual Translator
+{
+protected:
+  virtual bool try_music (Music*) { return true; }
+
+public:  
+  TRANSLATOR_DECLARATIONS(Rest_swallow_translator);
+};
+
+
 Skip_req_swallow_translator::Skip_req_swallow_translator(){}
 
 ENTER_DESCRIPTION(Skip_req_swallow_translator,
@@ -28,4 +38,36 @@ ENTER_DESCRIPTION(Skip_req_swallow_translator,
                  "",
                  "",
                  "");
+
+
+Rest_swallow_translator::Rest_swallow_translator(){}
+
+ENTER_DESCRIPTION(Rest_swallow_translator,
+                 "Swallow rest",
+                 "",
+                 "rest-event",
+                 "",
+                 "",
+       
+
+         "");
+
+class Note_swallow_translator : public virtual Translator
+{
+protected:
+  virtual bool try_music (Music*) { return true; }
+
+public:  
+  TRANSLATOR_DECLARATIONS(Note_swallow_translator);
+};
+
+Note_swallow_translator::Note_swallow_translator(){}
+
+ENTER_DESCRIPTION(Note_swallow_translator,
+                 "Swallow notes",
+                 "",
+                 "note-event",
+                 "",
+                 "",
+                 "");
                  
index 00d06183d3f4d4bc97a3b8940464978e1f2e5850..23e0b06a6165843791b7d79cd81a667427d4ec4e 100644 (file)
@@ -300,6 +300,7 @@ ChordNamesContext = \translator {
        \type "Engraver_group_engraver"
        \name ChordNames
 
+       \consists "Rest_swallow_translator" 
        \consists "Output_property_engraver"    
        \consists "Separating_line_group_engraver"
        \consists "New_chord_name_engraver"
@@ -479,7 +480,9 @@ GraceContext = \translator {
 FiguredBassContext = \translator {
        \type "Engraver_group_engraver"
        \name FiguredBass 
-       \consists "Figured_bass_engraver"       
+       \consists "Figured_bass_engraver"
+       \consists "Rest_swallow_translator"
+       \consists "Note_swallow_translator"
        \consistsend "Axis_group_engraver"
 }
 
index 90b293f5d0e95b6aca16786a3c1d8f23a4ed6345..2753dc5e11852e9fd6f95bffc5aed23d244642a3 100644 (file)
@@ -6,7 +6,7 @@
   "Brew a single column for a music figure"
   (let* (
         (chain (Font_interface::get_property_alist_chain grob))
-        (mf (ly:get-font grob (cons  '((font-family . music))
+        (mf (ly:get-font grob (cons  '((font-family . music) (font-magnification . 0.8))
                                      chain 
                                      )))
         (nf (ly:get-font grob