]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.152.jcn1
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 7 May 2001 15:08:47 +0000 (17:08 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 7 May 2001 15:08:47 +0000 (17:08 +0200)
1.3.151.jcn4
============

* Added alternative introduction to tutorial; to be merged.

* Reverted simple easy note head function, as some printers seem to
choke on it (so there are printers that don't use ghostscript?).

* Chord tremolo fixes: shift beams vertically on whole notes.  Center beams on whole notes.  'beam-gap' had been renamed to 'gap', but only for reading.

1.3.151.uu1
===========

CHANGES
Documentation/user/lilypond.tely
Documentation/user/toet.itely [new file with mode: 0644]
VERSION
input/regression/chord-tremolo.ly
lily/beam.cc
lily/chord-tremolo-engraver.cc
ps/music-drawing-routines.ps

diff --git a/CHANGES b/CHANGES
index 51f00eae8004f724f3903369ae35a941dad2b3f9..76516840010d6575697168904210cc7886eb6d48 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,16 @@
+1.3.151.jcn4
+============
+
+* Added alternative introduction to tutorial; to be merged.
+
+* Reverted simple easy note head function, as some printers seem to
+choke on it (so there are printers that don't use ghostscript?).
+
+* Chord tremolo fixes: shift beams vertically on whole notes.  Center beams on whole notes.  'beam-gap' had been renamed to 'gap', but only for reading.
+
+1.3.151.uu1
+===========
+
 1.3.151.jcn2
 ============
 
index 375272f238eb88dc3db01dfa8c7d3d0d2e4c9245..0318bc16d9d331013bfb2c0061271dfcecdb3687 100644 (file)
@@ -70,6 +70,7 @@ this and other documentation.
 @menu
 * Preface::                        Preface.
 * Tutorial::                       A tutorial introduction to LilyPond.
+* Toet::                           Stab at real simple tutorial.
 * Reference Manual::               Reference Manual.
 * Invoking LilyPond::              Operation.
 * Bug reports::                    Where to report bugs.
@@ -93,6 +94,7 @@ this and other documentation.
 @mbinclude macros.itexi
 @mbinclude preface.itely
 @mbinclude tutorial.itely
+@mbinclude toet.itely
 @mbinclude refman.itely
 @mbinclude internals.itely
 @mbinclude invoking.itexi
diff --git a/Documentation/user/toet.itely b/Documentation/user/toet.itely
new file mode 100644 (file)
index 0000000..5eddb7f
--- /dev/null
@@ -0,0 +1,319 @@
+@c -*-texinfo-*-
+
+@c TODO: LilyPond Lilypond lilypond
+
+@node Toet
+@chapter Toet
+
+The music is described in a text file, using a simple music language.
+LilyPond reads that text file and generates music that you can print or
+view.
+
+Therefore, creating music notation with LilyPond is done in two steps.
+Using a text editor, you write down the notes to print.  Then, you run
+LilyPond to get your printed output.
+
+
+This tutorial starts with a small introduction to the LilyPond music
+language.  After this first contact, we will show you how to produce
+printed output; you should then be able to create your first sheets of
+music.
+
+The tutorial continues with a bit more elaborate example of real music.
+This piece introduces and explains some finer details of LilyPond.
+Then, a number of more complex examples follow, that will help you to
+produce most complex music with LilyPond.
+
+
+@menu
+* Music language of LilyPond:: First contact
+* Running LilyPond toet::      
+@end menu
+
+
+
+@node Music language of LilyPond
+@section Music language of LilyPond
+
+This section shows how easy making music with LilyPond actually is.  If
+you have not used LilyPond before, this section is for you.
+
+
+You get a simple note by typing its name, from @code{a} through @code{g}:
+
+@lilypond[verbatim, relative 1]
+a b c d e f g
+@end lilypond
+
+@separate
+
+A are sharp is made by adding @code{is}, a flat by adding @code{es}:
+
+@lilypond[verbatim, relative 0]
+fis aes cisis beses
+@end lilypond
+
+@separate
+
+The length of a note is specified by adding a number, @code{1} for a
+whole note, @code{2} for a halve note:
+
+@lilypond[verbatim, relative 1]
+a1 a2 a8 a4 a16 a8. a16
+@end lilypond
+
+@separate
+
+Adding a high quote @code{'}, raises the pitch by one octave, adding a
+``low quote'' @code{,} (a comma), lowers the pitch one octave:
+
+@lilypond[verbatim, relative 1]
+c c' c,,
+@end lilypond
+
+@separate
+
+If you type no octaviation quotes, LilyPond chooses the note that is
+closest to the previous one, which is often just the one you need.  For
+example, @code{c f} goes up, and @code{c g} goes down:
+
+@lilypond[verbatim, relative 1]
+c f c g c
+@end lilypond
+
+@separate
+
+You can make a large interval by adding octaviation quotes.  For example,
+@code{c f,} goes down, and @code{c g'} goes up:
+
+@lilypond[verbatim, relative 1]
+c f, f c' c g' c, 
+@end lilypond
+
+@separate
+
+To get a rest you use note name @code{r}, to skip a note use note name
+@code{s}:
+
+@lilypond[verbatim, relative 1]
+r2 s4 r4
+@end lilypond
+
+@separate
+
+The meter can be specified using @code{\time}:
+
+@c \time -> \meter ?
+@lilypond[verbatim, relative 1]
+\time 3/4 c c c | R1 * 3/4
+@end lilypond
+
+@separate
+
+The key is specified using @code{\key}:
+
+@lilypond[verbatim, relative 0]
+\key f \major es as bes
+@end lilypond
+
+@separate
+
+Slurs are printed using parenthesis @code{()}, for phrasing slurs use
+@code{\(} and @code{\)}.  You get a tie using @code{~}:
+
+@lilypond[verbatim, relative 1]
+c\( ( ) d  ~ d \) c
+@end lilypond
+
+@separate
+
+A chord is made using angle brackets @code{<} and @code{>}:
+
+@lilypond[verbatim, relative 1]
+\oneVoice <a c> <b d> <c e>
+@end lilypond
+
+@separate
+
+suddenly lilypond bit really difficult:
+[explain about score -> \score and \notes]
+
+long chords; simultaneous music
+@lilypond[verbatim]
+\paper { linewidth = -1.0 }
+\score {
+  \context Staff \notes \relative c'' <
+    { \voiceOne a b c }
+    { \voiceTwo c d e }
+  >
+}
+@end lilypond
+
+@separate
+
+@lilypond[verbatim]
+\paper { linewidth = -1.0 }
+\score {
+  \context GrandStaff \notes \relative c' <
+    \context Staff=one { a' b c }
+    \context Staff=two { \clef bass c,, d e }
+  >
+}
+@end lilypond
+
+
+@node Running LilyPond toet
+@section Running LilyPond toet
+
+This section shows how to view and print music with LilyPond.  If you
+want to test your setup of LilyPond, or try to run an example file
+yourself, then read this section.
+
+The first step is to create an text file with some music.  Using your
+favorite text-editor, create @file{test.ly} containing
+
+@ignore
+
+NOTE: if you're reading this, ie, the Texinfo source itself, test.ly
+should of course contain:
+
+   \score{
+     \notes { c'4 e' g' }
+   }
+
+@end ignore
+
+@example
+\score @{
+  \notes @{ c'4 e' g' @}
+@} 
+@end example
+
+@unnumberedsubsec Running LilyPond on Unix
+@cindex Unix, Running lilypond on
+@cindex ly2dvi
+
+To run LilyPond, you invoke ly2dvi to compile your LilyPond source file:
+
+@quotation
+@example
+ly2dvi -P test.ly
+@end example
+@end quotation
+
+You will see the following on your screen:
+
+@quotation
+@example
+GNU LilyPond 1.4.0
+Now processing: `/home/fred/ly/test.ly'
+Parsing...
+Interpreting music...[1]
+ @emph{ ... some more text ... }
+PS output to test.ps...
+DVI output to test.dvi...
+@end example
+@end quotation
+
+The results are a ``DeVice Independent'' file
+(@file{test.dvi}) and a PostScript file (@file{test.ps}).
+
+@cindex DVI file
+
+@cindex Viewing music
+@cindex xdvi
+@cindex .dvi
+
+To view the @code{test.dvi} output, run Xdvi:
+
+@quotation
+@example
+xdvi test.dvi
+@end example
+@end quotation
+
+@c FIXME: should we say anything on xdvi-gs interaction?
+
+You should see the following in your main Xdvi window:
+@lilypond
+\score {
+  \notes { c'4 e' g' }
+} 
+@end lilypond
+
+When you're satisfied with the result, you can print the
+PostScript file:
+
+@quotation
+@example
+lpr test.ps
+@end example
+@end quotation
+If this does not make your printer produce a page of music, you should
+look into installing and configuring ghostscript.  Refer to
+GhostScript's website at @uref{http://www.ghostscript.com}.
+@cindex GhostScript
+@cindex @code{lpr}
+@cindex Printing output
+
+@cindex PostScript
+@cindex .ps
+
+
+@unnumberedsubsec Running LilyPond on Windows
+
+
+On windows, you open a LilyPond shell, and then you invoke ly2dvi
+compile your LilyPond source file, just like on Unix:
+
+@quotation
+@example
+ly2dvi -P test.ly
+@end example
+@end quotation
+You will see the following on your screen:
+
+@c FIXME: leave this out, just refer to unix section?
+@c FIXME: commands run in dos shell: we can't redirect output
+@quotation
+@example
+GNU LilyPond 1.3.150
+Now processing: `/home/tim/ly/test.ly'
+Parsing...
+Interpreting music...[1]
+ @emph{ ... some more text ... }
+PS output to test.ps...
+DVI output to test.dvi...
+@end example
+@end quotation
+
+To view the @code{test.dvi} output, run Yap
+
+@quotation
+@example
+yap test
+@end example
+@end quotation
+You should see the following in your Yap window
+@lilypond
+\score {
+  \notes { c'4 e' g' }
+} 
+@end lilypond
+
+@c FIXME: talk about newer Yap versions, proper gs installation?
+When you're satisfied with the result, you can print from within Yap
+(File/Print).  Note that Yap may not display embedded PostScript symbols
+such as beams and slurs.  Don't worry, they'll be printed anyway.
+
+You can also print the PostScript file directly from the
+command line using GSview:
+
+@quotation
+@example
+gsview32 /s test.ps
+@end example
+@end quotation
+
+
+
diff --git a/VERSION b/VERSION
index a9c088acdfb866bad7fe79953ec4407f3aa55601..8f664406f14b46706eef138461b7e48c40d10be7 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=152
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 4b5cb2ca8d46ec76269d6b49143052e429d63b32..5fd9dbdfa336335e444926bd8d58715495358c9f 100644 (file)
@@ -12,14 +12,19 @@ stems.
   
 \score { 
   \context Voice \notes\relative c' {
-       \repeat "tremolo" 8 { c16 d16 }
-       \repeat "tremolo" 4 { c16 d16 }    
-       \repeat "tremolo" 2 { c16 d16 }    
+        % huh -> one beam missing!
+       \repeat "tremolo" 8 { d16 e }
+       \repeat "tremolo" 4 { d e }
+       \repeat "tremolo" 2 { d e }
+       \repeat "tremolo" 1 { d e }
+       \repeat "tremolo" 1 { d e }
+       \break
+       \repeat "tremolo" 4 { f'8 e }
+       \repeat "tremolo" 2 { f e }    
+       \repeat "tremolo" 1 { f e }
   }
   \paper {
-    % ugh, wide
-    %linewidth = -1.0
-    linewidth = 40*\staffspace
+    linewidth = 90*\staffspace
   }  
   \midi { }
 }
index 46bf9a7131cf91e1093b2ddeb0a61b127fa4430f..77186ed8e26575a251c1ba26e7d5c9fbd8d0d92c 100644 (file)
@@ -798,6 +798,10 @@ Beam::stem_beams (Grob*me,Item *here, Item *next, Item *prev,
 
   Direction dir = Directional_element_interface::get (me);
   
+  /* [Tremolo] beams on whole notes may not have direction set? */
+ if (dir == CENTER)
+    dir = Directional_element_interface::get (here);
+  
   /* half beams extending to the left. */
   if (prev)
     {
@@ -844,8 +848,10 @@ Beam::stem_beams (Grob*me,Item *here, Item *next, Item *prev,
              b.translate_axis (-dir  * bdy * j, Y_AXIS);
              rightbeams.add_molecule (b);
            }
-         // TODO: notehead widths differ for different types
-         gap_f = nw_f / 2;
+         if (Stem::invisible_b (here))
+           gap_f = nw_f;
+         else
+           gap_f = nw_f / 2;
          w -= 2 * gap_f;
          a = Lookup::beam (dydx, w + stemdx, thick);
        }
@@ -853,7 +859,13 @@ Beam::stem_beams (Grob*me,Item *here, Item *next, Item *prev,
       for (; j  < rwholebeams; j++)
        {
          Molecule b (a);
-         b.translate (Offset (Stem::invisible_b (here) ? 0 : gap_f, -dir * bdy * j));
+         Real tx = 0;
+         if (Stem::invisible_b (here))
+           // ugh, see chord-tremolo.ly
+           tx = (-dir + 1) / 2 * nw_f * 1.5 + gap_f/4;
+         else
+           tx = gap_f;
+         b.translate (Offset (tx, -dir * bdy * j));
          rightbeams.add_molecule (b);
        }
 
index 78a2ad588587b96b586fdb3de6c981ba885f30b3..9a9017e663647cefa17ca64aa97ef188cdbfc7ed 100644 (file)
@@ -178,11 +178,11 @@ Chord_tremolo_engraver::acknowledge_grob (Grob_info info)
              don't understand this comment.
                      --hwn.
           */
-         SCM d = s->get_grob_property ("direction");
+         SCM d = s->get_grob_property ("direction");
          if (Stem::type_i (s) != 1)
            {
              int gap_i =Stem::flag_i (s) - ((Stem::type_i (s) >? 2) - 2);
-             beam_p_->set_grob_property ("beam-gap", gh_int2scm (gap_i));
+             beam_p_->set_grob_property ("gap", gh_int2scm (gap_i));
            }
          s->set_grob_property ("direction", d);
 
index 154fa206c0effa5275f6ca9deab6324ea1cc1d61..778aa81ad167650f8fadb85050f4b90da79b93da 100644 (file)
@@ -76,7 +76,7 @@
        stroke 
 } bind def 
 
-/difficult_draw_ez_ball % ch letter_col ball_col font
+/draw_ez_ball % ch letter_col ball_col font
 {
        % font
        findfont 0.7 scalefont setfont 
 } bind def
 
 % Simple, but does it work everywhere?
+% Han-Wen reports that one printer (brand?) at cs.uu.nl chokes on this,
+% reverted for now -- jcn
+%
 % The filled circles are drawn by setting the linewidth
-% to 2*radius and drawing a point.  Is that (defined to be)
-% a nice filled circle?
-/draw_ez_ball % ch letter_col ball_col font
+% to 2*radius and drawing a point.
+/simple_draw_ez_ball % ch letter_col ball_col font
 {
        % font
        findfont 0.85 scalefont setfont