]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.59
authorfred <fred>
Tue, 26 Mar 2002 23:22:51 +0000 (23:22 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:22:51 +0000 (23:22 +0000)
54 files changed:
aclocal.m4
buildscripts/set-lily.sh
config.make.in
flower/file-path.cc
flower/include/file-path.hh
input/test/keys.ly
input/test/keys2.ly
lily/audio-item.cc
lily/command-request.cc
lily/include/audio-item.hh
lily/include/bar.hh
lily/include/beam.hh
lily/include/breathing-sign.hh
lily/include/chord-name.hh
lily/include/command-request.hh
lily/include/crescendo.hh
lily/include/dots.hh
lily/include/extender-spanner.hh
lily/include/hyphen-spanner.hh
lily/include/key-def.hh
lily/include/key-engraver.hh
lily/include/key-item.hh
lily/include/key-performer.hh
lily/include/local-key-item.hh
lily/include/multi-measure-rest.hh
lily/include/newkey-def.hh [new file with mode: 0644]
lily/include/note-head.hh
lily/include/rest.hh
lily/include/score-element.hh
lily/include/slur.hh
lily/include/staff-symbol.hh
lily/include/stem-tremolo.hh
lily/include/stem.hh
lily/include/sustain-pedal.hh
lily/include/text-item.hh
lily/include/tie.hh
lily/include/time-signature.hh
lily/include/tuplet-spanner.hh
lily/include/volta-spanner.hh
lily/key-item.cc
lily/key-performer.cc
lily/local-key-engraver.cc
lily/main.cc
lily/midi-item.cc
lily/my-lily-lexer.cc
lily/newkey-def.cc [new file with mode: 0644]
lily/parser.yy
lily/piano-pedal-engraver.cc
lily/sustain-pedal.cc
lily/system-start-delimiter.cc
ly/engraver.ly
make/toplevel.make.in
scm/lily.scm
stepmake/aclocal.m4

index 4e032e115e26794d51f8509c910c3533619a88f3..25ba3293eb21aae4913762ba1744026668b9d528 100644 (file)
@@ -1,5 +1,3 @@
-dnl WARNING WARNING WARNING WARNING
-dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
 dnl aclocal.m4   -*-shell-script-*-
 dnl StepMake subroutines for configure.in
 
@@ -555,26 +553,33 @@ AC_DEFUN(XXAC_STEPMAKE_TEXMF_DIRS, [
 ])
 
 AC_DEFUN(AC_STEPMAKE_TEXMF_DIRS, [
-    AC_ARG_ENABLE(tex-tfmdir,
-    [  enable-tex-tfmdir=DIR   set the tex-directory where cmr10.tfm lives (default: use kpsewhich)],
-    [TFMDIR=$enableval],
-    [TFMDIR=auto] )
+    AC_ARG_ENABLE(tfm-path,
+    [  enable-tfm-path=PATH   set path of tex directories where tfm files live, esp.: cmr10.tfm (default: use kpsewhich)],
+    [tfm_path=$enableval],
+    [tfm_path=auto] )
 
     AC_CHECK_PROGS(KPSEWHICH, kpsewhich, no)
-    AC_MSG_CHECKING(for TeX TFM directory)
-    if test "x$TFMDIR" = xauto ; then
-       if test "x$TEX_TFMDIR" = "x" ; then
-           if test "x$KPSEWHICH" != "xno" ; then
-               CMR10=`kpsewhich tfm cmr10.tfm`
-               TEX_TFMDIR=`dirname $CMR10`
-           else
-               AC_STEPMAKE_WARN(Please set TEX_TFMDIR (to where cmr10.tfm lives):
-       TEX_TFMDIR=/usr/local/TeX/lib/tex/fonts ./configure)
-           fi
+    AC_MSG_CHECKING(for tfm path)
+
+    TFM_FONTS="cmr msam"
+
+    if test "x$tfm_path" = xauto ; then
+       if test "x$KPSEWHICH" != "xno" ; then
+           for i in $TFM_FONTS; do
+               dir=`$KPSEWHICH tfm ${i}10.tfm`
+               TFM_PATH="$TFM_PATH `dirname $dir`"
+           done
+       else
+           AC_STEPMAKE_WARN(Please specify where cmr10.tfm lives:
+    ./configure --enable-tfm-path=/usr/local/TeX/lib/tex/fonts)
        fi
+    else
+         TFM_PATH=$tfm_path
     fi
-    AC_MSG_RESULT($TEX_TFMDIR)
-    AC_SUBST(TEX_TFMDIR)
+
+    TFM_PATH=`echo $TFM_PATH | tr ':' ' '`
+    AC_MSG_RESULT($TFM_PATH)
+    AC_SUBST(TFM_PATH)
 ])
 
 AC_DEFUN(AC_STEPMAKE_TEXMF, [
@@ -793,9 +798,7 @@ dnl             find the libraries.
 AC_DEFUN([GUILE_FLAGS],[
 ## The GUILE_FLAGS macro.
   AC_MSG_CHECKING(for Guile)
-  if $guile_config link > /dev/null ; then
-      :
-  else
+  if ! $guile_config link > /dev/null ; then
       AC_MSG_RESULT("cannot execute $guile_config")
       AC_MSG_ERROR("cannot find guile-config; is Guile installed?")
       exit 1
index df01378c4567b5e61d2e43ceb28c940078c197a2..9775748d185086c2db855206ac9a83b1f3099dbc 100644 (file)
@@ -60,14 +60,13 @@ showln -sf $LILYPOND_SOURCEDIR/buildscripts/out/genheader $prefix/bin/genheader
 showln -sf $LILYPOND_SOURCEDIR/scripts/out/as2text $prefix/bin/as2text
 
 
-
 testmkdir $prefix/share
 rm -rf $prefix/share/lilypond
 showln -sf $sources/lilypond $prefix/share/lilypond
 
 
 BUILDDIR=`pwd`
-LOCALES="de it nl fr"
+LOCALES="de fr it ja nl ru"
 for i in $LOCALES; do
        dir=$BUILDDIR/share/locale/$i/LC_MESSAGES
        if test ! -x $dir ; then
@@ -78,12 +77,20 @@ for i in $LOCALES; do
 done
 rm -f afm; showln -sf $BUILDDIR/mf/out afm
 rm -f tfm; showln -sf $BUILDDIR/mf/out tfm
-if test "x$TEX_TFMDIR" = "x" ; then
-       CMR10=`kpsewhich tfm cmr10.tfm`
-       TEX_TFMDIR=`dirname $CMR10`
-fi
-rm -f cmtfm; showln -sf $TEX_TFMDIR $BUILDDIR/cmtfm
 
+TFM_FONTS="cmr msam"
+for i in $TFM_FONTS; do
+    dir=`kpsewhich tfm ${i}10.tfm`
+    TFM_PATH="$TFM_PATH `dirname $dir`"
+done
+
+# urg: GNU make's $(word) index starts at 1
+i=1
+for dir in $TFM_PATH; do
+       rm -f $BUILDDIR/tfm.$i;
+       showln -s $dir $BUILDDIR/tfm.$i
+       i=$((i + 1))
+done
 
 if [ -f ../.gdbinit.lilypond ];
 then
@@ -98,7 +105,7 @@ echo
 
 echo Starting configuration
 echo
-(set -x; TEX_TFMDIR=$TEX_TFMDIR ./configure --prefix=$prefix --enable-debugging --enable-printing --enable-checking --disable-optimise)
+(set -x; ./configure --prefix=$prefix --enable-debugging --enable-printing --enable-checking --disable-optimise)
 
 echo "Making tags in background..."
 make TAGS > /dev/null 2>&1 &
index 8a72dfea93dcdebac7d0be4ac35568538cb976ae..23798deabf1f6f15d8f833c10b5ddf9774660ef2 100644 (file)
@@ -38,7 +38,8 @@ localedir = @localedir@
 program_prefix = @program_prefix@
 program_suffix = @program_suffix@
 EXTRA_LIBES = @EXTRA_LIBES@ @LIBS@
-TEX_TFMDIR = @TEX_TFMDIR@
+TFM_PATH = @TFM_PATH@
+TFM_SUFFIXES = @TFM_SUFFIXES@
 RANLIB = @RANLIB@
 DEFS = @DEFS@
 #SET_MAKE = @SET_MAKE@
index 5f430ce9a070f6941a2c18e5ab7544f39c1efd03..10df133946ee45fe911d512d60a349332c912dc5 100644 (file)
@@ -110,10 +110,27 @@ File_path::find (String nm) const
   return "";
 }
 
+/**
+   Add an directory, return false if failed
+ */
+bool
+File_path::try_add (String s)
+{
+  if (s == "")
+    s =  ".";
+  FILE  * f = fopen (s.ch_C(), "r");
+  if (!f)
+    return false;
+  fclose (f);
+    
+  push (s);
+  return true;
+}
+
 void
 File_path::add (String s)
 {
-   push (s); 
+  push (s);
 }
 
 String
index 15c295ba4b3880fa593ab8b6ba05422f8322d8cb..fdaf3e254a8dbf518156418626651cb3b0f0e0dc 100644 (file)
@@ -30,7 +30,8 @@ public:
 
   Array<String>::push;
   String str ()const;
-  void add (String str);
+  bool try_add (String str);
+  void add (String);
   void parse_path (String);
 };
 
index 98ddbe08b0087b5e6460e37cd768fa7692a75795..35b11a9a1521c62735d6b7c3248ac1b4b5b53fde 100644 (file)
@@ -4,8 +4,14 @@
   \notes \relative c''
   {
        \property Staff. createKeyOnClefChange = ##t  
-    \key bes; c2 \key c \minor;  c2
+    \key bes; c2
+%    \key c ; %  \minor;
+    \key es ; %  \minor;
+    c2
     \break
-    \key bes \major; c2 \clef alto; c2   \key d; c1
+    \key bes ; % \major;
+    c2 \clef alto; c2   \key d; \clef treble; c2
+       \property Staff. keySignature = #'((2 . -1)  (6 . -1) (4 . -1))
+       e2
   }
 }
index 944cc8fb16cdbbd5201093ef07d21ee7e2df11c1..b9209cfe48c4198919d9968ae3b48fdf69b296c4 100644 (file)
@@ -9,7 +9,7 @@ blah = \notes {
        [cis8 d e f] [e! a b cis'] |
        es e f e a a' a  a' |
  \clef "bass";  }
-  [es16 c' b a] [g f es d] [c d es d] [c Bes As G] |
+  [es16 c' b a] [g f es d] [c d es d] [c bes, as, g,] |
 
 \clef "violin";
        \keysignature  c;
index 5d78ec4bd58794be869199bcbe49e7bc33cf4f13..4e771ca08e23aaadfbd3ac325971a3333e1d345e 100644 (file)
@@ -40,9 +40,9 @@ Audio_note::tie_to (Audio_note* t)
 }
 
                    
-Audio_key::Audio_key (Key_def const& k)
+Audio_key::Audio_key () // Key_def const& k)
 {
-  key_ = k;
+  //fixme.
 }
 
 Audio_dynamic::Audio_dynamic (Real volume)
index 3f941f3fe17872d438ce1d09f7c398ca7b7e9632..fea2de22a4a8bdd6e6af1c873290b3d19e22fce1 100644 (file)
@@ -111,7 +111,7 @@ Key_change_req::Key_change_req ()
 Key_change_req::Key_change_req (Key_change_req const&s)
   : Request (s)
 {
-  key_ = s.key_ ?  new Key_def (*s.key_) : 0;
+  key_ = s.key_ ?  new Newkey_def (*s.key_) : 0;
 }
 
 Key_change_req::~Key_change_req ()
index ef13d9f0216daa7d719c24326e7380b71b0fc913..b06ab920c997de089f03ce7e4640a707ec258f51 100644 (file)
@@ -7,11 +7,11 @@
 #ifndef AUDIO_ITEM_HH
 #define AUDIO_ITEM_HH
 
- #include <typeinfo>
+#include <typeinfo>
 #include "lily-proto.hh"
 #include "string.hh"
 #include "audio-element.hh"
-#include "key-def.hh"
+
 #include "musical-pitch.hh"
 #include "moment.hh"
 #include "drul-array.hh"
@@ -48,9 +48,8 @@ public:
 class Audio_key : public Audio_item
 {
 public:
-  Audio_key (Key_def const& key);
-
-  Key_def key_;
+  Audio_key (); //Newkey_def const& key);
+  // FIXME
 };
 
 class Audio_instrument : public Audio_item
index 6673cea6f95c96e1090b0eb1981056869872f1e3..bfb2ce7379f0bb3e3d061d38b64eaa15d9ff6c28 100644 (file)
@@ -23,7 +23,7 @@ public:
 
 protected:
   virtual void before_line_breaking ();
-  virtual Molecule  do_brew_molecule () const;
+  Molecule  do_brew_molecule () const;
   virtual Real get_bar_size () const;
 };
 #endif // BAR_HH
index 99eac088af3a3482a4090bb07614e468c337f40b..9021a08ab05374486082dde59ea481e77e797bd9 100644 (file)
@@ -49,7 +49,7 @@ protected:
  
   virtual void before_line_breaking ();
   virtual void after_line_breaking ();
-  virtual Molecule do_brew_molecule () const;
+  Molecule do_brew_molecule () const;
 
   Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const;
 private:
index a2b0181d2b6bc0f4b3224bab07bfd3d8a9154112..6ecf02e263908594fe8dc83e4c9bf914994b9bcf 100644 (file)
@@ -26,7 +26,7 @@ public:
   Breathing_sign (SCM s);
 protected:
   virtual void after_line_breaking ();
-  virtual Molecule do_brew_molecule () const;
+  Molecule do_brew_molecule () const;
 };
 
 #endif // BREATHING_SIGN_HH
index 80bc855e4396303b3e375503d6eeb5227687dd47..d89e81c2e3e543745ae9dd0c72c517b07efe3892 100644 (file)
@@ -29,7 +29,7 @@ VIRTUAL_COPY_CONS (Score_element);
   Molecule ly_text2molecule (SCM scm) const;
   Chord_name(SCM s);
 protected:
-  virtual Molecule do_brew_molecule () const;
+  Molecule do_brew_molecule () const;
 
 };
 
index f8755a92dbc16cd7a9e9393fc383e0c01b94c5f1..a79e71132510f44142570ca3c2d6991170057003 100644 (file)
@@ -14,7 +14,7 @@
 #include "array.hh"
 #include "duration.hh"
 #include "musical-pitch.hh"
-#include "key-def.hh"
+#include "newkey-def.hh"
 #include "protected-scm.hh"
 
 class Break_req : public Request {
@@ -102,13 +102,16 @@ class Breathing_sign_req : public Request {
     Routines for sharps and flats are separated, 
     so that caller may identify non-conventional keys.
 */
+/*
+  UGH!
+ */
 class Key_change_req  : public Request
 {
 public:
   Key_change_req ();
   ~Key_change_req();
   Key_change_req(Key_change_req const &);
-  Key_def *key_;
+  Newkey_def *key_;
 
 protected:
   VIRTUAL_COPY_CONS(Music);
index e43f005e61bea9b50554a1b7145c03fb6035d063..a9d45763207e63a8879ba50cce90a27bed7122d7 100644 (file)
@@ -23,7 +23,7 @@ public:
 Crescendo(SCM);
 protected:
   VIRTUAL_COPY_CONS(Score_element);
-  virtual Molecule do_brew_molecule() const;
+  Molecule do_brew_molecule() const;
     
 private:
   Molecule get_symbol() const;
index 8f33241c68ec1e8f944b2b84ed7d9d3c50249040..ace3555c6c4195efc227638f145f30a50512fda7 100644 (file)
@@ -26,7 +26,7 @@
 class Dots :  public Item
 {
 protected:
-  virtual Molecule do_brew_molecule () const;
+  Molecule do_brew_molecule () const;
   virtual void after_line_breaking ();
 public:
    static SCM scheme_molecule (SCM);
index b921217dbee55b02d0e7da9118fd660229280728..a86a3d0e03eb3286bbdf18575af2bf4929d75fdb 100644 (file)
@@ -36,7 +36,7 @@ public:
   
 
 protected:
-  virtual Molecule do_brew_molecule () const;
+  Molecule do_brew_molecule () const;
   void after_line_breaking ();
  
   VIRTUAL_COPY_CONS (Score_element);
index 1270bce805216b477eb6cddab271db9afefba284..920c4c35fa2871638658a675a86e85938e746091 100644 (file)
@@ -27,7 +27,7 @@ public:
   
 
 protected:
-  virtual Molecule do_brew_molecule () const;
+  Molecule do_brew_molecule () const;
   Interval do_height () const;
 
   void after_line_breaking ();
index 160e7c43cbc2297d5994b60fae3ef63a88e6b32c..65296f81060baccd891380179b283fc7515acef0 100644 (file)
@@ -1,50 +1,2 @@
-/*   
-  key-def.hh -- declare Key_def
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2000 Jan Nieuwenhuizen <janneke@gnu.org>
-  
- */
 
-#ifndef KEY_DEF_HH
-#define KEY_DEF_HH
-
-#include "array.hh"
-#include "musical-pitch.hh"
-
-/**
-  Universal key definition (Should rename class Key to 'Accidentals'?)
-
-  FIXME: merge key.hh and key-def.hh classes.
-
-  FIXME: use Scheme data structs for this.
- */
-class Key_def
-{
-public:
-  Key_def ();
-  
-  Array<Musical_pitch> pitch_arr_;
-  int modality_i_;
-  bool ordinary_key_b_;
-
-  /// squash the octaves to 1
-  void squash_octaves ();
-
-  /// return number accidentals in key; ordinary key only
-  int ordinary_accidentals_i () const;
-
-  /// return number of flats in key
-  int flats_i () const;
-
-  /// return number of sharps in key
-  int sharps_i () const;
-
-  /// modality == 3
-  bool minor_b () const;
-
-  void transpose (Musical_pitch d);
-};
-
-#endif /* KEY_DEF_HH */
+#error
index 408f961d67d9725b7bd1f6b361a235c4e780be86..0b1be334fec3f84bb9841868e7ef4e14808f7154 100644 (file)
@@ -9,44 +9,5 @@
 
 #ifndef KEYGRAV_HH
 #define KEYGRAV_HH
-
-#include "engraver.hh"
-
-#include "musical-pitch.hh"
-#include "protected-scm.hh"
-#include "newkey.hh"
-
-
-/**
-  Make the key signature.
- */
-class Key_engraver : public Engraver {
-  void create_key(bool);
-  void read_req (Key_change_req const * r);
-
-public:
-  Key_engraver();
-  
-  VIRTUAL_COPY_CONS(Translator);
-
-  /*
-    TODO: move these into properties.
-   */
-  Newkey key_;
-  Key_change_req * keyreq_l_;
-  Key_item * item_p_;
-
-  Protected_scm old_accs_;
-  Protected_scm new_accs_;  
-
-  bool key_changed_b() const;
-    
-protected:
-  virtual bool do_try_music (Music *req_l);
-  virtual void do_process_music();
-  virtual void do_pre_move_processing();
-  virtual void do_post_move_processing();
-  virtual void acknowledge_element (Score_element_info);
-};
-
+#error
 #endif // KEYGRAV_HH
index 67b1d6c935f86482cbf805df3fdd10ed9c65356d..8743259021623add22abd8b23e5bfb9427932728 100644 (file)
@@ -33,7 +33,7 @@ public:
   
 
 protected:
-  virtual Molecule do_brew_molecule() const;
+  Molecule do_brew_molecule() const;
 };
 
 #endif // KEYITEM_HH
index 535cb3e1bdcde6c9996b877233040239f4fc7fab..512bd48a53e4ac7254011267667f82138cb8e290 100644 (file)
@@ -21,7 +21,6 @@ public:
   ~Key_performer();
 
 protected:
-  void do_print() const;
   virtual bool do_try_music (Music* req_l);
   virtual void do_process_music ();
   virtual void do_pre_move_processing ();
index 400d7de2a7af387ed40dbadbac89cab554616bdd..ccedf0f9b7e7fa222d1bf8248678b6a41d2827a9 100644 (file)
@@ -46,7 +46,7 @@ public:
   void add_pitch (Musical_pitch, bool cautionary, bool natural);
 protected:
   virtual void before_line_breaking ();
-  virtual Molecule do_brew_molecule() const;
+  Molecule do_brew_molecule() const;
 };
 
 #endif // LOCALKEYITEM_HH
index eba41029b21b69c4430904264e94a2a03d35bac3..4349b8d3cf48a6012db42c883382a2dac7ff26fd 100644 (file)
@@ -23,7 +23,7 @@ public:
   void add_column (Item*);
   Molecule compound_rest (int)const;
 protected:
-  virtual Molecule do_brew_molecule () const;
+  Molecule do_brew_molecule () const;
   VIRTUAL_COPY_CONS (Score_element);
 
   virtual void do_add_processing ();
diff --git a/lily/include/newkey-def.hh b/lily/include/newkey-def.hh
new file mode 100644 (file)
index 0000000..dfa20c6
--- /dev/null
@@ -0,0 +1,36 @@
+/*   
+  newkey-def.hh -- declare Newkey_def
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef NEWKEY_DEF_HH
+#define NEWKEY_DEF_HH
+
+#include "protected-scm.hh"
+#include "musical-pitch.hh"
+
+class Newkey_def
+{
+
+public:
+  Protected_scm  pitch_alist_;
+
+  Newkey_def();
+  
+  /// return number of flats in key
+  int flats_i () const;
+
+  /// return number of sharps in key
+  int sharps_i () const;
+  int accs_i (int) const;
+  
+  void transpose (Musical_pitch d);
+};
+
+#endif /* NEWKEY_DEF_HH */
+
+
index 0ce36022fc912f775b3b28be1cad57bd1b62b1ed..eb86e467704e599f415578b4d287edeeef5c1962 100644 (file)
@@ -30,7 +30,7 @@ public:
   Note_head (SCM);
 protected:
   virtual void before_line_breaking ();
-  virtual Molecule do_brew_molecule() const;
+  Molecule do_brew_molecule() const;
 };
 #endif // NOTEHEAD_HH
 
index 0b0ebef383c9e18f94b4aa375e2c9a5b66bf0177..1977bd67388559ed925fc8c9116004d32b163f55 100644 (file)
@@ -23,7 +23,7 @@ class  Rest : public Rhythmic_head
 {
 protected:
   virtual void after_line_breaking ();
-  virtual Molecule do_brew_molecule () const;
+  Molecule do_brew_molecule () const;
 public:
    static SCM scheme_molecule (SCM);
   
index 276fe75e3e0666bb74c99ecaa54adf837d34daaf..2ded67f8cc51fa228fd41fe17b408b9bff2c9ae9 100644 (file)
@@ -184,7 +184,7 @@ protected:
   
   ///executed directly after the item is added to the Paper_score
   virtual void do_add_processing ();
-  virtual Molecule do_brew_molecule ()const;
+  Molecule do_brew_molecule ()const;
   
   static Interval dim_cache_callback (Dimension_cache const*);
   
@@ -245,14 +245,7 @@ public:
 
 Score_element * unsmob_element (SCM);
 
-#define MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(TYPE)                              \
-SCM                                                            \
-TYPE::scheme_molecule (SCM smob)                               \
-{                                                              \
-  TYPE * b = dynamic_cast<TYPE*> (unsmob_element (smob));      \
-  return b ?  b->do_brew_molecule ().create_scheme () : SCM_EOL; \
-}                                                              \
-                                                               \
+#define MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(TYPE)                          \
 void                                                           \
 TYPE ## __init_functions ()                                    \
 {                                                              \
@@ -262,6 +255,16 @@ TYPE ## __init_functions ()                                        \
                                                                \
 ADD_SCM_INIT_FUNC(TYPE ## _molecule, TYPE ## __init_functions);        \
 
+#define MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(TYPE)                              \
+MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(TYPE);\
+SCM                                                            \
+TYPE::scheme_molecule (SCM smob)                               \
+{                                                              \
+  TYPE * b = dynamic_cast<TYPE*> (unsmob_element (smob));      \
+  return b ?  b->do_brew_molecule ().create_scheme () : SCM_EOL; \
+}                                                              \
+                                                               \
+
 
 
 #endif // STAFFELEM_HH
index a44f1f4bd4af75c69b4f62db8f3ee8cc1d9bc7a1..9a71f42d3f4bbe8267a5213e8b27a33a30b645e4 100644 (file)
@@ -25,7 +25,7 @@ public:
 
 
 protected:
-  virtual Molecule do_brew_molecule () const;
+  Molecule do_brew_molecule () const;
   virtual Array<Offset> get_encompass_offset_arr () const;
   Bezier get_curve () const;
   Drul_array<Real> dy_f_drul_;
index 4ed5b22af03a22fc684ae4bd0e244818ae703b90..98478d5c36c904eef091539fe8558363ea2cdc10 100644 (file)
@@ -27,7 +27,7 @@ public:
 
 protected:
   VIRTUAL_COPY_CONS(Score_element);
-  virtual Molecule do_brew_molecule() const;
+  Molecule do_brew_molecule() const;
 
 };
 #endif // STAFFSYM_HH
index ec2e7b4426e195a64533442863c6f5a012400792..97cbd2c690c1fe5c504cd9a4a47a3b298f8e11cd 100644 (file)
@@ -16,7 +16,7 @@
 class Stem_tremolo : public Item {
 protected:
   Stem * stem_l () const;
-  virtual Molecule do_brew_molecule () const;
+  Molecule do_brew_molecule () const;
 
   static Interval dim_callback (Score_element*, Axis);
 public:
index 44d054f011458588aa7dacacc5b9a98ee2dbdf16..ea208ff7921dedb6965b5de86beba621efca11dd 100644 (file)
@@ -93,7 +93,7 @@ protected:
 
   virtual void before_line_breaking();
   static Interval dim_callback (Score_element const*,Axis);
-  virtual Molecule do_brew_molecule() const;
+  Molecule do_brew_molecule() const;
 
   void set_spacing_hints () ;
 };
index 505723c316da01b92260623e9b6fc1b220ea11a8..fe1a3147469517248e1985001c156b0298bfd0d8 100644 (file)
@@ -33,10 +33,10 @@ class Sustain_pedal : public Item
 public:
    static SCM scheme_molecule (SCM);
   
-VIRTUAL_COPY_CONS (Score_element);
+  VIRTUAL_COPY_CONS (Score_element);
   Sustain_pedal (SCM);
 protected:
-  virtual Molecule do_brew_molecule () const;
+  // Molecule do_brew_molecule () const;
   virtual void after_line_breaking ();
 };
 
index d70347307a86ebcb914673b2b8c96435d33ec420..d69a23f0af7592ac6bdd27bc1764538ce5f1f412 100644 (file)
@@ -23,7 +23,7 @@ public:
   
 Text_item (SCM s);
 protected:
-  virtual Molecule do_brew_molecule () const;
+  Molecule do_brew_molecule () const;
 };
 
 #endif /* Text_ITEM_HH */
index 71e0e86c879c2e85117265bcebec24b4ca62ec74..c6fc1c89040d777981a41ca2e9cb89935b5c35b2 100644 (file)
@@ -31,7 +31,7 @@ public:
   virtual Direction get_default_dir() const;
 
 protected:
-  virtual Molecule do_brew_molecule () const;
+  Molecule do_brew_molecule () const;
   virtual Array<Offset> get_encompass_offset_arr () const;
   Bezier get_curve () const;
 
index ac4a49f237c289dcb1153527a03f64a83bb0bdbc..ea338b29a45511c3f38547b5faa7a3320799ec20 100644 (file)
@@ -24,7 +24,7 @@ class Time_signature: public Item
   Molecule time_signature (int, int)const;
   
 protected:
-  virtual Molecule do_brew_molecule() const;
+  Molecule do_brew_molecule() const;
 public:
   Time_signature (SCM);
  static SCM scheme_molecule (SCM);
index e7390afbf2c1d47fcf52e8dd1b5ec97763b4182a..ca725e5d401d0b1ac45a58ea6cbc3f871c5f8cae 100644 (file)
@@ -30,7 +30,7 @@ protected:
   void calc_dy (Real *) const;
   void calc_position_and_height (Real*,Real *dy)const;
   
-  virtual Molecule do_brew_molecule () const;
+  Molecule do_brew_molecule () const;
   VIRTUAL_COPY_CONS(Score_element);
   virtual void do_add_processing ();
   virtual void after_line_breaking ();
index a9a05605da444787de446aa8d5ce22f3a5352018..40c2195a44f803a364cc9f0878435542828ffd7d 100644 (file)
@@ -22,7 +22,7 @@ public:
   void add_bar (Bar*);
  
 protected:
-  virtual Molecule do_brew_molecule () const;
+  Molecule do_brew_molecule () const;
   VIRTUAL_COPY_CONS (Score_element);
 
   virtual void do_add_processing ();
index af54bc7b5e3286eb19c4a1716cf9db4daef01a88..46ad565f5044ef075a3e8623470e1f0e835f1fde 100644 (file)
@@ -15,9 +15,6 @@
 #include "lookup.hh"
 #include "staff-symbol-referencer.hh"
 
-const int FLAT_TOP_PITCH=2; /* fes,ges,as and bes typeset in lower octave */
-const int SHARP_TOP_PITCH=4; /*  ais and bis typeset in lower octave */
-
 Key_item::Key_item (SCM s)
   : Item (s)
 {
@@ -25,6 +22,12 @@ Key_item::Key_item (SCM s)
 }
 
 
+/*
+  FIXME: too much hardcoding here.
+ */
+const int FLAT_TOP_PITCH=2; /* fes,ges,as and bes typeset in lower octave */
+const int SHARP_TOP_PITCH=4; /*  ais and bis typeset in lower octave */
+
 
 /*
   FIXME: key-item should just get a list of (position, acc), and leave
index ea2668b926c91bd2419836b5f32e0a4d71fbdf8d..81fa1c5296eced08330422c4dab90e04665a09d7 100644 (file)
@@ -11,8 +11,6 @@
 #include "audio-item.hh"
 
 
-
-
 ADD_THIS_TRANSLATOR (Key_performer);
 
 Key_performer::Key_performer ()
@@ -25,21 +23,12 @@ Key_performer::~Key_performer ()
 {
 }
 
-void 
-Key_performer::do_print () const
-{
-#ifndef NPRINT
-  if (key_req_l_)
-    key_req_l_->print ();
-#endif
-}
-
 void
 Key_performer::do_process_music ()
 {
   if (key_req_l_ && key_req_l_->key_)
     {
-      audio_p_ = new Audio_key (*key_req_l_->key_);
+      audio_p_ = new Audio_key (); // *key_req_l_->key_);
       Audio_element_info info (audio_p_, key_req_l_);
       announce_element (info);
       key_req_l_ = 0;
index d8350f1c7a3ad5ad9198424958d13d3147a6e788..8e8babad662d2f470d4968cae56c36483a7a8f2b 100644 (file)
@@ -7,9 +7,7 @@
 
 #include "musical-request.hh"
 #include "command-request.hh"
-#include "local-key-engraver.hh"
 #include "local-key-item.hh"
-#include "key-engraver.hh"
 #include "debug.hh"
 #include "key-item.hh"
 #include "tie.hh"
@@ -41,8 +39,8 @@ protected:
   virtual void process_acknowledged ();
   virtual void do_removal_processing ();
 public:
-  
-  Newkey local_key_;
+
+  SCM last_accs_;
   Key_engraver *key_grav_l_;
   Array<Note_req* > mel_l_arr_;
   Array<Item*> support_l_arr_;
@@ -51,7 +49,6 @@ public:
   Local_key_engraver();
   bool self_grace_b_;
   Grace_align_item * grace_align_l_;
-  Timing_translator * time_trans_l_  ;
 };
 
 
@@ -61,44 +58,21 @@ Local_key_engraver::Local_key_engraver()
   key_grav_l_ = 0;
   key_item_p_ =0;
   grace_align_l_ =0;
-  time_trans_l_ = 0;
+  last_accs_ = SCM_EOL;
 }
 
+
 void
 Local_key_engraver::do_creation_processing ()
 {
-  /*
-    UGHGUHGUH.
-
-    Breaks if Key_engraver is removed from under us.
-  */
-  Translator * result =
-    daddy_grav_l()->get_simple_translator ("Key_engraver");
-
-  key_grav_l_ = dynamic_cast<Key_engraver *> (result);
-
-  if (!key_grav_l_)
-    {
-      warning (_ ("out of tune:"));
-      warning (_f ("can't find: `%s'", "Key_engraver"));
-    }
-  else
-    {
-      local_key_ = key_grav_l_->key_;
-    }
-
-  /*
-    TODO
-    (if we are grace) get key info from parent Local_key_engraver
-  */
-
-  Translator * tr = daddy_grav_l()->get_simple_translator ("Timing_engraver"); // ugh
-  time_trans_l_ = dynamic_cast<Timing_translator*> (tr);
+  last_accs_ = get_property ("keySignature");
 }
 
 void
 Local_key_engraver::process_acknowledged ()
 {
+  SCM localsig = get_property ("localKeySignature");
+  
   if (!key_item_p_ && mel_l_arr_.size()) 
     {
       SCM f = get_property ("forgetAccidentals");
@@ -108,18 +82,23 @@ Local_key_engraver::process_acknowledged ()
          Item * support_l = support_l_arr_[i];
          Note_req * note_l = mel_l_arr_[i];
 
+         int n = note_l->pitch_.notename_i_;
+         int o = note_l->pitch_.octave_i_;
+         int a = note_l->pitch_.accidental_i_;
+         
          /* see if there's a tie that "changes" the accidental */
          /* works because if there's a tie, the note to the left
             is of the same pitch as the actual note */
 
-         int prev_acc =local_key_.get (note_l->pitch_.octave_i_,
-                                       note_l->pitch_.notename_i_);
-         bool different = prev_acc != note_l->pitch_.accidental_i_;
+         SCM prev = scm_assoc (gh_cons (gh_int2scm (o), gh_int2scm (n)), localsig);
+         if (prev == SCM_BOOL_F)
+           prev = scm_assoc (gh_int2scm (n), localsig);
+         int prev_acc = (prev == SCM_BOOL_F) ? 0 : gh_scm2int (gh_cdr (prev));
+         bool different = prev_acc != a;
          
          bool tie_changes = tied_l_arr_.find_l (support_l) && different;
          if (!forget
-             && (note_l->forceacc_b_
-                 || !different)
+             && (note_l->forceacc_b_ || different)
              && !tie_changes)
            {
              if (!key_item_p_) 
@@ -133,8 +112,9 @@ Local_key_engraver::process_acknowledged ()
                }
 
              
-             bool extra_natural
-               = sign (prev_acc) * (prev_acc - note_l->pitch_.accidental_i_) == 1 ;
+             bool extra_natural =
+               sign (prev_acc) * (prev_acc - a) == 1
+               && abs(prev_acc) == 2;
 
              key_item_p_->add_pitch (note_l->pitch_,
                                      note_l->cautionary_b_,
@@ -144,9 +124,14 @@ Local_key_engraver::process_acknowledged ()
          
          if (!forget)
            {
-             local_key_.set (note_l->pitch_.octave_i_, note_l->pitch_.notename_i_,
-                             note_l->pitch_.accidental_i_);
+             localsig = scm_assoc_set_x (localsig, gh_cons (gh_int2scm (o),
+                                                            gh_int2scm (n)),
+                                         gh_int2scm (a)); 
+
 #if 0
+             /*
+               TESTME!
+              */
              if (!tied_l_arr_.find_l (support_l))
                {
                  local_key_.clear_internal_forceacc (note_l->pitch_);
@@ -170,7 +155,7 @@ Local_key_engraver::process_acknowledged ()
 void
 Local_key_engraver::do_removal_processing ()
 {
-  // TODO: signal accidentals to Local_key_engraver the 
+  // TODO: if grace ? signal accidentals to Local_key_engraver the 
 }
 
 void
@@ -231,14 +216,15 @@ Local_key_engraver::do_process_music()
   SCM smp = get_property ("measurePosition");
   Moment mp =  (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
 
+  SCM sig = get_property ("keySignature");
   if (!mp)
     {
-      if (!to_boolean (get_property ("noResetKey")) && key_grav_l_)
-       local_key_= key_grav_l_->key_;
+      if (!to_boolean (get_property ("noResetKey")))
+       daddy_trans_l_->set_property ("localKeySignature",  sig);
     }
-  else if (key_grav_l_ && key_grav_l_->key_changed_b ())
+  else if (last_accs_ != sig) 
     {
-      local_key_ = key_grav_l_->key_;
+      daddy_trans_l_->set_property ("localKeySignature",  sig);
     }
 }
 
index fcbd09e5c62a6fe8a543e3502314ceb80752d3f5..3bade16b9d3e52a9881b944848022d78dd739752 100644 (file)
@@ -217,13 +217,21 @@ setup_paths ()
     global_path.parse_path (env_sz);
 
 
-  char *suffixes[] = {"ly", "afm", "scm", "tfm", "cmtfm", "ps", 0};
+  /*
+    Should use kpathsea, this is getting out of hand.  
+   */
+  char *suffixes[] = {"ly", "afm", "scm", "tfm", "ps", 0};
+  String prefix = prefix_directory;
+  if (prefix.empty_b ()) prefix =  DIR_DATADIR;
   for (char **s = suffixes; *s; s++)
     {
-      if (!prefix_directory.empty_b())
-       global_path.add (prefix_directory + to_str ('/') + String (*s));
-      else
-       global_path.add (String (DIR_DATADIR) + to_str ('/') + String(*s));
+      String p =  prefix + to_str ('/') + String (*s);
+      
+      global_path.add (p);
+      /* Urg: GNU make's $(word) index starts at 1 */
+      int i  = 1;
+      while (global_path.try_add (p + to_str (".") + to_str (i)))
+       i++;
     }
 }
 
index 7afd3d69e2450be871c17da9a43787abd0fa7825..e91572455daa8ba2a1b0754917ca97d4765a455f 100644 (file)
@@ -356,8 +356,9 @@ Midi_key::Midi_key (Audio_key*a)
 String
 Midi_key::str () const
 {
-  int sharps_i = audio_l_->key_.sharps_i ();
-  int flats_i = audio_l_->key_.flats_i ();
+  // fxime.
+  int sharps_i = 0; //audio_l_->key_.sharps_i ();
+  int flats_i = 0; //audio_l_->key_.flats_i ();
 
   // midi cannot handle non-conventional keys
   if (flats_i && sharps_i)
@@ -370,7 +371,9 @@ Midi_key::str () const
 
   String str = "ff5902";
   str += String_convert::i2hex_str (accidentals_i, 2, '0');
-  str += String_convert::i2hex_str ((int)audio_l_->key_.minor_b (), 2, '0');
+
+  // (int)audio_l_->key_.minor_b ()
+  str += String_convert::i2hex_str (0, 2, '0');
   return String_convert::hex2bin_str (str);
 }
 
index ab0bd3f3a82b295e16ec8a753acd2b7bbc05e50d..a547335081321d302fe8c5342824b5df1568e987 100644 (file)
@@ -47,7 +47,6 @@ static Keyword_ent the_key_tab[]={
   {"in", IN_T},
   {"lyrics", LYRICS},
   {"key", KEY},
-  {"keysignature", KEYSIGNATURE},
   {"mark", MARK},
   {"musicalpitch", MUSICAL_PITCH},
   {"time", TIME_T},
@@ -66,7 +65,6 @@ static Keyword_ent the_key_tab[]={
   {"relative", RELATIVE},
   {"remove", REMOVE},
   {"repeat", REPEAT},
-  {"repetitions", REPETITIONS},
   {"addlyrics", ADDLYRICS},
   {"score", SCORE},
   {"script", SCRIPT},
diff --git a/lily/newkey-def.cc b/lily/newkey-def.cc
new file mode 100644 (file)
index 0000000..6d8e583
--- /dev/null
@@ -0,0 +1,51 @@
+/*   
+  newkey-def.cc --  implement Newkey_def
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "newkey-def.hh"
+#include "misc.hh"
+
+
+Newkey_def::Newkey_def()
+{
+  pitch_alist_ = SCM_EOL;
+}
+
+void
+Newkey_def::transpose (Musical_pitch p) 
+{
+  SCM newlist = SCM_EOL;
+  for (SCM s = pitch_alist_; gh_pair_p (s); s = gh_cdr (s))
+    {
+      SCM k = gh_caar (s);
+
+      if (gh_pair_p (k))
+       {
+         Musical_pitch orig (gh_list (gh_car (k), gh_cdr (k), gh_cdr (s), SCM_UNDEFINED));
+
+         orig.transpose (p);
+
+         SCM key = gh_cons (gh_int2scm (orig.octave_i_),
+                            gh_int2scm (orig.notename_i_));
+
+         newlist = gh_cons (gh_cons (key, gh_int2scm (orig.accidental_i_)),
+                            newlist);
+       }
+      else if (gh_number_p (k))
+       {
+         Musical_pitch orig (gh_list (gh_int2scm (0), k, gh_cdar (s), SCM_UNDEFINED));
+         orig.transpose (p);
+
+         SCM key =gh_int2scm (orig.notename_i_);
+         newlist = gh_cons (gh_cons (key, gh_int2scm (orig.accidental_i_)),
+                            newlist);
+       }
+    }
+
+  pitch_alist_ = newlist;
+}
index e6c4fe3c191a097738f36fad245cb45adf67cc7c..69be37c7e235d9ead38673763949f49d41f67cb5 100644 (file)
@@ -151,7 +151,6 @@ yylex (YYSTYPE *s,  void * v_l)
 %token IN_T
 %token INVALID
 %token KEY
-%token KEYSIGNATURE
 %token LYRICS
 %token MARK
 %token MEASURES
@@ -169,7 +168,6 @@ yylex (YYSTYPE *s,  void * v_l)
 %token RELATIVE
 %token REMOVE
 %token REPEAT
-%token REPETITIONS
 %token ADDLYRICS
 %token SCM_T
 %token SCORE
@@ -223,7 +221,7 @@ yylex (YYSTYPE *s,  void * v_l)
 %type <i>      tremolo_type
 %type <i>      int unsigned
 %type <i>      script_dir
-%type <i>      optional_modality 
+
 %type <id>     identifier_init  
 %type <duration> steno_duration optional_notemode_duration
 %type <duration> entered_notemode_duration explicit_duration
@@ -233,7 +231,7 @@ yylex (YYSTYPE *s,  void * v_l)
 %type <pitch>   steno_musical_pitch musical_pitch absolute_musical_pitch
 %type <pitch>   steno_tonic_pitch
 
-%type <pitch_arr>      pitch_list chord_additions chord_subtractions chord_notes chord_step
+%type <pitch_arr>      chord_additions chord_subtractions chord_notes chord_step
 %type <music>  chord
 %type <pitch>  chord_note chord_inversion chord_bass
 %type <midi>   midi_block midi_body
@@ -1008,28 +1006,16 @@ verbose_command_req:
                key_p->key_ = 0;
                $$ = key_p;
        }
-/* UGH. optional.  */
-
-       | KEY NOTENAME_PITCH optional_modality  {
-               Key_change_req *key_p= new Key_change_req;
-               Key_def d;
-               d.pitch_arr_.push (*$2);
-               d.ordinary_key_b_ = true;
-               d.modality_i_ = $3;
-
-               key_p->key_ = new Key_def (d);
-               $$ = key_p;
-               delete $2;
-       }
-       | KEYSIGNATURE pitch_list {
+/*
+TODO: Support for minor/major keys; make `major-scale' settable.
+*/
+       | KEY NOTENAME_PITCH    {
                Key_change_req *key_p= new Key_change_req;
-               Key_def d;
-               d.pitch_arr_ = *$2;
-               d.ordinary_key_b_ = false;
-
-               key_p->key_ = new Key_def(d);
-               $$ = key_p;
-               delete $2;
+               key_p->key_ = new Newkey_def;
+               
+               key_p->key_->pitch_alist_ = scm_eval (ly_symbol2scm ("major-scale"));
+               key_p->key_->transpose (* $2);
+               $$ = key_p; 
        }
        ;
 
@@ -1105,15 +1091,6 @@ verbose_request:
        }
        ;
 
-optional_modality:
-       /* empty */     {
-               $$ = 0;
-       }
-       | int   {
-               $$ = $1;
-       }
-       ;
-
 sup_quotes:
        '\'' {
                $$ = 1;
@@ -1555,6 +1532,11 @@ chord_note:
 /*
        UTILITIES
  */
+
+/*
+  FIXME: use scm.
+*/
+/*
 pitch_list:                    {
                $$ = new Array<Musical_pitch>;
        }
@@ -1563,7 +1545,7 @@ pitch_list:                       {
                delete $2;
        }
        ;
-
+*/
 
 int_list:
        /**/                    {
index e51fff1c6eacfec6da71b43f38e32e4790e2c82a..b8a69703a7f9a9e985ca67bf98d6bdaa217b2611 100644 (file)
@@ -181,27 +181,24 @@ Piano_pedal_engraver::do_process_music ()
          s = get_property ("start" + String (p->name_ ));
        }
 
-      if (s != SCM_UNDEFINED)
+      if (gh_string_p (s))
        {
          if (p->name_ == String ("Sustain"))
            {
-             p->item_p_ = new Sustain_pedal (SCM_EOL);
-             p->item_p_->set_elt_property ("text", s);
+             // fixme: Item should be sufficient.
+             p->item_p_ = new Text_item (get_property ("basicSustainPedalProperties"));
            }
          else
            {
-             p->item_p_ = new Text_item (SCM_EOL);
+             p->item_p_ = new Text_item (get_property ("basicPedalProperties"));
+           }
              p->item_p_->set_elt_property ("text", s);
              // guh
-             p->item_p_->set_elt_property ("style", ly_str02scm ("italic"));
-           }
 
          Side_position_interface si (p->item_p_);
          si.set_axis (Y_AXIS);
 
          // todo: init with basic props.
-         p->item_p_->set_elt_property ("no-spacing-rods"  , SCM_BOOL_T);
-         p->item_p_->set_elt_property ("self-alignment-X", gh_int2scm (0));
          p->item_p_->add_offset_callback (Side_position_interface::aligned_on_self, X_AXIS);
          p->item_p_->add_offset_callback (Side_position_interface::centered_on_parent, X_AXIS);
          announce_element (Score_element_info (p->item_p_,
index f94867bbf41d070e0d4b525e9f485d80a6b5c316..93e454441c9489a3e11bb757b3a9fc31c70be349 100644 (file)
@@ -16,6 +16,7 @@
 void
 Sustain_pedal::after_line_breaking ()
 {
+  return ;
   /*
     UGH. Should work automatically via offset callback. 
    */
@@ -24,43 +25,39 @@ Sustain_pedal::after_line_breaking ()
   i.set_direction (d);
 }
 
-Molecule
-Sustain_pedal::do_brew_molecule () const
+MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Sustain_pedal);
+
+
+SCM
+Sustain_pedal::scheme_molecule (SCM smob) 
 {
+  Score_element * e = unsmob_element (smob);
+  
   Molecule mol;
-  SCM glyph = get_elt_property ("text");
-  if (glyph == SCM_UNDEFINED)
-    return mol;
+  SCM glyph = e->get_elt_property ("text");
+  if (!gh_string_p (glyph))
+    return mol.create_scheme();
   String text = ly_scm2string (glyph);
 
   for (int i = 0; i < text.length_i (); i++)
     {
-      String idx = String ("pedal-") + String (&text.byte_C ()[i], 1);
-      Molecule m = lookup_l ()->afm_find (idx);
-      if (m.empty_b ())
-       continue;
-      Real kern = 0;
-      if (i)
+      String idx ("pedal-");
+      if (text.cut_str (i, 3) == "Ped")
        {
-         SCM s = scm_eval (gh_list (ly_symbol2scm ("pedal-kerning"),
-                                    ly_str02scm (String (&text.byte_C ()[i - 1], 1).ch_C ()),
-                                    ly_str02scm (String (&text.byte_C ()[i], 1).ch_C ()),
-                                    SCM_UNDEFINED));
-         if (gh_number_p (s))
-           {
-             Staff_symbol_referencer_interface st (this);
-             Real staff_space = st.staff_space ();
-             kern = gh_scm2double (s) * staff_space;
-           }
+         idx += "Ped";
+         i += 2;
        }
-      mol.add_at_edge (X_AXIS, RIGHT, m, kern);
+      else
+       idx += String (&text.byte_C ()[i], 1);
+      Molecule m = e->lookup_l ()->afm_find (idx);
+      if (!m.empty_b ())
+       mol.add_at_edge (X_AXIS, RIGHT, m, 0);
     }
     
-  return mol;
+  return mol.create_scheme ();
 }
 
-
-
 Sustain_pedal ::Sustain_pedal(SCM s )
   : Item (s)
-{}
+{
+}
index 197761591904aa882c4cf6adb7de913feb0398c6..f02cab53d59c32562de15d8a2297442ee9e2fd38 100644 (file)
@@ -112,9 +112,8 @@ System_start_delimiter::staff_brace (Real y)  const
   int idx = int (((maxht - step) <? y - minht) / step);
   idx = idx >? 0;
 
-  SCM l = scm_eval (gh_list (ly_symbol2scm ("style-to-cmr"),
-                           ly_str02scm ("brace"),
-                           SCM_UNDEFINED));
+  SCM l = scm_assoc (ly_str02scm ("brace"),
+                    scm_eval (ly_symbol2scm ("cmr-alist")));
   
   String nm = "feta-braces";
   if (l != SCM_BOOL_F)
index ba8064a1040050db5a6067b634a0c9e5a5e7f62d..965321ee6c5d39408cfad673a973f4f4643d8fb2 100644 (file)
@@ -152,6 +152,7 @@ VoiceContext = \translator {
        stopStartSustain = #"*Ped."
        startUnaChorda = #"una chorda"
        stopUnaChorda = #"tre chorde"
+
        \consists "Piano_pedal_engraver";
        \consists "Script_engraver";
        \consists "Script_column_engraver";
@@ -380,9 +381,19 @@ ScoreContext = \translator {
        defaultBarType = #"|"
        systemStartDelimiterGlyph = #'bar-line
 
+       %
+       % what order to print accs.  We could compute this, 
+       % but computing is more work than putting it here.
+       %
+       % Flats come first, then sharps.
+       keyAccidentalOrder = #'(
+         (6 . -1) (2  . -1) (5 . -1 ) (1  . -1) (4  . -1) (0  . -1) (3  . -1)
+        (3  . 1) (0 . 1) (4 . 1) (1 . 1) (5 . 1) (2 . 1) (6 . 1)
+       )
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        % default settings, mainly for breakable items
        % in alphabetical order
+       % TODO: uniform naming.;  
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        basicBarlineProperties = #`(
                (break-align-symbol . Staff_bar)
@@ -490,6 +501,13 @@ ScoreContext = \translator {
                (molecule-callback . ,Text_item::scheme_molecule)
                (style . "italic")
        )
+       basicPedalProperties = #`(
+               (molecule-callback . ,Text_item::scheme_molecule)
+               (style . "italic")
+               (no-spacing-rods . #t)
+               (self-alignment-X . 0)
+                               
+       )
        basicTextProperties = #`( )
        basicRestProperties = #`( 
                (molecule-callback . ,Rest::scheme_molecule)
@@ -504,7 +522,11 @@ ScoreContext = \translator {
        basicSlurProperties = #`(
                (molecule-callback . ,Slur::scheme_molecule)
        )
-
+       basicSustainPedalProperties = #`(
+               (no-spacing-rods . #t)
+               (molecule-callback . ,Sustain_pedal::scheme_molecule)
+               (self-alignment-X . 0)
+       )       
        basicSystemStartDelimiterProperties = #`(
                (molecule-callback . ,System_start_delimiter::scheme_molecule)
                (collapse-height . 1.0)
index 5b9e2b90bd13aa8a2b64416174e628b0a4b17bdd..9cc19ff4b5c58f8cce22427d8b754126b012c542 100644 (file)
@@ -51,10 +51,11 @@ examples:
 
        tar --exclude='*.dvi' --exclude='*.tex' --exclude='*.ps' --exclude='*.ppm' -czf $(outdir)/examples.tar.gz *-examples.html  `find input mutopia -type d -name 'out-www' -print`
 
+
+my_tfm_path=$(TFM_PATH) /tmp /tmp  /tmp /tmp  /tmp /tmp 
 localinstall:
        mkdir -p $(datadir)
-       rm -f $(datadir)/cmtfm 
-       $(LN_S) $(TEX_TFMDIR) $(datadir)/cmtfm
+       $(foreach i, 1 2 3 4 5, rm -f $(datadir)/tfm.$(i); $(LN_S) $(word $(i), $(my_tfm_path)) $(datadir)/tfm.$(i) ; )
 
 local-WWW-clean:
        $(SHELL) $(depth)/buildscripts/clean-fonts.sh
index d68cdd938449f411ab890090b0e4d7817e27068b..42b517f5d05ce5a42b44d8888f32d46bef3334b7 100644 (file)
    )
 )
 
-;; (define (ly-warn s) (error s))
-(define (break-align-spacer this next)
-  (let ((entry (assoc (list this next) space-alist)))
-    (if entry
-       (cdr entry)
-       (begin (ly-warn (string-append "Unknown spacing pair `" this "', `" next "'"))
-              '(minimum-space 0.0)))))
-  
-
 (define (find-notehead-symbol duration style)
   (case style
    ((cross) "2cross")
   )
             
 (define script-alist '())
-(define (articulation-to-scriptdef a)
-  (assoc a script-alist)
-  )
-
-;; Map style names to TeX font names.  Return false if 
-;; no font name found. 
-(define (style-to-cmr s)
-  (assoc s cmr-alist )
-  )
-           
-
 
 (define font-name-alist  '())
 (define (font-command name-mag)
      )
    )
      
+
+(define major-scale
+  '(
+    (0 . 0)
+    (1 . 0)
+    (2 . 0)
+    (3 . 0)
+    (4 . 0)
+    (5 . 0)
+    (6 . 0)
+    )
+  )
index 3e488a8f4f66b06d2b65bb93931053027c2d6bae..25ba3293eb21aae4913762ba1744026668b9d528 100644 (file)
@@ -553,26 +553,33 @@ AC_DEFUN(XXAC_STEPMAKE_TEXMF_DIRS, [
 ])
 
 AC_DEFUN(AC_STEPMAKE_TEXMF_DIRS, [
-    AC_ARG_ENABLE(tex-tfmdir,
-    [  enable-tex-tfmdir=DIR   set the tex-directory where cmr10.tfm lives (default: use kpsewhich)],
-    [TFMDIR=$enableval],
-    [TFMDIR=auto] )
+    AC_ARG_ENABLE(tfm-path,
+    [  enable-tfm-path=PATH   set path of tex directories where tfm files live, esp.: cmr10.tfm (default: use kpsewhich)],
+    [tfm_path=$enableval],
+    [tfm_path=auto] )
 
     AC_CHECK_PROGS(KPSEWHICH, kpsewhich, no)
-    AC_MSG_CHECKING(for TeX TFM directory)
-    if test "x$TFMDIR" = xauto ; then
-       if test "x$TEX_TFMDIR" = "x" ; then
-           if test "x$KPSEWHICH" != "xno" ; then
-               CMR10=`kpsewhich tfm cmr10.tfm`
-               TEX_TFMDIR=`dirname $CMR10`
-           else
-               AC_STEPMAKE_WARN(Please set TEX_TFMDIR (to where cmr10.tfm lives):
-       TEX_TFMDIR=/usr/local/TeX/lib/tex/fonts ./configure)
-           fi
+    AC_MSG_CHECKING(for tfm path)
+
+    TFM_FONTS="cmr msam"
+
+    if test "x$tfm_path" = xauto ; then
+       if test "x$KPSEWHICH" != "xno" ; then
+           for i in $TFM_FONTS; do
+               dir=`$KPSEWHICH tfm ${i}10.tfm`
+               TFM_PATH="$TFM_PATH `dirname $dir`"
+           done
+       else
+           AC_STEPMAKE_WARN(Please specify where cmr10.tfm lives:
+    ./configure --enable-tfm-path=/usr/local/TeX/lib/tex/fonts)
        fi
+    else
+         TFM_PATH=$tfm_path
     fi
-    AC_MSG_RESULT($TEX_TFMDIR)
-    AC_SUBST(TEX_TFMDIR)
+
+    TFM_PATH=`echo $TFM_PATH | tr ':' ' '`
+    AC_MSG_RESULT($TFM_PATH)
+    AC_SUBST(TFM_PATH)
 ])
 
 AC_DEFUN(AC_STEPMAKE_TEXMF, [