2002-07-07 Han-Wen <hanwen@cs.uu.nl>
+ * scm/font.scm (change-rhs-size): add support for "paper19.ly"
+
* VERSION: 1.5.66 released
* scm/grob-description.scm (all-grob-descriptions): add
(c) 2000--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+#include <stdio.h>
+#include <math.h>
#include "spaceable-grob.hh"
#include "grob.hh"
void
Spaceable_grob::add_rod (Grob *me , Grob * p, Real d)
{
+ // printf ("rod %lf\n", d);
+
+
SCM mins = get_minimum_distances (me);
SCM newdist = gh_double2scm (d);
for (SCM s = mins; gh_pair_p (s); s = ly_cdr (s))
void
Spaceable_grob::add_spring (Grob*me, Grob * p, Real d, Real strength, bool expand_only)
{
- if (d < 0.0 || strength <= 0.0)
+ // printf ("dist %lf, str %lf\n", d, strength);
+ if (d <= 0.0 || strength <= 0.0)
{
programming_error ("Adding reverse spring! Setting to unit spring");
d = 1.0;
strength = 1.0;
}
+ if (isinf (d) || isnan(d)
+ || isnan (strength))
+ {
+ /*
+ strength == INF is possible. It means fixed distance.
+ */
+ programming_error ("Insane distance found.");
+ d = 1.0;
+ strength = 1.0;
+ }
+
#ifndef NDEBUG
SCM mins = me->get_grob_property ("ideal-distances");
for (SCM s = mins; gh_pair_p (s); s = ly_cdr (s))
--- /dev/null
+% paper20-init.ly
+
+
+\version "1.5.49"
+
+paperNineteen = \paper {
+ staffheight = 19.0\pt
+ \stylesheet #(make-style-sheet 'paper19)
+
+ \include "params-init.ly"
+}
+
+\paper { \paperNineteen }
+
".\\\\Unrestricted modification and redistribution is permitted
and encouraged---copy this music and share it.}"
tagline = \mutopiapublicdomain
- lastupdated = "2000/Feb/14"
+ lastupdated = "2002/July/7"
+ footer = "Mutopia-2002/07/07-6"
+
}
-% It would be nice to squeeze this onto two pages, but I am not sure
-% if it would work with US paper.
+%{
+ We really want this piece on 2 pages.
+
+ tweaks: we use 19 iso. 20 pt staff space, and squeeze up the spacing a bit.
+
+ the few forced linebreaks were an earlier attempt to get the spacing
+ to match up.
+
+%}
+
+\include "paper19.ly"
+\version "1.5.65"
+
+
-\version "1.3.146"
-
dux = \context Voice=two \notes \relative c''{
\voiceTwo
\clef violin
r8 c16 b c8 g as c16 b c8 d |
g, c16 b c8 d f,16 g as4 g16 f |
- es c' b a g f! es d c8 es' d c |
+ es c' b a g f! es d c8 es' d c | \break
bes a bes c fis, g a fis |
%%5
g4 r16 c, d es f g as8~ as16 d, es f |
- g a bes8 ~ bes16 es, f g as g f es d8 c'16 b! |
+ g a bes8 ~ bes16 es, f g as g f es d8 c'16 b! | \break
% forced accident!
c4 r4 r8 f es d |
r8 as g f g f16 es f8 d |
d, g16 fis g8 a! c,16 d es4 d16 c | % forced accident!
bes8 r8 r16 d e fis g a bes8 ~ bes16 e, f g |
a bes c8 ~ c16 fis,16 g a bes8 es,!16 d es8 g, |
+ \break
as f'16 es f8 a,8 bes g'16 f g8 b, |
%%20
- c16 f \translator Staff = bass
- \stemBoth \stemUp
- es d c bes! as g
+ c16 f es d
+ \translator Staff = bass
+ c bes! as g
f8 \translator Staff = treble
- \stemBoth \stemDown
as' g f |
es d es f b, c d b |
c4 r8 e8 f f16 e f8 c |
comes = \context Voice=one \notes \relative c'' {
\voiceOne
+ \property Voice.MultiMeasureRest \override #'staff-position = #6
R1 |
R1 |
r8 g'16 fis g8 c, es g16 fis g8 a |
f,16 g as4 g16 f es4 r8 es' |
d c g' g,
%%30
- \context Staff=bass <
- { \voiceOne c2 ~ | c1 ~ | c1 }
- \context Voice=four { \voiceTwo c,2 ~ | c1 ~ | c1 }
- >
+ < { c2 ~ | c1 ~ | c1 } \\
+ { c,2 ~ | c1 ~ | c1 }
+ >
}
\score {
\property Score.TimeSignature \override #'style = #'C
\context Staff = treble <
\key c \minor
-% \key es \major
\dux
{ \comes \bar "|." }
\time 4/4
\paper {
linewidth = 18.0 \cm
+ \translator { \ScoreContext
+ SpacingSpanner \override #'spacing-increment = #1.0
+ SpacingSpanner \override #'shortest-duration-space = #1.9
+ }
}
\header{
opus = "BWV 847"
((2 * * music 26) . "feta26")
((1 * * music 23) . "feta23")
((0 * * music 20) . "feta20")
- ((-0.5 * * music 20) . "feta19")
((-1 * * music 16) . "feta16")
((-2 * * music 13) . "feta13")
((-3 * * music 11) . "feta11")
((2 * * ancient 26) . "parmesan26")
((1 * * ancient 23) . "parmesan23")
((0 * * ancient 20) . "parmesan20")
- ((-0.5 * * ancient 20) . "parmesan19")
((-1 * * ancient 16) . "parmesan16")
((-2 * * ancient 13) . "parmesan13")
((-3 * * ancient 11) . "parmesan11")
(cons (- (car font-desc) decrement) (cdr font-desc))
)
+(define (change-rhs-size font-desc from to )
+ (cons (car font-desc)
+ (regexp-substitute/global #f from (cdr font-desc) 'pre to 'post))
+
+ )
+
+
;;
(define (map-alist-keys func list)
"map a function FUNC over the keys of an alist LIST, leaving the vals. "
'((paper11 . -3)
(paper13 . -2)
(paper16 . -1)
- (paper19 . -0.5)
(paper20 . 0)
(paper23 . 1)
(paper26 . 2)
))
)
+(set! font-list-alist
+ (cons
+ (cons
+ 'paper19
+ (map (lambda (x) (change-rhs-size x "20" "19"))
+ paper20-style-sheet-alist))
+ font-list-alist))
(define (make-style-sheet sym)
`((fonts . ,(append paper-style-sheet-alist