]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.45
authorfred <fred>
Tue, 26 Mar 2002 23:21:15 +0000 (23:21 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:21:15 +0000 (23:21 +0000)
41 files changed:
CHANGES
VERSION
buildscripts/make-cygwin-cross.sh
buildscripts/ps-to-pfa.py
input/bugs/bar-break.ly [new file with mode: 0644]
input/bugs/shorthand-trickery.ly [new file with mode: 0644]
input/bugs/text-dynamics.ly [new file with mode: 0644]
input/star-spangled-banner.ly
input/test/bar-break.ly
input/test/font-body.ly
input/test/pedal.ly [new file with mode: 0644]
lily/chord-name.cc
lily/include/audio-item.hh
lily/include/rhythmic-head.hh
lily/lexer.ll
lily/lookup.cc
lily/midi-item.cc
lily/piano-pedal-engraver.cc [new file with mode: 0644]
lily/piano-pedal-performer.cc
lily/text-item.cc
ly/engraver.ly
ly/spanners.ly
mf/GNUmakefile
mf/feta-accordion.mf
mf/feta-generic.mf
mf/feta-macros.mf
mf/feta-nummer-generic.mf
mf/feta-nummer.mf
mf/feta-params.mf
mf/feta-pendaal.mf [new file with mode: 0644]
mf/feta-schrift.mf
mf/feta-test11.mf [new file with mode: 0644]
mf/feta-test13.mf
mf/feta-test23.mf [new file with mode: 0644]
mf/feta-test26.mf
scm/generic-property.scm
scm/lily.scm
scm/paper.scm
stepmake/stepmake/metafont-vars.make
tex/p.tex [new file with mode: 0644]
tex/pedal.tex [new file with mode: 0644]

diff --git a/CHANGES b/CHANGES
index e9cb084f880ce41a2e8f56b9094c4cbad37c948a..8749754c4b0a9d5824f84aa377790fc77344e2fc 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,32 @@
+1.3.44.jcn2
+===========
+
+* Implemented una-chorda and sostenuto piano pedals in performer and engraver.
+
+* Added Properties textScriptWordSpace and chordNameWordSpace.
+
+* Junked old lyrics in star-spangled-banner.
+
+1.3.44.jcn1
+===========
+
+* Added a Piano_pedal_engraver.
+
+* Removed some empty files.
+
+* Created piano pedal symbols: * - . P e d.
+
+* Fixed ps-to-pfa.py to handle multiple unfills.
+
+* Moved accordion symbols out of feta-script to end of font.
+
+* Bugfix: don't create tfm's, pfa's etc of feta-test fonts.
+
+* Fixed blot_diameter for small resolutions.
+
+1.3.43
+======
+
 1.3.43.hwn1
 ===========
 
@@ -55,7 +84,7 @@ Also updated index.texi.
 * Change all occurances of Staff_margin_engraver to
 Instrument_name_engraver, add a convert-mudela rule
 
-* Change status == busy assert into programming error
+* Change status == busy assert into programming sample/sample/error
 
 1.3.42
 ======
diff --git a/VERSION b/VERSION
index d1321c83225fe4899ca7c27d82d1dd2500f6786f..3330e8a8cd747c0f4f6c98c5d8895bc77d1814e0 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=44
+PATCH_LEVEL=45
 MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
index 6d9bd3b1ff7d9dcb92497bac28d1cca40ffb554b..fa6a47f450d0208b6f961491d88f2a1b032cade1 100644 (file)
@@ -606,6 +606,7 @@ copy < olddll
 copy < newdll 
 bash setup.sh
 if not errorlevel 0 goto nobash
+attrib +s \\Cygnus\\usr\\share\\lilypond\\cmtfm
 goto :exit
 :nobash
 @echo "setup.bat: can't find bash"
index bab745820d330d367b83a040974b8da639da38f0..796c5d8b3770426b7dec2792e60d636da579fedf 100644 (file)
@@ -122,8 +122,7 @@ end                                         % of font dictionary
        f.write (''
 'exch definefont pop                         % Define the font\n')
 
-
-suspect_re = re.compile ('closepath (.*?) 1 setgray newpath (.*?) closepath fill')
+suspect_re = re.compile ('closepath ((gsave )*fill( grestore stroke)*) 1 setgray newpath (.*?) closepath fill')
 
 def characters (f):
        sys.stderr.write ('[')
@@ -153,7 +152,7 @@ def characters (f):
                        m = suspect_re.search (s)
                        while m:
                                fill = m.group (1)
-                               path = m.group (2)
+                               path = m.group (4)
 
                                # be complicated, in case of gsave/grestore.
                                # vill as quick hack to avoid duple substitutions.
diff --git a/input/bugs/bar-break.ly b/input/bugs/bar-break.ly
new file mode 100644 (file)
index 0000000..94fd0db
--- /dev/null
@@ -0,0 +1,28 @@
+\score
+{
+  \context StaffGroup = a < 
+    \context PianoStaff = b <
+      \context Staff = "c" \notes\relative c'' { b4 b \bar "empty"; \break b b }
+      \context Staff = "d" \notes\relative c'' { b4 b b b }
+    >
+  >
+
+  \paper {
+       indent=100.0\mm;
+       linewidth=150.0\mm;
+    \translator {
+      \StaffContext
+        \consists "Instrument_name_engraver";
+       numberOfStaffLines  = #1
+        marginScriptPadding = #30  % urg: this is in PT
+       instrument = #"Foo"
+       instr = #"Bar"
+    }
+    \translator {
+      \StaffGroupContext
+        \consists "Instrument_name_engraver";
+        marginScriptPadding = #10  % urg: this is in PT
+       instrument = #"Piano\n(For rehearsal only)"
+      }
+  }
+}
diff --git a/input/bugs/shorthand-trickery.ly b/input/bugs/shorthand-trickery.ly
new file mode 100644 (file)
index 0000000..6ad3025
--- /dev/null
@@ -0,0 +1,36 @@
+%
+% Example of shorthand trickery 
+% \property Context.foo = bar
+%
+foo = \property Staff.foo = #"bar"
+%
+%
+%
+
+one = \context Voice\notes\relative c {
+       a1 b c
+}
+
+
+two = \context Voice\notes {
+       a1\foo
+       b
+       < c\foo e >
+}
+
+\score{
+       \context OtherStaff=one <
+               \one
+               \two
+       >
+       \paper{
+               \translator {
+                       \StaffContext
+                       \name "OtherStaff";
+               }
+               \translator {
+                       \ScoreContext
+                       \accepts "OtherStaff";
+               }
+       }
+}
diff --git a/input/bugs/text-dynamics.ly b/input/bugs/text-dynamics.ly
new file mode 100644 (file)
index 0000000..03dfeee
--- /dev/null
@@ -0,0 +1,144 @@
+\header{
+Composer="Sergej Rachmaninov (1873-1943)";
+Title="Elegie";
+Subtitle="À Monsieur A. Arensky";
+Opus="Opus 3 Nr 1";
+Note="Small fragment to show Pedal and Dynamics problems";
+Enteredby="JCN";
+}
+
+%
+% Arg.  
+% How to remove dynamics from Voice/Staff, but still show fingering?
+% When Dynamic_engraver is removed, the Text_engraver happily engraves
+% the dynamic markings.
+% When the Text_engraver is removed, it can't engrave the fingerings.
+%
+
+global = \notes{
+       \key es \minor;
+       \time 4/4;
+}
+
+upperMusic = \context Voice\notes\relative c'' {
+       %1
+       R1
+       R1
+       r2 ges'2--~
+}
+
+upperDynamics = \context Voice\notes {
+       %1
+       s1\pp
+       s1
+       s2 s2\mf
+}
+
+upperFingering = \context Voice\notes {
+       %1
+       s1
+       s1
+       s2 s2-4
+}
+
+lowerMusic = \context Voice\notes\relative c {
+       %1
+       <es,8(es,> bes' ges' es' bes' es, ges,)bes,
+       <es,8(es,> bes' ges' es' bes' es, ges,)bes,
+       <es,8(es,> bes' ges' es' bes' es, ges,)bes,
+}
+
+lowerPedal = \context Voice\notes {
+       %1
+       %1
+       s8\unachorda\sustaindown s8 s4 s2
+       s8\sustaindown\sustainup s8 s4 s2
+       s8\sustaindown\sustainup s8 s4 s2\trechorde
+}
+
+lowerDynamics = \context Voice\notes {
+       %1
+}
+
+lowerFingering = \context Voice\notes {
+       %1
+       s8 s8-5 s-2 s-1 s-2 s-1 s-2 s
+       s1
+       s1
+}
+
+\score{
+       \context PianoStaff <
+               \context UpperStaff=upper <
+                       \global
+                       \upperMusic
+                       \upperDynamics
+                       \upperFingering
+                       \lowerPedal
+               >
+               \context LowerStaff=lower <
+                       \global
+                       \clef bass;
+                       \lowerMusic
+                       \lowerPedal
+                       \lowerDynamics
+                       \lowerFingering
+                       \upperDynamics
+               >
+       >
+       \paper{
+               % Hmm
+               \translator {
+                       \VoiceContext
+                       \remove "Piano_pedal_engraver";
+                       \remove "Dynamic_engraver";
+                       % AAAARGH!
+                       \remove "Text_engraver";
+               }
+               \translator {
+                       \StaffContext
+                       \name "UpperStaff";
+                       \consists "Dynamic_engraver";
+                       dynamicPadding = #3  % urg, in \pt
+                       dynamicMinimumSpace = #6  % urg, in \pt
+               }
+               \translator {
+                       \StaffContext
+                       \name "LowerStaff";
+                       \consists "Piano_pedal_engraver";
+                       startSustain = #"Ped."
+                       stopSustain = #"*"
+                       stopStartSustain = #"-P"
+                       startUnaChorda = #"una chorda"
+                       stopUnaChorda = #"tre chorde"
+                       textScriptPadding = #3.0
+               }
+               \translator {
+                       \PianoStaffContext
+                       \accepts "UpperStaff";
+                       \accepts "LowerStaff";
+               }
+               \translator {
+                       \ScoreContext
+                       timeSignatureStyle = #"C"
+               }
+       }
+       \midi{
+               % Zucht
+               \translator {
+                       \StaffContext
+                       \name "UpperStaff";
+               }
+               \translator {
+                       \StaffContext
+                       \name "LowerStaff";
+               }
+               \translator {
+                       \ScoreContext
+                       \accepts "UpperStaff";
+                       \accepts "LowerStaff";
+               }
+               \tempo 4 = 88;
+       }
+}
+
index e485996a039b25845a6c8af2e19909d59900f839..4c14e483e5615e21fa78fb8df6ddfedacb1dba27 100644 (file)
@@ -4,7 +4,23 @@ http://www.Arkkra.com/doc/star.html
 http://www.Arkkra.com/doc/star.ps
 %}
 
+\version "1.3.42";
 
+% TODO: 
+%
+%  * centre non-melismata lyrics under notehead:
+%
+%      l       c    c    c    l
+%        ___
+%       |   |   |    |    |    |    |
+%      x|()x|  x|   x|   x|   x|( )x|
+%      Oh_____say  can  you   see
+%
+%
+%  * repeat colons in Lyrics / running into barline of 'Whose broad'
+%
+%  * slur/lyric clash
+%
 
 \header{
        title="The Star Spangled Banner";
@@ -16,11 +32,22 @@ http://www.Arkkra.com/doc/star.ps
        copyright="public domain";
 }
 
+global = \notes {
+  \time 3/4; 
+  \key d;
+  \partial 4;
+}
+
 $staff1_voice_1 = \notes {
   a8.()fis16 
-  \repeat volta 2 { d4 fis4 a4 d'2 fis'8. e'16 d'4 fis4 gis4 a2 a8 a8 
-  fis'4. e'8 d'4 cis'2 b8. cis'16 d'4 d'4 a4 }
-  \alternative { { fis4 d4 a8. fis16 } { fis4 d4 fis'8. fis'16 } } 
+  \repeat volta 2 { 
+    d4 fis4 a4 d'2 fis'8. e'16 d'4 fis4 gis4 a2 a8 a8 
+    fis'4. e'8 d'4 cis'2 b8. cis'16 d'4 d'4 a4 
+  }
+  \alternative { 
+    { fis4 d4 a8. fis16 } 
+    { fis4 d4 fis'8. fis'16 }
+  } 
   fis'4 g'4 a'4 a'2 g'8 fis'8 e'4 fis'4
   g'4 g'2 g'4 fis'4. e'8 d'4 cis'2 b8. cis'16 d'4 fis4 gis4 a2 a4
   d'4 d'4 d'8()cis'8 b4 b4 b4 e'4 g'8 ()fis'8  e'8()d'8 
@@ -30,9 +57,14 @@ $staff1_voice_1 = \notes {
 
 $staff1_voice_2 = \notes { 
   a8.()fis16 
-  \repeat volta 2 { a,4 d4 e4 d4 () fis4 fis8. fis16 fis4 d4 d4 cis2
-  e8 e8 a4. a8 a4 a2 a8. a16 a4 a4 a4 }
-  \alternative { { fis4 d4 a8. fis16 } { fis4 d4 r4 } }
+  \repeat volta 2 { 
+    a,4 d4 e4 d4 () fis4 fis8. fis16 fis4 d4 d4 cis2
+    e8 e8 a4. a8 a4 a2 a8. a16 a4 a4 a4 
+  }
+  \alternative { 
+    { fis4 d4 a8. fis16 } 
+    { fis4 d4 r4 } 
+  }
   a4 a4 d'4 d'2 a8 a8 cis'4 cis'4 cis'4 cis'2 a4 a4. a8 a4 a2
   a8. a16 d4 d4 d4 cis2 e4 fis4 e4 d4 d4 d4 dis4 g4 g8()dis8 e4 e2
   e8. e16 d4.()a8 a8 a8 a2 g8 g8 a4. a8 g4 fis2 s4 
@@ -40,9 +72,14 @@ $staff1_voice_2 = \notes {
 
 $staff2_voice_1 = \notes { 
   r4 
-  \repeat volta 2 { fis4 a4 a4 b2 cis'8. cis'16 b4 b4 b4 a2 cis'8 cis'8 
-  d'4. cis'8 d'4 e'2 e'8. e'16 d'4 d'4 a4 }
-  \alternative { { fis4 d4 r4 } { fis4 d4 r4 } }
+  \repeat volta 2 { 
+    fis4 a4 a4 b2 cis'8. cis'16 b4 b4 b4 a2 cis'8 cis'8 
+    d'4. cis'8 d'4 e'2 e'8. e'16 d'4 d'4 a4 
+  }
+  \alternative { 
+    { fis4 d4 r4 } 
+    { fis4 d4 r4 } 
+  }
   d4 e4 fis4 fis'2 e'8 d'8 e'4 e'4 e'4 e'2 cis'4 d'4. cis'8 d'4 e'2
   e'8. e'16 a4 a4 e4 e2 cis'4 a4 a4 a4 g4 g4 b4 b4 b4 b4 a2
   cis'8. cis'16 a4.()cis'8 d'8 d'8 d'2 d'8 d'8 d'4. d'8 cis'4
@@ -51,113 +88,83 @@ $staff2_voice_1 = \notes {
 
 $staff2_voice_2 = \notes { 
   r4 
-  \repeat volta 2 { d4 d4 cis4 b,2 ais,8. ais,16 b,4 b,4 e4 a,2 a8 a8 
-  d4. e8 fis8 g8 a2 g8. g16 fis4 fis4 a4 }
-  \alternative { { fis4 d4 r4 } { fis4 d4 r4 } } 
+  \repeat volta 2 { 
+    d4 d4 cis4 b,2 ais,8. ais,16 b,4 b,4 e4 a,2 a8 a8 
+    d4. e8 fis8 g8 a2 g8. g16 fis4 fis4 a4 
+  }
+  \alternative { 
+    { fis4 d4 r4 } 
+    { fis4 d4 r4 } 
+  }
   d4 d4 d4 d2 d8 d8 a4 a4 a4 a2 a,4 d4. e8 fis8 g8 a2 g8. g16 
   fis4 d4 e4 a,2 a4 d4 e4 fis4 g4 g4 fis4 e4 e8()fis8  g8()gis8 a2 
   g8. g16 fis4.()a,8 d8 e8 fis2 b8 b8 a4. a8 a,4 d2 s4 
 }
 
-
-altOne =\lyrics {  say,4 can you | see,2 __ by8. the16 dawn's4 ear- ly light2 What8
-       so8 proud-4. ly8 we4 hailed,2 At8. the16 twi-4 light's last gleam-
-       ing. Whose8. broad16  }
-
-altTwo =     \lyrics {  stripes4 and bright stars,2 through8. the16 per-4 il- ous fight,2
-      O'er8 the8 ram-4. parts8 we4 watched,2 were8. so16 gal-4 lant- ly 
-       _ _   % UGH UGH
-       stream-4 ing
-  And8. the16 rock-4 ets' red glare,2 the8 bombs8
-  burst-4 ing in air,2 gave4 proof4. through8 the4 night2 that8.
-  our16 flag4 was still there,2 Oh4 say, does that star- span-
-  gled ban- ner yet wave,2 __ O'er8. the16 land2 __ of8 the8 free2
-  and8 the8 home4. of8 the4 brave.2
-}
-% old code
-nonRepeatText = \lyrics  \context LyricVoice = LVA {
-  Oh4 __
-  \context Lyrics <
-       \altOne  
-       \altTwo 
-  >
-}
-
-%{
-Be careful to have all duration within the lyrics of the same kind.
-
-Alternatives & need to be matched more intelligently.  See
-"whose broad" alt1, volta1, "streaming" alt2, *volta2*!
-
-%}
-
-textxx = \lyrics {  
+text = \lyrics {  
   Oh __ \repeat "fold" 2 { }
   \alternative {
-     { 
-       say, can you | see, by the dawn's ear- ly light What
-       so proud- ly we hailed, At the twi- light's last gleam-
-       ing. Whose broad 
-     }
-
+    { 
+      say, can you | see, by the dawn's ear- ly light 
+      What so proud- ly we hailed, 
+      At the twi- light's last gleam- ing. 
+      %Whose broad
+      %Whose broad_justoseewhatsgoingonhere \bar ":|";
+      % Ah, it seems that this context stops to exist just before
+      % the :| barline is set, and doesn't see its width?
+      % Adding one here fixes running into the span-bar,
+      % but adds yet another repeatcolon -- maybe we can fix that 
+      % elsewhere.
+      Whose broad \bar ":|";
+    }
     { 
       stripes and bright stars, through the per- il- ous fight,
       O'er the ram- parts we watched, were so gal- lant- ly
-       " " " " " "  " "% _ _ _ _ % UGH UGH UGH 
-       stream- ing
-  And the rock- ets' red glare, the bombs
-  burst- ing in air, gave proof through the night that
-  our flag was still there, Oh say, does that star- span-
-  gled ban- ner yet wave, __ O'er the land __ of the free
-  and the home of the brave.
+      " " " " " "  " "% UGH UGH UGH 
+      stream- ing
+
+      And the rock- ets' red glare, the bombs burst- ing in air, 
+      gave proof through the night that our flag was still there, 
+      Oh say, does that star- span- gled ban- ner yet wave, __ 
+      O'er the land __ of the free and the home of the brave.
+    }
   }
-}}
-
+}
 
-beginmatter = \notes {\time 3/4; \key d;  s4 | }
-                       
+\include "paper16.ly";
 
-automaticLyrics = \notes \context GrandStaff < 
+\score{ 
+       \context GrandStaff \notes < 
                \addlyrics
-               \context Staff=staffA <
-                       \beginmatter
+               \context Staff=upper <
+                       \global
                        \clef treble;
                        \property Staff.automaticMelismata = ##t
-                       \context Voice = one \transpose c'' {\stemup \$staff1_voice_1 \bar "|.";} 
-                       \context Voice = two \transpose c'' {\stemdown \$staff1_voice_2 } 
-               >
-               \context LyricVoice \textxx
-               \context Staff=staffB <
-                       \beginmatter
-                       \clef bass;
-               \property Staff.noVoltaBraces = ##t
-                       \context Voice = three {\stemup \$staff2_voice_1 \bar "|."; } 
-                       \context Voice = four {\stemdown \$staff2_voice_2 } 
-               >
-       >
-
-handLyrics = \notes \context GrandStaff < 
-               \context Staff=staffA <
-                       \beginmatter
-                        \transpose c'' {\voiceone \$staff1_voice_1 \bar "|.";} 
-                        \transpose c'' {\voicetwo \$staff1_voice_2 } 
+                       \context Voice = one \transpose c'' {
+                               \stemup
+                               \$staff1_voice_1
+                               \bar "|.";
+                       } 
+                       \context Voice = two \transpose c'' {
+                               \stemdown
+                               \$staff1_voice_2
+                       }
                >
-               \nonRepeatText
-               \context Staff=staffB <
-                       \beginmatter
+               \context LyricVoice \text
+               \context Staff=lower <
+                       \global
                        \clef bass;
-
-                       \property Staff.noVoltaBraces = "1"
-                       {\voiceone \$staff2_voice_1 \bar "|."; } 
-                       {\voicetwo \$staff2_voice_2 } 
+                       \property Staff.noVoltaBraces = ##t
+                       \context Voice = three {
+                               \stemup
+                               \$staff2_voice_1
+                       } 
+                       \context Voice = four {
+                               \stemdown
+                               \$staff2_voice_2
+                       } 
                >
        >
-
-
-\include "paper16.ly";
-
-\score{ 
-       \automaticLyrics
        \paper{
                \paper_sixteen
                textheight = 230.\mm;
@@ -168,15 +175,28 @@ handLyrics = \notes \context GrandStaff <
                }
                \translator {
                        \LyricsContext
+                       \consists "Span_bar_engraver";
+                       % Urg
+                       % 'Whose broad' still runs into the :| span-bar
+                       %\consists "Span_bar_engraver";
+
+                       % Urg
+                       % Moet iemand kunnen begrijpen hoe die visibilities
+                       % werken?
+                       %% #'Span_bar_engraver-visibility = #all-invisible
+                       "Span_bar_engraver-visibility" = #all-invisible
+                       "Bar_engraver-visibility" = #all-invisible
+                       "Span_bar::visibility-lambda" = #all-invisible
                }
                \translator {
                        \LyricsVoiceContext
                        \consists "Bar_engraver";
-                       
+                       "Bar_engraver-visibility" = #all-invisible
+                       "Bar::visibility-lambda" = #all-invisible
                }
        }
-       \midi {}
+       \midi {
+               \tempo 4 = 60;
+       }
 }
 
-
-\version "1.3.42";
index e9606a07ac8e2c6214a021566d4793987e74150c..37a6ee138db131b168b2009a3ae60761f38d8115 100644 (file)
@@ -22,7 +22,7 @@
       \StaffGroupContext
         \consists "Instrument_name_engraver";
         marginScriptPadding = #10  % urg: this is in PT
-       instrument = #" \n \n \n \n \n \n \n \n \n \nPiano\n(For rehearsal only)"
+       instrument = #"Piano in het midden"
       }
   }
 }
index 5ff097f6f9c5d9774d3c719ce5261c5757f84df7..970031c1ba8c43c8b4b75dc0f02c5c10bc7983c7 100644 (file)
@@ -62,5 +62,6 @@ c\longa*1/4 c\breve*1/2 c1 c2 c4 c8
                        \time 12/8; a1. |
                        \time 12/4;
                        r1. r2. r4. r8. r16. r32. r64. r64. |
+                       c2\sustaindown c\sustainup |
                }
 }
diff --git a/input/test/pedal.ly b/input/test/pedal.ly
new file mode 100644 (file)
index 0000000..40410a3
--- /dev/null
@@ -0,0 +1,14 @@
+\score{
+\context Staff \notes\relative c'{
+c\sustaindown d e f\sustainup g\sustaindown b c
+c,\sustainup\sustaindown d e f \sustainup g\sustaindown b c
+\property Staff.stopStartSustain = #"-P"
+\property Staff.startSustain = #"P"
+c,\sustainup\sustaindown d e f \sustainup g\sustaindown b c
+}
+\paper{
+}
+\midi{
+\tempo 4 = 60;
+}
+}
index 7b94bb1771c87693b3f4909f283afaa94afb16c0..27e3342e51e7ecd34de67b75593a881206ad6083 100644 (file)
@@ -13,6 +13,7 @@
 #include "molecule.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
+#include "staff-symbol-referencer.hh"
 
 
 /*
@@ -296,5 +297,11 @@ Chord_name::do_brew_molecule () const
     mol.add_at_edge (X_AXIS, RIGHT, name.inversion_mol, 0);
   if (!name.bass_mol.empty_b ())
     mol.add_at_edge (X_AXIS, RIGHT, name.bass_mol, 0);
+
+  s = get_elt_property ("word-space");
+  if (gh_number_p (s))
+    mol.dim_.interval_a_[X_AXIS][RIGHT] += gh_scm2double (s)
+      * staff_symbol_referencer (this).staff_space ();
+
   return mol;
 }
index 9c01181055731e33127fb646eba17dba752d9871..ef13d9f0216daa7d719c24326e7380b71b0fc913 100644 (file)
@@ -79,7 +79,8 @@ public:
 class Audio_piano_pedal : public Audio_item
 {
 public:
-  bool type_b_;
+  String type_str_;
+  Direction dir_;
 };
 
 class Audio_text : public Audio_item
index 2435085d57cc27e1fae565d887f84c5c6a9743e8..bb34f17efe4692791d876b907e5c95def2ee2a74 100644 (file)
 
 #include "item.hh"
 
+/*
+  Why don't I have a 
+  VIRTUAL_COPY_CONS (Score_element);
+  see also note-head, rest.
+  ?
+*/
 
 class Rhythmic_head : public Item
 {
index 1f75b5d39be343abb967de051c805834056c70cc..23692d60d74c93cc9041d9c20594094494ad5cf6 100644 (file)
@@ -25,7 +25,6 @@
 #include <stdio.h>
 #include <ctype.h>
 
-#include "notename-table.hh"
 #include "lily-guile.hh"
 #include "string.hh"
 #include "string-convert.hh"
index 8be036fa7805a66e99fe1f24b4a1fea3f09c343f..166af27043c12223fa57c58a0d667fe424853e7a 100644 (file)
@@ -365,11 +365,11 @@ Lookup::accordion (SCM s, Real staff_space) const
 
   if (sym == "Discant")
     {
-      Molecule r = afm_find("scripts-accDiscant");
+      Molecule r = afm_find("accordion-accDiscant");
       m.add_molecule(r);
       if (reg.left_str(1) == "F")
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(staff_space * 2.5 PT, Y_AXIS);
          m.add_molecule(d);
          reg = reg.right_str(reg.length_i()-1);
@@ -397,27 +397,27 @@ Lookup::accordion (SCM s, Real staff_space) const
        }
       if (eflag & 0x02)
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(staff_space * 1.5 PT, Y_AXIS);
          m.add_molecule(d);
        }
       if (eflag & 0x04)
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(staff_space * 1.5 PT, Y_AXIS);
          d.translate_axis(0.8 * staff_space PT, X_AXIS);
          m.add_molecule(d);
        }
       if (eflag & 0x01)
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(staff_space * 1.5 PT, Y_AXIS);
          d.translate_axis(-0.8 * staff_space PT, X_AXIS);
          m.add_molecule(d);
        }
       if (reg.left_str(2) == "SS")
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(0.5 * staff_space PT, Y_AXIS);
          d.translate_axis(0.4 * staff_space PT, X_AXIS);
          m.add_molecule(d);
@@ -427,7 +427,7 @@ Lookup::accordion (SCM s, Real staff_space) const
        }
       if (reg.left_str(1) == "S")
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(0.5 * staff_space PT, Y_AXIS);
          m.add_molecule(d);
          reg = reg.right_str(reg.length_i()-1);
@@ -435,29 +435,29 @@ Lookup::accordion (SCM s, Real staff_space) const
     }
   else if (sym == "Freebase")
     {
-      Molecule r = afm_find("scripts-accFreebase");
+      Molecule r = afm_find("accordion-accFreebase");
       m.add_molecule(r);
       if (reg.left_str(1) == "F")
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(staff_space * 1.5 PT, Y_AXIS);
          m.add_molecule(d);
          reg = reg.right_str(reg.length_i()-1);
        }
       if (reg == "E")
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(staff_space * 0.5 PT, Y_AXIS);
          m.add_molecule(d);
        }
     }
   else if (sym == "Bayanbase")
     {
-      Molecule r = afm_find("scripts-accBayanbase");
+      Molecule r = afm_find("accordion-accBayanbase");
       m.add_molecule(r);
       if (reg.left_str(1) == "T")
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(staff_space * 2.5 PT, Y_AXIS);
          m.add_molecule(d);
          reg = reg.right_str(reg.length_i()-1);
@@ -465,14 +465,14 @@ Lookup::accordion (SCM s, Real staff_space) const
       /* include 4' reed just for completeness. You don't want to use this. */
       if (reg.left_str(1) == "F")
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(staff_space * 1.5 PT, Y_AXIS);
          m.add_molecule(d);
          reg = reg.right_str(reg.length_i()-1);
        }
       if (reg.left_str(2) == "EE")
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(staff_space * 0.5 PT, Y_AXIS);
          d.translate_axis(0.4 * staff_space PT, X_AXIS);
          m.add_molecule(d);
@@ -482,7 +482,7 @@ Lookup::accordion (SCM s, Real staff_space) const
        }
       if (reg.left_str(1) == "E")
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(staff_space * 0.5 PT, Y_AXIS);
          m.add_molecule(d);
          reg = reg.right_str(reg.length_i()-1);
@@ -490,25 +490,25 @@ Lookup::accordion (SCM s, Real staff_space) const
     }
   else if (sym == "Stdbase")
     {
-      Molecule r = afm_find("scripts-accStdbase");
+      Molecule r = afm_find("accordion-accStdbase");
       m.add_molecule(r);
       if (reg.left_str(1) == "T")
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(staff_space * 3.5 PT, Y_AXIS);
          m.add_molecule(d);
          reg = reg.right_str(reg.length_i()-1);
        }
       if (reg.left_str(1) == "F")
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(staff_space * 2.5 PT, Y_AXIS);
          m.add_molecule(d);
          reg = reg.right_str(reg.length_i()-1);
        }
       if (reg.left_str(1) == "M")
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(staff_space * 2 PT, Y_AXIS);
          d.translate_axis(staff_space PT, X_AXIS);
          m.add_molecule(d);
@@ -516,14 +516,14 @@ Lookup::accordion (SCM s, Real staff_space) const
        }
       if (reg.left_str(1) == "E")
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(staff_space * 1.5 PT, Y_AXIS);
          m.add_molecule(d);
          reg = reg.right_str(reg.length_i()-1);
        }
       if (reg.left_str(1) == "S")
        {
-         Molecule d = afm_find("scripts-accDot");
+         Molecule d = afm_find("accordion-accDot");
          d.translate_axis(staff_space * 0.5 PT, Y_AXIS);
          m.add_molecule(d);
          reg = reg.right_str(reg.length_i()-1);
@@ -533,22 +533,22 @@ Lookup::accordion (SCM s, Real staff_space) const
      for the rectangle */
   else if (sym == "SB")
     {
-      Molecule r = afm_find("scripts-accSB");
+      Molecule r = afm_find("accordion-accSB");
       m.add_molecule(r);
     }
   else if (sym == "BB")
     {
-      Molecule r = afm_find("scripts-accBB");
+      Molecule r = afm_find("accordion-accBB");
       m.add_molecule(r);
     }
   else if (sym == "OldEE")
     {
-      Molecule r = afm_find("scripts-accOldEE");
+      Molecule r = afm_find("accordion-accOldEE");
       m.add_molecule(r);
     }
   else if (sym == "OldEES")
     {
-      Molecule r = afm_find("scripts-accOldEES");
+      Molecule r = afm_find("accordion-accOldEES");
       m.add_molecule(r);
     }
   return m;  
index 683269212963467181b66a7acc333b56cc307b29..7afd3d69e2450be871c17da9a43787abd0fa7825 100644 (file)
@@ -502,8 +502,14 @@ Midi_piano_pedal::str () const
   Byte status_byte = (char) (0xB0 + channel_i_);
   String str = to_str ((char)status_byte);
 
-  str += to_str ((char)0x40);
-  int pedal = audio_l_->type_b_ ? 0x7f : 0;
+  if (audio_l_->type_str_ == "Sostenuto")
+    str += to_str ((char)0x42);
+  else if (audio_l_->type_str_ == "Sustain")
+    str += to_str ((char)0x40);
+  else if (audio_l_->type_str_ == "UnaChorda")
+    str += to_str ((char)0x43);
+
+  int pedal = ((1 - audio_l_->dir_) / 2 ) * 0x7f;
   str += to_str ((char)pedal);
   return str;
 }
diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc
new file mode 100644 (file)
index 0000000..0a7bf17
--- /dev/null
@@ -0,0 +1,288 @@
+/*   
+  piano-pedal-engraver.cc --  implement Piano_pedal_engraver
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2000 Jan Nieuwenhuizen <janneke@gnu.org>
+ */
+
+#include "engraver.hh"
+#include "musical-request.hh"
+#include "score-element.hh"
+#include "item.hh"
+#include "lookup.hh"
+#include "lily-guile.hh"
+#include "note-head.hh"
+#include "stem.hh"
+#include "side-position-interface.hh"
+#include "staff-symbol-referencer.hh"
+#include "dictionary.hh"
+#include "dictionary-iter.hh"
+#include "text-item.hh"
+
+/*
+  Urg.
+  This is almost text
+  Problem is:
+    * we have no kerning
+    * symbols are at wrong place in font
+*/
+
+class Sustain_pedal : public Item
+{
+public:
+  VIRTUAL_COPY_CONS (Score_element);
+
+protected:
+  virtual Molecule do_brew_molecule () const;
+  virtual void after_line_breaking ();
+};
+
+void
+Sustain_pedal::after_line_breaking ()
+{
+  Side_position_interface i (this);
+  Direction d =  i.get_direction ();
+  i.set_direction (d);
+}
+
+Molecule
+Sustain_pedal::do_brew_molecule () const
+{
+  Molecule mol;
+  SCM glyph = get_elt_property ("glyph");
+  if (glyph == SCM_UNDEFINED)
+    return mol;
+  String text = ly_scm2string (glyph);
+
+  for (int i = 0; i < text.length_i (); i++)
+    {
+      // leuke koor dump door tiepo, snapnie helemaal:
+      //String idx = ("pedal-") + text[i];
+      // urg, Byte* ??
+      // braak: waarom vindt String het zo moeilijk om
+      // String + char te doen?
+      //String idx = "pedal-" + String (&text.byte_C ()[i], 1);
+      String idx = String ("pedal-") + String (&text.byte_C ()[i], 1);
+      Molecule m = lookup_l ()->afm_find (idx);
+      if (m.empty_b ())
+       continue;
+      Real kern = 0;
+      if (i)
+       {
+         SCM s = scm_eval (gh_list (ly_symbol2scm ("pedal-kerning"),
+                                    ly_str02scm (String (&text.byte_C ()[i - 1], 1).ch_C ()),
+                                    ly_str02scm (String (&text.byte_C ()[i], 1).ch_C ()),
+                                    SCM_UNDEFINED));
+         if (gh_number_p (s))
+           {
+             Staff_symbol_referencer_interface st (this);
+             Real staff_space = st.staff_space ();
+             kern = gh_scm2double (s) * staff_space;
+           }
+       }
+      mol.add_at_edge (X_AXIS, RIGHT, m, kern);
+    }
+    
+  return mol;
+}
+
+
+
+/*
+   TODO:
+     * it would be real cool if an engraver could be initialised with a
+       string, ie:
+
+          Piano_pedal_engraver::"sostenuto"
+          Piano_pedal_engraver::"sustain"
+          Piano_pedal_engraver::"una-chorda"
+ */
+
+/**
+   engrave Piano pedals
+ */
+class Piano_pedal_engraver : public Engraver
+{
+  struct Pedal_info
+  {
+    Span_req* start_req_l_;
+    Drul_array<Span_req*> req_l_drul_;
+    Item* item_p_;
+  };
+
+public:
+  VIRTUAL_COPY_CONS (Translator);
+  Piano_pedal_engraver ();
+
+protected:
+  virtual bool do_try_music (Music*);
+  virtual void do_process_music ();
+  virtual void do_pre_move_processing ();
+  virtual void do_post_move_processing ();
+  virtual void acknowledge_element (Score_element_info);
+
+private:
+  Dictionary<Pedal_info> info_dict_;
+};
+
+ADD_THIS_TRANSLATOR (Piano_pedal_engraver);
+
+Piano_pedal_engraver::Piano_pedal_engraver ()
+{
+  (void)info_dict_["Sostenuto"];
+  (void)info_dict_["Sustain"];
+  (void)info_dict_["UnaChorda"];
+  for (Dictionary_iter <Pedal_info> i (info_dict_); i.ok (); i++)
+    {
+      Pedal_info& p = i.val_ref ();
+      p.item_p_ = 0;
+      p.req_l_drul_[START] = 0;
+      p.req_l_drul_[STOP] = 0;
+      p.start_req_l_ = 0;
+    }
+}
+
+/*
+  Urg: Code dup
+  I'm a script
+ */
+void
+Piano_pedal_engraver::acknowledge_element (Score_element_info info)
+{
+  for (Dictionary_iter <Pedal_info> i (info_dict_); i.ok (); i++)
+    {
+      Pedal_info& p = i.val_ref ();
+      if (p.item_p_)
+       {
+         if (Note_head* n = dynamic_cast<Note_head*> (info.elem_l_))
+           {
+             Side_position_interface st (p.item_p_);
+             st.add_support (n);
+             if (st.get_axis( ) == X_AXIS
+                 && !p.item_p_->parent_l (Y_AXIS))
+               p.item_p_->set_parent (n, Y_AXIS);
+           }
+         if (Stem* s = dynamic_cast<Stem*> (info.elem_l_))
+           {
+             Side_position_interface st (p.item_p_);
+             st.add_support (s);
+           }
+       }
+    }
+}
+
+bool
+Piano_pedal_engraver::do_try_music (Music *m)
+{
+  for (Dictionary_iter <Pedal_info> i (info_dict_); i.ok (); i++)
+    {
+      Pedal_info& p = i.val_ref ();
+      if (Span_req * s = dynamic_cast<Span_req*>(m))
+       {
+         if (s->span_type_str_ == i.key ())
+           {
+             p.req_l_drul_[s->span_dir_] = s;
+             return true;
+           }
+       }
+    }
+  return false;
+}
+
+void
+Piano_pedal_engraver::do_process_music ()
+{
+  for (Dictionary_iter <Pedal_info> i (info_dict_); i.ok (); i++)
+    {
+      Pedal_info& p = i.val_ref ();
+      SCM s = SCM_UNDEFINED;
+      if (p.req_l_drul_[STOP] && p.req_l_drul_[START])
+       {
+         if (!p.start_req_l_)
+           {
+             p.req_l_drul_[STOP]->warning (_f ("can't find start of piano pedal: %s", i.key ()));
+           }
+         else
+           {
+             s = get_property ("stopStart" + i.key ());
+           }
+         p.start_req_l_ = p.req_l_drul_[START];
+       }
+      else if (p.req_l_drul_[STOP])
+       {
+         if (!p.start_req_l_)
+           {
+             p.req_l_drul_[STOP]->warning (_f ("can't find start of piano pedal: %s", i.key ()));
+           }
+         else
+           {
+             s = get_property ("stop" + i.key ());
+           }
+         p.start_req_l_ = 0;
+       }
+      else if (p.req_l_drul_[START])
+       {
+         p.start_req_l_ = p.req_l_drul_[START];
+         s = get_property ("start" + i.key ());
+       }
+
+      if (s != SCM_UNDEFINED)
+       {
+         if (i.key () == "Sustain")
+           {
+             p.item_p_ = new Sustain_pedal;
+             p.item_p_->set_elt_property ("glyph", s);
+           }
+         else
+           {
+             p.item_p_ = new Text_item;
+             p.item_p_->set_elt_property ("text", s);
+             // guh
+             p.item_p_->set_elt_property ("style", ly_str02scm ("italic"));
+           }
+
+         Side_position_interface si (p.item_p_);
+         si.set_axis (Y_AXIS);
+
+         /* Hmm,
+            If set to empty, it can't be centred
+            Howto centre non-fat text?
+            p.item_p_->set_empty (X_AXIS);
+         */
+         p.item_p_->set_elt_property ("self-alignment-X", gh_int2scm (0));
+         p.item_p_->add_offset_callback (Side_position_interface::aligned_on_self, X_AXIS);
+         p.item_p_->add_offset_callback (Side_position_interface::centered_on_parent, X_AXIS);
+         announce_element (Score_element_info (p.item_p_,
+                                               p.req_l_drul_[START]
+                                               ? p.req_l_drul_[START]
+                                               : p.req_l_drul_[STOP]));
+       }
+    }
+}
+
+void
+Piano_pedal_engraver::do_pre_move_processing ()
+{
+  for (Dictionary_iter <Pedal_info> i (info_dict_); i.ok (); i++)
+    {
+      Pedal_info& p = i.val_ref ();
+      if (p.item_p_)
+       {
+         side_position (p.item_p_).add_staff_support ();
+         typeset_element (p.item_p_);
+       }
+      p.item_p_ = 0;
+    }
+}
+
+void
+Piano_pedal_engraver::do_post_move_processing ()
+{
+  for (Dictionary_iter <Pedal_info> i (info_dict_); i.ok (); i++)
+    {
+      Pedal_info& p = i.val_ref ();
+      p.req_l_drul_[STOP] = 0;
+      p.req_l_drul_[START] = 0;
+    }
+}
index f5cfd9089587c05076fb5a470062cffd504faa9f..01dfab892ff7260916df6196c1002f2f2ef11b74 100644 (file)
@@ -1,5 +1,5 @@
 /*
- piano-pedal-performer.cc -- implement Piano_pedal_performer
 piano-pedal-performer.cc -- implement Piano_pedal_performer
 
   source file of the GNU LilyPond music typesetter
 
 #include "command-request.hh"
 #include "musical-request.hh"
 #include "audio-item.hh"
-
-
-/*
-  TODO:
-    sostenuto
-    una-chorda ?
- */
+#include "dictionary.hh"
+#include "dictionary-iter.hh"
 
 /**
    perform Piano pedals
  */
 class Piano_pedal_performer : public Performer
 {
+  struct Pedal_info
+  {
+    Span_req* start_req_l_;
+    Drul_array<Span_req*> req_l_drul_;
+  };
+
 public:
   VIRTUAL_COPY_CONS (Translator);
   
@@ -36,43 +37,55 @@ protected:
 
 private:
   Link_array<Audio_piano_pedal> audio_p_arr_;
-  Span_req* span_start_req_l_;
-  Drul_array<Span_req*> span_req_l_drul_;
+  Dictionary<Pedal_info> info_dict_;
 };
 
 ADD_THIS_TRANSLATOR (Piano_pedal_performer);
 
 Piano_pedal_performer::Piano_pedal_performer ()
 {
-  span_req_l_drul_[START] = 0;
-  span_req_l_drul_[STOP] = 0;
-  span_start_req_l_ = 0;
+  (void)info_dict_["Sostenuto"];
+  (void)info_dict_["Sustain"];
+  (void)info_dict_["UnaChorda"];
+  for (Dictionary_iter <Pedal_info> i (info_dict_); i.ok (); i++)
+    {
+      Pedal_info& p = i.val_ref ();
+      p.req_l_drul_[START] = 0;
+      p.req_l_drul_[STOP] = 0;
+      p.start_req_l_ = 0;
+    }
 }
 
 void
 Piano_pedal_performer::do_process_music ()
 {
-  if (span_req_l_drul_[STOP])
+  for (Dictionary_iter <Pedal_info> i (info_dict_); i.ok (); i++)
     {
-      if (!span_start_req_l_)
+      Pedal_info& p = i.val_ref ();
+      if (p.req_l_drul_[STOP])
        {
-         span_req_l_drul_[STOP]->warning (_ ("can't find start of piano_pedal"));
+         if (!p.start_req_l_)
+           {
+             p.req_l_drul_[STOP]->warning (_f ("can't find start of piano pedal: %s", i.key ()));
+           }
+         else
+           {
+             Audio_piano_pedal* a = new Audio_piano_pedal;
+             a->type_str_ = i.key ();
+             a->dir_ = STOP;
+             audio_p_arr_.push (a);
+           }
+         p.start_req_l_ = 0;
        }
-      else
+
+      if (p.req_l_drul_[START])
        {
-         Audio_piano_pedal* p = new Audio_piano_pedal;
-         p->type_b_ = false;
-         audio_p_arr_.push (p);
+         p.start_req_l_ = p.req_l_drul_[START];
+         Audio_piano_pedal* a = new Audio_piano_pedal;
+         a->type_str_ = i.key ();
+         a->dir_ = START;
+         audio_p_arr_.push (a);
        }
-      span_start_req_l_ = 0;
-    }
-
-  if (span_req_l_drul_[START])
-    {
-      span_start_req_l_ = span_req_l_drul_[START];
-      Audio_piano_pedal* p = new Audio_piano_pedal;
-      p->type_b_ = true;
-      audio_p_arr_.push (p);
     }
 }
 
@@ -87,19 +100,27 @@ Piano_pedal_performer::do_pre_move_processing ()
 void
 Piano_pedal_performer::do_post_move_processing ()
 {
-  span_req_l_drul_[STOP] = 0;
-  span_req_l_drul_[START] = 0;
+  for (Dictionary_iter <Pedal_info> i (info_dict_); i.ok (); i++)
+    {
+      Pedal_info& p = i.val_ref ();
+      p.req_l_drul_[STOP] = 0;
+      p.req_l_drul_[START] = 0;
+    }
 }
 
 bool
 Piano_pedal_performer::do_try_music (Music* r)
 {
-  if (Span_req * s = dynamic_cast<Span_req*>(r))
+  for (Dictionary_iter <Pedal_info> i (info_dict_); i.ok (); i++)
     {
-      if (s-> span_type_str_ == "sustain")
+      Pedal_info& p = i.val_ref ();
+      if (Span_req * s = dynamic_cast<Span_req*>(r))
        {
-         span_req_l_drul_[s->span_dir_] = s;
-         return true;
+         if (s->span_type_str_ == i.key ())
+           {
+             p.req_l_drul_[s->span_dir_] = s;
+             return true;
+           }
        }
     }
   return false;
index ea0c6f2475aa8efc99a036004c48c2d6c9f313dd..0b0845e143987eceb45a9f2efcd535d386fc06b0 100644 (file)
@@ -12,6 +12,7 @@
 #include "molecule.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
+#include "staff-symbol-referencer.hh"
 
 Molecule 
 Text_item::do_brew_molecule () const
@@ -20,8 +21,15 @@ Text_item::do_brew_molecule () const
   String st = gh_string_p (style) ?  ly_scm2string (style) : "";
   SCM txt = get_elt_property ("text");
   String t = gh_string_p (txt) ? ly_scm2string (txt) : "";
-  
-  return paper_l ()->lookup_l(0)->text (st, t, paper_l ());
+
+  Molecule mol = paper_l ()->lookup_l(0)->text (st, t, paper_l ());
+
+  SCM s = get_elt_property ("word-space");
+  if (gh_number_p (s))
+    mol.dim_.interval_a_[X_AXIS][RIGHT] += gh_scm2double (s)
+      * staff_symbol_referencer (this).staff_space ();
+  return mol; 
 }
 
 
index 68a8c9df2e149cb79699642d9dd072455e1acf9e..e32f472d022f98dd87178ba9525a1428b300b73b 100644 (file)
@@ -144,6 +144,13 @@ VoiceContext = \translator {
        \consists "Melisma_engraver";
        textScriptPadding = #3.0
        \consists "Text_engraver";
+
+       startSustain = #"Ped."
+       stopSustain = #"*"
+       stopStartSustain = #"*Ped."
+       startUnaChorda = #"una chorda"
+       stopUnaChorda = #"tre chorde"
+       \consists "Piano_pedal_engraver";
        \consists "Script_engraver";
        \consists "Script_column_engraver";
        \consists "Rhythmic_column_engraver";
@@ -290,6 +297,8 @@ ChordNameContext = \translator {
        \type "Engraver_group_engraver";
        \name ChordNames;
 
+       Generic_property_list = #generic-chord-staff-properties
+       \consists "Property_engraver";  
        \consists "Output_property_engraver";   
        \accepts "ChordNameVoice";
        \consistsend "Axis_group_engraver";
index ba9049182142c7328c5c47ad7e7e62c1d6d3b222..8af8a2e57df47f07a3fba56f31b6eb92ff92028e 100644 (file)
@@ -24,8 +24,14 @@ cresc = \spanrequest \start "crescendo"
 endcresc = \spanrequest \stop "crescendo"
 
 % better name sustainstart/stop? 
-sustaindown = \spanrequest \start "sustain"
-sustainup = \spanrequest \stop "sustain"
+sustaindown = \spanrequest \start "Sustain"
+sustainup = \spanrequest \stop "Sustain"
+
+unachorda = \spanrequest \start "UnaChorda"
+trechorde = \spanrequest \stop "UnaChorda"
+
+sostenutodown = \spanrequest \start "Sostenuto"
+sostenutoup = \spanrequest \stop "Sostenuto"
 
 %crescpoco = \property Voice.crescendoText = "cresc. poco a poco"
 %decresc = \property Voice.crescendoText = "decr."
index 4549535290795d1fd6bab790c163ef4f80ecec19..2cbdcded23de56ab6df7ce43f2d9fba1b84cabab 100644 (file)
@@ -3,14 +3,18 @@
 depth = ..
 
 STEPMAKE_TEMPLATES=metafont metapost asciifont install install-out
+include $(depth)/make/stepmake.make 
 
 AF_FILES = $(wildcard *.af) 
 
 EXTRA_DIST_FILES += README feta.tex
 
-FET_FILES = $(wildcard feta[0-9]*.mf)
-FONT_FILES = $(wildcard feta*[0-9].mf)
-XPM_FONTS = feta20
+# don't try to make fonts from test files
+TEST_FILES = $(wildcard *test*.mf)
+FET_FILES = $(filter-out $(TEST_FILES),$(wildcard feta[0-9]*.mf))
+FONT_FILES = $(filter-out $(TEST_FILES),$(wildcard feta*[0-9].mf))
+
+XPM_FONTS = feta20 feta-nummer10 feta-braces20
 
 LOG_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.log))
 TEXTABLES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.tex))
@@ -18,6 +22,11 @@ AFM_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.afm) $(AF_FILES:.af=.afm))
 TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm))
 PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa)) 
 
+foo:
+       @echo fof: $(FONT_FILES)
+       @echo fef: $(FET_FILES)
+       @echo tfm: $(TFM_FILES)
+
 # Make tfm files first, log files last, 
 # so that normally log files aren't made twice
 ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(AFM_FILES) $(TFM_FILES) $(PFA_FILES) $(LOG_FILES)
@@ -42,9 +51,7 @@ INSTALLATION_OUT_FILES3=$(TFM_FILES)
 INSTALLATION_OUT_DIR4=$(datadir)/pfa
 INSTALLATION_OUT_FILES4=$(PFA_FILES)
 
-
 export MFINPUTS:=.:$(MFINPUTS)
-include $(depth)/make/stepmake.make 
 
 default: $(ALL_GEN_FILES)
 
index e08c90bf009866e07955d68c4a2f6ff9b38ae674..c06618dc37341594f15c05b153ba85a569c21450 100644 (file)
@@ -1,5 +1,7 @@
 % -*- Fundamental -*-
 
+fet_begingroup("accordion")
+
 accreg_dot_size# := .5staff_space#;
 accreg_linethickness# := 1.3stafflinethickness#;
 
@@ -150,16 +152,28 @@ def def_some_vars =
 enddef;
 
 def print_penpos (suffix $)=
-       message str $ &": ("&decimal x.$.l&", "&decimal y.$.l&"); ("&decimal x.$.r&", "&decimal y.$.r&");";
+       message "z"&str $ &"l = ("&decimal x.$.l&", "&decimal y.$.l&"); z"&str $ &"r = ("&decimal x.$.r&", "&decimal y.$.r&");";
 enddef;
 
+%fet_beginchar("accTEST", "accTEST", "accTEST")
+%      set_char_box(.4staffsize#, .4staffsize#, 0, 2.4staff_space#);
+%      def_some_vars;
+%      penlabels(10, 11, 12, 13, 14);
+%      penstroke z10e--z11e{right}..z12e..z13e{left}--z14e;
+%fet_endchar;
+
 fet_beginchar("accSB", "accSB", "accSB")
        set_char_box(.4staffsize#, .4staffsize#, 0, 2.4staff_space#);
        def_some_vars;
        def_B(.35width, .7height);
 
-       penstroke z10e--z11e{right}..z12e..z13e{left}--z14e;
+       %print_penpos (10);
+       %print_penpos (11);
+       %print_penpos (12);
+       %print_penpos (13);
+       %print_penpos (14);
        penlabels(10, 11, 12, 13, 14);
+       penstroke z10e--z11e{right}..z12e..z13e{left}--z14e;
 
        penstroke z13e{right}..z15e{up}..z16e{left}--z17e;
        penstroke z18e--z19e;
@@ -283,3 +297,5 @@ fet_beginchar("accOldEES", "accOldEES", "accOldEES")
        currentpicture := currentpicture shifted (-w/2, -shy*h);
        currentpicture := currentpicture shifted (0, r);
 fet_endchar;
+
+fet_endgroup("accordion")
index 94c8c67611edbb8778ccb66c8025d0e5edb1d821..4d01e53bf7c427fb2ebce86c8aab89247432ab6b 100644 (file)
@@ -22,8 +22,7 @@ make_pen_stack;
 make_picture_stack;
 input feta-params;
 
-
-
+font_x_height  staff_space#;
 
 if test = 0: 
        input feta-eindelijk;
@@ -34,13 +33,17 @@ if test = 0:
        input feta-banier;
        input feta-klef;
        input feta-timesig;
+       input feta-pendaal;
+       input feta-accordion;
 else:
 %      input feta-bolletjes;   
 %      input feta-banier;
 %      input feta-eindelijk;
 %      input feta-klef;
 %      input feta-toevallig;
-       input feta-schrift;
+%      input feta-schrift;
 %      input feta-haak;
 %      input feta-timesig;
+       input feta-pendaal;
+%      input feta-accordion;
 fi
index 47e415c70da45a5b36dfeb607bd5b35305389a80..814c82a16dbc77649a3197b3903c33285a72fc17 100644 (file)
@@ -214,7 +214,11 @@ def draw_bulb(expr turndir, zl, zr, bulb_rad, radius_factor)=
        save rad, ang;
 
        ang = angle(zr-zl);
-       z0 = zr + bulb_rad * (zl-zr)/length(zr -zl);
+
+       % don't get near infinity
+       %z0 = zr + bulb_rad * (zl-zr)/length(zr -zl);
+       z0 = zr + bulb_rad /length(zr -zl) * (zl-zr);
+
        rad =  bulb_rad;
 
        z1 = z0 + radius_factor* rad * dir(ang + turndir* 100);
index cdd56736c3843e1304e2214fe34375547fd196e1..c171f9b42d624a1890c9ee68635fd2722eb0dad8 100644 (file)
@@ -5,14 +5,16 @@ test:=0;
 
 input feta-autometric;
 input feta-macros;
+input feta-params;
 
-blot_diameter# = .4pt#;
+%blot_diameter# = .4pt#;
 
 fet_beginfont("feta-nummer", size);
 mode_setup;
 
 height#:=designsize;
 
+font_x_height height#;
 
 save b,h; 4h+b=1.15; 10h+b=1;
 fatten:=designsize*h+b;
index b66cc177a57ba098ebbd0644685fd76c306e28c7..a7664589eff43aa50624e68165de664fdb0a8085 100644 (file)
@@ -6,7 +6,7 @@
 % 
 % (c) 1997--2000 Jan Nieuwenhuizen <janneke@gnu.org>
 
-fet_begingroup("nummer")
+fet_begingroup("number")
 
 define_pixels(height,thick,thick,thin,hair,flare);
 define_pixels(foot_top,foot_width);
@@ -85,7 +85,8 @@ save dot_diam;
 dot_diam# = 7/8flare#;
 define_pixels(dot_diam);
 
-code := 43;
+
+code := 43;  % , = 44 
 
 % urg
 fet_beginchar("Numeral comma", ",", "comma")
@@ -121,7 +122,7 @@ fet_endchar;
 
 % skip slash
 
-code := 47;
+code := 47; % 0 = 48
 
 fet_beginchar("Numeral 0", "0", "zero")
 %      set_char_box(0, 4/5height#*widen, 0, height#);
@@ -416,5 +417,5 @@ fet_beginchar("Numeral 9", "9", "nine")
        currentpicture := currentpicture shifted (w,h);
 fet_endchar;
 
-fet_endgroup("nummer")
+fet_endgroup("number")
 
index 21b365958f6df4ed5ee2c29d1104e92de9bb18cc..702604002ac6788fdc2aedc31968270b15da30d5 100644 (file)
@@ -4,7 +4,7 @@ stafflines = 5;
 staff_space#:=staffsize#/(stafflines-1);
 
 % URG!
-font_x_height  staff_space# ;
+%font_x_height  staff_space# ;
 
 %
 %  [D.K.Roush & J.S.Gourlay] say this should be 0.072
@@ -39,4 +39,10 @@ overdone_heads = 0.0;
 %
 numeric blot_diameter;
 blot_diameter# = .4pt#;
+if (blot_diameter# * hppp) < 1:
+       blot_diameter# := 1/hppp;
+fi
+if (blot_diameter# * vppp) < 1:
+       blot_diameter# := 1/vppp;
+fi
 define_pixels(blot_diameter);
diff --git a/mf/feta-pendaal.mf b/mf/feta-pendaal.mf
new file mode 100644 (file)
index 0000000..2cdbddc
--- /dev/null
@@ -0,0 +1,262 @@
+% feta-pendaal.mf -- piano pedal markings
+%
+% part of LilyPond's pretty-but-neat music font
+%
+% source file of the Feta (not the Font-En-Tja) music font
+% 
+% (c) 2000 Jan Nieuwenhuizen <janneke@gnu.org>
+%
+% Voor Cup
+
+% Kerning
+%
+% Pe = -0.034 pedalh == -0.07 staff-space
+% ed = -0.27 pedalh == -0.53 staff-space
+
+fet_begingroup("pedal")
+
+pedalpha = 40;
+pedbeta = 25;
+
+penh#=0.7stafflinethickness#;
+penw#=4penh#;
+%penw#=penh#;
+define_pixels (penh,penw);
+
+pedalh# = 2staff_space#;
+pedalbh# = 4/7pedalh#;
+define_pixels (pedalh,pedalbh);
+
+% code values for own pedal font commented out
+% code := 41;  % * = 42
+
+def draw_asterisk_bulb (expr w, h, i) =
+       begingroup;
+       clearxy;
+       save bulb, p;
+       path p;
+       bulb = 4/3penw;
+
+       pickup pencircle scaled penh;
+       penpos 1 (bulb, 180);
+       penpos 2 (bulb, 0);
+       penpos 3 (penh, 0);
+       penpos 4 (penw, 0);
+
+       z0 = (1/2w, h - 1/2w);
+       z1 = (1/2w, h-1/2bulb);
+       z2 = z1;
+       z3 = (x1, y1-penw);
+       z4 = (x1, y3-2penh);
+
+       penlabels (1,2,3,4);
+%      penstroke z1e{up}..z2e{down}..z3e{down}..z4e;
+       p = z1l{up}..z2l{down}..z3l{down}..z4l..z4r
+               ..z3r{up}..z2r{up}..z1r{down}..cycle;
+       p := p rotatedaround (z0, 360/8i);
+       fill p;
+       endgroup;
+       enddef;
+
+fet_beginchar("Pedal asterisk", "*", "pedal-asterisk")
+       set_char_box(0, 7/9pedalh#, 0, pedalh#);
+       z0 = (1/2w, h - 1/2w);
+       for i = 0 upto 7:
+               draw_asterisk_bulb (w, h, i);
+               pickup pencircle scaled penw;
+               undraw z0;
+       endfor
+fet_endchar;
+
+% skip + and ,
+
+% code := 44;  % - = 45
+
+fet_beginchar("Pedal dash", "-", "pedal-dash")
+       set_char_box(0, 3penw#, 0, pedalbh#);
+       pickup pencircle scaled penh;
+
+       penpos 1 (penw, 60);
+       penpos 2 (penw, 60);
+       z1l = (0, 2/3h - 1/2penw);
+       z2r = (w, y1l + 1.2penw);
+       penlabels (1,2);
+       penstroke z1e{dir 40}..tension 1.2 ..z2e{dir 40};
+fet_endchar;
+
+fet_beginchar("Pedal dot", ".", "pedal-dot")
+       set_char_box(0, penw#, 0, penw#);
+       pickup pencircle scaled penw;
+       draw (1/2penw,1/2penw);
+fet_endchar;
+
+% code := 79;  % P = 80
+
+fet_beginchar("Pedal P", "P", "pedal-P")
+       set_char_box(0, 5/6pedalh#, 0, pedalh#);
+       pickup pencircle scaled penh;
+
+       penpos 1 (penh, 0);
+       penpos 2 (penw, 55);
+       penpos 3 (penw, pedalpha);
+       penpos 4 (1.2penh, -pedalpha);
+       penpos 5 (penh, -pedalpha);
+       penpos 6 (penh, 180-pedalpha);
+       penpos 7 (2penh, 180-pedalpha);
+       penpos 8 (penh, 90);
+       penpos 9 (4/3penw,50);
+       penpos 10 (1.4penw,50);
+       penpos 11 (penh, 90+pedalpha);
+
+       z1r = (0.6w, h);
+       x2l = x1l - penw;
+       y2 = 0.7h;
+       x3r = x2l + 2penw;
+       y3r = 0.4h;
+       z4l = z5r + 1/4(z3r - z5r);
+       x5 = 1/4w;
+       y5r = 0;
+       z6 = z5;
+       z7 = z6r + 1/3(z8r - z6r);
+       z8r = z5r + 3/5(z3r - z5r);
+       x9l = x10l - penh;
+       y9l = 1/4penh;
+       x10l = w - tand (90-pedalpha)*y11l;
+       y10l = 1/4penh;
+       x11l = w;
+       y11 = 1/5h;
+
+       penlabels (1,2,3,4,5,6,7,8,9,10,11);
+       penstroke z1e..tension 2.5 .. z2e.. tension 1.5 .. z3e ..tension 2.5
+               ..z4e..tension 1.5
+               ..z5e..z6e..tension 1.5
+               ..z7e..tension 1.5
+               ..z8e{right}..tension 1.5
+               ..z9e{dir -pedalpha}
+               ..z10e..tension 2.5..z11e;
+
+       penpos 12 (penh, 0);
+       penpos 13 (penw, -90-pedbeta);
+       penpos 14 (penh, 90);
+       penpos 15 (penw, -90+pedbeta);
+       penpos 16 (penh, 180+pedbeta);
+       z12 = (5/9x1, y2);
+       z13l = (1/2x12r, y15r);
+       z14r = z1r;
+       z15l = (1/2[x16,w], y2l + 0.5penw);
+       x16 = 1/4[x1, w];
+       y16r = y2r;
+
+       penlabels (12,13,14,15,16);
+       penstroke z12e{down}..tension 1.1
+               ..z13e{dir (180-pedbeta)}..tension 1.1
+               ..z14e{right}..tension 1.1
+               ..z15e{dir (180+pedbeta)}..tension 1.1
+               ..z16e{dir (90+pedbeta)};
+fet_endchar;
+
+
+% code := 99;  % d = 100
+
+if 0 = 1:
+
+fet_beginchar("Pedal d", "d", "pedal-d")
+       set_char_box(2/9pedalh#, 4/9pedalh#, 0, 7/8pedalh#);
+       pickup pencircle scaled penh;
+
+       penpos 1 (penh, -70);
+       penpos 2 (3/4penw, 0);
+       penpos 3 (2penh, 90);
+       penpos 4 (penw, 190);
+       penpos 5 (penh, -10-90);
+
+       z1l = (1/2w, pedalbh);
+       z2l = (0, 1/2pedalbh);
+       z3l = (1/2w, 0);
+       z4 = (w - 1/2penw, 1/2pedalbh + penh);
+       x5r = -b;
+       y5l = h;
+
+       penlabels (1,2,3,4,5);
+
+       penstroke z1e{dir (-70-90)}..tension 1.1
+               ..z2e{down}..tension 1.1
+               ..z3e{right}..tension 1.1
+               ..z4e{dir (90+10)}..tension 1.1
+               ..z5e{dir (180-10)};
+fet_endchar;
+
+else:
+
+fet_beginchar("Pedal d", "d", "pedal-d")
+       set_char_box(0, 2/3pedalh#, 0, 7/8pedalh#);
+       pickup pencircle scaled penh;
+
+       penpos 1 (penh, -70);
+       penpos 2 (3/4penw, 0);
+       penpos 3 (2penh, 90);
+       penpos 4 (penw, 190);
+       penpos 5 (penh, -10-90);
+
+       z1l = (2/3w, pedalbh);
+       z2l = (1/3w, 1/2pedalbh);
+       z3l = (x1l, 0);
+       z4 = (w - 1/2penw, 1/2pedalbh + penh);
+       x5r = 0;
+       y5l = h;
+
+       penlabels (1,2,3,4,5);
+
+       penstroke z1e{dir (-70-90)}..tension 1.1
+               ..z2e{down}..tension 1.1
+               ..z3e{right}..tension 1.1
+               ..z4e{dir (90+10)}..tension 1.1
+               ..z5e{dir (180-10)};
+fet_endchar;
+
+fi
+
+fet_beginchar("Pedal e", "e", "pedal-e")
+       set_char_box(0, 2/5pedalh#, 0, pedalbh#);
+       pickup pencircle scaled penh;
+
+       penpos 1 (penh, pedalpha-90);
+       penpos 2 (penh, pedalpha-90);
+       penpos 3 (3/5penw, pedalpha);
+       penpos 4 (1.2penh, 90+pedalpha);
+       penpos 5 (2/3penw, 180);
+       penpos 6 (penw, 180+pedalpha);
+       penpos 7 (2/3penw, -90-20);
+       penpos 8 (penh, pedalpha-90);
+
+       z1l = (0, 1/5pedalh);
+       z2 = z1 + dir pedalpha * penw;
+       z3 = (3/5w, 8/9h);
+
+       z4 = (2/9w,  y3);
+
+       x5r = 0;
+       y5 = y2;
+
+       x6 = 3/8w;
+       y6r = 1/2penh;
+
+       z7l = (x6l+penh, y6l);
+
+       x8r = w;
+       y8 = 1/5pedalh;
+
+       penlabels (1,2,3,4,5,6,7,8);
+       penstroke z1e{dir pedalpha}
+               ..z2e{dir pedalpha}.. tension 1.1
+               %urg
+               ..z3e..tension 1.05
+               ..z4e..tension 1.1
+               ..z5e..tension 1.5
+               ..z6e{dir -pedalpha}..tension 1.1
+               ..z7e.. tension 2.5
+               ..z8e;
+fet_endchar;
+
+fet_endgroup("pedal")
+
index b72653b4adca3bbd42124292c43041f581c4a429..481e378e501d2b81d860d94a778ce696b2eb807e 100644 (file)
@@ -699,7 +699,6 @@ fet_beginchar("Coda", "coda", "coda")
 fet_endchar;
 
 input feta-slag;
-input feta-accordion;
 
 fet_endgroup("scripts");
 
diff --git a/mf/feta-test11.mf b/mf/feta-test11.mf
new file mode 100644 (file)
index 0000000..eaaa862
--- /dev/null
@@ -0,0 +1,21 @@
+% feta-test16
+% part of LilyPond's pretty-but-neat music font
+
+input feta-autometric;
+fet_beginfont("feta-test", 23);
+staffsize#:=23pt#;
+test:=1;
+
+% smoked cheese
+% test := -1;
+
+
+% dem piksels.
+%test := 1;
+
+input feta-generic;
+
+fet_endfont("feta");
+
+end.
+
index 3d2ed3cea24a5753346a70045d28856d0e9be4d3..ce1e04cf856b0ec7a8a1e2f21bf61d1c2a402586 100644 (file)
@@ -2,8 +2,8 @@
 % part of LilyPond's pretty-but-neat music font
 
 input feta-autometric;
-fet_beginfont("feta-test", 16);
-staffsize#:=16pt#;
+fet_beginfont("feta-test", 13);
+staffsize#:=13pt#;
 test:=1;
 
 % smoked cheese
diff --git a/mf/feta-test23.mf b/mf/feta-test23.mf
new file mode 100644 (file)
index 0000000..e4656d6
--- /dev/null
@@ -0,0 +1,22 @@
+% feta-test23
+% part of LilyPond's pretty-but-neat music font
+
+
+input feta-autometric;
+fet_beginfont("feta-test", 23);
+staffsize#:=23pt#;
+test:=1;
+
+% smoked cheese
+% test := -1;
+
+
+% dem piksels.
+%test := 1;
+
+input feta-generic;
+
+fet_endfont("feta");
+
+end.
+
index e51a6ce12a319b519a6cf6c2bdd7d828dd2c0d59..212d63fa4a7bf31af8424b81c6defd99d2263704 100644 (file)
@@ -2,7 +2,7 @@
 % part of LilyPond's pretty-but-neat music font
 
 input feta-autometric;
-fet_beginfont("feta-test", 16);
+fet_beginfont("feta-test", 26);
 staffsize#:=26pt#;
 test:=1;
 
index 554408caffd6325f867686baa9272a921c5e1d73..10df9e75caa80fd18608a4723695ff6c853509b2 100644 (file)
                     (list 'textScriptPadding number? 'padding)
                     (list 'textVerticalAlignment dir? 'self-alignment-Y)
                     (list 'textHorizontalAlignment dir? 'self-alignment-X)
+                    (list 'textScriptWordSpace number? 'word-space)
                     )
        ))
 
+(define generic-sustain-pedal-properties
+  (cons "Sustain_pedal" (list
+                        (list 'textScriptPadding number? 'padding)
+                        (list 'sustainPedalPadding number? 'padding))))
+
+(define generic-chord-name-properties
+  (cons "Chord_name" (list
+                     (list 'textScriptWordSpace number? 'word-space)
+                     (list 'chordNameWordSpace number? 'word-space))))
+
 (define generic-crescendo-properties
   (cons "Crescendo" (list
                     (list 'verticalDirection dir? 'direction)
    generic-slur-properties
    generic-beam-properties
    generic-text-properties
+   generic-sustain-pedal-properties
    generic-note-column-properties
    generic-script-properties
    generic-All-properties
   (list generic-text-properties
   )
 )
+
+(define generic-chord-staff-properties
+  (list generic-chord-name-properties
+  )
+)
index df8e73a6075eb21af0017084f7c8851ffa0e6e59..7e67be562cbd43fd0e72c6ec2928b9e1f0121b25 100644 (file)
@@ -85,6 +85,7 @@
 (define (begin-of-line-visible d) (if (= d 1) '(#f . #f) '(#t . #t)))
 (define (spanbar-begin-of-line-invisible d) (if (= d -1) '(#t . #t) '(#f . #f)))
 (define (all-visible d) '(#f . #f))
+(define (all-invisible d) '(#t . #t))
 (define (begin-of-line-invisible d) (if (= d 1) '(#t . #t) '(#f . #f)))
 (define (end-of-line-invisible d) (if (= d -1) '(#t . #t) '(#f . #f)))
 
index a615f9564f13c9b38b8d4c16a9d3164cb2920d43..c5bdbbeba4b577fae647d11ab15850adfe31ddc6 100644 (file)
        (beta (/ (* pi r-0) (* 2.0 h-inf))))
     (* alpha (atan (* beta b)))))
  
+;; see mf/feta-pendaal.mf
+(define pedal-kerning-alist '())
+(set! pedal-kerning-alist
+      (append 
+      '(
+       (("P" . "e") . -0.07)
+       (("e" . "d") . -0.53)
+       (("*" . "P") . 0.2)
+       )
+      pedal-kerning-alist))
+
+(define (pedal-kerning l r)
+  (let ((entry (assoc (cons l r) pedal-kerning-alist)))
+    (if entry
+       (cdr entry))))
+
index 7beeca41101efd215390e7aba7b5578880e776a7..96af1473119e62441b59c86ec34651393d2ff7a3 100644 (file)
@@ -1,6 +1,5 @@
 
 MF_FILES := $(wildcard *.mf)
-FONT_FILES = $(wildcard *[0-9].mf)
 EXTRA_DIST_FILES += $(MF_FILES)
 MF_TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm))
 MF_DVI_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.dvi))
diff --git a/tex/p.tex b/tex/p.tex
new file mode 100644 (file)
index 0000000..d66fca3
--- /dev/null
+++ b/tex/p.tex
@@ -0,0 +1,39 @@
+% pedal.tex
+
+\hsize = 296mm
+\vsize = 210mm
+
+% fix chord.cc::banter_str before removing these
+\def\fetdef#1#2{%
+  \def#1{\hbox{\char#2}}}
+
+\fetdef\pedalasterisk{101}
+\fetdef\pedaldash{102}
+\fetdef\pedaldot{103}
+\fetdef\pedalP{104}
+\fetdef\pedald{105}
+\fetdef\pedale{106}
+
+%\font\fetatwentysixfontt=feta26 scaled \magstep 4
+%\font\fetatwentysixfontt=feta26 scaled 18842
+\font\fetatwentysixfontt=feta26 scaled 2407
+\magnification \magstep 4
+
+\def\fetafont{\fetatwentysixfontt}
+
+\baselineskip 12mm
+
+\vbox{
+\kern 20mm
+
+\hbox{
+\fetatwentysixfontt
+\hbox { \pedalP\kern-0.06ex\pedale\kern -0.55ex\pedald\pedaldot}
+\kern 50mm
+\pedalasterisk
+}
+}
+
+\end
+
+%\endinput
diff --git a/tex/pedal.tex b/tex/pedal.tex
new file mode 100644 (file)
index 0000000..a4c7616
--- /dev/null
@@ -0,0 +1,62 @@
+% pedal.tex
+
+% fix chord.cc::banter_str before removing these
+\def\fetdef#1#2{%
+  \def#1{\hbox{\char#2}}}
+
+\fetdef\pedalasterisk{101}
+\fetdef\pedaldash{102}
+\fetdef\pedaldot{103}
+\fetdef\pedalP{104}
+\fetdef\pedald{105}
+\fetdef\pedale{106}
+
+
+\font\fetaelevenfont=feta11
+\font\fetathirteenfont=feta13
+\font\fetasixteenfont=feta16
+\font\fetatwentyfont=feta20
+\font\fetatwentythreefont=feta23
+\font\fetatwentysixfont=feta26
+
+\font\fetaelevenfontt=feta11 scaled \magstep 4
+\font\fetathirteenfontt=feta13 scaled \magstep 4
+\font\fetasixteenfontt=feta16 scaled \magstep 4
+\font\fetatwentyfontt=feta20 scaled \magstep 4
+\font\fetatwentythreefontt=feta23 scaled \magstep 4
+\font\fetatwentysixfontt=feta26 scaled \magstep 4
+
+\def\fetafont{\fetasixteenfont}
+
+\def\test{
+\hbox {
+\hbox { \pedalP\kern-0.05ex\pedale\kern -0.6ex\pedald\pedaldot}
+\kern 1ex
+\pedalasterisk
+\kern 1ex
+\hbox {\pedaldash\pedalP}
+}
+}
+
+\magnification \magstep 4
+\baselineskip 12mm
+
+\vbox{
+\fetaelevenfont \test
+\fetathirteenfont \test
+\fetasixteenfont \test
+\fetatwentyfont \test
+\fetatwentythreefont \test
+\fetatwentysixfont \test
+
+%\fetaelevenfontt \test
+%\fetathirteenfontt \test
+\fetasixteenfontt \test
+\fetatwentyfontt \test
+\fetatwentythreefontt \test
+\fetatwentysixfontt \test
+}
+
+\end
+
+%\endinput