From ff9bf2db15f577cef78424991d4c15aa15def1ad Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 6 Oct 2002 13:59:21 +0000 Subject: [PATCH] * scripts/convert-ly.py (FatalConversionError.conv): add rule for (ly-make-music "Foo_bar") -> (make-music-by-name 'FooBarEvent). * mf/feta-din.mf (test): add x-height and space. --- ChangeLog | 5 ++++ Documentation/user/refman.itely | 44 ++++++++++++--------------------- input/test/music-creation.ly | 4 +-- input/test/note-chords.ly | 7 +++++- mf/feta-din-code.mf | 5 ++++ mf/feta-din.mf | 5 ++++ scm/clef.scm | 4 +-- scm/to-xml.scm | 12 +++++++-- scripts/convert-ly.py | 18 ++++++++------ stepmake/bin/package-diff.py | 5 ---- 10 files changed, 61 insertions(+), 48 deletions(-) diff --git a/ChangeLog b/ChangeLog index 13b7cfdc74..126b284bd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2002-10-06 Han-Wen Nienhuys + * scripts/convert-ly.py (FatalConversionError.conv): add rule for + (ly-make-music "Foo_bar") -> (make-music-by-name 'FooBarEvent). + + * mf/feta-din.mf (test): add x-height and space. + * lily/dynamic-engraver.cc (process_music): take dynamic direction from ^_ for crescendi. Idem for slurs and phrasing slurs. diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 9868e18287..a4724a34bf 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -2727,6 +2727,7 @@ sometimes voices can cross between the two staves. The behavior. In this section we discuss the @internalsref{PianoStaff} and some other pianistic peculiarities. + @menu * Automatic staff changes:: * Manual staff switches:: @@ -2735,6 +2736,21 @@ other pianistic peculiarities. * Voice follower lines:: @end menu +@refbugs + +There is no support for putting chords across staves. You can get +this result by increasing the length of the stem in the lower stave so +it reaches the stem in the upper stave, or vice versa. An example is +included with the distribution as @file{input/test/stem-cross-staff.ly}. + +@cindex cross staff stem +@cindex stem, cross staff + + +@c fixme: should have hyperlinks as well. + + + @c . {Automatic staff changes} @node Automatic staff changes @@ -2842,32 +2858,6 @@ c''4 \sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4 \sostenutoUp @end lilypond -@node Cross staff stems -@subsection Cross staff stems -@cindex Cross staff stems -@cindex Stems, cross staff - -Unfortunately, there is no support for putting chords across staves. -You can get this result by increasing the length of the stem in the -lower stave so it reaches the stem in the upper stave, or vice versa. - -@lilypond - -sUp = \translator Staff = "up" -sDown = \translator Staff = "down" - -stemExtend = \property Voice.Stem \set #'length = #22 -stemNormal = \property Voice.Slur \revert #'length - - - < { \stemDown \sDown s4. a, } \\ - { \stemDown \sUp f4. \stemExtend f }> | - - \stemNormal - - [...] -@end lilypond - @node Arpeggio @subsection Arpeggio @cindex Arpeggio @@ -4219,8 +4209,6 @@ object, and set a object property in that object. @cindex object description - - A object definition is a Scheme association list, that is stored in a context property. By assigning to that property (using plain @code{\property}), you can change the resulting objects. diff --git a/input/test/music-creation.ly b/input/test/music-creation.ly index 647005b7db..df76133dfe 100644 --- a/input/test/music-creation.ly +++ b/input/test/music-creation.ly @@ -7,15 +7,13 @@ } #(define (make-note-req p d) - ;; huh? lily-guile: Could not find music type `Note_req' - ;;(let* ((ml (make-music-by-name "Note_req"))) (let* ((ml (make-music-by-name 'NoteEvent))) (ly-set-mus-property! ml 'duration d) (ly-set-mus-property! ml 'pitch p) ml)) #(define (make-note elts) - (let* ((ml (make-music-by-name 'RequestChord))) + (let* ((ml (make-music-by-name 'EventChord))) (ly-set-mus-property! ml 'elements elts) ml)) diff --git a/input/test/note-chords.ly b/input/test/note-chords.ly index 25286f8168..39158bcb57 100644 --- a/input/test/note-chords.ly +++ b/input/test/note-chords.ly @@ -1,3 +1,8 @@ +\header { + + texidoc= "Chord names don't attempt to find inversions and +bass notes." } + \version "1.5.68" scheme = \notes { @@ -8,7 +13,7 @@ scheme = \notes { \score { < - \context ChordNamesVoice \scheme + \context ChordNames \scheme \context Staff \scheme > \paper { linewidth = -1. } diff --git a/mf/feta-din-code.mf b/mf/feta-din-code.mf index e457b64ad2..0523d2189a 100644 --- a/mf/feta-din-code.mf +++ b/mf/feta-din-code.mf @@ -6,6 +6,11 @@ med_thick = round (1.5 stafflinethickness); bottom_blot = 1.3 serif_thick; +code := 32; +fet_beginchar("Space", "space", "space") + set_char_box(0, horizontal_space#, 0, ex#); +fet_endchar; + % % Couldn't find many z examples. This one is losely inspired diff --git a/mf/feta-din.mf b/mf/feta-din.mf index 00d7211031..861959b9e2 100644 --- a/mf/feta-din.mf +++ b/mf/feta-din.mf @@ -14,6 +14,11 @@ ascender# := 0.72 ex#; staffspace# := 1.75 / 2.0 * ex#; stafflinethickness# := staffspace# / 10; +horizontal_space# := .66 ex#; + +font_x_height ex#; +font_normal_space horizontal_space#; + define_pixels (staffspace, stafflinethickness, ex, descender, ascender); fet_beginfont("feta-din", design_size); diff --git a/scm/clef.scm b/scm/clef.scm index ba2d3bc54c..e0aae19639 100644 --- a/scm/clef.scm +++ b/scm/clef.scm @@ -93,7 +93,7 @@ (define (make-prop-set props) (let* ( - (m (make-music-by-name 'PropertySet)) + (m (make-music-by-name 'PropertySet)) ) (map (lambda (x) (ly-set-mus-property! m (car x) (cdr x))) props) @@ -148,7 +148,7 @@ ) (begin (ly-warn (format "Unknown clef type `~a' -See scm/lily.scm for supported clefs")) +See scm/lily.scm for supported clefs" cl)) (make-music-by-name 'Music) ) diff --git a/scm/to-xml.scm b/scm/to-xml.scm index 3bc7a8068a..67f607e8f2 100644 --- a/scm/to-xml.scm +++ b/scm/to-xml.scm @@ -1,4 +1,8 @@ (use-modules (ice-9 regex)) + + +;; should make module? + " @@ -185,11 +189,15 @@ is then separated. (begin (music-to-xml-helper e port))) (display (close-tag 'music) port) - )) + )) (define-public (music-to-xml music port) "Dump XML-ish stuff to PORT." - (display (dtd-header) port) + + ;; dtd contains # -- This confuses tex during make web. + ;; + ;; (display (dtd-header) port) + (display (open-tag 'music '((type . score)) '()) port) (music-to-xml-helper music port) (display (close-tag 'music) port)) diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index 8f24f130ed..25bb3e215b 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -965,13 +965,6 @@ if 1: conversions.append (((1,5,72), conv, 'set! point-and-click -> set-point-and-click!')) -if 1: - def conv (str): - str = re.sub ('ly-make-music', 'make-music-by-name', str) - return str - - conversions.append (((1,7,1), conv, 'ly-make-music -> make-music-by-name')) - if 1: def conv (str): @@ -983,6 +976,17 @@ if 1: conversions.append (((1,6,5), conv, 'Stems: flag-style -> stroke-style; style -> flag-style')) +if 1: + def subst_req_name (match): + return "(make-music-by-name \'%sEvent)" % regularize_id (match.group(1)) + + def conv (str): + str = re.sub ('\\(ly-make-music *\"([A-Z][a-z_]+)_req\"\\)', subst_req_name, str) + str = re.sub ('Request_chord', 'EventChord', str) + return str + + conversions.append (((1,7,1), conv, 'ly-make-music foo_bar_req -> make-music-by-name FooBarEvent')) + ################################ # END OF CONVERSIONS ################################ diff --git a/stepmake/bin/package-diff.py b/stepmake/bin/package-diff.py index 977ae337b3..284e2c6e8e 100644 --- a/stepmake/bin/package-diff.py +++ b/stepmake/bin/package-diff.py @@ -135,8 +135,6 @@ def remove_automatic (dirnames): sys.stderr.write ("can't remove: `" + f + "'\n'") def dirname (v): - # urg, again? - from packagepython import * return flags.package.name + '-' + version_tuple_to_str (v) def tarball(v): @@ -181,9 +179,6 @@ i.e., you should run def makediff (fromdir, todir, patch_name): - # urg, again? - from packagepython import * - remove_automatic ([fromdir, todir]) # ugh -- 2.39.5