From: fred Date: Tue, 26 Mar 2002 23:22:51 +0000 (+0000) Subject: lilypond-1.3.59 X-Git-Tag: release/1.5.59~1587 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8f3c0282e7ab1650b3cfc2c44b09088f864deb31;p=lilypond.git lilypond-1.3.59 --- diff --git a/aclocal.m4 b/aclocal.m4 index 4e032e115e..25ba3293eb 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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 diff --git a/buildscripts/set-lily.sh b/buildscripts/set-lily.sh index df01378c45..9775748d18 100644 --- a/buildscripts/set-lily.sh +++ b/buildscripts/set-lily.sh @@ -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 & diff --git a/config.make.in b/config.make.in index 8a72dfea93..23798deabf 100644 --- a/config.make.in +++ b/config.make.in @@ -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@ diff --git a/flower/file-path.cc b/flower/file-path.cc index 5f430ce9a0..10df133946 100644 --- a/flower/file-path.cc +++ b/flower/file-path.cc @@ -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 diff --git a/flower/include/file-path.hh b/flower/include/file-path.hh index 15c295ba4b..fdaf3e254a 100644 --- a/flower/include/file-path.hh +++ b/flower/include/file-path.hh @@ -30,7 +30,8 @@ public: Array::push; String str ()const; - void add (String str); + bool try_add (String str); + void add (String); void parse_path (String); }; diff --git a/input/test/keys.ly b/input/test/keys.ly index 98ddbe08b0..35b11a9a15 100644 --- a/input/test/keys.ly +++ b/input/test/keys.ly @@ -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 } } diff --git a/input/test/keys2.ly b/input/test/keys2.ly index 944cc8fb16..b9209cfe48 100644 --- a/input/test/keys2.ly +++ b/input/test/keys2.ly @@ -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; diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 5d78ec4bd5..4e771ca08e 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -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) diff --git a/lily/command-request.cc b/lily/command-request.cc index 3f941f3fe1..fea2de22a4 100644 --- a/lily/command-request.cc +++ b/lily/command-request.cc @@ -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 () diff --git a/lily/include/audio-item.hh b/lily/include/audio-item.hh index ef13d9f021..b06ab920c9 100644 --- a/lily/include/audio-item.hh +++ b/lily/include/audio-item.hh @@ -7,11 +7,11 @@ #ifndef AUDIO_ITEM_HH #define AUDIO_ITEM_HH - #include +#include #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 diff --git a/lily/include/bar.hh b/lily/include/bar.hh index 6673cea6f9..bfb2ce7379 100644 --- a/lily/include/bar.hh +++ b/lily/include/bar.hh @@ -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 diff --git a/lily/include/beam.hh b/lily/include/beam.hh index 99eac088af..9021a08ab0 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -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: diff --git a/lily/include/breathing-sign.hh b/lily/include/breathing-sign.hh index a2b0181d2b..6ecf02e263 100644 --- a/lily/include/breathing-sign.hh +++ b/lily/include/breathing-sign.hh @@ -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 diff --git a/lily/include/chord-name.hh b/lily/include/chord-name.hh index 80bc855e43..d89e81c2e3 100644 --- a/lily/include/chord-name.hh +++ b/lily/include/chord-name.hh @@ -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; }; diff --git a/lily/include/command-request.hh b/lily/include/command-request.hh index f8755a92db..a79e711325 100644 --- a/lily/include/command-request.hh +++ b/lily/include/command-request.hh @@ -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); diff --git a/lily/include/crescendo.hh b/lily/include/crescendo.hh index e43f005e61..a9d4576320 100644 --- a/lily/include/crescendo.hh +++ b/lily/include/crescendo.hh @@ -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; diff --git a/lily/include/dots.hh b/lily/include/dots.hh index 8f33241c68..ace3555c6c 100644 --- a/lily/include/dots.hh +++ b/lily/include/dots.hh @@ -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); diff --git a/lily/include/extender-spanner.hh b/lily/include/extender-spanner.hh index b921217dbe..a86a3d0e03 100644 --- a/lily/include/extender-spanner.hh +++ b/lily/include/extender-spanner.hh @@ -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); diff --git a/lily/include/hyphen-spanner.hh b/lily/include/hyphen-spanner.hh index 1270bce805..920c4c35fa 100644 --- a/lily/include/hyphen-spanner.hh +++ b/lily/include/hyphen-spanner.hh @@ -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 (); diff --git a/lily/include/key-def.hh b/lily/include/key-def.hh index 160e7c43cb..65296f8106 100644 --- a/lily/include/key-def.hh +++ b/lily/include/key-def.hh @@ -1,50 +1,2 @@ -/* - key-def.hh -- declare Key_def - - source file of the GNU LilyPond music typesetter - - (c) 1999--2000 Jan Nieuwenhuizen - - */ -#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 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 diff --git a/lily/include/key-engraver.hh b/lily/include/key-engraver.hh index 408f961d67..0b1be334fe 100644 --- a/lily/include/key-engraver.hh +++ b/lily/include/key-engraver.hh @@ -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 diff --git a/lily/include/key-item.hh b/lily/include/key-item.hh index 67b1d6c935..8743259021 100644 --- a/lily/include/key-item.hh +++ b/lily/include/key-item.hh @@ -33,7 +33,7 @@ public: protected: - virtual Molecule do_brew_molecule() const; + Molecule do_brew_molecule() const; }; #endif // KEYITEM_HH diff --git a/lily/include/key-performer.hh b/lily/include/key-performer.hh index 535cb3e1bd..512bd48a53 100644 --- a/lily/include/key-performer.hh +++ b/lily/include/key-performer.hh @@ -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 (); diff --git a/lily/include/local-key-item.hh b/lily/include/local-key-item.hh index 400d7de2a7..ccedf0f9b7 100644 --- a/lily/include/local-key-item.hh +++ b/lily/include/local-key-item.hh @@ -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 diff --git a/lily/include/multi-measure-rest.hh b/lily/include/multi-measure-rest.hh index eba41029b2..4349b8d3cf 100644 --- a/lily/include/multi-measure-rest.hh +++ b/lily/include/multi-measure-rest.hh @@ -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 index 0000000000..dfa20c6c6b --- /dev/null +++ b/lily/include/newkey-def.hh @@ -0,0 +1,36 @@ +/* + newkey-def.hh -- declare Newkey_def + + source file of the GNU LilyPond music typesetter + + (c) 2000 Han-Wen Nienhuys + + */ + +#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 */ + + diff --git a/lily/include/note-head.hh b/lily/include/note-head.hh index 0ce36022fc..eb86e46770 100644 --- a/lily/include/note-head.hh +++ b/lily/include/note-head.hh @@ -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 diff --git a/lily/include/rest.hh b/lily/include/rest.hh index 0b0ebef383..1977bd6738 100644 --- a/lily/include/rest.hh +++ b/lily/include/rest.hh @@ -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); diff --git a/lily/include/score-element.hh b/lily/include/score-element.hh index 276fe75e3e..2ded67f8cc 100644 --- a/lily/include/score-element.hh +++ b/lily/include/score-element.hh @@ -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 (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 (unsmob_element (smob)); \ + return b ? b->do_brew_molecule ().create_scheme () : SCM_EOL; \ +} \ + \ + #endif // STAFFELEM_HH diff --git a/lily/include/slur.hh b/lily/include/slur.hh index a44f1f4bd4..9a71f42d3f 100644 --- a/lily/include/slur.hh +++ b/lily/include/slur.hh @@ -25,7 +25,7 @@ public: protected: - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; virtual Array get_encompass_offset_arr () const; Bezier get_curve () const; Drul_array dy_f_drul_; diff --git a/lily/include/staff-symbol.hh b/lily/include/staff-symbol.hh index 4ed5b22af0..98478d5c36 100644 --- a/lily/include/staff-symbol.hh +++ b/lily/include/staff-symbol.hh @@ -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 diff --git a/lily/include/stem-tremolo.hh b/lily/include/stem-tremolo.hh index ec2e7b4426..97cbd2c690 100644 --- a/lily/include/stem-tremolo.hh +++ b/lily/include/stem-tremolo.hh @@ -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: diff --git a/lily/include/stem.hh b/lily/include/stem.hh index 44d054f011..ea208ff792 100644 --- a/lily/include/stem.hh +++ b/lily/include/stem.hh @@ -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 () ; }; diff --git a/lily/include/sustain-pedal.hh b/lily/include/sustain-pedal.hh index 505723c316..fe1a314746 100644 --- a/lily/include/sustain-pedal.hh +++ b/lily/include/sustain-pedal.hh @@ -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 (); }; diff --git a/lily/include/text-item.hh b/lily/include/text-item.hh index d70347307a..d69a23f0af 100644 --- a/lily/include/text-item.hh +++ b/lily/include/text-item.hh @@ -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 */ diff --git a/lily/include/tie.hh b/lily/include/tie.hh index 71e0e86c87..c6fc1c8904 100644 --- a/lily/include/tie.hh +++ b/lily/include/tie.hh @@ -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 get_encompass_offset_arr () const; Bezier get_curve () const; diff --git a/lily/include/time-signature.hh b/lily/include/time-signature.hh index ac4a49f237..ea338b29a4 100644 --- a/lily/include/time-signature.hh +++ b/lily/include/time-signature.hh @@ -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); diff --git a/lily/include/tuplet-spanner.hh b/lily/include/tuplet-spanner.hh index e7390afbf2..ca725e5d40 100644 --- a/lily/include/tuplet-spanner.hh +++ b/lily/include/tuplet-spanner.hh @@ -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 (); diff --git a/lily/include/volta-spanner.hh b/lily/include/volta-spanner.hh index a9a05605da..40c2195a44 100644 --- a/lily/include/volta-spanner.hh +++ b/lily/include/volta-spanner.hh @@ -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 (); diff --git a/lily/key-item.cc b/lily/key-item.cc index af54bc7b5e..46ad565f50 100644 --- a/lily/key-item.cc +++ b/lily/key-item.cc @@ -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 diff --git a/lily/key-performer.cc b/lily/key-performer.cc index ea2668b926..81fa1c5296 100644 --- a/lily/key-performer.cc +++ b/lily/key-performer.cc @@ -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; diff --git a/lily/local-key-engraver.cc b/lily/local-key-engraver.cc index d8350f1c7a..8e8babad66 100644 --- a/lily/local-key-engraver.cc +++ b/lily/local-key-engraver.cc @@ -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 mel_l_arr_; Array 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 (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 (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); } } diff --git a/lily/main.cc b/lily/main.cc index fcbd09e5c6..3bade16b9d 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -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++; } } diff --git a/lily/midi-item.cc b/lily/midi-item.cc index 7afd3d69e2..e91572455d 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -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); } diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index ab0bd3f3a8..a547335081 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -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 index 0000000000..6d8e5836f8 --- /dev/null +++ b/lily/newkey-def.cc @@ -0,0 +1,51 @@ +/* + newkey-def.cc -- implement Newkey_def + + source file of the GNU LilyPond music typesetter + + (c) 2000 Han-Wen Nienhuys + + */ + +#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; +} diff --git a/lily/parser.yy b/lily/parser.yy index e6c4fe3c19..69be37c7e2 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -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 tremolo_type %type int unsigned %type script_dir -%type optional_modality + %type identifier_init %type steno_duration optional_notemode_duration %type entered_notemode_duration explicit_duration @@ -233,7 +231,7 @@ yylex (YYSTYPE *s, void * v_l) %type steno_musical_pitch musical_pitch absolute_musical_pitch %type steno_tonic_pitch -%type pitch_list chord_additions chord_subtractions chord_notes chord_step +%type chord_additions chord_subtractions chord_notes chord_step %type chord %type chord_note chord_inversion chord_bass %type 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; } @@ -1563,7 +1545,7 @@ pitch_list: { delete $2; } ; - +*/ int_list: /**/ { diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index e51fff1c6e..b8a69703a7 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -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_, diff --git a/lily/sustain-pedal.cc b/lily/sustain-pedal.cc index f94867bbf4..93e454441c 100644 --- a/lily/sustain-pedal.cc +++ b/lily/sustain-pedal.cc @@ -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) -{} +{ +} diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index 1977615919..f02cab53d5 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -112,9 +112,8 @@ System_start_delimiter::staff_brace (Real y) const int idx = int (((maxht - step) ? 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) diff --git a/ly/engraver.ly b/ly/engraver.ly index ba8064a104..965321ee6c 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -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) diff --git a/make/toplevel.make.in b/make/toplevel.make.in index 5b9e2b90bd..9cc19ff4b5 100644 --- a/make/toplevel.make.in +++ b/make/toplevel.make.in @@ -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 diff --git a/scm/lily.scm b/scm/lily.scm index d68cdd9384..42b517f5d0 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -136,15 +136,6 @@ ) ) -;; (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") @@ -210,17 +201,6 @@ ) (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) @@ -971,3 +951,15 @@ ) ) + +(define major-scale + '( + (0 . 0) + (1 . 0) + (2 . 0) + (3 . 0) + (4 . 0) + (5 . 0) + (6 . 0) + ) + ) diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index 3e488a8f4f..25ba3293eb 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -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, [