]> git.donarmstrong.com Git - lilypond.git/commitdiff
''
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 16 May 2002 22:35:08 +0000 (22:35 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 16 May 2002 22:35:08 +0000 (22:35 +0000)
24 files changed:
ChangeLog
Documentation/user/GNUmakefile
Documentation/user/internals.itely
flower/include/string.hh
flower/include/virtual-methods.hh
lily/bar-line.cc
lily/grob-info.cc
lily/include/clef.hh
lily/include/command-request.hh
lily/include/item.hh
lily/include/lyric-phrasing-engraver.hh
lily/include/main.hh
lily/include/output-property.hh
lily/include/paper-def.hh
lily/include/paper-score.hh
lily/include/score.hh
lily/include/system.hh
lily/include/translator.hh
lily/input-smob.cc
lily/note-head.cc
lily/paper-outputter.cc
lily/parser.yy
scm/music-functions.scm
scm/output-lib.scm

index 7354b4b79c7ea361d353f863b35856d6fb8022e1..e2244a7a581183b7bea4b94b53d467c79a44a036 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2002-05-17  Han-Wen  <hanwen@cs.uu.nl>
+
+       * scm/music-functions.scm (check-start-chords): function to check
+       for chords without \context. Apply automatically from parser.
+
+2002-05-16  Han-Wen  <hanwen@cs.uu.nl>
+
+       * lily/bar-line.cc: remove index entries. Texinfo can't handle  :
+       in index entries.
+
+       * scm/output-lib.scm: fix ez notation stems. 
+
+       * lily/paper-outputter.cc: various fixes to speed up compilation.
+
 2002-05-16  Mats Bengtsson  <mats.bengtsson@s3.kth.se>
 
        * scripts/lilypond-book.py: Don't import pre for Python >= 2.2
@@ -54,7 +68,7 @@
        * mf/GNUmakefile (INSTALLATION_OUT_FILES4): create and install
        fonts.dir file.
 
-       * lily/parser.yy (My_lily_parser): uncomment code. (Causes
+       * lily/parser.yy (My_lily_parser): comment out code. (Causes
        problems  with recent bison releases).
 
        * make/lilypond.redhat.spec.in: add pfa fonts to X. 
index def4e0dd4d07f3d00fc81dcf1324d15c6ea18ff1..b28fc119984fcf944b74c70b1e3e75328de83b64 100644 (file)
@@ -120,7 +120,7 @@ ifneq ($(CROSS),yes)
 # however, this triggers compilation during install, which  is a bad thing (tm).
 
 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(depth)/$(builddir)/lily/$(outconfbase)/lilypond
-       cd $(outdir) && ../$(depth)/$(builddir)/lily/$(outconfbase)/lilypond ../$(src-depth)/ly/generate-documentation
+       cd $(outdir) && ../$(depth)/$(builddir)/lily/$(outconfbase)/lilypond --verbose ../$(src-depth)/ly/generate-documentation
        -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
 
 
index 51fc93f0489366c3dca70658c6ada033ac46028d..a22b7acf3b1e733a0df936c298d821c12ff81223 100644 (file)
@@ -177,7 +177,7 @@ extract the alteration from pitch  @var{p}.
 calculate the number of semitones of @var{p} from central C.
 @end defun
 
-@defun Pitch::transpose t p
+@defun Pitch@code{:}@code{:}transpose t p
 Transpose @var{p} by the amount @var{t}, where @var{t} is the pitch that
 central C is transposed to. 
 @end defun
@@ -238,11 +238,11 @@ retrieve the value of @var{sym} from context @var{tr}
 set value of property @var{sym} in context @var{tr} to @var{val}.
 @end defun
 
-@defun Translator::name tr
+@defun Translator@code{:}@code{:}name tr
 Return the type name of the translator @var{tr}.
 @end defun 
 
-@defun Translator::description tr
+@defun Translator@code{:}@code{:}description tr
 Return an alist of properties of  translator @var{tr}.
 @end defun
 
index 921afb2a65d2f6b14dff230e6e005649fe1b541d..4737be12d2eddf50814180313b72c2ec0a867200 100644 (file)
@@ -53,7 +53,7 @@ class ostream;
 
 \item
   No operator[] is provided, since this would be enormously  slow. If needed,
-  convert to char const* .
+k  convert to char const* .
 \end{itemize}
 
 */
index 45e610412748cf5824703db2ec4b1295cf21bd7c..eb144367a9ae1116ba1d69e5071a12b33bfdcdfc 100644 (file)
@@ -28,17 +28,13 @@ demangle_classname (std::type_info const &);
    
  */
 
-// fix constness: gcc-2.95 is correct in defining
-//    typeof (*this)
-// in a const member function to be const
-
-#if 0
-#define VIRTUAL_COPY_CONS(base) \
-  virtual base *clone () const \
-  { \
-    return new typeof (*this) (*this); \
-  }
-#else
+/*
+  fix constness: gcc-2.95 is correct in defining
+  
+    typeof (*this)
+    
+  in a const member function to be const
+*/
 #define VIRTUAL_COPY_CONS(base) \
   virtual base* clone_const_helper () \
     { \
@@ -49,6 +45,6 @@ demangle_classname (std::type_info const &);
       base* urg = (base*)this; \
       return urg->clone_const_helper (); \
     }
-#endif 
+
 
 #endif /* VIRTUAL_METHODS_HH */
index e124e3a658b1b98ff896fff951d90b21a64243da..f48667ede9fd6bff5056ab720c71e2d9f4d5827e 100644 (file)
@@ -196,24 +196,10 @@ ADD_INTERFACE (Bar_line, "bar-line-interface",
 This is a request to print a special bar symbol. It replaces the 
 regular bar symbol with a special
 symbol.  The argument @var{bartype} is a string which specifies the
-kind of bar to print.  Options are @code{:|}
-@cindex |A@@@code{:|}
-,
-@code{|:}
-@cindex |B@@@code{|:}
-, @code{:|:}
-@cindex |C@@@code{:|:}
-,
-@code{||}
-@cindex |D@@@code{||}
-, @code{|.}
-@cindex |E@@@code{|.}
-,
-@code{.|}
-@cindex |F@@@code{.|}
-, and @code{.|.}
-@cindex |G@@@code{.|.}
-. 
+kind of bar to print.  Options are @code{:|},
+@code{|:}, @code{:|:},
+@code{||}, @code{|.},
+@code{.|}, and @code{.|.}. 
 
 These produce, respectively, a right repeat, a left repeat, a double
 repeat, a double bar, a start bar, an end bar, and a thick double bar.
index 4cc90129c4cec169bd1bd85d92a2e0004753df11..9b4d540e0e74416a3716a645de672447017ae7d2 100644 (file)
@@ -5,10 +5,10 @@
 
   (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
+
 #include "grob.hh"
 #include "grob-info.hh"
-#include "request.hh"
-#include "translator.hh"
+#include "music.hh"
 #include "translator-group.hh"
 
 Grob_info::Grob_info (Grob*s_l)
index 0f0d4f0ce9e625828fa5bea2759658a1db2324f9..5f05fe31d82c4fca0354e81203f5adde64b808f0 100644 (file)
@@ -1,5 +1,5 @@
 /*   
-  clef.hh -- declare 
+  clef.hh -- declare Clef
   
   source file of the GNU LilyPond music typesetter
   
index 204e93fbd655d211e85ef6f421a53b3849e10d92..0d05e7dbf55314a86c423600ff406c18fd039fd9 100644 (file)
@@ -14,7 +14,7 @@
 #include "array.hh"
 #include "duration.hh"
 #include "pitch.hh"
-#include "protected-scm.hh"
+
 
 class Break_req : public Request {
 public:
index 408e73ddebbc0834e3c5fe29c04d89493e0b8b81..e7bb84178910010d99fb69fbd33a84e7145c65d7 100644 (file)
@@ -12,7 +12,7 @@
 #include "box.hh"
 #include "grob.hh"
 #include "drul-array.hh"
-#include "protected-scm.hh"
+
 
 /**
   A horizontally fixed size element of the score.
index 8a336e55ae59c2d4eeaccc19d2beadcb375f0960..ef0db36a9195508f956e2b24819c0ee5b27086bd 100644 (file)
@@ -14,6 +14,7 @@
 #include "engraver.hh"
 #include "item.hh"
 #include "smobs.hh"
+#include "protected-scm.hh"
 
 class Syllable_group;
 
@@ -80,6 +81,9 @@ public:
 
 private:
   /** association list of Syllable_group smobs
+
+  fixme: should use property.
+  
   */
   Protected_scm voice_alist_;
   Grob * any_notehead_l_;
index 0fadb2524af66638c513fe4427102a74e414c21b..e7caae383ccf957def54200cbf3498e8bc485f90 100644 (file)
@@ -41,7 +41,4 @@ extern File_path global_path;
 extern int score_count_global;
 extern Sources* source_global_l;
 
-#include <iostream.h> /* gcc 3.0 */
-
-
 #endif /* MAIN_HH */
index be204448b15b1c5035ca16de7ab16113373a42c7..015225e54836042e3f36e2887cb28fe7f07159db 100644 (file)
@@ -11,7 +11,7 @@
 #define OUTPUT_PROPERTY_HH
 
 #include "music.hh"
-//#include "protected-scm.hh"
+
 
 /*
   
index 6bc9df23d3a37fec080fa951a667bc2f05d2f436..5987e6527f46838c209371eeff688f60c2b081ef 100644 (file)
 #include "lily-proto.hh"
 #include "lily-guile.hh"
 #include "real.hh"
-
-#include "moment.hh"
 #include "array.hh"
 #include "interval.hh"
 #include "music-output-def.hh"
-#include "protected-scm.hh"
+
 
 /** 
 
index 940a4fb62b929c05f8b6c8e051126aca71288679..a24a75c6ed38d2be29d2f5e3c0328f5472628a29 100644 (file)
@@ -15,7 +15,7 @@
 #include "lily-proto.hh"
 #include "music-output.hh"
 #include "lily-guile.hh"
-#include "protected-scm.hh"
+
 
 /** all stuff which goes onto paper. notes, signs, symbols in a score
      #Paper_score# contains the items, the columns.
index 6019c8fa116e9ab58663f7c4e5e390276af872ba..91db1701874e22bcf818cd09b4ca260f3517c121 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "input.hh"
 #include "lily-proto.hh"
-#include "protected-scm.hh"
+
 #include "parray.hh"
 #include "smobs.hh"
 
index 7f67f070a893d4aeb875f497b8eae73d34bcc30c..3e838b268cb632fae0b565d7c4a42df47fb4ad23 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef SCORELINE_HH
 #define SCORELINE_HH
 
-#include "protected-scm.hh" 
+
 #include "column-x-positions.hh"
 #include "spanner.hh"
 
index dbe0ff7e628e2901932915862d1e2fae4291467a..fa0854866814777c911a9015539f6c9dab64dc26 100644 (file)
@@ -15,7 +15,6 @@
 #include "lily-proto.hh"
 #include "virtual-methods.hh"
 #include "lily-guile.hh"
-#include "parray.hh"
 #include "input.hh"
 #include "smobs.hh"
 
index 89a96a1e4a4909c2f145734821be3dd795b19008..af9180a744f58a534028bc775de1b0d08c0c0a43 100644 (file)
@@ -36,7 +36,8 @@ free_smob (SCM s)
 }
 
 /*
-  for unknown reason, we don't use IMPLEMENT_TYPE_P
+  We don't use IMPLEMENT_TYPE_P, since the smobification part is
+  implemented separately from the class.
  */
 SCM
 ly_input_p (SCM x)
@@ -44,6 +45,19 @@ ly_input_p (SCM x)
   return unsmob_input (x) ? SCM_BOOL_T : SCM_BOOL_F ;
 }
 
+SCM
+ly_input_message (SCM sip, SCM msg)
+{
+  Input *ip  = unsmob_input(sip);
+  
+  SCM_ASSERT_TYPE(ip, sip, SCM_ARG1, __FUNCTION__, "input location");
+  SCM_ASSERT_TYPE(gh_string_p(msg), msg, SCM_ARG2, __FUNCTION__, "string");
+
+  String m = ly_scm2string (msg);
+
+  ip->message (m);
+  return SCM_UNDEFINED;
+}
 
 
 static void
@@ -58,6 +72,8 @@ start_input_smobs ()
   
   scm_c_define_gsubr ("ly-input-location?", 1, 0, 0,
                      (Scheme_function_unknown)ly_input_p);
+  scm_c_define_gsubr ("ly-input-message", 2, 0, 0,
+                     (Scheme_function_unknown)ly_input_message);
 }
 
 SCM
index 23328569c5ec438bfc6654d29f9d1b34432d5faa..01ecae6a330d3cfd4733bf67243e8598c35a3b1c 100644 (file)
@@ -173,11 +173,14 @@ Note_head::brew_molecule (SCM smob)
 
 /*
   Compute the width the head without ledgers.
+
+  -- there used to be some code from the time that ledgers
+  did take space. Nowadays, we can simply take the standard extent.
  */
 Interval
 Note_head::head_extent (Grob *me, Axis a)
 {
-  return internal_brew_molecule (me, false).extent (a);
+  return me->get_molecule()->extent (a);
 }
 
 
index 7f1cfaac4ca19bdf2739895846cdf5f0e4a2419e..5e8c509807f53d6881d1ab2d411858cca763fd65 100644 (file)
@@ -8,10 +8,8 @@
 */
 
 #include <time.h>
-
 #include <math.h>
 
-
 #include "dimensions.hh"
 #include "virtual-methods.hh"
 #include "paper-outputter.hh"
index 22d49dc65abf8983f4fe674581cc0d4e51559ba0..c1a0b28271f7eaa856f5121affd26c81e9d0be97 100644 (file)
@@ -570,6 +570,13 @@ score_body:
                SCM m = $1->self_scm ();
                scm_gc_unprotect_object (m);
                $$->music_ = m;
+
+               /*
+                       guh.
+               */
+               SCM check_func = scm_c_eval_string ("check-start-chords");
+               gh_call1 (check_func, m);
+               
        }
        | SCORE_IDENTIFIER {
                $$ = new Score (*unsmob_score ($1));
@@ -741,10 +748,12 @@ Sequential_music:
        SEQUENTIAL '{' Music_list '}'           {
                $$ = new Sequential_music (SCM_EOL);
                $$->set_mus_property ("elements", ly_car ($3));
+               $$->set_spot(THIS->here_input());
        }
        | '{' Music_list '}'            {
                $$ = new Sequential_music (SCM_EOL);
                $$->set_mus_property ("elements", ly_car ($2));
+               $$->set_spot(THIS->here_input());
        }
        ;
 
@@ -752,11 +761,13 @@ Simultaneous_music:
        SIMULTANEOUS '{' Music_list '}'{
                $$ = new Simultaneous_music (SCM_EOL);
                $$->set_mus_property ("elements", ly_car ($3));
+               $$->set_spot(THIS->here_input());
 
        }
        | '<' Music_list '>'    {
                $$ = new Simultaneous_music (SCM_EOL);
                $$->set_mus_property ("elements", ly_car ($2));
+               $$->set_spot(THIS->here_input());
        }
        ;
 
index 77b54f113cee4799c6ac8f2d1a57588780777808..81d56d38819a983a9039c6c72fb553971e601617 100644 (file)
@@ -240,3 +240,52 @@ this is not an override
      ))
 
 ;;;
+
+;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;
+
+(define (has-request-chord elts)
+  (reduce (lambda (x y) (or x y)) (map (lambda (x) (equal? (ly-music-name x)
+                                                          "Request_chord")) elts)
+  ))
+
+(define (ly-music-message music msg)
+  (let* (
+      (ip (ly-get-mus-property music 'origin))
+      )
+
+    (if (ly-input-location? ip)
+       (ly-input-message ip msg)
+       (ly-warn msg))
+  ))
+  
+(define (check-start-chords music)
+  "Check music expression for a Simultaneous_music containing notes
+(ie. Request_chords), without context specification.
+
+Called  from parser.
+"
+     (let*
+       ((es (ly-get-mus-property music 'elements))
+       (e (ly-get-mus-property music 'element))
+       (name (ly-music-name music)) 
+       )
+
+       (cond 
+        ((equal? name "Context_specced_music") #t)
+        ((equal? name "Simultaneous_music")
+
+         (if (has-request-chord es)
+             (ly-music-message music "Starting score with a chord.
+Please insert an explicit \\context before chord")
+             (map check-start-chords es)))
+        
+        ((equal? name "Sequential_music")
+          (if (pair? es)
+              (check-start-chords (car es))))
+         (else (if (music? e) (check-start-chords e )))
+       
+       ))
+
+     music
+     )
index 254732788f0eb638991885ff352be9c6bb384b42..8ae4df7790d8edeb1aeedace236ecddc2b298299 100644 (file)
@@ -91,6 +91,8 @@ centered, X==1 is at the right, X == -1 is at the left."
     ((harmonic) '(1.0 0.0))
     ((triangle) '(0.75 . 0.15))
     (else
+
+     ;; this also works for easy notation.
      '(1.0 . 0.0)
      )))