]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.5.10 release/1.5.10
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 17 Sep 2001 12:45:06 +0000 (14:45 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 17 Sep 2001 12:45:06 +0000 (14:45 +0200)
==========
* Emacs-mode: Keyboard shortcuts, separated identifiers from keywords
and spacing not necessary in font-locking.

1.5.9.j

66 files changed:
AUTHORS.txt
CHANGES
Documentation/topdocs/AUTHORS.texi
INSTALL.txt
VERSION
aclocal.m4
configure
flower/include/rational.hh
flower/rational.cc
input/paddy.abc
input/regression/collision-2.ly [new file with mode: 0644]
input/regression/collision-mesh.ly
input/regression/collisions.ly
input/test/ancient-font.ly
input/test/figured-bass.ly
lily/beam.cc
lily/collision.cc
lily/command-request.cc
lily/engraver.cc
lily/figured-bass-engraver.cc [new file with mode: 0644]
lily/grob.cc
lily/include/command-request.hh
lily/include/lily-proto.hh
lily/include/main.hh
lily/include/my-lily-lexer.hh
lily/include/porrectus.hh [new file with mode: 0644]
lily/include/untransposable-music.hh [new file with mode: 0644]
lily/lexer.ll
lily/musical-request.cc
lily/my-lily-lexer.cc
lily/parser.yy
lily/porrectus-engraver.cc [new file with mode: 0644]
lily/porrectus.cc [new file with mode: 0644]
lily/score.cc
lily/tuplet-bracket.cc
lily/untransposable-music.cc [new file with mode: 0644]
lily/volta-engraver.cc
lilypond-font-lock.el
lilypond-mode.el
ly/engraver-init.ly
ly/params-init.ly
make/out/lilypond.lsm
make/out/lilypond.mandrake.spec
make/out/lilypond.redhat.spec
make/out/lilypond.suse.spec
scm/font.scm
scm/generic-property.scm
scm/grob-description.scm
scm/grob-property-description.scm
scm/interface-description.scm
scm/translator-description.scm
stepmake/aclocal.m4
stepmake/stepmake/asciifont-rules.make [deleted file]
stepmake/stepmake/asciifont-targets.make [deleted file]
stepmake/stepmake/asciifont-vars.make [deleted file]
stepmake/stepmake/files.make [deleted file]
stepmake/stepmake/include.make [deleted file]
stepmake/stepmake/manual.make [deleted file]
stepmake/stepmake/package.make [deleted file]
stepmake/stepmake/prolog-rules.make [deleted file]
stepmake/stepmake/prolog-targets.make [deleted file]
stepmake/stepmake/prolog-vars.make [deleted file]
stepmake/stepmake/template.make [deleted file]
stepmake/stepmake/yodl-rules.make [deleted file]
stepmake/stepmake/yodl-targets.make [deleted file]
stepmake/stepmake/yodl-vars.make [deleted file]

index 4f9e6ff8a2e2aa6de99aa0dce453a26032ad8baa..3a1949d8ac3382777c62ba8bcac872418595304f 100644 (file)
@@ -72,7 +72,9 @@ list is alphabetically ordered.
    * Roy R. Rankin <Roy.Rankin@alcatel.com.au>,     major extension,
      fixes to abc2ly, lilypond bug fixes
 
-   * Juergen Reuter <reuterj@ira.uka.de>         Custos support.
+   * Juergen Reuter <reuterj@ira.uka.de>         Ancient notation
+     support (custos, porrectus, mensural notation,         ancient
+     clefs, etc.)
 
    * Jeffrey B. Reed <daboys@austin.rr.com>,     Windows-NT support.
 
diff --git a/CHANGES b/CHANGES
index 832e85472453ee9bf9e305aecac1b7c11b3acea4..0f3adbfcb0d9c1b4e57c9fbe549c5e052421df35 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+1.5.9.hjj2
+==========
+* Emacs-mode: Keyboard shortcuts, separated identifiers from keywords
+and spacing not necessary in font-locking.
+
 1.5.9.jcn3
 ==========
 
@@ -6,11 +11,12 @@ where @WEB-TITLE@ is not defined.
 
 * Bugfix: stepmake: don't go building executables all over the place,
 if NAME is set in environment.  Some cleanups. 
-
 * add-html-footer.py: remove href to self.  Substitute @at-variables@
 defined in html comments.  Any occurrence of
 
-   <!-- @foo@=bar -->
+       <!-- @foo@=bar -->
 
 in the html page, will subsequently substitute any occurrence of @foo@
 in the same html page with `bar'.
@@ -21,6 +27,28 @@ in the same html page with `bar'.
 
 * windows doc update.
 
+1.5.9.hwn3
+==========
+
+* Optimizations:
+  - speed up Rational::operator+= 
+  - speed up Rational::compare ()
+  - don't store origins if point-and-click not set. 
+
+* \figures input mode:  \figures { <4 6+> <3- 5>2. } 
+
+* Obscure bugfix: call kpsewhich with --format for mfplain.
+
+* Don't put  volta bracket on top of following note (vertically).
+
+* Collision fixes.
+
+* Crude figured bass support (supports rests as well, now)
+
+* Bugfix: various collision issues, updated regtest example.
+
+* Porrectus support (Juergen Reuter)
+
 1.5.9
 =====
 
index 01701732aa39490eae90130cf63306758c7bdb7d..a6ec5460cabe1a33c3cb60324f4c56b04268b4dc 100644 (file)
@@ -75,7 +75,8 @@ list is alphabetically ordered.
 @item @email{Roy.Rankin@@alcatel.com.au, Roy R. Rankin},
     major extension, fixes to abc2ly, lilypond bug fixes
 @item @email{reuterj@@ira.uka.de, Juergen Reuter}
-        Custos support.
+        Ancient notation  support (custos, porrectus, mensural notation,
+        ancient clefs, etc.)
 @item @email{daboys@@austin.rr.com, Jeffrey B. Reed},
     Windows-NT support.
 @item Shay Rojanski
index 373eb96146776606c6f1af1113b3a6d5b1d5f864..4c8da9fa63792746d386cf13b5691f94f9d49267 100644 (file)
@@ -480,8 +480,9 @@ by running \`apt-get' as root before building the package:
 
    For Debian in development ("unstable", the future 2.3 or 3.0):
 
-       apt-get install task-debian-devel task-c++-dev \
-               python-base libguile9-dev tetex-bin libkpathsea-dev \
+       apt-get install binutils cpp gcc libc6-dev \
+               g++ libstdc++2.10-dev \
+               python-base libguile-dev tetex-bin libkpathsea-dev \
                tetex-extra flex bison texinfo bibtex2html groff gs \
                netpbm m4 gettext
 
diff --git a/VERSION b/VERSION
index 33a0bf8761aad2156a97d7c4f8460fcf20bace5c..29adfa84087c3e5e80283415b6a944d5cba830a3 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=5
-PATCH_LEVEL=9
-MY_PATCH_LEVEL=jcn3
+PATCH_LEVEL=10
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 720f2db6296b7a59fe15bcdc0c6cadad6898c54f..fd2b360a3a6c614439e3b41ef5731d43c8587a2e 100644 (file)
@@ -717,7 +717,7 @@ AC_DEFUN(AC_STEPMAKE_TEXMF, [
     #
     # For now let people define these in their environments
     #
-    : ${MFPLAIN_MP=`kpsewhich mp mfplain.mp`}
+    : ${MFPLAIN_MP=`kpsewhich --format mp mfplain.mp`}
     AC_MSG_RESULT($MFPLAIN_MP)
 
     AC_MSG_CHECKING(for inimetapost flags)
index 21e84bc95a41f727c9dbd2606d403e447ae8c4c5..abca10383af745d57a1aa8fbfcc566c606b11674 100755 (executable)
--- a/configure
+++ b/configure
@@ -2748,7 +2748,7 @@ echo "configure:2748: checking for mfplain.mp" >&5
     #
     # For now let people define these in their environments
     #
-    : ${MFPLAIN_MP=`kpsewhich mp mfplain.mp`}
+    : ${MFPLAIN_MP=`kpsewhich --format mp mfplain.mp`}
     echo "$ac_t""$MFPLAIN_MP" 1>&6
 
     echo $ac_n "checking for inimetapost flags""... $ac_c" 1>&6
index ab4a3d41cfb862b8e83ba8942b1a3ae59e9a4024..995700c55c32e2ce513f82d653e17a9ea904cd3e 100644 (file)
@@ -35,7 +35,10 @@ class Rational {
 
 public:
   void set_infinite (int sign);
-  bool infty_b () const;
+  bool infty_b () const
+    {
+      return sign_ == 2 || sign_ == -2;
+    }
   void invert ();
   int num () const { return sign_ * num_; }
   int den () const { return den_; }
@@ -52,7 +55,8 @@ public:
      Initialize to 0. 
    */
   Rational ();
-  Rational (int, int =1);
+  Rational (int);
+  Rational (int, int);
   Rational (double);
   Rational (Rational const&r) {   copy (r);}
 
index d5e679a9e973e0711a18ce443986f2ab51e9e9e1..3b0b3d0928da37a1a87c9b2b1f11245d3d5505f4 100644 (file)
@@ -44,6 +44,13 @@ Rational::Rational (int n, int d)
   normalise ();
 }
 
+Rational::Rational (int n)
+{
+  sign_ = ::sign (n);
+  num_ = abs (n);
+  den_= 1;
+}
+
 static
 int gcd (int a, int b)
 {
@@ -99,31 +106,31 @@ Rational::normalise ()
     {
       den_ = 1;
       num_ = 0;
-      return ;
     }
-  if (!den_)
-    sign_ = 2;
-  if (!num_)
-    sign_ = 0;
-
-  int g = gcd (num_ , den_);
+  else if (!den_)
+    {
+      sign_ = 2;
+      num_ = 1;
+    }
+  else if (!num_)
+    {
+      sign_ = 0;
+      den_ = 1;
+    }
+  else
+    {
+      int g = gcd (num_ , den_);
 
-  num_ /= g;
-  den_ /= g;
+      num_ /= g;
+      den_ /= g;
+    }
 }
-
 int
 Rational::sign () const
 {
   return ::sign (sign_);
 }
 
-bool
-Rational::infty_b () const
-{
-  return abs (sign_) > 1;
-}
-
 int
 Rational::compare (Rational const &r, Rational const &s)
 {
@@ -133,8 +140,17 @@ Rational::compare (Rational const &r, Rational const &s)
     return 1;
   else if (r.infty_b ())
     return 0;
-
-  return (r - s).sign ();
+  else if (r.sign_ == 0)
+    return 0;
+  else
+    {
+      /*
+       TODO: fix this code; (r-s).sign() is too expensive.
+       
+       return r.sign_ * ::sign  (r.num_ * s.den_ - s.num_ * r.den_);
+      */
+      return (r - s).sign ();
+    }
 }
 
 int
index 41a116e9474b73ff908a0fac5d60bbd35ef03f47..0aadebc63c1e9f3144087a46af9fbd5448ef8905 100644 (file)
@@ -1,35 +1,16 @@
-\header {
-       footnotes = ""
-       tagline = "Lily was here (unknown version) -- automatically converted from ABC"
-}
-voicedefault = \notes {
-\property Score.defaultBarType="empty"
+%
+%  This is NOT a lilypond input file. It is an ABC file, see
+%  http://www.gre.ac.uk/~c.walshaw/abc/
+%  
+%  LilyPond includes import tools for Finale, Musedata, ABC, MIDI and PMX
+%
+X:1
+T:Paddy O'Rafferty
+C:Trad.
+M:6/8
+K:D
+dff cee|def gfe|dff cee|dfe dBA|dff cee|def gfe|faf gfe|1 dfe dBA:|2 dfe dcB||
+~A3 B3|gfe fdB|AFA B2c|dfe dcB|~A3 ~B3|efe efg|faf gfe|1 dfe dcB:|2 dfe dBA||
+fAA eAA|def gfe|fAA eAA|dfe dBA|fAA eAA|def gfe|faf gfe|dfe dBA:|
 
-        c''8        c''8        f''8              }               
-%    This is NOT a lilypond input file. It is an ABC file, see
- %    http://www.gre.ac.uk/~c.walshaw/abc/
-     %    
-     
-%    LilyPond includes import tools for Finale, Musedata, ABC, MIDI and PMX
-               b''8 ^\downbow   a''8      f''8        d''''1    b'''1    a'''1  
-    b''8    a''8      e''''1      b''8    a''8      f''8        e''''1    
-d''''1    b'''1    a'''1      b''8    a''8      c''8      e''''1    f''8        
-b''8    a''8        b'''2 ^"~"         b''8 ^"~"-.   a''8        b''8    a''8   
-     f''8        d''''1    b'''1    a'''1      b''8    a''8        b''8    a''8 
-       a'''1    a'''1    e''''1    a'''1    a'''1      b''8    a''8        
-b'''1    a'''1      b''8    a''8      d''''1    e''''1    f''8      f''8      
-b'''1    a'''1      b''8    a''8      }                     c''8      \grace {  
-            }                   }           }   
-}\score{
-        \notes <
 
-       \context Staff="default"
-       {
-           \voicedefault 
-       }
-
-    >
-       \paper {
-       }
-       \midi {}
-}
diff --git a/input/regression/collision-2.ly b/input/regression/collision-2.ly
new file mode 100644 (file)
index 0000000..04b9f80
--- /dev/null
@@ -0,0 +1,9 @@
+
+\score { \notes
+
+  \context Staff \notes <  
+       % the f and g on 4th beat are exceptionally ugh.
+       \context Voice=i { \stemUp c4 d e f g2 g4 a | }
+       \context Voice=ii { \stemDown g4 f e g  g2 g2 } 
+>}
+}
index 25881933f7afc44f58308f4d7ce58943c4ba9ebc..571183ebc52cf55dd1bf39c41bd0c6c593667b6d 100644 (file)
@@ -4,17 +4,25 @@ are resolved."
 }
 
 \score {
-  \context Staff \notes \relative c' {
+  \context Staff \notes \transpose c'' {
      \time 3/4
      % Here's what I was trying to do:
-     < \context Voice  = VI {\stemDown <g4 b g'> 
-     r4 r4 }
-       \context Voice=VII {\stemUp d'2.} >
+     < \context Voice  = VI {\stemDown
+       <g4 b g'>
+       <g4. b g'>       
+       <g4 b d'>
+       d'4
+       d'4.       
+       }
+       
+       \context Voice=VII {\stemUp
+         d'4
+         d'4.   
+        <a4 c'>
+        <g4 b g'>
+        <g4. b g'>              
+          } >
 
-     % Or:
-
-     <\context Voice = VI {\stemUp <g4 b g'>  r r}
-       \context Voice= VII {\stemDown d'2.} >
   }
 }
 
index 89332dee95dacc3ada55b3c879395351207dc547..2f1467326d3e1de7b2c4c01f29e8a2e2fa465146 100644 (file)
@@ -12,56 +12,52 @@ Tested =     "test the Collision resolution "
 }
 
 
-twovoice =  \context Staff \notes < 
-       \context Voice=i { \stemDown c4 d e f g2~  g4 a [c8 d e f] c2| }
-       \context Voice=ii { \stemUp g4 f e g ~ g2 g2  c4 g4 g2 } 
+twovoice =
+\notes \relative c' \context Staff \notes < 
+       \context Voice=i { \stemDown c4 c  d d e e f f }
+       \context Voice=ii { \stemUp g4 f f e e d d c } 
 >
 
-twovoicesteminvert =  \context Staff \notes <  
-       % the f and g on 4th beat are exceptionally ugh.
-       \context Voice=i { \stemUp c4 d e f g2 g4 a | }
-       \context Voice=ii { \stemDown g4 f e g  g2 g2 } 
+twovoicechords = \context Staff \notes <
+       \context Voice = i \relative c' {
+               \stemUp e4 d c b a g f
+       }
+       \context Voice = ii \relative c' {
+               \stemDown <a4 c> <a4 c> <a4 c> <a4 c> <a c>
+               <a c> <a c>  
+       }
 >
 
+
 threevoice =  \context Staff \notes <
        \context Voice=i { \stemUp g4 f e f g a g2 }
-       \context Voice=ii { \stemUp \property Voice.NoteColumn \override #'horizontal-shift = #1
-               e2  e2  e2  e2 }
+       \context Voice=ii { \stemUp \shiftOn
+               e4 e e e e e e e  }
        \context Voice=iii { \stemDown c4 d e d c d es }
 >
 
-chordstest =  \context Staff \notes <
-       \context Voice = i \relative c {
-               \stemUp e4 dis c f g f a b b
-       }
-       \context Voice = ii \relative c {
-               \stemDown <a4 c> <a4 c> <a4 e'> <a4 c> <e' a> <e a> <e a> <a c> <a d>
-       }
->
-
 hairyChord =  \context Staff \notes\relative c' <
      \context Voice=one {
- \property Voice.NoteColumn \override #'horizontal-shift = #0
+\shiftOff
        \stemUp 
        e4 
      }
      
      \context Voice=two {
        \stemUp
+       \shiftOn
  \property Voice.NoteColumn \override #'horizontal-shift = #1
        cis
      }
      
-     \context Voice=three {
- \property Voice.NoteColumn \override #'horizontal-shift = #2
-
+     \context Voice=three {    \shiftOnn
        \stemUp 
        ais
      }
      
      \context Voice=four {
         \stemDown
- \property Voice.NoteColumn \override #'horizontal-shift = #1
+       \shiftOn
 
        fis
      }
@@ -69,10 +65,11 @@ hairyChord =  \context Staff \notes\relative c' <
 
 
 \score{
-       \notes \transpose c'' {  \twovoice  
-       \twovoicesteminvert 
-       \threevoice \break
-        \chordstest
+       \notes \transpose c'' {
+          \twovoice
+          \twovoicechords
+       
+       \threevoice 
         \hairyChord
        }
        
index 405e6add22c2a38f86003f33048b311ebc1d38cf..c3f4ccf1551adaebfb3b429f6428bf587b0ffc2d 100644 (file)
@@ -27,6 +27,10 @@ upperVoice =  \context Staff = upperVoice <
        \property Staff.Accidentals \override #'style = #'vaticana
        \property Staff.Custos \override #'style = #'vaticana
        \property Voice.NoteHead \override #'style = #'vaticana_punctum
+       \property Voice.Porrectus \override #'style = #'vaticana
+       \property Voice.Porrectus \override #'solid = ##t
+       \property Voice.Porrectus \override #'add-stem = ##t
+       \property Voice.Porrectus \override #'stem-direction = #-1
        \key es \major
        \clef "vaticana_fa2"
        c!1 des! e! f! ges!
@@ -37,10 +41,10 @@ upperVoice =  \context Staff = upperVoice <
        \clef "vaticana_do2"
 
        \property Voice.NoteHead \override #'style = #'vaticana_subbipunctum
-       a! b! ces'
+       a! b!
        \property Staff.BarLine \override #'bar-size = #3.0 \bar "|"
        \property Voice.NoteHead \override #'style = #'vaticana_virga
-       b! a! ges fes
+       ces' b! ces'! \porrectus ges! \porrectus fes!
        \breathe
        \clef "vaticana_fa1"
        \property Voice.NoteHead \override #'style = #'vaticana_quilisma
@@ -112,69 +116,92 @@ lowerVoice =  \context Staff = lowerNotes <
     % \property Staff.StaffSymbol \override #'line-count = #5
     \context Staff \outputproperty #(make-type-checker 'staff-symbol-interface)
       #'line-count = #5
-    
+
     \notes \transpose c' {
        \property Voice.noAutoBeaming = ##t
        \property Staff.KeySignature \override #'style = #'mensural
        \property Staff.Accidentals \override #'style = #'mensural
        \property Staff.Custos \override #'style = #'mensural
-        \property Voice.NoteHead \override #'style = #'neo_mensural
-        \property Voice.Rest \override #'style = #'neo_mensural
+       \property Voice.NoteHead \override #'style = #'neo_mensural
+       \property Voice.Rest \override #'style = #'neo_mensural
+       \property Voice.Porrectus \override #'style = #'mensural
+       \property Voice.Porrectus \override #'solid = ##f
+       \property Voice.Porrectus \override #'add-stem = ##t
+       \property Voice.Porrectus \override #'stem-direction = #1
        \key a \major
+
+       % IMPORTANT NOTE:
+       %
+       % The porrectus syntax is subject to change.  For proper
+       % use, it may eventually change into something like this:
+       %
+       % \ligature { e \porrectus c }
+       %
+       % The reason is that there needs to be some enclosing instance
+       % for correct handling of line breaking, alignment with
+       % adjacent note heads, and placement of accidentals.
+
        \clef "neo_mensural_c2"
-       c2 dis es fis ges
-        \property Staff.forceClef = ##t
+       cis' e' \porrectus d' gis' \porrectus e'
+       \property Staff.forceClef = ##t
        \clef "neo_mensural_c2"
-       ais bes cis'
-       bis as gis fes
+
+       fis' \porrectus b cis''
+       b \porrectus a a \porrectus fis
        \clef "petrucci_c2"
-       e d c1 \bar "|"
+       cis \porrectus fis ces1 % \bar "|"
 
        \clef "petrucci_c2"
        r\longa
-        \property Staff.forceClef = ##t
+       \property Staff.forceClef = ##t
        \clef "mensural_c2"
        r\breve r1 r2
        \clef "mensural_g"
        r4 r8 r16 r32 r32 \bar "|"
 
-        \property Voice.NoteHead \override #'style = #'mensural
+       \property Voice.NoteHead \override #'style = #'mensural
        \property Voice.Stem \override #'style = #'mensural
        \property Voice.Stem \override #'thickness = #1.0
-        \property Voice.Rest \override #'style = #'mensural
+       \property Voice.Rest \override #'style = #'mensural
        \clef "petrucci_f"
        c8 b, c16 b, c32 b, c64 b, c b,
        d8 e  d16 e  d32 e  d64 e  d e
        r\longa
-        \property Staff.forceClef = ##t
+       \property Staff.forceClef = ##t
        \clef "petrucci_f"
-       r\breve r1 \bar "|"
+       r\breve r1 \bar "|"
        \clef "mensural_f"
 
-       % FIXME: need this to avoid segmentation fault on r8/r16/r32
-       % (Strange: what has Voice.Stem style to do with mensural rests?)
+       % FIXME: must set Voice.Stem style to #'neo_mensural to avoid
+       % segmentation fault on r8/r16/r32.  (Strange: what has
+       % Voice.Stem style to do with mensural rests?)
        \property Voice.Stem \override #'style = #'neo_mensural
-
        r2 r4 r8 r16 r32 r32
        \property Voice.Stem \override #'style = #'mensural
 
-        \property Staff.forceClef = ##t
+       \property Staff.forceClef = ##t
        \clef "mensural_f"
        e2 f g
        \clef "mensural_g"
-       as'! bes'! cis''!
-       bes'! as'! gis'! fis'!
-        \property Staff.forceClef = ##t
+
+       % FIXME: In the second and all subsequent lines of score, the
+       % stems and accidentals of the junked notes keep visible on
+       % porrectus grobs.  Is this an initialization bug in the line
+       % breaking algorithm?
+
+       bes'! \porrectus as'! \porrectus cis''!
+       bes'! \porrectus fis'! as'! \porrectus ges'!
+       \property Staff.forceClef = ##t
        \clef "mensural_g"
        e' d' c'1 \bar "|"
 
-        \property Staff.forceClef = ##t
+       \property Staff.forceClef = ##t
        \clef "petrucci_g"
        c'2 d' e' f' g'
        \clef "petrucci_g"
        as'! bes'! cis''!
        bes'! as'! gis'! fis'!
-        \property Staff.forceClef = ##t
+       \property Staff.forceClef = ##t
        \clef "mensural_g"
        es'! des'! cis'!1 \bar "||"
     }
index 102c7f90b6a1b3a1fe28d297e3a01f2c0a633fef..9c6b0300be89eb0249300f6b702d08bf978fb5dc 100644 (file)
@@ -1,27 +1,29 @@
-\version "1.3.146"
-% Example of figured bass, using text scripts.
-% (An alternative is to use a lyrics line if you want the figures
-% aligned vertically.)
-
-
-
-% Scheme macros for accidentals. Note how they can be combined
-% with other strings, for example in: d^#`(columns ,sharp "4")
-
-#(define sharp '((raise . 0.2) (music (named "accidentals-1"))))
-#(define natural '((raise . 0.2) (music (named "accidentals-0"))))
-#(define flat '((raise . 0.2) (music (named "accidentals--1"))))
-
-
-\score{
-  \notes \relative c'{
-    \clef bass
-
-      c^"5" d^#natural g,^"7 6" [a8 e] |
-      fis4^"7 6" [g8 d] e4^"7 6" [f?8 c] |
-      [d^#sharp d b g][c^"7" c^"5" a^"6" f] |
-      [bes^"7" bes^"5" g^"6" e] a4^#sharp d^"6" ~ |
-      d^#`(columns ,sharp "4") c^"6" d e^#sharp |
+\header {
+texidoc = "Test figured bass.
+
+Figured bass is created by the FiguredBass context which eats
+note-requests and rest-requests.  You can enter these either using
+standard @code{< >} notation, or using the special @code{\figures { }}
+mode, which allows you to type numbers, like @code{<4 6+>}.
+" }
+
+\score { \notes  <
+\context FiguredBass \transpose c'' {
+   <e! g >
+   <f8 ais >
+   \figures {
+     r 
+     <1 3 5>4 <3- 5+ 6!> <5>
+   } 
+ }
+ \context Voice {
+   c 
+   g8 g 
+   f4
+   d
+   c
   }
-}
-
+>
+ }
index 48c81d14cf764266d1db2665f99b643dbf370376..df1bf65ffa809ecc77c2ca32ca169d3b178059ac 100644 (file)
@@ -761,7 +761,7 @@ Beam::set_beaming (Grob*me,Beaming_info_list *beaming)
   */
 Molecule
 Beam::stem_beams (Grob*me,Item *here, Item *next, Item *prev,
-                 Real dy, Real dydx
+                 Real /* dy */ , Real dydx
                  ) 
 {
   // ugh -> use commonx
index 39e906b6ab72eccab8fb334bfba016d58b4c5548..d0bcf4eec24f9e928fb33b0cf278458d7b967354 100644 (file)
@@ -56,8 +56,28 @@ check_meshing_chords (Grob*me,
   Grob * nd_l = Note_column::first_head (cd);
       
      
+
+  /*
+    this case (distant half collide), 
+    
+        |
+      x |
+     | x
+     |
+
+   the noteheads may be closer than this case (close half collide)
+
+       |
+       |
+      x 
+     x
+    |
+    |
+    
+   */
   
-  bool half_collide = false;
+  bool close_half_collide = false;
+  bool distant_half_collide = false;  
   bool full_collide = false;  
 
   /*
@@ -86,7 +106,7 @@ check_meshing_chords (Grob*me,
 
   bool touch = (ups[0] - dps.top () >= 0);
   
-  bool merge_possible = (ups[0] >= dps[0]) && (ups.top () <= dps.top ());
+  bool merge_possible = (ups[0] >= dps[0]) && (ups.top () >= dps.top ());
 
   merge_possible = merge_possible &&
     Rhythmic_head::balltype_i (nu_l) == Rhythmic_head::balltype_i (nd_l);
@@ -100,7 +120,10 @@ check_meshing_chords (Grob*me,
     if (abs (ups[i] - dps[j]) == 1)
       {
        merge_possible = false;
-       half_collide = true;
+       if (ups[i] > dps[j])
+         close_half_collide = true;
+       else
+         distant_half_collide = true;
       }
     else if (ups[i]==dps[j])
       full_collide = true;
@@ -127,21 +150,34 @@ check_meshing_chords (Grob*me,
   
   Real shift_amount = 1;
 
-  if ( touch)
+  if (touch)
     shift_amount *= -1;
-  else
+
   /*
     for full collisions, the right hand head may obscure dots, so
     make sure the dotted heads go to the right.
    */
-    if ((Rhythmic_head::dot_count (nu_l) < Rhythmic_head::dot_count (nd_l)
-          && full_collide))
-      shift_amount *= -1;
+  if ((Rhythmic_head::dot_count (nu_l) > Rhythmic_head::dot_count (nd_l)
+       && full_collide))
+    shift_amount = 1;
 
+  /*
+    TODO: these numbers are magic; should devise a set of grob props
+    to tune this behavior.  */
+  
   if (merge_possible)
     shift_amount *= 0.0;
-  else if (half_collide || full_collide) 
+  else if (close_half_collide && !touch)
+    shift_amount *= 0.52;
+  else if (distant_half_collide && !touch)
+    shift_amount *= 0.4;
+  else if (distant_half_collide || close_half_collide || full_collide)
     shift_amount *= 0.5;
+  /*
+    we're meshing.
+  */
+  else if (Rhythmic_head::dot_count (nu_l) || Rhythmic_head::dot_count (nd_l))
+    shift_amount *= 0.1;
   else
     shift_amount *= 0.25;
 
@@ -295,51 +331,6 @@ Collision::automatic_shift (Grob *me)
 
   check_meshing_chords (me, &offsets, extents, clash_groups);
   
-#if 0  
-  /*
-    if the up and down version are close, and can not be merged, move
-    all of them again. */
-  if (extents[UP].size () && extents[DOWN].size ())
-    {
-      Grob *cu_l =clash_groups[UP][0];
-      Grob *cd_l =clash_groups[DOWN][0];
-
-
-      /*
-       TODO.
-       */
-      Grob * nu_l= Note_column::first_head (cu_l);
-      Grob * nd_l = Note_column::first_head (cd_l);
-      
-      int downpos = Note_column::head_positions_interval (cd_l)[BIGGER];
-      int uppos = Note_column::head_positions_interval (cu_l)[SMALLER];      
-      
-      bool merge  =
-       downpos == uppos
-       && Rhythmic_head::balltype_i (nu_l) == Rhythmic_head::balltype_i (nd_l);
-
-
-      if (!to_boolean (me->get_grob_property ("merge-differently-dotted")))
-       merge = merge && Rhythmic_head::dot_count (nu_l) == Rhythmic_head::dot_count (nd_l);
-
-      /*
-       notes are close, but can not be merged.  Shift
-       */
-      if (abs (uppos - downpos) < 2 && !merge)
-         do
-         {
-           for (int i=0; i < clash_groups[d].size (); i++)
-             {
-               if(Rhythmic_head::dot_count (nu_l) > Rhythmic_head::dot_count (nd_l))
-                 offsets[d][i] += d * 0.5;
-               else 
-                 offsets[d][i] -= d * 0.5;
-             }
-         }
-         while ((flip (&d))!= UP);
-    }
-#endif
-  
   do
     {
       for (int i=0; i < clash_groups[d].size (); i++)
index aac1ebe576fc16d628f3f26a10c83293197bc40f..ce8db7f353851be59e034193cda0fd48c88c2909 100644 (file)
@@ -115,6 +115,7 @@ ADD_MUSIC (Melisma_playing_req);
 ADD_MUSIC (Melisma_req);
 ADD_MUSIC (Melodic_req);
 ADD_MUSIC (Note_req);
+ADD_MUSIC (Porrectus_req);
 ADD_MUSIC (Rest_req);
 ADD_MUSIC (Rhythmic_req);
 ADD_MUSIC (Script_req);
index 02e683b05501f8dfea9bdc53e159e514c1914af8..9059624ce660f249c0ea9b2e6a1c860f65821161 100644 (file)
@@ -10,6 +10,7 @@
 #include "engraver.hh"
 #include "engraver-group-engraver.hh"
 #include "grob.hh"
+#include "main.hh"
 
 
 void
@@ -21,7 +22,8 @@ Engraver::announce_grob (Grob_info inf)
 void
 Engraver::announce_grob (Grob* e, Music *m)
 {
-  if (m && m->origin ()->location_str ().length_i ())
+  if (m && store_locations_global_b 
+      && m->origin ()->location_str ().length_i ())
     {
       e->set_grob_property ("origin", m->get_mus_property ("origin"));
     }
diff --git a/lily/figured-bass-engraver.cc b/lily/figured-bass-engraver.cc
new file mode 100644 (file)
index 0000000..87894fc
--- /dev/null
@@ -0,0 +1,104 @@
+#include "engraver.hh"
+#include "text-item.hh"
+#include "musical-request.hh"
+#include "item.hh"
+
+class Figured_bass_engraver : public Engraver
+{
+public:
+  VIRTUAL_COPY_CONS(Translator);
+  Figured_bass_engraver();
+
+protected:
+  Link_array<Note_req> figures_;
+  Rest_req * rest_req_;
+
+  Grob * figure_;
+  
+  virtual bool try_music (Music*);
+  virtual void stop_translation_timestep ();
+  virtual void process_music ();
+};
+
+
+Figured_bass_engraver::Figured_bass_engraver()
+{
+  figure_ = 0;
+  rest_req_ = 0;
+}
+
+void
+Figured_bass_engraver::stop_translation_timestep ()
+{
+  if (figure_)
+    {
+      typeset_grob (figure_);
+      figure_ =00;
+    }
+
+  figures_.clear ();
+}
+
+bool
+Figured_bass_engraver::try_music (Music*m)
+{
+  if (Note_req* n = dynamic_cast<Note_req*> (m))
+    {
+      figures_.push (n);
+      return true;
+    }
+  else if (Rest_req * r = dynamic_cast<Rest_req*> (m))
+    {
+      rest_req_ = r;
+      return true;
+    }
+  return false;
+}
+
+void
+Figured_bass_engraver::process_music ()
+{
+  if (rest_req_)
+    {
+      figure_ = new Item (get_property ("BassFigure"));
+      announce_grob (figure_, rest_req_); // todo
+      figure_->set_grob_property ("text" , gh_str02scm ("-"));
+    }
+  else if (figures_.size ())
+    {
+      figure_ = new Item (get_property ("BassFigure"));
+      announce_grob (figure_, figures_[0]); // todo
+      SCM flist = SCM_EOL;
+      for (int i = 0; i < figures_.size (); i++)
+       {
+         Note_req * n = figures_[i];
+         Pitch *p = unsmob_pitch (n->get_mus_property ("pitch"));
+         
+         String fstr = to_str (p->steps ()+ 1);
+         
+         SCM one_fig = ly_str02scm(fstr.ch_C ());
+
+         if (p->alteration_i_ || to_boolean (n->get_mus_property ("force-accidental") ))
+           {
+             SCM alter = scm_assoc (gh_int2scm (p->alteration_i_),
+                                    figure_->get_grob_property ("accidental-alist"));
+             if (gh_pair_p (alter))
+               {
+                 one_fig = gh_list (ly_symbol2scm ("columns"),
+                                    one_fig,
+                                    gh_cdr(alter),
+                                    SCM_UNDEFINED);
+               }
+           }
+         
+         flist = gh_cons (one_fig, flist);
+       }
+
+      flist = gh_cons (ly_symbol2scm ("lines"), flist);
+
+      figure_-> set_grob_property ("text", flist);
+    }
+}
+
+  
+ADD_THIS_TRANSLATOR(Figured_bass_engraver);
index 0f233e61369b61a04650580be4d96088635d4c0e..c5cfcbe1747fd0c5b98138fbf7390ca3b71feb39 100644 (file)
@@ -351,6 +351,8 @@ Grob::add_dependency (Grob*e)
       Do break substitution in S, using CRITERION. Return new value.
       CRITERION is either a SMOB pointer to the desired line, or a number
       representing the break direction. Do not modify SRC.
+
+      It is rather tightly coded, since it takes a lot of time.
 */
 SCM
 Grob::handle_broken_grobs (SCM src, SCM criterion)
index 8c4cbeeb51fb9e5928af904a09b836c6a6cb1a6d..fa7d7f4e636f4a4ddc2a5f9e540b3369f35ea159 100644 (file)
@@ -51,6 +51,10 @@ class Breathing_sign_req : public Request {
   VIRTUAL_COPY_CONS (Music);
 };
 
+class Porrectus_req : public Request {
+  VIRTUAL_COPY_CONS (Music);
+};
+
 /**
     Handle key changes.
 */
index 7259cd3b28f7557ad0c97f5767f95520ac24a710..bafbe115783fb65be2d04885279513a49e12852d 100644 (file)
@@ -132,6 +132,7 @@ class Performer_group_performer;
 class Piano_bar_engraver;
 
 class Pitch_squash_engraver;
+class Porrectus_req;
 class Property_iterator;
 class Rational;
 class Relative_octave_music;
index 12d63619c826bd14f92da3ad39e4f44a192c5236..7d2f90174f5fe406049df1983ea55330b9eac6d4 100644 (file)
@@ -30,6 +30,7 @@ extern String output_format_global;
 extern String output_name_global;
 extern bool safe_global_b;
 extern bool verbose_global_b;
+extern bool store_locations_global_b;
 
 /* misc */
 extern All_font_metrics *all_fonts_global_p;
index a0f6901b1bcb1c387a021a5286306316b9a254e5..2c3d40595288e853e2ed231236e0210adcc7655b 100644 (file)
@@ -56,6 +56,7 @@ public:
 
   SCM lookup_identifier (String s);
   void push_note_state ();
+  void push_figuredbass_state ();
   void push_chord_state ();
   void push_lyric_state ();
   void pop_state ();
@@ -64,7 +65,7 @@ public:
   bool note_state_b () const;
   bool chord_state_b () const;
   bool lyric_state_b () const;
-
+  bool figure_state_b () const;
 private:
   int lookup_keyword (String);
   int scan_bare_word (String);
diff --git a/lily/include/porrectus.hh b/lily/include/porrectus.hh
new file mode 100644 (file)
index 0000000..8a11b03
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+  porrectus.hh
+
+  Copyright (C) 2001 Juergen Reuter
+
+  written for the GNU LilyPond music typesetter
+*/
+
+#ifndef PORRECTUS_HH
+#define PORRECTUS_HH
+
+#include "lily-guile.hh"
+
+/*
+  porrectus ligature
+*/
+class Porrectus
+{
+public:
+  static void set_left_head (Grob *, SCM);
+  static SCM get_left_head (Grob *);
+  static void set_right_head (Grob *, SCM);
+  static SCM get_right_head (Grob *);
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+
+private:
+  static Molecule brew_vaticana_molecule (Item *, bool, bool, Direction, Real);
+  static Molecule brew_mensural_molecule (Item *, bool, bool, Direction, Real);
+  static Molecule brew_horizontal_slope (Real, Real, Real);
+  static Molecule create_ledger_line (Interval, Grob *);
+  static Molecule create_streepjes (Grob *, int, int, Interval);
+};
+
+#endif // PORRECTUS_HH
diff --git a/lily/include/untransposable-music.hh b/lily/include/untransposable-music.hh
new file mode 100644 (file)
index 0000000..4f99e41
--- /dev/null
@@ -0,0 +1,26 @@
+
+/*   
+untransposable-music.hh -- declare 
+
+source file of the GNU LilyPond music typesetter
+
+(c) 2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef UNTRANSPOSABLE_MUSIC_HH
+#define UNTRANSPOSABLE_MUSIC_HH
+#include "music-wrapper.hh"
+
+class Untransposable_music : public Music_wrapper
+{
+public:
+  Untransposable_music ();
+  virtual Pitch to_relative_octave (Pitch);
+  virtual void transpose (Pitch); 
+  VIRTUAL_COPY_CONS(Music);
+};
+
+
+#endif /* UNTRANSPOSABLE_MUSIC_HH */
+
index a875cea59ee59bbd0ccb8c313b0209af72122f09..2bbf7c564c076fbfa1a0b3543ab6ab56a2212433 100644 (file)
@@ -93,6 +93,7 @@ SCM scan_fraction (String);
 %x incl
 %x lyrics
 %x notes
+%x figures
 %x quote
 %x longcomment
 
@@ -129,7 +130,7 @@ HYPHEN              --
        // windows-suck-suck-suck
 }
 
-<INITIAL,chords,incl,lyrics,notes>{
+<INITIAL,chords,incl,lyrics,notes,figures>{
   "%{" {
        yy_push_state (longcomment);
   }
@@ -146,7 +147,7 @@ HYPHEN              --
   }
 }
 
-<INITIAL,chords,lyrics,notes>\\version{WHITE}* {
+<INITIAL,chords,lyrics,notes,figures>\\version{WHITE}* {
        yy_push_state (version);
 }
 <version>\"[^"]*\"     { /* got the version number */
@@ -178,7 +179,7 @@ HYPHEN              --
 }
 
 
-<INITIAL,chords,lyrics,notes>\\maininput           {
+<INITIAL,chords,lyrics,notes,figures>\\maininput           {
        if (!main_input_b_)
        {
                start_main_input ();
@@ -188,7 +189,7 @@ HYPHEN              --
                error (_ ("\\maininput disallowed outside init files"));
 }
 
-<INITIAL,chords,lyrics,notes>\\include           {
+<INITIAL,chords,lyrics,figures,notes>\\include           {
        yy_push_state (incl);
 }
 <incl>\"[^"]*\";?   { /* got the include file name */
@@ -221,34 +222,34 @@ HYPHEN            --
        cerr << _ ("Missing end quote") << endl;
        exit (1);
 }
-<chords,notes>{RESTNAME}       {
+<chords,notes,figures>{RESTNAME}       {
        const char *s = YYText ();
        yylval.scm = ly_str02scm (s);
        return RESTNAME;
 }
-<chords,notes>R                {
+<chords,notes,figures>R                {
        return MULTI_MEASURE_REST;
 }
-<INITIAL,chords,lyrics,notes>\\\${BLACK}*{WHITE}       {
+<INITIAL,chords,lyrics,notes,figures>\\\${BLACK}*{WHITE}       {
        String s=YYText () + 2;
        s=s.left_str (s.length_i () - 1);
        return scan_escaped_word (s); 
 }
-<INITIAL,chords,lyrics,notes>\${BLACK}*{WHITE}         {
+<INITIAL,chords,lyrics,notes,figures>\${BLACK}*{WHITE}         {
        String s=YYText () + 1;
        s=s.left_str (s.length_i () - 1);
        return scan_bare_word (s);
 }
-<INITIAL,chords,lyrics,notes>\\\${BLACK}*              { // backup rule
+<INITIAL,chords,lyrics,notes,figures>\\\${BLACK}*              { // backup rule
        cerr << _ ("white expected") << endl;
        exit (1);
 }
-<INITIAL,chords,lyrics,notes>\${BLACK}*                { // backup rule
+<INITIAL,chords,lyrics,notes,figures>\${BLACK}*                { // backup rule
        cerr << _ ("white expected") << endl;
        exit (1);
 }
 
-<INITIAL,chords,lyrics,notes># { //embedded scm
+<INITIAL,chords,lyrics,notes,figures># { //embedded scm
        //char const* s = YYText () + 1;
        char const* s = here_ch_C ();
        int n = 0;
@@ -267,7 +268,15 @@ HYPHEN             --
 
        return SCM_T;
 }
-<notes>{
+<figures>{
+       \>              {
+               return FIGURE_CLOSE;
+       }
+       \<      {
+               return FIGURE_OPEN;
+       }
+}
+<notes,figures>{
        {ALPHAWORD}     {
                return scan_bare_word (YYText ());
        }
@@ -430,11 +439,11 @@ HYPHEN            --
        return c;
 }
 
-<INITIAL,notes>.       {
+<INITIAL,notes,figures>.       {
        return YYText ()[0];
 }
 
-<INITIAL,lyrics,notes>\\. {
+<INITIAL,lyrics,notes,figures>\\. {
     char c= YYText ()[1];
 
     switch (c) {
@@ -467,6 +476,11 @@ My_lily_lexer::push_note_state ()
        yy_push_state (notes);
 }
 
+void
+My_lily_lexer::push_figuredbass_state()
+{
+       yy_push_state (figures);
+}
 void
 My_lily_lexer::push_chord_state ()
 {
@@ -581,6 +595,12 @@ My_lily_lexer::lyric_state_b () const
        return YY_START == lyrics;
 }
 
+bool
+My_lily_lexer::figure_state_b () const
+{
+       return YY_START == figures;
+}
+
 /*
  urg, belong to String (_convert)
  and should be generalised 
index ae24d23a2e44772ac0b017943eefc887d922205e..7ed6f00438233220c2eb453e20d0600feaa492ed 100644 (file)
@@ -52,16 +52,16 @@ Rhythmic_req::do_equal_b (Request const* r) const
 Moment
 Rhythmic_req::length_mom () const
 {
-  return  unsmob_duration (get_mus_property ("duration"))->length_mom ();
-
+  Duration* d = unsmob_duration (get_mus_property ("duration"));
+  return d ? d->length_mom () : Moment (0);
 }
 
 void
 Rhythmic_req::compress (Moment m)
 {
   Duration *d =  unsmob_duration (get_mus_property ("duration"));
-
-  set_mus_property ("duration", d ->compressed (m.main_part_).smobbed_copy ());
+  if (d)
+    set_mus_property ("duration", d ->compressed (m.main_part_).smobbed_copy ());
 }
 
 bool
@@ -109,6 +109,3 @@ Articulation_req::do_equal_b (Request const* r) const
 
 
 
-
-
-
index 9c07514277d086f51970fbc136023dbfc25d241b..54feff2251622e7fa5cb695e5e1a239d0d919d6d 100644 (file)
@@ -50,9 +50,8 @@ static Keyword_ent the_key_tab[]={
   {"duration", DURATION},
   {"dynamicscript", DYNAMICSCRIPT},
   {"elementdescriptions", ELEMENTDESCRIPTIONS},
-  {"font", FONT},
+  {"figures",FIGURES},
   {"grace", GRACE},
-  {"ngrace", NGRACE},
   {"glissando", GLISSANDO},
   {"header", HEADER},
   {"in", IN_T},
@@ -81,6 +80,7 @@ static Keyword_ent the_key_tab[]={
   {"repeat", REPEAT},
   {"addlyrics", ADDLYRICS},
   {"partcombine", PARTCOMBINE},
+  {"porrectus", PORRECTUS},
   {"score", SCORE},
   {"script", SCRIPT},
   {"stylesheet", STYLESHEET},
index c732454e5325a659c8996f5539b185d604deb000..c0a6061ddf33b6cd82a446d0d12373b9de9de0c2 100644 (file)
     -
  */
 
+/*
+
+the rules for who is protecting what are very shady. TODO: uniformise
+this.
+
+
+*/
+
 #include <ctype.h>
 #include <iostream.h>
 
@@ -45,7 +53,7 @@
 #include "transposed-music.hh"
 #include "time-scaled-music.hh"
 #include "repeated-music.hh"
-
+#include "untransposable-music.hh"
 #include "lilypond-input-version.hh"
 #include "grace-music.hh"
 #include "part-combine-music.hh"
@@ -186,9 +194,9 @@ yylex (YYSTYPE *s,  void * v_l)
 %token DENIES
 %token DURATION
 %token EXTENDER
-%token FONT
+%token FIGURES FIGURE_OPEN FIGURE_CLOSE
 %token GLISSANDO
-%token GRACE NGRACE
+%token GRACE 
 %token HEADER
 %token HYPHEN
 %token IN_T
@@ -207,6 +215,7 @@ yylex (YYSTYPE *s,  void * v_l)
 %token PAPER
 %token PARTIAL
 %token PENALTY
+%token PORRECTUS
 %token PROPERTY
 %token OVERRIDE SET REVERT 
 %token PT_T
@@ -237,6 +246,8 @@ yylex (YYSTYPE *s,  void * v_l)
 %token CHORD_BASS CHORD_COLON CHORD_MINUS CHORD_CARET 
 
 %type <i>      exclamations questions dots
+%type <i>      bass_number bass_mod
+%type <scm>    bass_figure figure_list figure_spec
 %token <i>     DIGIT
 %token <scm>   NOTENAME_PITCH
 %token <scm>   TONICNAME_PITCH
@@ -912,6 +923,16 @@ Composite_music:
                { $$ = $3;
                  THIS->lexer_p_->pop_state ();
                }
+       | FIGURES
+               { THIS->lexer_p_->push_figuredbass_state (); }
+       Music
+               {
+                 Music * chm = new Untransposable_music () ;
+                 chm->set_mus_property ("element", $3->self_scm ());
+                 $$ = chm;
+
+                 THIS->lexer_p_->pop_state ();
+       }
        | CHORDS
                { THIS->lexer_p_->push_chord_state (); }
        Music
@@ -1215,6 +1236,9 @@ shorthand_command_req:
        | BREATHE {
                $$ = new Breathing_sign_req;
        }
+       | PORRECTUS {
+               $$ = new Porrectus_req;
+       }
        ;
 
 
@@ -1674,6 +1698,56 @@ tremolo_type:
        ;
 
 
+bass_number:
+       DIGIT
+       | UNSIGNED 
+       ;
+
+bass_mod:
+       '-'     { $$ = -1; }
+       | '+'   { $$ = 1; } 
+       | '!'   { $$ = 0; }
+       ;
+
+bass_figure:
+       bass_number  {
+               Pitch p ;
+               p .notename_i_ = $1 - 1;
+               p.normalise();
+               
+               Note_req * nr = new Note_req;
+               $$ = nr->self_scm ();
+               nr->set_mus_property ("pitch", p.smobbed_copy ());
+               scm_unprotect_object ($$);
+       }
+       | bass_figure bass_mod {
+               if ($2) { 
+                       SCM sp = unsmob_music ($1)->get_mus_property ("pitch");
+                       unsmob_pitch (sp)->alteration_i_ += $2;
+               } else {
+                       unsmob_music ($1)->set_mus_property ("force-accidental", SCM_BOOL_T);
+               }
+       }
+       ;
+
+figure_list:
+       /**/            {
+               $$ = SCM_EOL;
+       }
+       | figure_list bass_figure {
+               $$ = gh_cons ($2, $1); 
+       }
+       ;
+
+figure_spec:
+       FIGURE_OPEN figure_list FIGURE_CLOSE {
+               Music * m = new Request_chord (SCM_EOL);
+               $2 = scm_reverse_x ($2, SCM_EOL);
+               m->set_mus_property ("elements",  $2);
+               $$ = m->self_scm ();
+       }
+       ;
+
 simple_element:
        pitch exclamations questions optional_notemode_duration {
 
@@ -1698,7 +1772,17 @@ simple_element:
                n->set_spot (i);
                $$ = v;
        }
-       | RESTNAME optional_notemode_duration           {
+       | figure_spec optional_notemode_duration {
+               Music * m = unsmob_music ($1);
+               Input i = THIS->pop_spot (); 
+               m->set_spot (i);
+               for (SCM s = m->get_mus_property ("elements"); gh_pair_p (s); s = gh_cdr (s))
+                       {
+                               unsmob_music (gh_car (s))->set_mus_property ("duration", $2);
+                       }
+               $$ = m;
+       }       
+       | RESTNAME optional_notemode_duration           {
 
                Input i = THIS->pop_spot ();
                SCM e = SCM_UNDEFINED;
diff --git a/lily/porrectus-engraver.cc b/lily/porrectus-engraver.cc
new file mode 100644 (file)
index 0000000..84d81f4
--- /dev/null
@@ -0,0 +1,237 @@
+/*
+  porrectus-engraver.cc -- implement Porrectus_engraver
+
+  Copyright (C) 2001 Juergen Reuter
+
+  written for the GNU LilyPond music typesetter
+*/
+
+/*
+ * FIXME: Currently, when creating a porrectus item, it takes the
+ * moment of the second note.  Actually, it should take the moment of
+ * the first note.
+ *
+ * TODO: Introduce "\~" as alternative syntax for "\porrectus"?
+ *
+ * TODO: Hufnagel support.
+ *
+ * TODO: Fine-tuning of porrectus shape.  In particular, the mensural
+ * non-solid shape could either be slightly bigger in height, or the
+ * extrem points could be slightly vertically shifted apart.
+ *
+ * TODO: For white mensural (i.e. #'style=#'mensural, #'solid=##f)
+ * porrectus grobs, it is possible to automatically determine all
+ * porrectus specific properties (add-stem, stem-direction) solely
+ * from the duration of the contributing notes and time-signature.
+ * Introduce a boolean grob property called auto-config, so that, if
+ * turned on, lily automatically sets the remaining properties
+ * properly.
+ *
+ * TODO: The following issues are not (and should not be) handled by
+ * this engraver: (1) accidentals placement, (2) avoiding line
+ * breaking inbetween porrectus, (3) spacing.  For example, currently
+ * only the accidental for the second note (cp. the above FIXME) is
+ * printed.  These issues should be resolved by some sort of ligature
+ * context that encloses use of this engraver, using syntax like:
+ * \ligature { e \porrectus c }.
+ *
+ * TODO: Do not allow a series of adjacent porrectus requests, as in:
+ * e \porrectus d \porrectus c.
+ */
+
+#include "staff-symbol-referencer.hh"
+#include "porrectus.hh"
+#include "musical-request.hh"
+#include "command-request.hh"
+#include "rhythmic-head.hh"
+#include "item.hh"
+#include "engraver.hh"
+#include "pqueue.hh"
+
+// TODO: PHead_melodic_tuple is duplicated code from tie-engraver.cc.
+// Maybe put this into public class?
+struct PHead_melodic_tuple {
+  Melodic_req *req_l_;
+  Grob *head_l_;
+  Moment end_;
+  PHead_melodic_tuple ();
+  PHead_melodic_tuple (Grob*, Melodic_req*, Moment);
+  static int pitch_compare (PHead_melodic_tuple const &,
+                           PHead_melodic_tuple const &);
+  static int time_compare (PHead_melodic_tuple const &,
+                          PHead_melodic_tuple const &);  
+};
+
+inline int compare (PHead_melodic_tuple const &a, PHead_melodic_tuple const &b)
+{
+  return PHead_melodic_tuple::time_compare (a,b);
+}
+
+class Porrectus_engraver : public Engraver {
+public:
+  Porrectus_engraver ();
+  VIRTUAL_COPY_CONS (Translator);
+  
+protected:
+  virtual bool try_music (Music *req_l);
+  virtual void create_grobs ();
+  virtual void stop_translation_timestep ();
+  virtual void start_translation_timestep ();
+  virtual void acknowledge_grob (Grob_info);
+
+private:
+  PQueue<PHead_melodic_tuple> past_notes_pq_;
+  Porrectus_req *porrectus_req_l_;
+  Array<PHead_melodic_tuple> left_heads_;
+  Array<PHead_melodic_tuple> right_heads_;
+  Link_array<Grob> porrectus_p_arr_;
+};
+
+Porrectus_engraver::Porrectus_engraver ()
+{
+  porrectus_req_l_ = 0;
+}
+
+bool
+Porrectus_engraver::try_music (Music *m)
+{
+  if (Porrectus_req *req_l_ = dynamic_cast <Porrectus_req *> (m))
+    {
+      porrectus_req_l_ = req_l_;
+      return true;
+    }
+  else
+    return false;
+}
+
+void
+Porrectus_engraver::acknowledge_grob (Grob_info info_l_)
+{
+  if (Rhythmic_head::has_interface (info_l_.elem_l_))
+    {
+      Note_req *note_req_l_ = dynamic_cast <Note_req *> (info_l_.req_l_);
+      if (!note_req_l_)
+       return;
+      left_heads_.push (PHead_melodic_tuple (info_l_.elem_l_, note_req_l_,
+                                            now_mom () +
+                                            note_req_l_->length_mom ()));
+    }
+}
+
+void
+Porrectus_engraver::create_grobs ()
+{
+  if (porrectus_req_l_)
+    {
+      left_heads_.sort (PHead_melodic_tuple::pitch_compare);
+      right_heads_.sort (PHead_melodic_tuple::pitch_compare);
+
+      SCM head_list = SCM_EOL;
+      
+      int i = left_heads_.size () - 1;
+      int j = right_heads_.size () - 1;
+
+      while ((i >= 0) && (j >= 0))
+       {
+         head_list =
+           gh_cons (gh_cons (right_heads_[j].head_l_->self_scm (),
+                             left_heads_[i].head_l_->self_scm ()),
+                    head_list);
+
+         past_notes_pq_. insert (left_heads_[i]);
+         left_heads_.del (i);
+         right_heads_.del (j);
+         i--;
+         j--;
+       }
+
+      for (SCM s = head_list; gh_pair_p (s); s = gh_cdr (s))
+       {
+         SCM caar = gh_caar (s);
+         SCM cdar = gh_cdar (s);
+
+         Item *left_head = dynamic_cast<Item*> (unsmob_grob (caar));
+         Item *right_head = dynamic_cast<Item*> (unsmob_grob (cdar));
+         left_head->set_grob_property("transparent", gh_bool2scm(true));
+         right_head->set_grob_property("transparent", gh_bool2scm(true));
+
+         Grob *porrectus_p_ = new Item (get_property ("Porrectus"));
+         Porrectus::set_left_head(porrectus_p_, caar);
+         Porrectus::set_right_head(porrectus_p_, cdar);
+         porrectus_p_arr_.push (porrectus_p_);
+         announce_grob (porrectus_p_, 0);
+       }
+    }
+}
+
+void
+Porrectus_engraver::stop_translation_timestep ()
+{
+  for (int i = 0; i < left_heads_.size (); i++)
+    {
+      past_notes_pq_.insert (left_heads_[i]);
+    }
+  left_heads_.clear ();
+
+  for (int i = 0; i < porrectus_p_arr_.size (); i++)
+    {
+      typeset_grob (porrectus_p_arr_[i]);
+    }
+  porrectus_p_arr_.clear ();
+}
+
+void
+Porrectus_engraver::start_translation_timestep ()
+{
+  porrectus_req_l_ = 0;
+  Moment now = now_mom ();
+  while (past_notes_pq_.size () && past_notes_pq_.front ().end_ < now)
+    past_notes_pq_.delmin ();
+
+  right_heads_.clear ();
+  while (past_notes_pq_.size () &&
+        (past_notes_pq_.front ().end_ == now))
+    right_heads_.push (past_notes_pq_.get ());
+}
+
+ADD_THIS_TRANSLATOR (Porrectus_engraver);
+
+// TODO: PHead_melodic_tuple is duplicated code from tie-engraver.cc.
+// Maybe put this into public class?
+
+PHead_melodic_tuple::PHead_melodic_tuple ()
+{
+  head_l_ = 0;
+  req_l_ = 0;
+  end_ = 0;
+}
+
+PHead_melodic_tuple::PHead_melodic_tuple (Grob *h, Melodic_req*m, Moment mom)
+{
+  head_l_ = h;
+  req_l_ = m;
+  end_ = mom;
+}
+
+/*
+  signed compare, should use pitch<? 
+ */
+int
+PHead_melodic_tuple::pitch_compare (PHead_melodic_tuple const&h1,
+                                   PHead_melodic_tuple const &h2)
+{
+  SCM p1 = h1.req_l_->get_mus_property ("pitch");
+  SCM p2 = h2.req_l_->get_mus_property ("pitch");
+  
+  int result = Pitch::compare (*unsmob_pitch (p1),
+                              *unsmob_pitch (p2));
+  return result;
+}
+
+int
+PHead_melodic_tuple::time_compare (PHead_melodic_tuple const&h1,
+                                  PHead_melodic_tuple const &h2)
+{
+  int result = Moment::compare(h1.end_,  h2.end_);
+  return result;
+}
diff --git a/lily/porrectus.cc b/lily/porrectus.cc
new file mode 100644 (file)
index 0000000..bec95d8
--- /dev/null
@@ -0,0 +1,374 @@
+/*
+  porrectus.cc -- implement Porrectus
+
+  Copyright (C) 2001 Juergen Reuter
+
+  written for the GNU LilyPond music typesetter
+
+  TODO: --> see porrectus-engraver.cc
+*/
+
+#include "staff-symbol-referencer.hh"
+#include "porrectus.hh"
+#include "item.hh"
+#include "molecule.hh"
+#include "pitch.hh"
+#include "lookup.hh"
+#include "debug.hh"
+#include "dimensions.hh"
+#include "direction.hh"
+#include "bezier.hh"
+#include "font-interface.hh"
+#include "math.h" // rint
+
+void
+Porrectus::set_left_head (Grob *me, SCM left_head)
+{
+  if (left_head == SCM_EOL)
+    {
+      warning (_ ("(left_head == SCM_EOL) (ignored)"));
+    }
+  me->set_grob_property ("left-head", left_head);
+}
+
+SCM
+Porrectus::get_left_head (Grob *me)
+{
+  SCM left_head = me->get_grob_property ("left-head");
+  return left_head;
+}
+
+void
+Porrectus::set_right_head (Grob *me, SCM right_head)
+{
+  if (right_head == SCM_EOL)
+    {
+      warning (_ ("(right_head == SCM_EOL) (ignored)"));
+    }
+  me->set_grob_property ("right-head", right_head);
+}
+
+SCM
+Porrectus::get_right_head (Grob *me)
+{
+  SCM right_head = me->get_grob_property ("right-head");
+  return right_head;
+}
+
+// Uugh.  The following two functions are almost duplicated code from
+// custos.cc, which itself is similar to code in note-head.cc.  Maybe
+// this should be moved to staff-symbol-referencer.cc?
+Molecule
+Porrectus::create_ledger_line (Interval x_extent, Grob *me) 
+{
+  Molecule line;
+  Molecule slice = Font_interface::get_default_font (me)->find_by_name ("noteheads-ledgerending");
+  Interval slice_x_extent = slice.extent (X_AXIS);
+  Interval slice_y_extent = slice.extent (Y_AXIS);
+
+  // Create left ending of ledger line.
+  Molecule left_ending = slice;
+  left_ending.translate_axis (x_extent[LEFT] - slice_x_extent[LEFT], X_AXIS);
+  if (x_extent.length () > slice_x_extent.length ())
+    line.add_molecule (left_ending);
+
+  // Create right ending of ledger line.
+  Molecule right_ending = slice;
+  right_ending.translate_axis (x_extent[RIGHT] - slice_x_extent[RIGHT],
+                              X_AXIS);
+  line.add_molecule (right_ending);
+
+  // Fill out space between left and right ending of ledger line by
+  // lining up a series of slices in a row between them.
+  Molecule fill_out_slice = left_ending;
+  Real thick = slice_y_extent.length ();
+  Real delta_x = slice_x_extent.length () - thick;
+  Real xpos = x_extent [LEFT] + 2*delta_x + thick/2; // TODO: check: thick*2?
+  while (xpos <= x_extent[RIGHT])
+    {
+      fill_out_slice.translate_axis (delta_x, X_AXIS);
+      line.add_molecule (fill_out_slice);
+      xpos += delta_x;
+    }
+
+  return line;
+}
+
+Molecule
+Porrectus::create_streepjes (Grob *me,
+                            int pos,
+                            int interspaces,
+                            Interval extent)
+{
+  Real inter_f = Staff_symbol_referencer::staff_space (me)/2;
+  int streepjes_i = abs (pos) < interspaces
+    ? 0
+    : (abs (pos) - interspaces) /2;
+  Molecule molecule = Molecule();
+  if (streepjes_i) 
+    {
+      Direction dir = (Direction)sign (pos);
+      Molecule ledger_line (create_ledger_line (extent, me));
+      ledger_line.set_empty (true);
+      Real offs = (Staff_symbol_referencer::on_staffline (me, pos))
+       ? 0.0
+       : -dir * inter_f;
+      for (int i = 0; i < streepjes_i; i++)
+       {
+         Molecule streep (ledger_line);
+         streep.translate_axis (-dir * inter_f * i * 2 + offs,
+                                Y_AXIS);
+         molecule.add_molecule (streep);
+       }
+    }
+  return molecule;
+}
+
+MAKE_SCHEME_CALLBACK (Porrectus,brew_molecule,1);
+SCM 
+Porrectus::brew_molecule (SCM smob)
+{
+  Item *me = (Item *)unsmob_grob (smob);
+
+  SCM scm_style = me->get_grob_property ("style");
+  String style;
+  if ((gh_symbol_p (scm_style)) && (scm_style != SCM_EOL))
+    style = ly_scm2string (scm_symbol_to_string (scm_style));
+  else {
+    warning (_ ("porrectus style undefined; using mensural"));
+    style = "mensural";
+  }
+
+  bool solid = to_boolean (me->get_grob_property ("solid"));
+  bool add_stem = to_boolean (me->get_grob_property ("add-stem"));
+
+  SCM stem_direction_scm = me->get_grob_property ("stem-direction");
+  Direction stem_direction =
+    gh_number_p (stem_direction_scm) ? to_dir (stem_direction_scm) : DOWN;
+  if (!stem_direction)
+    stem_direction = DOWN;
+
+  SCM left_head_scm = get_left_head (me);
+  SCM right_head_scm = get_right_head (me);
+  if ((left_head_scm == SCM_EOL) || (right_head_scm == SCM_EOL))
+    {
+      warning (_ ("junking lonely porrectus"));
+      return SCM_EOL;
+    }
+
+  Item *left_head = dynamic_cast<Item*> (unsmob_grob (left_head_scm));
+  Item *right_head = dynamic_cast<Item*> (unsmob_grob (right_head_scm));
+  if (!left_head || !right_head)
+    {
+      warning (_ ("junking lonely porrectus"));
+      return SCM_EOL;
+    }
+
+  Real left_position_f = Staff_symbol_referencer::position_f (left_head);
+  Real right_position_f = Staff_symbol_referencer::position_f (right_head);
+  Real interval = right_position_f - left_position_f;
+
+  Molecule molecule;
+  if (String::compare_i (style, "vaticana") == 0)
+    molecule = brew_vaticana_molecule (me, solid, add_stem, stem_direction,
+                                      interval);
+  else if (String::compare_i (style, "mensural") == 0)
+    molecule = brew_mensural_molecule (me, solid, add_stem, stem_direction,
+                                      interval);
+  else
+    return SCM_EOL;
+
+  Real space = Staff_symbol_referencer::staff_space (me);
+  Real head_extent = molecule.extent (X_AXIS).length ();
+  Interval extent (-0.2 * head_extent, 1.2 * head_extent);
+  int interspaces = Staff_symbol_referencer::line_count (me)-1;
+
+  molecule.translate_axis (left_position_f * space/2, Y_AXIS);
+
+  Molecule left_head_streepjes =
+    create_streepjes (me, (int)rint (left_position_f), interspaces, extent);
+  left_head_streepjes.translate_axis (left_position_f * space/2, Y_AXIS);
+  molecule.add_molecule (left_head_streepjes);
+
+  Molecule right_head_streepjes =
+    create_streepjes (me, (int)rint (right_position_f), interspaces, extent);
+  right_head_streepjes.translate_axis (right_position_f * space/2, Y_AXIS);
+  molecule.add_molecule (right_head_streepjes);
+
+  return molecule.smobbed_copy();
+}
+
+Molecule
+Porrectus::brew_vaticana_molecule (Item *me,
+                                  bool solid,
+                                  bool add_stem,
+                                  Direction stem_direction,
+                                  Real interval)
+{
+  Real space = Staff_symbol_referencer::staff_space (me);
+  Real line_thickness = space/6;
+  Real width = 2.4 * space;
+  Molecule molecule = Molecule ();
+
+  if (interval >= 0.0)
+    {
+      warning (_ ("ascending vaticana style porrectus (ignored)"));
+    }
+
+  if (add_stem)
+    {
+      bool consider_interval =
+       ((stem_direction == DOWN) && (interval < 0.0)) ||
+       ((stem_direction == UP) && (interval > 0.0));
+
+      Interval stem_box_x (-line_thickness/2, +line_thickness/2);
+      Interval stem_box_y;
+
+      if (consider_interval)
+        {
+         Real y_length = interval / 2.0;
+         if (y_length < 1.2 * space)
+           y_length = 1.2 * space;
+         stem_box_y = Interval (0, y_length);
+       }
+      else
+       stem_box_y = Interval (0, space);
+
+      Real y_correction =
+       (stem_direction == UP) ?
+       0.3 * space :
+       - 0.3 * space - stem_box_y.length();
+
+      Box stem_box (stem_box_x, stem_box_y);
+      Molecule stem = Lookup::filledbox (stem_box);
+      stem.translate_axis (y_correction, Y_AXIS);
+      molecule.add_molecule(stem);
+    }
+
+  Box vertical_edge (Interval (-line_thickness/2, +line_thickness/2),
+                    Interval (-4*line_thickness/2, +4*line_thickness/2));
+  Molecule left_edge = Lookup::filledbox (vertical_edge);
+  Molecule right_edge = Lookup::filledbox (vertical_edge);
+  right_edge.translate_axis (width, X_AXIS);
+  right_edge.translate_axis (interval / 2.0, Y_AXIS);
+  molecule.add_molecule(left_edge);
+  molecule.add_molecule(right_edge);
+
+  Bezier bezier;
+  bezier.control_[0] = Offset (0.00 * width, 0.0);
+  bezier.control_[1] = Offset (0.33 * width, interval / 2.0);
+  bezier.control_[2] = Offset (0.66 * width, interval / 2.0);
+  bezier.control_[3] = Offset (1.00 * width, interval / 2.0);
+
+  Molecule slice;
+  slice = Lookup::slur (bezier, 0.0, line_thickness);
+  slice.translate_axis (-3 * line_thickness/2, Y_AXIS);
+  molecule.add_molecule (slice);
+  if (solid)
+    for (int i = -2; i < +2; i++)
+      {
+       slice = Lookup::slur (bezier, 0.0, line_thickness);
+       slice.translate_axis (i * line_thickness/2, Y_AXIS);
+       molecule.add_molecule (slice);
+      }
+  slice = Lookup::slur (bezier, 0.0, line_thickness);
+  slice.translate_axis (+3 * line_thickness/2, Y_AXIS);
+  molecule.add_molecule (slice);
+
+  return molecule;
+}
+
+Molecule
+Porrectus::brew_mensural_molecule (Item *me,
+                                  bool solid,
+                                  bool add_stem,
+                                  Direction stem_direction,
+                                  Real interval)
+{
+  Real space = Staff_symbol_referencer::staff_space (me);
+  Real line_thickness = space/6;
+  Real width = 2.4 * space;
+  Molecule molecule = Molecule ();
+
+  if (add_stem)
+    {
+      // Uugh.  This is currently the same as in
+      // brew_vaticana_molecule, but may eventually be changed.
+
+      bool consider_interval =
+       ((stem_direction == DOWN) && (interval < 0.0)) ||
+       ((stem_direction == UP) && (interval > 0.0));
+
+      Interval stem_box_x (0, line_thickness);
+      Interval stem_box_y;
+
+      if (consider_interval)
+        {
+         Real y_length = interval / 2.0;
+         if (y_length < 1.2 * space)
+           y_length = 1.2 * space;
+         stem_box_y = Interval (0, y_length);
+       }
+      else
+       stem_box_y = Interval (0, space);
+
+      Real y_correction =
+       (stem_direction == UP) ?
+       0.3 * space :
+       - 0.3 * space - stem_box_y.length();
+
+      Box stem_box (stem_box_x, stem_box_y);
+      Molecule stem = Lookup::filledbox (stem_box);
+      stem.translate_axis (y_correction, Y_AXIS);
+      molecule.add_molecule(stem);
+    }
+
+  Real slope = (interval / 2.0) / width;
+
+  Molecule left_edge =
+    brew_horizontal_slope (line_thickness, slope, 3.5 * line_thickness);
+  left_edge.translate_axis (0.25 * line_thickness, Y_AXIS);
+  molecule.add_molecule(left_edge);
+
+  Molecule right_edge =
+    brew_horizontal_slope (line_thickness, slope, 3.5 * line_thickness);
+  right_edge.translate_axis (width - line_thickness, X_AXIS);
+  right_edge.translate_axis (interval / 2.0 * (1.0 - (line_thickness/width)) +
+                            0.25 * line_thickness, Y_AXIS);
+  molecule.add_molecule(right_edge);
+
+  Molecule bottom_edge =
+    Porrectus::brew_horizontal_slope (width, slope, line_thickness);
+  bottom_edge.translate_axis (-3 * line_thickness/2, Y_AXIS);
+  molecule.add_molecule (bottom_edge);
+
+  Molecule top_edge =
+    Porrectus::brew_horizontal_slope (width, slope, line_thickness);
+  top_edge.translate_axis (+3 * line_thickness/2, Y_AXIS);
+  molecule.add_molecule (top_edge);
+
+  if (solid)
+    {
+      Molecule core =
+       Porrectus::brew_horizontal_slope (width, slope, 6 * line_thickness/2);
+      core.translate_axis (-line_thickness/2, Y_AXIS);
+      molecule.add_molecule (core);
+    }
+
+  return molecule;
+}
+
+Molecule
+Porrectus::brew_horizontal_slope(Real width, Real slope, Real line_thickness)
+{
+  SCM width_scm = gh_double2scm (width);
+  SCM slope_scm = gh_double2scm (slope);
+  SCM line_thickness_scm = gh_double2scm (line_thickness);
+  SCM horizontal_slope = gh_list (ly_symbol2scm ("beam"),
+                                 width_scm, slope_scm,
+                                 line_thickness_scm, SCM_UNDEFINED);
+  Box b (Interval (0, width),
+        Interval (0, width * slope +
+                  sqrt (sqr(line_thickness/slope) + sqr (line_thickness))));
+  return Molecule (b, horizontal_slope);
+}
index ae6cf4173db1bfed7ef604a0dd868fb0ae33dcb7..9ab1dbe428c1eb3359063c1d22951d4f4de76afb 100644 (file)
@@ -35,13 +35,24 @@ Score::Score ()
   smobify_self ();
 }
 
+/*
+  store point & click locations.
+  Global to save some time. (Sue us!)
+ */
+bool store_locations_global_b;
+
 Score::Score (Score const &s)
   : Input (s)
 {
   music_ = SCM_EOL;
   header_p_ = 0;
   smobify_self ();
-  
+
+  /*
+    TODO: this is not very elegant.... 
+   */
+  store_locations_global_b = (gh_eval_str ("point-and-click") !=  SCM_BOOL_F);
+
   Music * m =unsmob_music (s.music_);
   music_ =  m?m->clone ()->self_scm () : SCM_EOL;
   scm_gc_unprotect_object (music_);
@@ -50,12 +61,11 @@ Score::Score (Score const &s)
     def_p_arr_.push (s.def_p_arr_[i]->clone ());
   errorlevel_i_ = s.errorlevel_i_;
   if (s.header_p_)
-       {
-         header_p_ = (s.header_p_) ? new Scheme_hash_table (*s.header_p_): 0;
+    {
+      header_p_ = (s.header_p_) ? new Scheme_hash_table (*s.header_p_): 0;
 
-         scm_gc_unprotect_object (header_p_->self_scm ());
-       }
+      scm_gc_unprotect_object (header_p_->self_scm ());
+    }
 }
 
 Score::~Score ()
index e6e07253cad45b9debd721732e5c11d51a54d990..04a48773ca98a3ca951ccf219794b96ba3391ae2 100644 (file)
@@ -254,8 +254,9 @@ Tuplet_bracket::after_line_breaking (SCM smob)
   Real dy, offset;
 
   calc_position_and_height (me,&offset,&dy);
-  
-  me->set_grob_property ("delta-y", gh_double2scm (dy));
+
+  if (!gh_number_p (me->get_grob_property ("delta-y")))
+    me->set_grob_property ("delta-y", gh_double2scm (dy));
 
   me->translate_axis (offset, Y_AXIS);
   return SCM_UNSPECIFIED;
diff --git a/lily/untransposable-music.cc b/lily/untransposable-music.cc
new file mode 100644 (file)
index 0000000..d04127f
--- /dev/null
@@ -0,0 +1,28 @@
+/*   
+untransposable-music.cc --  implement Untransposable_music
+
+source file of the GNU LilyPond music typesetter
+
+(c) 2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "untransposable-music.hh"
+
+void
+Untransposable_music::transpose (Pitch )
+{
+}
+
+Pitch
+Untransposable_music::to_relative_octave (Pitch p)
+{
+  return p;
+}
+
+ADD_MUSIC(Untransposable_music);
+
+Untransposable_music::Untransposable_music()
+{
+
+}
index 1227a9315bc25bbdbd0880f7b7e05dd59d891306..6feb88b12d4a4eb7d966a4164caa77fd7055872c 100644 (file)
@@ -141,8 +141,6 @@ Volta_engraver::acknowledge_grob (Grob_info i)
        {
          if (volta_span_p_)
            Volta_spanner::add_column (volta_span_p_,item);
-         if (end_volta_span_p_)
-           Volta_spanner::add_column (end_volta_span_p_,item);      
        }
       if (Bar::has_interface (item))
        {
index 1646ad001b158a3c4ec6af5a0fa01a1efd29fcba..166db820be7af570ac990a679fa10fc6c6b81125 100644 (file)
@@ -3,14 +3,14 @@
 ;; Copyright (C) 1992,1993,1994  Tim Peters
 
 ;; Author: 2001: Heikki Junes
-;;  * Emacs-mode: new keywords, reserved words, notenames and brackets are
-;;    font-lock-keywords; implementation encourages spacing/indenting.
+;;  * Emacs-mode: new keywords, reserved words, identifiers, notenames, 
+;;    some dynamics and brackets are font-lock-keywords
 ;; Author: 1997: Han-Wen Nienhuys
 ;; Author: 1995-1996 Barry A. Warsaw
 ;;         1992-1994 Tim Peters
 ;; Created:       Feb 1992
 ;; Version:       0.0
-;; Last Modified: 1SEP2001
+;; Last Modified: 14SEP2001
 ;; Keywords: lilypond languages music notation
 
 ;; This software is provided as-is, without express or implied
 (defconst LilyPond-font-lock-keywords
   (let* ((keywords '( ; need special order due to over[lapping] of words
 
-"accepts" "addlyrics" "alternative" "apply" "arpeggio" "autoBeamOff"
-"autoBeamOn" "autochange" "bar" "BarNumberingStaffContext" "break"
-"breathe" "breve" "cadenzaOn" "cadenzaOff" "char" "chord" "chordmodifiers"
-"ChordNamesContext" "chordstest" "chords" "clef" "cm" "commandspanrequest"
-"consistsend" "consists" "context" "default" "denies" "different"
-"dotsBoth" "dotsDown" "dotsUp" "duration" "dynamicscript" "dynamicUp"
-"dynamicDown" "dynamicBoth" "EasyNotation" "elementdescriptions"
-"emptyText" "extreme" "ex" "fatText" "fermata" "fff" "ff" "f" "font" "foo"
-"glissando" "gliss" "grace" "grstaff" "hairyChord" "HaraKiriStaffContext"
-"header" "hideStaffSwitch" "include" "in" "key" "linebreak" "longa"
-"lyrics" "LyricsContext" "LyricsVoiceContext" "major" "mark" "melismaEnd"
-"melisma" "midi" "minor" "mm" "musicalpitch" "m" "name" "newpage"
-"noBreak" "noisebeat" "noise" "normalkey" "normalsize" "notenames" "notes"
-"n" "onestaff" "oneVoice" "one" "OrchestralScoreContext" "outputproperty"
-"override" "paperTwentysix" "paper" "partcombine" "partial" "penalty"
-"PianoStaffContext" "pp" "property" "pt" "p" "relative" "remove" "repeat"
-"restsII" "rests" "revert" "rhythm" "right" "scales" "scale" "scheme"
-"score" "ScoreContext" "scpaper" "scriptBoth" "scriptDown" "scriptUp"
-"script" "scscore" "sd" "sequential" "settings" "set" "sfz" "shitfOnnn"
-"shitfOnn" "shitfOn" "shitfOff" "showStaffSwitch" "simultaneous" "skip"
-"slurBoth" "slurDown" "slurUp" "slurDotted" "slurSolid" "small"
-"spanrequest" "specialKey" "staccato" "StaffContext" "staffspace"
-"stemBoth" "stemDown" "stemUp" "stpaper" "stscore" "stylesheet" "su"
-"tempo" "tenuto" "textII" "textI" "textscript" "thenotes" "ThreadContext"
-"threevoice" "tieBoth" "tieDown" "tieDotted" "tieSolid" "tieUp" "times"
-"time" "tiny" "touch" "translator" "transpose" "tupletBoth" "tupletDown"
-"tupletUp" "twovoicesteminvert" "twovoice" "two" "turnOff" "type" "t"
-"unset" "version" "voiceB" "VoiceContext" "voiceC" "voiceD" "voiceE"
-"voiceOne" "voiceTwo" "voiceThree" "voiceFour" "zagers" "zager" "zoger"
+;; all letters are lowercase
+"accepts" "accompany" "addlyrics" "aeolian" "alias" "alternative"
+"apply" "arpeggio" "autochange" "bar" "break" "breathe" "breve"
+"beamintervals" "broken" "blend" "bcincipit" "char" "ch" "cg"
+"chord\\(s\\|stest\\|chordmodifiers\\)?"
+"clef \\(bass\\|treble\\|violin\\|tenor\\)?"
+"clipping" "cm" "coda" "complex" "commandspanrequest" "consists\\(end\\)?"
+"context" "contrabasso" "decr" "default" "denies" "different" "dirs"
+"down\\(bow\\|prall\\)?" "dorian" "duration" "dynamicscript"
+"eccentric" "eg" "embeddedps" "endincipit" "elementdescriptions"
+"ex\\(treme\\)?" "fermata" "f+" "font" "flageolet" "fp" "fragment" "fz"
+"gliss\\(ando\\)?" "global" "gg" "gmsus" "grace" "gr\\(and\\)?staff"
+"header" "hsize" "in\\(clude\\|versions\\|visible\\)?" "ionian"
+"key\\(s\\(ignature\\)?\\)?" "lag" "lheel" "line\\(break\\|prall\\)"
+"locrian" "longa" "lower" "ltoe" "lydian" "lyrics"
+"maintainer" "mark" "maxima" "mel\\(isma\\|ody\\)?" "midi" "major"
+"minor" "mixolydian" "mordent" "monstrous" "multipart" "music"
+"musicalpitch" "m\\(p\\|f\\|m\\)?" "name" "newpage" "noise\\(beat\\)?"
+"normal\\(key\\|size\\)" "note\\(name\\)?s" "nt?"
+"one\\(staff\\)?" "open" "outputproperty" "over\\(ride\\)?"
+"paper" "partcombine" "partial" "penalty" "phrygian" "pitch" "p+"
+"property" "pt" "prall\\(mordent\\|prall\\|up\\)?" "quickmeasure"
+"relative" "remove" "repeat" "rever\\(t\\|seturn\\)" "rf" "rheel" "rhythm"
+"right" "rtoe" "scales?" "scheme" "score" "scpaper" "script" "scscore" "sd"
+"segno" "sequential" "set\\(tings\\)?" "sf\\(f\\|z\\)?" "shortlong"
+"simultaneous" "singlepart" "skip" "small" "smarttranspose" "spanrequest"
+"staccato" "staff\\(height\\|space\\)" "start" "stop\\(ped\\)?"
+"st\\(paper\\|score\\)" "stuff" "stylesheet" "su" "tab" "tempo" "tenuto" 
+"textscript" "thenotes" "thrd" "threevoice" "thumb" "tilt\\(down\\|up\\)" 
+"timb" "times?" "timpani" "tiny" "toeters" "touch" "trans\\(lator\\|pose\\)" 
+"trill" "trombe" "turn" "type" "t\\(wo\\(voice\\(steminvert\\)?\\)?\\)?" 
+"un\\(der\\|set\\)" "up\\(bow\\|per\\|prall\\)?" "version" 
+"viol\\(a\\|in\\(incipit\\)?\\|oncello\\)" "visible" "voicedefault" "vsize"
+"x" "zagers?" "z\\(eu\\|o\\)ger"
 
                      ))
 
+  (identifiers '( 
+
+;; in principle, have one or more uppercase letters
+"\\(\\(BarNumbering\\|Choir\\|Grand\\|HaraKiri\\|OrchestralPart\\|Piano\\|Rhythmic\\)Staff\\|\\(Cue\\|Lyrics\\)?Voice\\|\\(Orchestral\\)?Score\\|ChordNames\\|Grace\\|Lyrics\\|StaffGroup\\|Thread\\)Context" ; *Context
+"\\(script\\|dots\\|dynamic\\|slur\\|stem\\|sustain\\|tie\\|tuplet\\)\\(Both\\|Down\\|Up\\)" ; *(Both/Down/Up)
+"\\(slur\\|tie\\)\\(Dotted\\|Solid\\)" ; *(Dotted/Solid)
+"\\(autoBeam\\|cadenza\\|impro\\|turn\\)\\(Off\\|On\\)" ; *(On/Off)
+"\\(empty\\|fat\\)Text" ; *Text
+"shift\\(On+\\|Off\\|I\\|II\\|III\\|IV\\|V\\)" ; shift*
+"EasyNotation"
+"\\(hide\\|show\\)StaffSwitch"
+"\\(lower\\|upper\\)Voice"
+"voice\\(One\\|Two\\|Three\\|Four\\|B\\|C\\|D\\|E\\)" ; voice*
+"paper\\(Eleven\\|Sixteen\\|Thirteen\\|TwentySix\\)" ; paper*
+"\\(lower\\|upper\\)\\(Octave\\|One\\)" ; (lower/upper)*
+"hairyChord"
+"\\(Piano\\|Rhythmic\\)\\(Staff\\)?"
+"\\(clarinetti\\|fagotti\\|flauti\\|melodic\\|oboi\\|\\(quite\\|rather\\|somewhat\\)LongLyrics\\|violinoII?\\)?\\(Staff\\)?" ; *Staff
+"\\(archi\\|bassi\\|legni\\|ottoni\\|timpani\\|viole\\|violini\\)\\(Group\\)" ; *Group
+"melisma\\(End\\)?" "staff\\(One\\|Two\\)?" "rests\\(II\\)?" "specialKey"
+"noBreak" "paperTwentysix" "endHorizScript" "FontBody" "text(I)+"
+
+                      ))
+
   (reservedwords '(
 
-"bass" "treble" "PianoStaff"
+;; Other words which look nicer when colored
+"Accidentals" "autoBeamSettings" "BarLine" "Beam"
+"ChordName\\([s]?\\|s.[a-zA-Z]*\\)" "Grace\\(.[a-zA-Z]*\\)?"
+"\\(Grand\\|Piano\\)Staff" "Lyrics\\(.[a-zA-Z]*\\)?" "NoteHead" 
+"Score\\(.[a-zA-Z]*\\)" "Stem" "Staff\\(Symbol\\)?" "TextScript" 
+"TimeSignature" "Voice\\(.[a-zA-Z]*\\)?"
 
                      ))
 
        (kwregex (mapconcat (lambda (x) (concat "\\\\" x))  keywords "\\|"))
+       (iregex (mapconcat (lambda (x) (concat "\\\\" x))  identifiers "\\|"))
        (rwregex (mapconcat (lambda (x) (concat "" x))  reservedwords "\\|"))
 )
 
 ;; font-lock- comment / string / keyword / builtin / function-name / 
 ;;            variable-name / type / constant / warning -face
 
-;; Using extra spaces was both easier to parse and looks better!
-;; highlight note grouping brackets; space around these { [ < brackets > ] }
-;;   make the text look {less[<messyand>]erronous}
-      '("\\([<{[]\\)[ \t]" 1 font-lock-warning-face)
-      '("\\([\]}>]\\)[ \t]" 1 font-lock-warning-face)
-      '("^\\([<{[]\\)[ \t]" 1 font-lock-warning-face)
-      '("^\\([\]}>]\\)[ \t]" 1 font-lock-warning-face)
-      '("\\([<{[]\\)$" 1 font-lock-warning-face)
-      '("\\([\]}>]\\)$" 1 font-lock-warning-face)
-
-;; highlight keywords; space after[ ]these commands /increases/readability
-      (concat "\\([_^]?\\(" kwregex "\\)\\)[ \t(]")
-      (concat "\\([_^]?\\(" kwregex "\\)\\)$")
       '("\\([_^]?\\\\[a-zA-Z][a-zA-Z]*\\)" 1 font-lock-constant-face)
-      '("\\([a-zA-Z][_a-zA-Z]*\\)[ \t]*=[ \t]*" 1 font-lock-variable-name-face)
-      '("[ \t]*=[ \t]*\\([a-zA-Z][_a-zA-Z]*\\)[ \t(]" 1 font-lock-variable-name-face)
-      '("[ \t]*=[ \t]*\\([a-zA-Z][_a-zA-Z]*\\)$" 1 font-lock-variable-name-face)
+      '("\\(\\(#'\\)?[a-zA-Z][_a-zA-Z.\-]*[ \t]*=[ \t]*#\\)" 1 font-lock-variable-name-face)
+      '("\\([a-zA-Z][_a-zA-Z.\-]*\\)[ \t]*=[ \t]*" 1 font-lock-variable-name-face)
+      '("[ \t]*=[ \t]*\\([a-zA-Z][_a-zA-Z]*\\)" 1 font-lock-variable-name-face)
+
 
 ;; other reserved words
-      (cons (concat "\\(" rwregex "\\) ") 'font-lock-variable-name-face)
-      (cons (concat "\\(" rwregex "\\)$") 'font-lock-variable-name-face)
+      (cons (concat "\\(" rwregex "\\)") 'font-lock-variable-name-face)
 
 ;; highlight note names; separate notes from (other than ')'-type) brackets
-      '("[ )\t]\\(\\(\\(\\(do\\|re\\|mi\\|fa\\|sol\\|la\\|si\\)\\(b\\|bb\\|d\\|dd\\|s\\|ss\\)?\\)\\|\\([a-hsr]\\(f\\|ff\\|s\\|ss\\|flat\\|flatflat\\|sharp\\|sharpsharp\\|is[s]?\\|is[s]?is[s]?\\|es[s]?\\|es[s]?es[s]?\\)?\\)\\|\\(as\\(as\\|es\\)?\\)\\|\\(es\\(ses\\)?\\)\\|\\(bb\\)\\)[,']*\\(64\\|32\\|16\\|8\\|4\\|2\\|1\\)?[.]*\\)" 1 font-lock-type-face)
+      '("[ <\{[~()\t]\\(\\(\\(\\(do\\|re\\|mi\\|fa\\|sol\\|la\\|si\\)\\(bb?\\|dd?\\|ss?\\)?\\)\\|\\([a-hsr]\\(flat\\(flat\\)?\\|sharp\\(sharp\\)?\\|ff?\\|ss?\\|is\\(siss\\|s\\|is\\)?\\|es\\(sess\\|s\\|es\\)?\\)?\\)\\|\\(as\\(as\\|es\\)?\\)\\|\\(es\\(es\\)?\\)\\|\\(bb\\)\\)[,']*\\(64\\|32\\|16\\|8\\|4\\|2\\|1\\)?[.]*\\)" 1 font-lock-type-face)
+
+;; highlight identifiers
+      (cons (concat "\\([_^]?\\(" iregex "\\)\\)+\\($\\|[] \t(~{}>\\\\]\\)") '(0 font-lock-function-name-face t))
+
+;; highlight keywords
+      (cons (concat "\\([_^]?\\(" kwregex "\\)\\)+\\($\\|[] \t(~{}>\\\\]\\)") '(0 font-lock-keyword-face t))
+
+      '("\\([][><}{]\\)" 0 font-lock-warning-face t)
+
+      '("\\([(~)]\\|\\\\<\\|\\\\!\\|\\\\>\\)" 0 font-lock-builtin-face t)
 
-      '("\\([(~)]\\)" 1 font-lock-builtin-face)
+;; highlight comments (again)
+      '("\\(%.*\\)" 0 font-lock-comment-face t)
 
       )
     )
index e0b7de1c765c696256f5634f988ddafce8225c92..565aa0494366d96947e62b827805fa02509af34f 100644 (file)
@@ -7,6 +7,8 @@
 ;;; 
 ;;; Changed 29th Aug 2001 Heikki Junes <heikki.junes@hut.fi>
 ;;;    * Add PS-compilation, PS-viewing and MIDI-play
+;;; Changed 12th Sep 2001 Heikki Junes
+;;;    * Keyboard shortcuts
 
 ;;; Inspired on auctex
 
@@ -273,6 +275,42 @@ Must be the car of an entry in `LilyPond-command-alist'."
   (LilyPond-command (LilyPond-command-query (LilyPond-master-file))
                    'LilyPond-master-file))
 
+(defun LilyPond-command-formatdvi ()
+  "Format the dvi output of the current document."
+  (interactive)
+  (LilyPond-command (LilyPond-command-menu "2Dvi") 'LilyPond-master-file)
+)
+
+(defun LilyPond-command-formatps ()
+  "Format the ps output of the current document."
+  (interactive)
+  (LilyPond-command (LilyPond-command-menu "2PS") 'LilyPond-master-file)
+)
+
+(defun LilyPond-command-smartview ()
+  "View the dvi output of current document."
+  (interactive)
+  (LilyPond-command (LilyPond-command-menu "SmartView") 'LilyPond-master-file)
+)
+
+(defun LilyPond-command-view ()
+  "View the dvi output of current document."
+  (interactive)
+  (LilyPond-command (LilyPond-command-menu "View") 'LilyPond-master-file)
+)
+
+(defun LilyPond-command-viewps ()
+  "View the ps output of current document."
+  (interactive)
+  (LilyPond-command (LilyPond-command-menu "ViewPS") 'LilyPond-master-file)
+)
+
+(defun LilyPond-command-midi ()
+  "View the ps output of current document."
+  (interactive)
+  (LilyPond-command (LilyPond-command-menu "Midi") 'LilyPond-master-file)
+)
+
 ;; FIXME, this is broken
 (defun LilyPond-region-file (begin end)
   (let (
@@ -382,6 +420,12 @@ command."
   (define-key LilyPond-mode-map "\C-c\C-b" 'LilyPond-command-buffer)
   (define-key LilyPond-mode-map "\C-c\C-k" 'LilyPond-kill-job)
   (define-key LilyPond-mode-map "\C-c\C-c" 'LilyPond-command-master)
+  (define-key LilyPond-mode-map "\C-c\C-d" 'LilyPond-command-formatdvi)
+  (define-key LilyPond-mode-map "\C-c\C-f" 'LilyPond-command-formatps)
+  (define-key LilyPond-mode-map "\C-c\C-s" 'LilyPond-command-smartview)
+  (define-key LilyPond-mode-map "\C-c\C-v" 'LilyPond-command-view)
+  (define-key LilyPond-mode-map "\C-c\C-p" 'LilyPond-command-viewps)
+  (define-key LilyPond-mode-map "\C-c\C-m" 'LilyPond-command-midi)
   )
 
 ;;; Menu Support
@@ -414,8 +458,20 @@ command."
             [ "Region" LilyPond-command-select-region
               :keys "C-c C-r" :style radio
               :selected (eq LilyPond-command-current 'LilyPond-command-region) ]))
-         (let ((file 'LilyPond-command-on-current))
-           (mapcar 'LilyPond-command-menu-entry LilyPond-command-alist))))
+;        (let ((file 'LilyPond-command-on-current))
+;          (mapcar 'LilyPond-command-menu-entry LilyPond-command-alist))
+;;; Some kind of mapping which includes :keys might be more elegant
+         '([ "LilyPond" (LilyPond-command (LilyPond-command-menu "ViewPS") 'LilyPond-master-file) ])
+         '([ "TeX" (LilyPond-command (LilyPond-command-menu "TeX") 'LilyPond-master-file) ])
+         '([ "2Dvi" (LilyPond-command (LilyPond-command-menu "2Dvi") 'LilyPond-master-file) :keys "C-c C-d"])
+         '([ "2PS" (LilyPond-command (LilyPond-command-menu "2PS") 'LilyPond-master-file) :keys "C-c C-f"])
+         '([ "Book" (LilyPond-command (LilyPond-command-menu "Book") 'LilyPond-master-file) ])
+         '([ "LaTeX" (LilyPond-command (LilyPond-command-menu "LaTeX") 'LilyPond-master-file) ])
+         '([ "SmartView" (LilyPond-command (LilyPond-command-menu "SmartView") 'LilyPond-master-file) :keys "C-c C-s"])
+         '([ "View" (LilyPond-command (LilyPond-command-menu "View") 'LilyPond-master-file) :keys "C-c C-v"])
+         '([ "ViewPS" (LilyPond-command (LilyPond-command-menu "ViewPS") 'LilyPond-master-file) :keys "C-c C-p"])
+         '([ "Midi" (LilyPond-command (LilyPond-command-menu "Midi") 'LilyPond-master-file) :keys "C-c C-m"])
+  ))
 
 
 (defconst LilyPond-imenu-generic-re "^\\([a-zA-Z_][a-zA-Z0-9_]*\\) *="
@@ -438,7 +494,7 @@ command."
 (defun LilyPond-command-select-region ()
   (interactive)
   (message "Next command will be on the region")
-  (setq LilyPond-command-current 'LilPond-command-region))
+  (setq LilyPond-command-current 'LilyPond-command-region))
 
 (defun LilyPond-command-menu (name)
   ;; Execute LilyPond-command-alist NAME from a menu.
index 9717e3c5e2730b3b84f9853c25ab3a865268d031..01e05e9bcfe7ef8b6893dfaab3144dc05a793262 100644 (file)
@@ -149,6 +149,7 @@ VoiceContext = \translator {
        \consists "Phrasing_slur_engraver"
        \consists "Slur_engraver"
        \consists "Tie_engraver"
+       \consists "Porrectus_engraver"
        \consists "Tuplet_engraver"
        \consists "A2_engraver"
 
@@ -221,6 +222,7 @@ StaffGroupContext = \translator {
        \accepts "InnerChoirStaff"
        \accepts "ChoirStaff"
        \accepts "InnerStaffGroup"
+       \accepts "FiguredBass"
 }
 
 
@@ -344,6 +346,7 @@ ScoreContext = \translator {
        \accepts "ChoirStaff"
        \accepts "PianoStaff"
        \accepts "NoteNames"
+       \accepts "FiguredBass"  
 
        soloText = #"Solo"
        soloIIText = #"Solo II"
@@ -413,3 +416,10 @@ EasyNotation =  \translator {
 GraceContext = \translator {
        \type "Engraver_group_engraver"
 }
+
+FiguredBassContext = \translator {
+       \type "Engraver_group_engraver"
+       \name FiguredBass 
+       \consists "Figured_bass_engraver"       
+       \consistsend "Axis_group_engraver"
+}
index f406588183e5ddac8c948e96f15f602553c56bcc..8bf36b290628f9478587353362cfca70a6279577 100644 (file)
@@ -41,7 +41,7 @@ blotdiameter = 0.4 / \outputscale
 \translator { \PianoStaffContext}
 \translator { \LyricsVoiceContext }
 \translator { \StaffContainerContext }
-
+\translator { \FiguredBassContext }
 
 
 
index 2496a8b7173f1d219ef2af8a038a1a17d281503d..db1b2ae5b2fd9f13398f263b28970e16ff0ed538 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.5.9
-Entered-date: 08SEP01
+Version: 1.5.10
+Entered-date: 17SEP01
 Description: @BLURB@
 Keywords: music notation typesetting midi fonts engraving
 Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       1000k lilypond-1.5.9.tar.gz 
+       1000k lilypond-1.5.10.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.5.9.tar.gz 
+       1000k lilypond-1.5.10.tar.gz 
 Copying-policy: GPL
 End
index e5b3515cab170cb3c56cd6c2f282b5fc3c2f4425..777fb25bf9eb73b83d5251b7f216f2ce45c06722 100644 (file)
@@ -1,5 +1,5 @@
 %define name lilypond
-%define version 1.5.9
+%define version 1.5.10
 %define release 1mdk
 
 Name: %{name}
index 39388a36fd24fc8caf00783756d804d86ed04119..3e4aca0512c76fa4d78fbc724303b9b7acb06bb6 100644 (file)
@@ -1,11 +1,11 @@
 %define info yes
 
 Name: lilypond
-Version: 1.5.9
+Version: 1.5.10
 Release: 1
 License: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.9.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.10.tar.gz
 Summary: Create and print music notation 
 URL: http://www.lilypond.org/
 BuildRoot: /tmp/lilypond-install
index b20198c2c75e205db6ce7a3d676e9d52fdb4ae2d..84bb9dfe56595c785eb02341334621e9be2538c8 100644 (file)
 
 Distribution: SuSE Linux 7.0 (i386)
 Name: lilypond
-Version: 1.5.9
+Version: 1.5.10
 Release: 2
 Copyright:    GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.9.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.10.tar.gz
 # music notation software for.. ?
 Summary: A program for printing sheet music.
 URL: http://www.lilypond.org/
index 39fcd09fbc4c1b8b6ddbf6c0d17a76723db349fa..d1813de9a1d12c6569e622a3e593eae2db77aaf1 100644 (file)
        (volta . ((font-family . number) (font-relative-size . -2)))
        (tuplet . ((font-family . roman) (font-shape . italic) (font-relative-size . -1)))
 
-       (timesig . ((font-family . number) (font-relative-size . 0)))
+       (timesig . ((font-family . number) ))
        (timesig-symbol . ((font-family . music) (font-relative-size . 0)))
        
        (mmrest . ((font-family . number) (font-relative-size . 1)))
index f5aba1fcc9d58d52d00507e642513f0f74bdf485..cf774ad23173a2c61a5c8f076344926e20325584 100644 (file)
@@ -1,6 +1,11 @@
 
-; BROKEN as of 1.3.55, FIXME
-;
+
+
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; DEPRECATED -- DO NOT UPDATE ! -- DO NOT USE !
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 
 ;
        (list (list 'noteNameStyle symbol? 'style))))
 
 
+(define generic-porrectus-properties
+  (cons 'porrectus-interface
+       (list
+        (list 'porrectusStyle symbol? 'style)
+        (list 'porrectusSolid boolean? 'solid)
+        (list 'porrectusAddStem boolean? 'add-stem)
+        (list 'porrectusStemDirection dir? 'stem-direction)
+        )))
+
+
 (define generic-rest-properties
   (cons 'rest-interface
        (list (list 'restStyle string? 'reststyle))))
    generic-tie-column-properties   
    generic-tuplet-spanner-properties
    generic-notehead-properties
+   generic-porrectus-properties
    generic-rest-properties
    generic-slur-properties
    generic-beam-properties
index dc0fbd7a07376d092adad860f9620478da6a05d0..e673a0d4dc7ed192961d158a57ef3705fba16ae7 100644 (file)
@@ -8,6 +8,16 @@
 ; distances are given in stafflinethickness (thicknesses) and
 ; staffspace (distances)
 
+(define default-alteration-alist
+  '(
+    (0 . ((raise . 0.5) (music "accidentals-0")))
+    (-1 . ((raise . 0.5) (music "accidentals--1")))
+    (-2 . ((raise . 0.5) (music "accidentals--2")))
+    (1 . ((raise . 0.5) (music  "accidentals-1")))
+    (2 . ((raise . 0.5) (music "accidentals-2")))
+    ))
+
+
 (define all-grob-descriptions
   `(
     (Accidentals . (
                        text-interface  font-interface break-aligned-interface))
        ))
 
+       (BassFigure . (
+                      (molecule-callback . ,Text_item::brew_molecule)
+                      (Y-offset-callbacks . (,Side_position_interface::aligned_on_self))
+                      (direction . 0)
+                      (accidental-alist . ,default-alteration-alist)
+                      (font-family . number)
+                      (font-relative-size . -1)
+                      (meta . ,(grob-description "BassFigure" text-interface font-interface ))
+       ))
        (Beam . (
                 ;; todo: clean this up a bit: the list is getting
                 ;; rather long.
                (meta . ,(grob-description "LyricText" lyric-syllable-interface text-interface font-interface ))
        ))
        
+       (Porrectus . (
+               (style . mensural)
+               (solid . #f)
+               (add-stem . #t)
+               (stem-direction . 1)
+               (molecule-callback . ,Porrectus::brew_molecule)
+               (meta . ,(grob-description "Porrectus"
+                                          porrectus-interface))
+       ))
+
        (RehearsalMark . (
                (molecule-callback . ,Text_item::brew_molecule)
                (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
 
        (TupletBracket . (
                (number-gap . 2.0)   
-               (delta-y . 0)
                (thick . 1.0)
                (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
                (molecule-callback . ,Tuplet_bracket::brew_molecule)
index f5ea904733756f26587b2f5553f6d290bc6caf8c..d47707af49949cb698e1661272d66ecc620096b5 100644 (file)
@@ -29,6 +29,7 @@
 (grob-property-description 'X-offset-callbacks list? "list of functions, each taking an grob and axis argument. The function determine the position relative to this grob's parent. The last one in the list is called first.")
 (grob-property-description 'Y-extent-callback procedure? "see @code{X-extent-callback}.")
 (grob-property-description 'Y-offset-callbacks list? "see @code{X-offset-callbacks}.")
+(grob-property-description 'add-stem boolean? "Add stem to porrectus?.")
 (grob-property-description 'after-line-breaking-callback procedure? "Procedure taking a grob as argument.
 This procedure is called (using dependency resolution) after line breaking. Return value is ignored.")
 (grob-property-description 'align number? "the alignment of the text, 0 is horizontal, 1 is vertical.")
@@ -269,6 +270,7 @@ reference point.
 (grob-property-description 'side-support list? "the support, a list of grobs.")
 (grob-property-description 'slope number? "some kind of slope")
 (grob-property-description 'slope-limit number? "set slope to zero if slope is running away steeper than this.")
+(grob-property-description 'solid boolean? "should porrectus be solidly filled?.")
 (grob-property-description 'space-alist list? "Alist of break align spacing tuples. See basic-property.scm")
 (grob-property-description 'space-function procedure? "function of type multiplicity -> real (in staffspace).")
 (grob-property-description 'spacing-procedure procedure? "procedure
@@ -281,6 +283,7 @@ itself.  Return value is ignored.")
 (grob-property-description 'staff-symbol boolean? "the staff symbol grob that we're in.")
 (grob-property-description 'staffline-clearance number? "don't get closer than this to stafflines.")
 (grob-property-description 'stem ly-grob? "pointer to Stem object.")
+(grob-property-description 'stem-direction dir? "up or down?.")
 (grob-property-description 'stem-end-position number? "Where does the stem end (the end is opposite to the support-head.")
 (grob-property-description 'stem-length number? "length of stem.")
 (grob-property-description 'stem-shorten list? "shorten stems in forced directions given flag multiplicity.")
index c11059a1c5b7a91f5488139407733e34e5d4b61a..9a375415ada435b0c4f0d2718435ecfb911d3c81 100644 (file)
@@ -567,6 +567,13 @@ contains-grace extra-space stretch-distance ))
 
 
 
+  (lily-interface
+   'porrectus-interface
+   "A porrectus ligature, joining two note heads into a single grob."
+   '(
+    ))
+
+
   (lily-interface
    'spaceable-element-interface
    "An grob (generally a Paper_column) that takes part in the
index ef856df0487711f3ec33e5ac8c7e4230767c2e29..b34c79ce2cb154e01f2c277fd1d8f90d40cde2ee 100644 (file)
@@ -435,6 +435,16 @@ making a single line staff that demonstrates the rhythm of a melody."
       squashedPosition
       )))
    
+   (cons
+    'Porrectus_engraver
+    (engraver-description
+     "Porrectus_engraver"
+     "Join adjacent notes to a porrectus ligature."
+     '(Porrectus)
+     '(
+      )))
+
+
    (cons
     'Property_engraver
     (engraver-description
index 720f2db6296b7a59fe15bcdc0c6cadad6898c54f..fd2b360a3a6c614439e3b41ef5731d43c8587a2e 100644 (file)
@@ -717,7 +717,7 @@ AC_DEFUN(AC_STEPMAKE_TEXMF, [
     #
     # For now let people define these in their environments
     #
-    : ${MFPLAIN_MP=`kpsewhich mp mfplain.mp`}
+    : ${MFPLAIN_MP=`kpsewhich --format mp mfplain.mp`}
     AC_MSG_RESULT($MFPLAIN_MP)
 
     AC_MSG_CHECKING(for inimetapost flags)
diff --git a/stepmake/stepmake/asciifont-rules.make b/stepmake/stepmake/asciifont-rules.make
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/stepmake/stepmake/asciifont-targets.make b/stepmake/stepmake/asciifont-targets.make
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/stepmake/stepmake/asciifont-vars.make b/stepmake/stepmake/asciifont-vars.make
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/stepmake/stepmake/files.make b/stepmake/stepmake/files.make
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/stepmake/stepmake/include.make b/stepmake/stepmake/include.make
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/stepmake/stepmake/manual.make b/stepmake/stepmake/manual.make
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/stepmake/stepmake/package.make b/stepmake/stepmake/package.make
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/stepmake/stepmake/prolog-rules.make b/stepmake/stepmake/prolog-rules.make
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/stepmake/stepmake/prolog-targets.make b/stepmake/stepmake/prolog-targets.make
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/stepmake/stepmake/prolog-vars.make b/stepmake/stepmake/prolog-vars.make
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/stepmake/stepmake/template.make b/stepmake/stepmake/template.make
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/stepmake/stepmake/yodl-rules.make b/stepmake/stepmake/yodl-rules.make
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/stepmake/stepmake/yodl-targets.make b/stepmake/stepmake/yodl-targets.make
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/stepmake/stepmake/yodl-vars.make b/stepmake/stepmake/yodl-vars.make
deleted file mode 100644 (file)
index e69de29..0000000