From 19125bf158fe23501e40eef6da3bbf876c664f2a Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 17 Sep 2001 14:45:06 +0200 Subject: [PATCH] release: 1.5.10 ========== * Emacs-mode: Keyboard shortcuts, separated identifiers from keywords and spacing not necessary in font-locking. 1.5.9.j --- AUTHORS.txt | 4 +- CHANGES | 32 +- Documentation/topdocs/AUTHORS.texi | 3 +- INSTALL.txt | 5 +- VERSION | 4 +- aclocal.m4 | 2 +- configure | 2 +- flower/include/rational.hh | 8 +- flower/rational.cc | 52 ++-- input/paddy.abc | 47 +-- input/regression/collision-2.ly | 9 + input/regression/collision-mesh.ly | 24 +- input/regression/collisions.ly | 51 ++-- input/test/ancient-font.ly | 75 +++-- input/test/figured-bass.ly | 54 ++-- lily/beam.cc | 2 +- lily/collision.cc | 99 +++--- lily/command-request.cc | 1 + lily/engraver.cc | 4 +- lily/figured-bass-engraver.cc | 104 +++++++ lily/grob.cc | 2 + lily/include/command-request.hh | 4 + lily/include/lily-proto.hh | 1 + lily/include/main.hh | 1 + lily/include/my-lily-lexer.hh | 3 +- lily/include/porrectus.hh | 34 +++ lily/include/untransposable-music.hh | 26 ++ lily/lexer.ll | 48 ++- lily/musical-request.cc | 11 +- lily/my-lily-lexer.cc | 4 +- lily/parser.yy | 92 +++++- lily/porrectus-engraver.cc | 237 ++++++++++++++ lily/porrectus.cc | 374 +++++++++++++++++++++++ lily/score.cc | 22 +- lily/tuplet-bracket.cc | 5 +- lily/untransposable-music.cc | 28 ++ lily/volta-engraver.cc | 2 - lilypond-font-lock.el | 139 +++++---- lilypond-mode.el | 62 +++- ly/engraver-init.ly | 10 + ly/params-init.ly | 2 +- make/out/lilypond.lsm | 8 +- make/out/lilypond.mandrake.spec | 2 +- make/out/lilypond.redhat.spec | 4 +- make/out/lilypond.suse.spec | 4 +- scm/font.scm | 2 +- scm/generic-property.scm | 20 +- scm/grob-description.scm | 30 +- scm/grob-property-description.scm | 3 + scm/interface-description.scm | 7 + scm/translator-description.scm | 10 + stepmake/aclocal.m4 | 2 +- stepmake/stepmake/asciifont-rules.make | 0 stepmake/stepmake/asciifont-targets.make | 0 stepmake/stepmake/asciifont-vars.make | 0 stepmake/stepmake/files.make | 0 stepmake/stepmake/include.make | 0 stepmake/stepmake/manual.make | 0 stepmake/stepmake/package.make | 0 stepmake/stepmake/prolog-rules.make | 0 stepmake/stepmake/prolog-targets.make | 0 stepmake/stepmake/prolog-vars.make | 0 stepmake/stepmake/template.make | 0 stepmake/stepmake/yodl-rules.make | 0 stepmake/stepmake/yodl-targets.make | 0 stepmake/stepmake/yodl-vars.make | 0 66 files changed, 1468 insertions(+), 313 deletions(-) create mode 100644 input/regression/collision-2.ly create mode 100644 lily/figured-bass-engraver.cc create mode 100644 lily/include/porrectus.hh create mode 100644 lily/include/untransposable-music.hh create mode 100644 lily/porrectus-engraver.cc create mode 100644 lily/porrectus.cc create mode 100644 lily/untransposable-music.cc delete mode 100644 stepmake/stepmake/asciifont-rules.make delete mode 100644 stepmake/stepmake/asciifont-targets.make delete mode 100644 stepmake/stepmake/asciifont-vars.make delete mode 100644 stepmake/stepmake/files.make delete mode 100644 stepmake/stepmake/include.make delete mode 100644 stepmake/stepmake/manual.make delete mode 100644 stepmake/stepmake/package.make delete mode 100644 stepmake/stepmake/prolog-rules.make delete mode 100644 stepmake/stepmake/prolog-targets.make delete mode 100644 stepmake/stepmake/prolog-vars.make delete mode 100644 stepmake/stepmake/template.make delete mode 100644 stepmake/stepmake/yodl-rules.make delete mode 100644 stepmake/stepmake/yodl-targets.make delete mode 100644 stepmake/stepmake/yodl-vars.make diff --git a/AUTHORS.txt b/AUTHORS.txt index 4f9e6ff8a2..3a1949d8ac 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -72,7 +72,9 @@ list is alphabetically ordered. * Roy R. Rankin , major extension, fixes to abc2ly, lilypond bug fixes - * Juergen Reuter Custos support. + * Juergen Reuter Ancient notation + support (custos, porrectus, mensural notation, ancient + clefs, etc.) * Jeffrey B. Reed , Windows-NT support. diff --git a/CHANGES b/CHANGES index 832e854724..0f3adbfcb0 100644 --- 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 - + 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 ===== diff --git a/Documentation/topdocs/AUTHORS.texi b/Documentation/topdocs/AUTHORS.texi index 01701732aa..a6ec5460ca 100644 --- a/Documentation/topdocs/AUTHORS.texi +++ b/Documentation/topdocs/AUTHORS.texi @@ -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 diff --git a/INSTALL.txt b/INSTALL.txt index 373eb96146..4c8da9fa63 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -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 33a0bf8761..29adfa8408 100644 --- 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. diff --git a/aclocal.m4 b/aclocal.m4 index 720f2db629..fd2b360a3a 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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/configure b/configure index 21e84bc95a..abca10383a 100755 --- 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 diff --git a/flower/include/rational.hh b/flower/include/rational.hh index ab4a3d41cf..995700c55c 100644 --- a/flower/include/rational.hh +++ b/flower/include/rational.hh @@ -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);} diff --git a/flower/rational.cc b/flower/rational.cc index d5e679a9e9..3b0b3d0928 100644 --- a/flower/rational.cc +++ b/flower/rational.cc @@ -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 diff --git a/input/paddy.abc b/input/paddy.abc index 41a116e947..0aadebc63c 100644 --- a/input/paddy.abc +++ b/input/paddy.abc @@ -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 index 0000000000..04b9f80c94 --- /dev/null +++ b/input/regression/collision-2.ly @@ -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 } +>} +} diff --git a/input/regression/collision-mesh.ly b/input/regression/collision-mesh.ly index 25881933f7..571183ebc5 100644 --- a/input/regression/collision-mesh.ly +++ b/input/regression/collision-mesh.ly @@ -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 - r4 r4 } - \context Voice=VII {\stemUp d'2.} > + < \context Voice = VI {\stemDown + + + + d'4 + d'4. + } + + \context Voice=VII {\stemUp + d'4 + d'4. + + + + } > - % Or: - - <\context Voice = VI {\stemUp r r} - \context Voice= VII {\stemDown d'2.} > } } diff --git a/input/regression/collisions.ly b/input/regression/collisions.ly index 89332dee95..2f1467326d 100644 --- a/input/regression/collisions.ly +++ b/input/regression/collisions.ly @@ -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 + + } > + 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 - } -> - 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 } diff --git a/input/test/ancient-font.ly b/input/test/ancient-font.ly index 405e6add22..c3f4ccf155 100644 --- a/input/test/ancient-font.ly +++ b/input/test/ancient-font.ly @@ -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 "||" } diff --git a/input/test/figured-bass.ly b/input/test/figured-bass.ly index 102c7f90b6..9c6b0300be 100644 --- a/input/test/figured-bass.ly +++ b/input/test/figured-bass.ly @@ -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'' { + + + \figures { + r + <1 3 5>4 <3- 5+ 6!> <5> + } + } + \context Voice { + c + g8 g + f4 + d + c } -} - + +> + } diff --git a/lily/beam.cc b/lily/beam.cc index 48c81d14cf..df1bf65ffa 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -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 diff --git a/lily/collision.cc b/lily/collision.cc index 39e906b6ab..d0bcf4eec2 100644 --- a/lily/collision.cc +++ b/lily/collision.cc @@ -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++) diff --git a/lily/command-request.cc b/lily/command-request.cc index aac1ebe576..ce8db7f353 100644 --- a/lily/command-request.cc +++ b/lily/command-request.cc @@ -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); diff --git a/lily/engraver.cc b/lily/engraver.cc index 02e683b055..9059624ce6 100644 --- a/lily/engraver.cc +++ b/lily/engraver.cc @@ -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 index 0000000000..87894fcdd5 --- /dev/null +++ b/lily/figured-bass-engraver.cc @@ -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 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 (m)) + { + figures_.push (n); + return true; + } + else if (Rest_req * r = dynamic_cast (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); diff --git a/lily/grob.cc b/lily/grob.cc index 0f233e6136..c5cfcbe174 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -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) diff --git a/lily/include/command-request.hh b/lily/include/command-request.hh index 8c4cbeeb51..fa7d7f4e63 100644 --- a/lily/include/command-request.hh +++ b/lily/include/command-request.hh @@ -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. */ diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index 7259cd3b28..bafbe11578 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -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; diff --git a/lily/include/main.hh b/lily/include/main.hh index 12d63619c8..7d2f90174f 100644 --- a/lily/include/main.hh +++ b/lily/include/main.hh @@ -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; diff --git a/lily/include/my-lily-lexer.hh b/lily/include/my-lily-lexer.hh index a0f6901b1b..2c3d405952 100644 --- a/lily/include/my-lily-lexer.hh +++ b/lily/include/my-lily-lexer.hh @@ -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 index 0000000000..8a11b0387d --- /dev/null +++ b/lily/include/porrectus.hh @@ -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 index 0000000000..4f99e41322 --- /dev/null +++ b/lily/include/untransposable-music.hh @@ -0,0 +1,26 @@ + +/* +untransposable-music.hh -- declare + +source file of the GNU LilyPond music typesetter + +(c) 2001 Han-Wen Nienhuys + + */ + +#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 */ + diff --git a/lily/lexer.ll b/lily/lexer.ll index a875cea59e..2bbf7c564c 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -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 } -{ +{ "%{" { yy_push_state (longcomment); } @@ -146,7 +147,7 @@ HYPHEN -- } } -\\version{WHITE}* { +\\version{WHITE}* { yy_push_state (version); } \"[^"]*\" { /* got the version number */ @@ -178,7 +179,7 @@ HYPHEN -- } -\\maininput { +\\maininput { if (!main_input_b_) { start_main_input (); @@ -188,7 +189,7 @@ HYPHEN -- error (_ ("\\maininput disallowed outside init files")); } -\\include { +\\include { yy_push_state (incl); } \"[^"]*\";? { /* got the include file name */ @@ -221,34 +222,34 @@ HYPHEN -- cerr << _ ("Missing end quote") << endl; exit (1); } -{RESTNAME} { +{RESTNAME} { const char *s = YYText (); yylval.scm = ly_str02scm (s); return RESTNAME; } -R { +R { return MULTI_MEASURE_REST; } -\\\${BLACK}*{WHITE} { +\\\${BLACK}*{WHITE} { String s=YYText () + 2; s=s.left_str (s.length_i () - 1); return scan_escaped_word (s); } -\${BLACK}*{WHITE} { +\${BLACK}*{WHITE} { String s=YYText () + 1; s=s.left_str (s.length_i () - 1); return scan_bare_word (s); } -\\\${BLACK}* { // backup rule +\\\${BLACK}* { // backup rule cerr << _ ("white expected") << endl; exit (1); } -\${BLACK}* { // backup rule +\${BLACK}* { // backup rule cerr << _ ("white expected") << endl; exit (1); } -# { //embedded scm +# { //embedded scm //char const* s = YYText () + 1; char const* s = here_ch_C (); int n = 0; @@ -267,7 +268,15 @@ HYPHEN -- return SCM_T; } -{ +{ + \> { + return FIGURE_CLOSE; + } + \< { + return FIGURE_OPEN; + } +} +{ {ALPHAWORD} { return scan_bare_word (YYText ()); } @@ -430,11 +439,11 @@ HYPHEN -- return c; } -. { +. { return YYText ()[0]; } -\\. { +\\. { 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 diff --git a/lily/musical-request.cc b/lily/musical-request.cc index ae24d23a2e..7ed6f00438 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -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 - - - diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index 9c07514277..54feff2251 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -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}, diff --git a/lily/parser.yy b/lily/parser.yy index c732454e53..c0a6061ddf 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -15,6 +15,14 @@ - */ +/* + +the rules for who is protecting what are very shady. TODO: uniformise +this. + + +*/ + #include #include @@ -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 exclamations questions dots +%type bass_number bass_mod +%type bass_figure figure_list figure_spec %token DIGIT %token NOTENAME_PITCH %token 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 index 0000000000..84d81f4460 --- /dev/null +++ b/lily/porrectus-engraver.cc @@ -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 past_notes_pq_; + Porrectus_req *porrectus_req_l_; + Array left_heads_; + Array right_heads_; + Link_array 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 (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 (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 (unsmob_grob (caar)); + Item *right_head = dynamic_cast (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 pitchget_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 index 0000000000..bec95d8bd2 --- /dev/null +++ b/lily/porrectus.cc @@ -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 (unsmob_grob (left_head_scm)); + Item *right_head = dynamic_cast (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); +} diff --git a/lily/score.cc b/lily/score.cc index ae6cf4173d..9ab1dbe428 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -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 () diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index e6e07253ca..04a48773ca 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-bracket.cc @@ -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 index 0000000000..d04127f4ac --- /dev/null +++ b/lily/untransposable-music.cc @@ -0,0 +1,28 @@ +/* +untransposable-music.cc -- implement Untransposable_music + +source file of the GNU LilyPond music typesetter + +(c) 2001 Han-Wen Nienhuys + + */ + +#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() +{ + +} diff --git a/lily/volta-engraver.cc b/lily/volta-engraver.cc index 1227a9315b..6feb88b12d 100644 --- a/lily/volta-engraver.cc +++ b/lily/volta-engraver.cc @@ -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)) { diff --git a/lilypond-font-lock.el b/lilypond-font-lock.el index 1646ad001b..166db820be 100644 --- a/lilypond-font-lock.el +++ b/lilypond-font-lock.el @@ -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 @@ -31,45 +31,80 @@ (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 "\\|")) ) @@ -78,32 +113,30 @@ ;; 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[]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) ) ) diff --git a/lilypond-mode.el b/lilypond-mode.el index e0b7de1c76..565aa04943 100644 --- a/lilypond-mode.el +++ b/lilypond-mode.el @@ -7,6 +7,8 @@ ;;; ;;; Changed 29th Aug 2001 Heikki Junes ;;; * 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. diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 9717e3c5e2..01e05e9bcf 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -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" +} diff --git a/ly/params-init.ly b/ly/params-init.ly index f406588183..8bf36b2906 100644 --- a/ly/params-init.ly +++ b/ly/params-init.ly @@ -41,7 +41,7 @@ blotdiameter = 0.4 / \outputscale \translator { \PianoStaffContext} \translator { \LyricsVoiceContext } \translator { \StaffContainerContext } - +\translator { \FiguredBassContext } diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 2496a8b717..db1b2ae5b2 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -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 diff --git a/make/out/lilypond.mandrake.spec b/make/out/lilypond.mandrake.spec index e5b3515cab..777fb25bf9 100644 --- a/make/out/lilypond.mandrake.spec +++ b/make/out/lilypond.mandrake.spec @@ -1,5 +1,5 @@ %define name lilypond -%define version 1.5.9 +%define version 1.5.10 %define release 1mdk Name: %{name} diff --git a/make/out/lilypond.redhat.spec b/make/out/lilypond.redhat.spec index 39388a36fd..3e4aca0512 100644 --- a/make/out/lilypond.redhat.spec +++ b/make/out/lilypond.redhat.spec @@ -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 diff --git a/make/out/lilypond.suse.spec b/make/out/lilypond.suse.spec index b20198c2c7..84bb9dfe56 100644 --- a/make/out/lilypond.suse.spec +++ b/make/out/lilypond.suse.spec @@ -14,11 +14,11 @@ 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/ diff --git a/scm/font.scm b/scm/font.scm index 39fcd09fbc..d1813de9a1 100644 --- a/scm/font.scm +++ b/scm/font.scm @@ -204,7 +204,7 @@ (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))) diff --git a/scm/generic-property.scm b/scm/generic-property.scm index f5aba1fcc9..cf774ad231 100644 --- a/scm/generic-property.scm +++ b/scm/generic-property.scm @@ -1,6 +1,11 @@ -; BROKEN as of 1.3.55, FIXME -; + + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; DEPRECATED -- DO NOT UPDATE ! -- DO NOT USE ! +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; @@ -167,6 +172,16 @@ (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)))) @@ -246,6 +261,7 @@ generic-tie-column-properties generic-tuplet-spanner-properties generic-notehead-properties + generic-porrectus-properties generic-rest-properties generic-slur-properties generic-beam-properties diff --git a/scm/grob-description.scm b/scm/grob-description.scm index dc0fbd7a07..e673a0d4dc 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -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 . ( @@ -66,6 +76,15 @@ 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. @@ -302,6 +321,16 @@ (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)) @@ -689,7 +718,6 @@ (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) diff --git a/scm/grob-property-description.scm b/scm/grob-property-description.scm index f5ea904733..d47707af49 100644 --- a/scm/grob-property-description.scm +++ b/scm/grob-property-description.scm @@ -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.") diff --git a/scm/interface-description.scm b/scm/interface-description.scm index c11059a1c5..9a375415ad 100644 --- a/scm/interface-description.scm +++ b/scm/interface-description.scm @@ -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 diff --git a/scm/translator-description.scm b/scm/translator-description.scm index ef856df048..b34c79ce2c 100644 --- a/scm/translator-description.scm +++ b/scm/translator-description.scm @@ -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 diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index 720f2db629..fd2b360a3a 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -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 index e69de29bb2..0000000000 diff --git a/stepmake/stepmake/asciifont-targets.make b/stepmake/stepmake/asciifont-targets.make deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/stepmake/stepmake/asciifont-vars.make b/stepmake/stepmake/asciifont-vars.make deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/stepmake/stepmake/files.make b/stepmake/stepmake/files.make deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/stepmake/stepmake/include.make b/stepmake/stepmake/include.make deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/stepmake/stepmake/manual.make b/stepmake/stepmake/manual.make deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/stepmake/stepmake/package.make b/stepmake/stepmake/package.make deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/stepmake/stepmake/prolog-rules.make b/stepmake/stepmake/prolog-rules.make deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/stepmake/stepmake/prolog-targets.make b/stepmake/stepmake/prolog-targets.make deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/stepmake/stepmake/prolog-vars.make b/stepmake/stepmake/prolog-vars.make deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/stepmake/stepmake/template.make b/stepmake/stepmake/template.make deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/stepmake/stepmake/yodl-rules.make b/stepmake/stepmake/yodl-rules.make deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/stepmake/stepmake/yodl-targets.make b/stepmake/stepmake/yodl-targets.make deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/stepmake/stepmake/yodl-vars.make b/stepmake/stepmake/yodl-vars.make deleted file mode 100644 index e69de29bb2..0000000000 -- 2.39.2