-1.3.140.jcn6
+1.3.141.jcn3
============
+* some mup2ly progress.
+
+* Bugfix: ly2dvi: don't include empty set fo latexheaders, don't use
+python-1.5.2 abspath func.
+
+* Setup for new mup converter, based on pmx2ly.
+
+* Bugfix: lilypond-book: accept \documentclass{article}.
+
+* scripts/update-lily.py: fancy source rebuild update tool that we're
+probably not going to use on www.lilypond.org. Check it out!
+
+* Bugfix: building of topdocs.
+
+1.3.141.hwn2
+============
+
+* Fix: instrument names on piano staffs.
+
+* Bugfix: don't left-align absolute dynamics.
+
+* Bugfix: don't make spacing rods for absolute dynamics.
+
+* Various bugfixes for examples (thanks Laura!).
+
+* Bugfix: clean up of hairpin ending logic. Crescendi start under
+notes now.
+
+* Don't substitute '\ ' for '\_' in lyrics. (Suggestion by Roy Rankin)
+
+* In computing text lengths handle the following cases \['`"^_]. (the same)
+
+* Made directories input/no-notation, input/ascii-art
+
+* Doco fixes.
+
+* Beat repeats, double measure repeats; removed repeat sign character
+from the font (WARNING: FONT CHANGED).
+
+* Cleanups in (de)crescendo code, fixed continued (de)crescendi.
+
+* German chords (Rune Zedler)
+
+1.3.141
+=======
+
* po update.
* Renamed remaining mudela -> lilypond (except for old change logs).
@lilypondfile[printfilename]{accidental-single-double.ly}
-
@section Stems
@lilypondfile[printfilename]{stem-tremolo.ly}
@lilypondfile[printfilename]{staccato-pos.ly}
-@lilypondfile[printfilename]{dynamics-line.ly}
-
@lilypondfile[printfilename]{arpeggio.ly}
@lilypondfile[printfilename]{glissando.ly}
-@lilypondfile[printfilename]{follow-thread.ly}
+@section Dynamics
+
+@lilypondfile[printfilename]{dynamics-line.ly}
+
+@lilypondfile[printfilename]{hairpin-ending.ly}
+
+@lilypondfile[printfilename]{dynamics-broken-hairpin.ly}
-@section Beams, slurs and other spanners
+@section Beams
@lilypondfile[printfilename]{beaming.ly}
@lilypondfile[printfilename]{triplets.ly}
+@section Slurs
@lilypondfile[printfilename]{slur-nice.ly}
+
@lilypondfile[printfilename]{slur-symmetry.ly}
+
@lilypondfile[printfilename]{slur-symmetry-1.ly}
@lilypondfile[printfilename]{slur-broken-trend.ly}
@lilypondfile[printfilename]{phrasing-slur.ly}
+@section Ties
+
@lilypondfile[printfilename]{tie.ly}
@lilypondfile[printfilename]{tie-chord.ly}
@lilypondfile[printfilename]{tie-accidental.ly}
-@lilypondfile[printfilename]{beam-cross-staff.ly}
-
-@lilypondfile[printfilename]{slur-cross-staff.ly}
@lilypondfile[printfilename]{tup.ly}
@lilypondfile[printfilename]{repeat-line-break.ly}
-@lilypondfile[printfilename]{auto-change.ly}
-
-
+@lilypondfile[printfilename]{volta-broken-left-edge.ly}
@section Lyrics
@section PianoStaff
+@lilypondfile[printfilename]{beam-cross-staff.ly}
+
+@lilypondfile[printfilename]{slur-cross-staff.ly}
+
+@lilypondfile[printfilename]{auto-change.ly}
+
+@lilypondfile[printfilename]{follow-thread.ly}
+
@section Global stuff
@lilypondfile[printfilename]{keys.ly}
-
-@ignore
-@c the input file is too long and does not test for specific bugs
-
-By default, time signatures are written with two numbers. With style
-``C'', 4/4 and 2/2 are written with their corresponding symbols and
-with style ``old'', 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and
-9/8 are typeset with symbols, all other signatures retain the default
-layout. The style ``1'', gives single number signatures for all
-signatures.
-%
-\mu delafile{time.ly}
-@end ignore
-
-
-
-
-
@section Hacks and Features
@lilypondfile[printfilename]{generic-output-property.ly}
* Page layout::
* Sound::
* Music entry::
-* Using LilyPond::
* Interpretation context::
* Syntactic details::
* Lexical details::
@lilypond[fragment,verbatim,center]
c'' \< \! c'' d'' \decr e'' \rced
- < f''1 { s4 \< \! s2 \> \! s4 } >
+ < f''1 { s4 s4 \< \! s4 \> \! s4 } >
@end lilypond
-[BUG in \> ! ]
-
You can also use a text saying @emph{cresc.} instead of hairpins. Here
is an example how to do it:
@end lilypond
+@refbugs
+When using spacer notes to subdivide note dynamics and @code{linewidth =
+-1}, starting a hairpin on the first spacer note (the one coinciding
+with the real note) exposes an embarassing bug.
printed once, and then the pattern is replaced with a special sign.
@lilypond[verbatim,singleline]
- \context Voice { \repeat "percent" 5 { c'1 } }
+ \context Voice { \repeat "percent" 4 { c'4 }
+ \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
+}
@end lilypond
-At present, only repeats of whole measures are supported.
+@refbugs
+
+You can not nest percent repeats, filling in the first measure with
+slashes, and repeating that measure with percents.
@node Rhythmic music
@section Rhythmic music
\score {
<
- \context ChordNamesVoice \scheme
+ \context ChordNames \scheme
\context Staff \scheme
>
}
Here @var{symbol} is a Scheme expression of symbol type, @var{context}
and @var{grobname} are strings and @var{value} is a Scheme expression.
+If you want to be
+Correct nesting of @code{\override}, @code{\set}, @code{\revert} is as
+follows
+
+@example
+\override \set \set \set \set
+\revert
+@end example
+
+This is always correct, but if you know the default value, you can also use
+@example
+\set \set \set \set
+\set @var{to default value}
+@end example
+
+If there is no default (i.e. by default, the grob property is unset),
+then you can use
+@example
+\set \set \set \set \set
+\revert
+@end example
+
+
@refbugs
LilyPond will hang or crash if @var{value} contains cyclic references.
harmless, and can be ignored.
-@c . {Using LilyPond}
-@node Using LilyPond
-@section Using LilyPond
-@cindex Using LilyPond
-@cindex Generating output
-
-@c slaat dit ergens op?
-
-@c direct postscript?
-
-@table @code
-@item plain lilypond
-@example
-lilypond foo.ly
-@end example
-For more information on how to use lilypond see
-@ifnottex
-@ref{Invoking LilyPond}.
-@end ifnottex
-@iftex
-the online manual.
-@end iftex
-
-@item ly2dvi
-Ly2dvi produces titling from @code{\header} fields.
-@example
-ly2dvi foo.ly
-@end example
-For more information on how to use ly2dvi see
-@ifnottex
-@ref{ly2dvi}.
-@end ifnottex
-@iftex
-the online manual.
-@end iftex
-
-@item lilypond-book
-Lilypond-book supports interleaving text and music.
-@example
-lilypond-book foo.doc
-@end example
-For more information on how to use lilypond-book see
-@ifnottex
-@ref{lilypond-book}.
-@end ifnottex
-@iftex
-the online manual.
-@end iftex
-@end table
-
-
-An emacs mode for LilyPond is included with the source archive as
-@file{lilypond-mode.el} and @file{lilypond-font-lock.el}. If you have
-an RPM, it is in @file{/usr/share/doc/lilypond-X/}. You have to install
-it yourself.
-
-Add this to your ~/.emacs or ~/.emacs.el:
-@example
- (load-library "lilypond-mode.el")
- (setq auto-mode-alist
- (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist))
- (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock)))
-@end example
-
-If you have the latest LilyPond-1.3.x Debian package, LilyPond-mode
-is automatically loaded, so you need not modify your ~/.emacs file.
-
-@menu
-* Pre-cooked makefile::
-@end menu
-
-@node Pre-cooked makefile
-@subsection Pre-cooked makefile
-
-@c waar deze info? is uiteindelijk wel handig, schat ik.
-[TODO: cut blabla]
-If you have a big music project, or just a lot of LilyPond input files,
-all generated output from LilyPond, @TeX{} and metafont will clutter
-your working directory. LilyPond comes with a one-size-fits-all
-pre-cooked makefile that helps you manage producing ouptut. It will
-produce all output in @file{out}, generate and track dependencies.
-Also, it helps in preparing your submission to the @ref{Mutopia
-project}.
-
-@file{make/ly.make}
-@example
-mkdir my-project
-cd my-project
-cp /usr/share/lilypond/make/ly.make GNUmakefile
-cp /usr/share/doc/lilypond/examples/input/tutorial/menuet.ly .
-make menuet
-[..]
-Generated out/menuet.ps for target menuet.
-@end example
-
-Type @samp{make help} to see possible targets.
-
-[TODO]
-@file{/usr/share/lilypond/doc/lilypond/examples/input/mutopia-header.ly}
-
-
@node Interpretation context
@section Interpretation context
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=141
+PATCH_LEVEL=142
MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
def tfm_checksum (fn):
+ sys.stderr.write ("Reading checksum from `%s'\n" % fn)
s = open (fn).read ()
s = s[ 12 * 2 : ]
cs_bytes = s[:4]
depth = ..
-SUBDIRS=bugs tricks test regression tutorial
+SUBDIRS=bugs tricks test regression tutorial no-notation ascii-art
examples=trip star-spangled-banner paddy scarlatti-test
flexamples=
--- /dev/null
+# input/bugs/Makefile
+
+depth = ../..
+
+LOCALSTEPMAKE_TEMPLATES=mutopia
+include $(depth)/make/stepmake.make
+
+
--- /dev/null
+
+% ascii art
+
+\include "paper-as5.ly"
+
+\score {
+ \notes\relative c''{
+ \time 4/4;
+ g1 a b c
+ g2 a b c
+ g4 a b c
+ }
+ \paper {
+ \paperAs_five
+ \translator { \StaffContext barSize = #5 }
+ }
+
+}
+
--- /dev/null
+
+\score{
+ <
+ \context Staff \notes\relative c'{
+ c d e f
+ \repeat "volta" 2 { g a b c }
+ \alternative { { c b a g } { f e d c } }
+ }
+ \context Lyrics \lyrics {
+ De eer- ste < { maat } { moet } >
+ \repeat fold 2 { }
+ \alternative {
+ { en dan twee keer }
+ { een koe- plet _ }
+ }
+ en dan nog dit er ach- ter aan
+ }
+ >
+}
--- /dev/null
+
+% asci art output
+
+
+
+\include "paper-as5.ly"
+
+\score {
+ \context StaffGroup <
+ \context Staff=upper \notes\relative c{
+ \key f \major;
+ \time 3/4;
+ r8^"Moderato" %\pp
+ <g'-. c-.> <c-. es-.> <g-. c-.> <c-. es-.> <g-. c-.> |
+ r8 <as-. c-.> <c-. es-.>
+ }
+ \context Staff=lower \notes\relative c{
+ \key f \major;
+ \time 3/4;
+ \clef "bass";
+ <c,2 c'> r4
+ <as2 as'> r4
+ }
+ >
+ \paper {
+% \paperAs_nine
+ indent=4.0\char;
+ linewidth=78.0\char;
+ \translator { \StaffContext barSize = #4.5 }
+ %\translator { \VoiceContext beamHeight = #0 }
+ \translator {
+ \VoiceContext
+ beamHeight = ##f
+ autoBeamSettings \override (begin * * * *) = #(make-moment 0 1)
+ textNonEmpty = ##f
+ }
+ }
+
+}
+
--- /dev/null
+
+% asci-art output, TODO: include how-to-use-this
+
+\include "paper-as9.ly"
+
+\score {
+ \context GrandStaff <
+ \context Staff=upper \notes\relative c{
+ \key f \major;
+ \time 3/4;
+ r8^"Moderato" %\pp
+ <g'-. c-.> <c-. es-.> <g-. c-.> <c-. es-.> <g-. c-.> |
+ r8 <as-. c-.> <c-. es-.>
+ }
+ \context Staff=lower \notes\relative c{
+ \key f \major;
+ \time 3/4;
+ \clef "bass";
+ <c,2 c'> r4
+ <as2 as'> r4
+ }
+ >
+ \paper {
+% \paperAs_nine
+ indent=4.0\char;
+ linewidth=78.0\char;
+ %\translator { \StaffContext barSize = #9 }
+ %\translator { \VoiceContext beamHeight = #0 }
+ \translator {
+ \VoiceContext
+ beamHeight = ##f
+ autoBeamSettings \override #(begin * * * *) = #(make-moment 0 1)
+ textNonEmpty = ##f
+ }
+ }
+
+}
+
--- /dev/null
+% ascii art output
+
+\header{
+filename = "twinkle.ly";
+title = "Twinkle Twinkle Little Star";
+composer = "Traditional";
+enteredby = "hwn and jcn";
+copyright = "public domain";
+}
+
+
+
+\include "paper-as5.ly"
+
+melody = \notes \relative c'' {
+ \time 2/4;
+ c4 c | g' g | a a | g g |
+%{
+ f f | e e | d d8.( e16 | )c2 |
+
+ g'4 g | f f | e e | d d |
+ g g | f f | e( e8. f16 | e4 )d |
+
+ c c | g' g | a a | g g |
+ f f | e e | d d8.( e16 | )c2 |
+%}
+}
+
+accompany = \notes \relative c {
+ \clef "bass";
+ \time 2/4;
+ c4 c' | e c | f c | e c |
+%{
+ d b | c a | f g | c,2 |
+
+ e'4 g, | d' g, | c g | b g |
+ e' g, | d' g, | c c8.( d16 | c4 )b |
+
+ c, c' | e c | f c | e c |
+ d b | c a | f g | c,2
+%}
+}
+
+
+text = \lyrics{
+ Twin -- kle, twin -- kle, lit -- tle star, " "
+%{
+ How I won -- der what you " " are.
+ Up a -- bove the world so high, " "
+ Like a dia -- mond in the " " sky. " "
+ Twin -- kle, twin -- kle, lit -- tle star, " "
+ How I won -- der what you " " are!
+%}
+}
+
+\score{
+ \context GrandStaff <
+ \addlyrics
+ \context Staff=upper \melody
+ \context Lyrics=between \text
+ \context Staff=lower \accompany
+ >
+ \paper{
+ \translator { \GrandStaffContext \accepts "Lyrics"; }
+ indent=4.0\char;
+ linewidth=78.0\char;
+ }
+}
+
%{
+
+You should preprocess this file with the C preprocessor. The one with
+FAKE_GRACE looks best.
+
+1.
+
cpp -P -traditional -o l.ly les-nereides.ly
+
+2.
+
cpp -P -traditional -o l-fake.ly -DFAKE_GRACE les-nereides.ly
+
%}
--- /dev/null
+# input/bugs/Makefile
+
+depth = ../..
+
+LOCALSTEPMAKE_TEMPLATES=mutopia
+include $(depth)/make/stepmake.make
+
+
--- /dev/null
+
+% Test parser error
+
+\score{
--- /dev/null
+
+% Test parser error
+
+foo = \notes{
+
+
+\score{
+}
--- /dev/null
+
+% Test parser error
+
+foo = \notes{
+
+
+\score{
+
--- /dev/null
+
+% Test parser error
+
+foo = \notes{
+}
+
+
+\score{
+ burp
+}
+
}
\context Voice=four {
\stemDown\slurDown\tieDown
- \property Voice.horizontalNoteShift=-1
+ \property Voice.NoteColumn \override #'horizontal-shift = #-1
fis
}
>
-header = {
+\header {
texidoc = "arpeggio stays clear of accidentals and flipped note heads.
-Since Arpeggio engraver is Voice, it does nothing for voice collisions."
-};
+Since Arpeggio engraver is Voice, it does nothing for voice collisions.";
+}
hairyChord = \context Staff \notes\relative c' <
\context Voice=one {
--- /dev/null
+
+\header {
+
+texidoc = "Hairpin dynamics start under notes if there are
+no text-dynamics. If there are text dynamics, the hairpin does not run
+into them.";
+
+}
+
+
+\score {
+\notes \relative c'' { c4 \> c4 \! c4 c4_\ff \> c4 \! c4 \p }
+\paper { linewidth = -1.;}
+}
\header {
-texidoc ="Broken volta spanners behave correctly at left edge in all cases."
-};
+texidoc ="Broken volta spanners behave correctly at left edge in all cases.";
+
+}
%{
\paper{
%my standard paper block
- % figure out a way to do this cleanly.
% 0=\font "feta19"
% -1=\font "feta16"
% \stylesheet #(make-style-sheet 'paper19)
- arithmetic_multiplier=7.\pt;
indent=0.;
linewidth=188.\mm;
- forced_stem_shorten0=0.;
- forced_stem_shorten1=0.;
- forced_stem_shorten2=0.;
- forced_stem_shorten3=0.;
+
\translator{
\PianoStaffContext
- maxVerticalAlign=8.4;
- minVerticalAlign=8.4;
+ VerticalAlignment \set #'forced-distance = #8.4
}
\translator{\StaffContext
TimeSignature \override #'style = #'C
}
- \translator{\VoiceContext
+ \translator {
+ \ScoreContext
+ SpacingSpanner \override #'arithmetic-multiplier = #1.4
+ }
+ \translator{
+ \VoiceContext
noStemExtend = ##t
tupletVisibility = ##f
+ Stem \override #'stem-shorten = #'(0.0)
}
}
-
-
-
-
+% include file for scarlatti-test
rh=\property Thread.NoteHead \override #'style = #'default
lh=\property Thread.NoteHead \override #'style = #'diamond
-
+%
+% TODO: what's this?
+%
global = \notes {
\context Staff=down <
\global
\clef bass;
- \autochange Staff \accompany
+ \autochange Staff \context Voice \accompany
>
>
\paper {
- gourlay_maxmeasures = 4.;
indent = 8.\mm;
textheight = 295.\mm;
- % ugly is beautiful
- slur_beautiful = 5.0;
-
\translator{
\PianoStaffContext
defaultBarType = #""
defaultBarType = #""
\remove "Time_signature_engraver";
- slurVerticalDirection = #1
- verticalDirection = -1
+ Slur \override #'direction = #1
+
+
autoBeamSettings \override #'(end * * * *) = #(make-moment 1 2)
}
}
+% test for ascii-art output
\include "paper-as9.ly"
% barline spacing disrupts visual rhythm.
-#(set! space-alist (assoc-set! space-alist '("Staff_bar" "begin-of-note") '(minimum_space 0.0)))
-#(set! space-alist (assoc-set! space-alist '("Staff_bar") '(minimum_space 0.0)))
+#(define nbal (acons '("Staff_bar" "begin-of-note") '(minimum_space 0.0) default-break-align-space-alist))
\score{
\notes \relative c' <
\context Staff= AS {
- \time 3/4;
+ \property Staff.timeSignatureFraction = #'(3 . 4)
c4 c c | c c c |
}
\context Staff=BS {
- \time 2/4;
+ \property Staff.timeSignatureFraction = #'(2 . 4)
c4 c | c c | c c
}
% TODO: make c4. here align with c4 there.
\context Staff =CS {
- \time 3/8;
+ \property Staff.timeSignatureFraction = #'(3 . 8)
c4. c8 c c c4. c8 c c
}
>
linewidth = -1.0\cm;
\translator{
\ScoreContext
+ BreakAlignment \override #'space-alist = #nbal
\remove Timing_engraver;
}
\translator{
+%
+% TODO: junkme.
+%
flauti = \notes \relative c' {
--- /dev/null
+\score {
+ \context Voice \notes\relative c {
+ % to see the magic: uncomment size stuff in init/paper20.ly
+
+ c'4 c4
+
+ \property Voice.fontSize= #-2
+ b16 (*1/2
+ \property Voice.fontSize= #0
+
+ ) g4 *31/32
+
+ a a g2
+
+ }
+ \paper { }
+ \midi { }
+}
+% body for the font test. Does not work standalone
+
FontBody= \notes\transpose c''{
\bar "|:";
c2\sustainDown c\sustainUp |
}
}
+\score {
+ \FontBody
+}
\paper{
\paperEleven
linewidth = 17.5 \cm;
- gourlay_maxmeasures =5.;
+
}
}
-
-
\header{
title= "The Feta Font";
subtitle = "proofsheet";
\include "paper13.ly"
-\include "font-body.ly"
-\score{
- \FontBody
- \paper{
- \paperThirteen
- linewidth = 17.5 \cm;
- gourlay_maxmeasures =5.;
- }
+\paper{
+linewidth = 17.5 \cm;
}
+\include "font-body.ly"
\include "paper16.ly"
-\include "font-body.ly"
-
-\score{
- \FontBody
\paper{
% don't change this.
% otherwise 16pt and 20pt layouts differ.
- \paperSixteen
- linewidth = 12.5 \cm;
- gourlay_maxmeasures =5.;
- }
-}
-
+
+ linewidth = 12.5 \cm;}
+
+ \include "font-body.ly"
"(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-\include "font-body.ly"
-
-\score{
- \context Staff { \FontBody}
\paper{
linewidth = 17.5 \cm;
- gourlay_maxmeasures =5.;
}
-}
+
+\include "font-body.ly"
}
\include "paper26.ly"
-\include "font-body.ly"
-
-\score{
- \FontBody
\paper{
- \paperTwentysix
+
linewidth = 17.5 \cm;
- gourlay_maxmeasures =5.;
+
}
-}
+
+ \include "font-body.ly"
+\header {
+texidoc = "Hara kiri staffs disappear when empty ";
+}
+
+
+% todo: use partcombine?, junk?
toeterI = \notes\relative c <{
\property Staff.instrument = #"Toeters"
}
toeters = \context Staff = toeters <
- \toeter_i
- \toeter_ii
+ \toeterI
+ \toeterIi
>
zager = \context Staff = zager \notes \relative c'' {
-blah = \notes {
-
-\transpose c'' {
- \time 4/4;
- \keysignature es;
- [cis8 d e f] [e! a b cis'] |
- es e f e a a' a a' |
- \clef "bass"; }
- [es16 c' b a] [g f es d] [c d es d] [c bes, as, g,] |
-
-\clef "violin";
- \keysignature c;
- cis4 c cis cis |
- <cis dis eis fes ges> cis dis2 ~ |
- \time 2/4 ;
- dis4 dis ~ | c cis~ | c
-}
-
-\score{
- \context Staff \blah
-
-}
+\header {
+texidoc = "" ;
+}
\score{
\notes\relative c''{
\time 2/4;
+ \property Voice.Slur \set #'minimum-length = #40
c()c
c~c\break
}
- \paper{
- linewidth=-1.\mm;
- slur_x_minimum=40.0*\interline;
- }
}
}
\paper {
% linewidth= 18.\cm;
-% gourlay_maxmeasures = 4.0
+
}
}
\transpose a \beamintervals
\transpose b \beamintervals
}
- \paper{
- gourlay_maxmeasures = 2.;
- }
}
\clef "bass";
\key c \major;
<e1\sff cis'^\downbow> | <cis\sff a'^\downbow> |
- <d,\ffff\decr g> ~ <d2 g> ~ <d8\p\rced g> |
+ <d,\ffff\decr g> | ~ <d2 g> ~ <d8\p\rced g>
}
\header{
piece="example 2";
@quotation
Your task, if you accept it is to implement a \smarttranspose
command> that would translate such oddities into more natural
- notations. Double accidentals should be removed, as well as #E
- (-> F), bC (-> B), bF (-> E), #B (-> C).
+ notations. Double accidentals should be removed, as well as E-sharp
+ (-> F), bC (-> B), bF (-> E), B-sharp (-> C).
@end quotation
You mean like this. (Sorry 'bout the nuked indentation.)
";
}
-% Btw, I've leant an el-neato trick for formatting code in email messages,
-% using inderect buffers.
-%
-% M-x make-indirect-buffer RET RET foo RET C-x b foo RET
-% Select region and then narrow: C-x n n
-% Set mode, eg: M-x sch TAB RET
-%
-
#(define (unhair-pitch p)
(let* ((o (pitch-octave p))
(a (pitch-alteration p))
\remove Axis_group_engraver;
}
}
+}
+
+% include file for tutorial
+
\header {
title = "Zo, goed lieverd?";
subtitle = "How's, this babe?";
script_req_l_->get_mus_property ("text"));
Side_position_interface::set_direction (script_p_, LEFT);
- Side_position_interface::set_axis (script_p_, X_AXIS);
-
+
if (Direction d = script_req_l_->get_direction ())
Directional_element_interface::set (line_spanner_, d);
switch (text[i])
{
case '\\':
+ // accent marks use width of base letter
+ if (i +1 < text.length_i ())
+ {
+ if (text[i+1]=='\'' || text[i+1]=='`' || text[i+1]=='"' ||
+ text[i+1]=='^')
+ {
+ i++;
+ break;
+ }
+ // for string width \\ is a \ and \_ is a _.
+ if (text[i+1]=='\\' || text[i+1]=='_')
+ {
+ break;
+ }
+ }
+
for (i++; (i < text.length_i ()) && !isspace (text[i])
&& text[i]!='{' && text[i]!='}'; i++)
;
/* Ugh, must be same as Text_spanner::brew_molecule. */
Real padding = gh_scm2double (me->get_grob_property ("if-text-padding"));
- Real broken_left = spanner->get_broken_left_end_align ();
- Real width = spanner->spanner_length ();
- width -= broken_left;
-
+
Drul_array<bool> broken;
- Drul_array<Real> extra_off;
+ Drul_array<Item*> bounds ;
Direction d = LEFT;
do
{
- Item *b = spanner->get_bound (d);
- broken[d] = b->break_status_dir () != CENTER;
+ bounds[d] =spanner->get_bound (d);
+ broken[d] = bounds[d]->break_status_dir () != CENTER;
+ }
+ while (flip (&d) != LEFT);
- if (!broken [d])
+ Grob *common = bounds[LEFT]->common_refpoint (bounds[RIGHT], X_AXIS);
+ Drul_array<Real> x_points ;
+
+ do
+ {
+ Item *b = bounds[d];
+ x_points[d] = b->relative_coordinate (common, X_AXIS);
+ if (broken [d])
{
-
- Interval e =b->extent (b, X_AXIS);
- Real r = 0.0;
- if (!e.empty_b ())
- r = e[-d] + padding;
- width += d * r;
- extra_off[d] = r;
+ if (d == LEFT)
+ x_points[d] = b->extent (common,X_AXIS)[RIGHT] ;
+ }
+ else
+ {
+ if (dynamic_cast<Paper_column*> (b))
+ {
+ /*
+ If we're hung on a paper column, that means we're not
+ adjacent to a text-dynamic, and we may move closer. We
+ make the padding a little smaller, here.
+ */
+ Interval e =b->extent (common, X_AXIS);
+ x_points[d] = e.center () - d * padding /3; // ugh.
+ }
+ else
+ {
+ Interval e =b->extent (common, X_AXIS);
+ if (!e.empty_b ())
+ x_points[d] = e[-d] - d*padding;
+ }
}
}
while (flip (&d) != LEFT);
- // FIXME: ecs tells us
- width += gh_scm2double (me->get_grob_property ("width-correct"));
- /* /Ugh */
-
+
+ Real width = x_points[RIGHT] - x_points[LEFT];
+
if (width < 0)
{
warning (_ ((grow_dir < 0) ? "decrescendo too small"
bool continued = broken[Direction (-grow_dir)];
Real height = gh_scm2double (me->get_grob_property ("height"));
Real thick = line * gh_scm2double (me->get_grob_property ("thickness"));
+
+ Real starth, endh;
+ if (grow_dir < 0)
+ {
+ starth = height;
+ endh = continued ? height/2 : 0.0;
+ }
+ else
+ {
+ starth = continued ? height/2 : 0.0;
+ endh = height;
+ }
- const char* type = (grow_dir < 0) ? "decrescendo" : "crescendo";
- SCM hairpin = gh_list (ly_symbol2scm (type),
- gh_double2scm (thick),
- gh_double2scm (width),
- gh_double2scm (height),
- gh_double2scm (continued ? height/2 : 0.0),
- SCM_UNDEFINED);
-
- Box b (Interval (0, width), Interval (-2*height, 2*height));
+ /*
+ TODO: junk this and, make a general
+
+ Lookup::line (XY1, XY2).
+ */
+ SCM hairpin = gh_list (ly_symbol2scm ("hairpin"),
+ gh_double2scm (thick),
+ gh_double2scm (width),
+ gh_double2scm (starth),
+ gh_double2scm (endh),
+ SCM_UNDEFINED);
+
+ /*
+ We make the hairpin too large in Y direction, so it stays at
+ proper distance from the staff.
+ */
+ Interval yext = 2* height * Interval (-1,1);
+ Box b (Interval (0, width), yext);
Molecule mol (b, hairpin);
- mol.translate_axis (broken_left + extra_off[LEFT], X_AXIS);
+
+ mol.translate_axis (x_points[LEFT]
+ - bounds[LEFT]->relative_coordinate (common, X_AXIS),
+ X_AXIS);
return mol.smobbed_copy ();
}
if (dynamic_cast<Spanner*> (i.elem_l_)
&& i.elem_l_->has_interface (ly_symbol2scm ("dynamic-interface")))
return;
-
+
+ /*
+ Hang the instrument names on the staffs, but not on the alignment
+ groups enclosing that staff. The alignment has no real location,
+ but is only a vehicle for the placement routine it contains, and
+ therefore the location of its refpoint won't be very useful.
+
+ */
if (dynamic_cast<Spanner*> (i.elem_l_)
&& ((Axis_group_interface::has_interface (i.elem_l_)
- && Axis_group_interface::axis_b (i.elem_l_, Y_AXIS))
- || (Align_interface::has_interface (i.elem_l_)
- && Align_interface::axis (i.elem_l_) == Y_AXIS)))
+ && Axis_group_interface::axis_b (i.elem_l_, Y_AXIS)))
+ && !Align_interface::has_interface (i.elem_l_))
{
SCM nl = gh_cons (i.elem_l_->self_scm (),
get_property ("instrumentSupport"));
void strip_trailing_white (String&);
void strip_leading_white (String&);
+String lyric_fudge (String s);
bool
return yylval.i = EXTENDER;
if (s == "--")
return yylval.i = HYPHEN;
- int i = 0;
- while ((i=s.index_i ("_")) != -1) // change word binding "_" to " "
- * (s.ch_l () + i) = ' ';
- if ((i=s.index_i ("\\,")) != -1) // change "\," to TeX's "\c "
- {
- * (s.ch_l () + i + 1) = 'c';
- s = s.left_str (i+2) + " " + s.right_str (s.length_i ()-i-2);
- }
+ s = lyric_fudge (s);
char c = s[s.length_i () - 1];
if (c == '{' || c == '}') // brace open is for not confusing dumb tools.
return true;
}
+
+String
+lyric_fudge (String s)
+{
+ char * chars =s.copy_ch_p ();
+
+ for (char * p = chars; *p ; p++)
+ {
+ if (*p == '_' && (p == chars || *(p-1) != '\\'))
+ *p = ' ';
+ }
+
+ s = String (chars);
+ delete[] chars;
+
+ int i =0;
+ if ((i=s.index_i ("\\,")) != -1) // change "\," to TeX's "\c "
+ {
+ * (s.ch_l () + i + 1) = 'c';
+ s = s.left_str (i+2) + " " + s.right_str (s.length_i ()-i-2);
+ }
+
+ return s;
+}
scm_unprotect_object (p->self_scm ());
$$ = sp;
+
+/*
+ TODO: should make alias TimingContext for Score
+*/
+
sp-> set_mus_property ("context-type", ly_str02scm ( "Score"));
}
;
}
return ly_interval2scm (r);
}
-
+
MAKE_SCHEME_CALLBACK (Stem,brew_molecule,1);
Real dy = Staff_symbol_referencer::staff_space (me)/2.0;
Real head_wid = 0;
- Real angle =0.0;
+ /*
+TODO:
+
+ I don't really get the idea of the attachment-angle.
+ It seems like that you attach the Stem to the NoteHead at point
+ (1,tan(aa)/2), making it still nessesary to have special CENTER-STEMS
+ option - and if I would like to attach stem i.e. here:
+
+ |
+ |
+ |
+ XXX
+ XXXXX
+ XXXXX
+ XXX
+
+ That would be impossible.
+ Why haven't you just made ATTACHMENT-COORDINATES as a pair of reals,
+ with (0 . 0) meaning CENTER, (1 . 1) upper right, etc...?
+
+-Rune
+
+
+ */
+
+ Real slope =0.0;
if (Grob *hed = support_head (me))
{
head_wid = hed->extent (hed,X_AXIS).length ();
- angle = gh_scm2double (hed->get_grob_property ("attachment-angle"));
+ slope = gh_scm2double (hed->get_grob_property ("attachment-slope"));
}
- stem_y[Direction (-d)] += d * head_wid * tan (angle)/ (2*dy);
+ stem_y[Direction (-d)] += d * head_wid * slope/ (2*dy);
if (!invisible_b (me))
{
%
% declare the standard dynamic identifiers.
%
-
+ppppp = \dynamicscript #"ppppp"
pppp = \dynamicscript #"pppp"
ppp = \dynamicscript #"ppp"
pp = \dynamicscript #"pp"
default: $(ALL_GEN_FILES)
-$(outdir)/%.afm $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log
+##
+## todo: this also depends on .tfm, FIXME.
+$(outdir)/%.afm $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log
$(PYTHON) $(buildscript-dir)/mf-to-table.py --package=$(topdir) --outdir=$(outdir) --dep $(outdir)/$(<F:.log=.dep) --afm $(outdir)/$(<F:.log=.afm) --tex $(outdir)/$(<F:.log=.tex) $<
local-clean:
; staffspace (distances)
(define all-grob-descriptions
- `((Arpeggio . (
+ `(
+ (Accidentals . (
+ (molecule-callback . ,Local_key_item::brew_molecule)
+ (X-offset-callbacks . (,Side_position_interface::aligned_side))
+ (after-line-breaking-callback . ,Local_key_item::after_line_breaking)
+ (direction . -1)
+ (left-padding . 0.2)
+ (right-padding . 0.4)
+ (meta . ,(grob-description "Accidentals" accidentals-interface font-interface side-position-interface))
+ ))
+
+ (Arpeggio . (
(X-extent-callback . ,Arpeggio::width_callback)
(Y-extent-callback . #f)
(molecule-callback . ,Arpeggio::brew_molecule)
(meta . ,(grob-description "Custos" custos-interface staff-symbol-referencer-interface break-aligned-interface) )
))
- (Hairpin . (
- (molecule-callback . ,Hairpin::brew_molecule)
- (thickness . 1.0)
- (height . 0.6666)
- (spacing-procedure . ,Spanner::set_spacing_rods)
- (minimum-length . 2.0)
- (if-text-padding . 1.0)
- (width-correct . -1.0)
-
- (dash-thickness . 1.2)
- (dash-length . 4.0)
- (self-alignment-Y . 0)
- (Y-offset-callbacks . (,Side_position_interface::aligned_on_self))
- (meta . ,(grob-description "Hairpin" hairpin-interface dynamic-interface))
- ))
(DotColumn . (
(axes 0 )
(Y-offset-callbacks . (,Dots::quantised_position_callback ,Staff_symbol_referencer::callback))
(meta . ,(grob-description "Dots" font-interface dots-interface ))
))
+ (DoublePercentRepeat
+ . ((molecule-callback . ,Percent_repeat_item_interface::double_percent)
+ (breakable . #t)
+ (slope . 1.0)
+ (font-family . music)
+ (width . 2.0)
+ (thickness . 0.48)
+ (break-align-symbol . Staff_bar)
+ (visibility-lambda . ,begin-of-line-invisible)
+ (meta . ,(grob-description "DoublePercentRepeat" font-interface percent-repeat-interface))
+ ))
(DynamicText . (
(Y-offset-callbacks . (,Side_position_interface::aligned_on_self))
(molecule-callback . ,Text_item::brew_molecule)
+ (no-spacing-rods . #t)
(script-priority . 100)
(font-series . bold)
(font-family . dynamic)
(axes 1)
(meta . ,(grob-description "HaraKiriVerticalGroup" axis-group-interface hara-kiri-group-interface))
))
-
- (LyricHyphen . (
+ (Hairpin . (
+ (molecule-callback . ,Hairpin::brew_molecule)
(thickness . 1.0)
- (height . 0.4)
- (minimum-length . 0.5)
- (molecule-callback . ,Hyphen_spanner::brew_molecule)
- (Y-extent-callback . ,Grob::point_dimension_callback)
- (meta . ,(grob-description "LyricHyphen" lyric-hyphen-interface ))
+ (height . 0.6666)
+ (spacing-procedure . ,Spanner::set_spacing_rods)
+ (minimum-length . 2.0)
+ (if-text-padding . 1.0)
+ (width-correct . -1.0)
+
+ (dash-thickness . 1.2)
+ (dash-length . 4.0)
+ (self-alignment-Y . 0)
+ (Y-offset-callbacks . (,Side_position_interface::aligned_on_self))
+ (meta . ,(grob-description "Hairpin" hairpin-interface dynamic-interface))
))
(InstrumentName . (
(meta . ,(grob-description "KeySignature" key-signature-interface font-interface break-aligned-interface))
))
- (Accidentals . (
- (molecule-callback . ,Local_key_item::brew_molecule)
- (X-offset-callbacks . (,Side_position_interface::aligned_side))
- (after-line-breaking-callback . ,Local_key_item::after_line_breaking)
- (direction . -1)
- (left-padding . 0.2)
- (right-padding . 0.4)
- (meta . ,(grob-description "Accidentals" accidentals-interface font-interface side-position-interface))
+
+ (LyricHyphen . (
+ (thickness . 1.0)
+ (height . 0.4)
+ (minimum-length . 0.5)
+ (molecule-callback . ,Hyphen_spanner::brew_molecule)
+ (Y-extent-callback . ,Grob::point_dimension_callback)
+ (meta . ,(grob-description "LyricHyphen" lyric-hyphen-interface ))
))
(LineOfScore . (
(style . default)
(molecule-callback . ,Note_head::brew_molecule)
(Y-offset-callbacks . (,Staff_symbol_referencer::callback))
- (attachment-angle . ,(* 20/360 3.14159))
+ (attachment-slope . 0.17)
(meta . ,(grob-description "NoteHead"
rhythmic-head-interface font-interface
note-head-interface ))
(PercentRepeat . (
(spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
(molecule-callback . ,Multi_measure_rest::percent)
- (staff-position . 0)
- (expand-limit . 10)
- (padding . 2.0) ; staffspace
+ (slope . 1.0)
+ (thickness . 0.48)
(minimum-width . 12.5) ; staffspace
(font-family . music)
- (meta . ,(grob-description "PercentRepeat" multi-measure-rest-interface font-interface))
+ (meta . ,(grob-description "PercentRepeat" multi-measure-rest-interface font-interface percent-repeat-interface))
))
+ (RepeatSlash . (
+ (molecule-callback . , Percent_repeat_item_interface::beat_slash)
+ (thickness . 0.48)
+ (slope . 1.7)
+ (meta . ,(grob-description "RepeatSlash" percent-repeat-interface))
+ ))
(Rest . (
(after-line-breaking-callback . ,Rest::after_line_breaking)
(X-extent-callback . ,Rest::extent_callback)
(no-spacing-rods . #t)
(direction . -1)
(padding . 0.5)
+;; todo: add X self alignment?
(baseline-skip . 2)
(font-family . roman)
(meta . ,(grob-description "TextScript" text-script-interface text-interface side-position-interface font-interface ))