+1.3.98.jcn2
+===========
+
+* Renamed all occurrences of font-size to font-relative-size
+
+* Renamed all occurrences of font-point to font-point-size
+
+* Fixed interface.scm descriptions to use symbols iso strings
+
+* Fixes for chord names, and added jazz style (James Hammons)
+
1.3.98.jcn1
===========
* Quick fix for regtest.
+1.3.98.hwn2
+===========
+
+* Rewrote Scheme side of font-selection.
+
+* Bugfix: deprecate group-center-element thoroughly.
+
+* Bugfix: LeftEdge must also have Break_align_item::alignment_callback
+X-offset-callback.
+
+* Add use music property "direction" for storing direction in
+Script_req, use music property "text-type" for storing 'dynamic,
+'finger, etc. Remove Dynamic_script_req. Resurrect fingerings.
+
+1.3.98.lec1
+===========
+
+* fixed scale-definition.ly for greek mode names.
+
1.3.98
======
-\input texinfo @c -*-texinfo-*-
-@setfilename mail.info
-@settitle mail
-
-@node Top, , , (dir)
-@top
-
-
-The following mailing list have been setup for LilyPond.
-
-@bye
LilyPond uses a versioning scheme similar to the Linux kernel. In a
version "x.y.z", an even second number 'y' denotes a stable version.
-For development versions 'y' is odd. For using straightforward score
-production, please use the latest stable version. Development versions
-may not produce good or nice scores.
+For development versions 'y' is odd. Sh, in theory, version 1.2 is stable,
+which means that there are no glaring errors in it. In practice 1.2.x is also
+unmaintained.
+
+1.3.x is in healthy development: lots of problems turn up, but they're
+fixed quickly. Therefore we recommend you try 1.2.x, if you have any
+problem with it, upgrade to the latest 1.3.x release.
@section Requirements
make -C Documentation/user/ dvi
@end example
-You need a working LilyPond binary to create the DVI sources .
-
+You need a working LilyPond binary to create the DVI and HTML sources.
@item use ASCII. Do
using @example
@end example
-and @emph{not} to us personally. See @file{Documentation/mail.texi} for
-more info.
+and @emph{not} to us personally. We have the following mailing lists:
+
+@itemize @bullet
+@item @uref{http://mail.gnu.org/mailman/listinfo/info-gnu-music,info-gnu-music@@gnu.org}
+is a low-volume list for information on the GNU Music project.
+ This list is moderated; ask
+ @email{drl@@gnu.org, David R. Linn} or
+ @email{hanwen@@cs.uu.nl, Han-Wen} to send announcements for this list.
+@item @uref{http://mail.gnu.org/mailman/listinfo/help-gnu-music,help-gnu-music@@gnu.org}
+ For help with using LilyPond.
+@item @uref{http://mail.gnu.org/mailman/listinfo/bug-gnu-music,bug-gnu-music@@gnu.org}
+If you have bugreports, you should send them to this list.
+@end itemize
+
@section Windows 32
MAJOR_VERSION=1
MINOR_VERSION=3
PATCH_LEVEL=98
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
#!@SHELL@
# tfmtoafm.sh --urg
-if [ $# -ne 1 ]; then
- echo "Usage: tfmtoafm FONT"
+tfm=$1
+font=`basename $1 .tfm`
+
+if [ $# -ne 1 -o "$tfm" = "$font" ]; then
+ echo "Usage: tfmtoafm TFM-FILE"
echo
- echo "example: tfmtoafm cmr10"
+ echo "example: tfmtoafm cmr10.tfm"
exit 2
fi
-font=$1
size=`echo $font | sed "s/[^0-9]*//"`
-afm=$1.afm
-fontfile=`kpsewhich $1.tfm`
+afm=$font.afm
+fontfile=`kpsewhich $font.tfm`
t1=/tmp/tfmtoafm1-$$
t2=/tmp/tfmtoafm2-$$
rm -f $t1 $t2 $font $afm
tail -127 $font | cut -f 1-2 > $t1
cat $t1 | cut -d, -f 1-2 > $t2
rm $t1
-nl -ba $t2 | awk -F '[ \t,]+' '{print "C "$2";\t"$3";\tB 0.00 0.00 "$4/'"$scaling"'" "$5/'"$scaling"'";"}' > $t1
+#nl -ba $t2 | awk -F '[ \t,]+' '{print "C "$2";\t"$3";\tB 0.00 0.00 "$4/'"$scaling"'" "$5/'"$scaling"'";"}' > $t1
+nl -ba $t2 | awk -F '[ \t,]+' '{print "C "$2" ; WX 0 ; N "$3" ; B 0.00 0.00 "$4/'"$scaling"'" "$5/'"$scaling"'" ;"}' > $t1
+count=`cat $t1 | wc -l`
+count=$((count + 1))
cat > $afm <<EOF
FontName cmr
StartFontMetrics
-StartCharMetrics
+StartCharMetrics $count
EOF
# urg 0 is difficult but we need it
-head -1 $t1 | sed "s/1;/0;/g" >> $afm
+head -1 $t1 | sed -e "s/C 1 ;/C 0 ;/" -e "s/-1 ;/-0 ;/" >> $afm
cat $t1 >> $afm
cat >> $afm <<EOF
EndCharMetrics
EndFontMetrics
EOF
-rm $t1 $t2
+rm $t1 $t2 $font
--- /dev/null
+
+
+\score {
+\notes \context Voice = VA \relative c'' {
+ \grace {[b8^1 c^2]} d4^3
+}
+\paper {linewidth = -1. ; }}
-cpp -P -traditional -o l-fake.ly -DFAKE_GRACE les-nereides.ly
\ No newline at end of file
+cpp -P -traditional -o l-fake.ly -DFAKE_GRACE les-nereides.ly
\property Score.PaperColumn \push #'space-factor = #0.6
\property Score.PaperColumn \push #'to-musical-spacing-factor = #0.04
- \property Voice.NoteHead \push #'font-size = #-1
- \property Voice.Stem \push #'font-size = #-1
+ \property Voice.NoteHead \push #'font-relative-size = #-1
+ \property Voice.Stem \push #'font-relative-size = #-1
\property Voice.Stem \push #'length = #6
\property Voice.Stem \push #'beamed-lengths =
#(map (lambda (x) (* 1.25 x)) '(0.0 2.5 2.0 1.5))
\property Voice.Stem \push #'beamed-minimum-lengths =
#(map (lambda (x) (* 1.25 x)) '(0.0 1.5 1.25 1.0))
- \property Voice.Beam \push #'font-size = #-1
- \property Voice.TextScript \push #'font-size = #-1
- \property Voice.Fingering \push #'font-size = #-1
- \property Voice.Slur \push #'font-size = #-1
- \property Staff.Accidentals \push #'font-size = #-1
+ \property Voice.Beam \push #'font-relative-size = #-1
+ \property Voice.TextScript \push #'font-relative-size = #-1
+ \property Voice.Fingering \push #'font-relative-size = #-1
+ \property Voice.Slur \push #'font-relative-size = #-1
+ \property Staff.Accidentals \push #'font-relative-size = #-1
\property Voice.Beam \push #'space-function = #grace-beam-space-function
)cis16
\property Staff."c0-position" = #-6
[cis32 a^1 fis^4 dis] [cis a )fis-2] s % s s
- \property Voice.NoteHead \pop #'font-size
- \property Voice.Stem \pop #'font-size
+ \property Voice.NoteHead \pop #'font-relative-size
+ \property Voice.Stem \pop #'font-relative-size
\property Voice.Stem \pop #'length
\property Voice.Stem \pop #'beamed-lengths
\property Voice.Stem \pop #'beamed-minimum-lengths
- \property Voice.Beam \pop #'font-size
- \property Voice.TextScript \pop #'font-size
- \property Voice.Fingering \pop #'font-size
- \property Voice.Slur \pop #'font-size
- \property Staff.Accidentals \pop #'font-size
+ \property Voice.Beam \pop #'font-relative-size
+ \property Voice.TextScript \pop #'font-relative-size
+ \property Voice.Fingering \pop #'font-relative-size
+ \property Voice.Slur \pop #'font-relative-size
+ \property Staff.Accidentals \pop #'font-relative-size
\property Voice.Beam \pop #'space-function
\property Score.PaperColumn \pop #'space-factor
\property Score.PaperColumn \pop #'to-musical-spacing-factor
s4 s8 s32 s s \clef bass;
\property Score.PaperColumn \push #'space-factor = #0.6
\property Score.PaperColumn \push #'to-musical-spacing-factor = #0.1
- \property Voice.NoteHead \push #'font-size = #-1
- \property Voice.Stem \push #'font-size = #-1
+ \property Voice.NoteHead \push #'font-relative-size = #-1
+ \property Voice.Stem \push #'font-relative-size = #-1
\property Voice.Stem \push #'length = #6
- \property Voice.Slur \push #'font-size = #-1
+ \property Voice.Slur \push #'font-relative-size = #-1
\property Voice.Slur \push #'attachment-offset = #'((-0.5 . 0) . (0.5 . 0))
<e,,,32( e,>
- \property Voice.NoteHead \pop #'font-size
- \property Voice.Stem \pop #'font-size
+ \property Voice.NoteHead \pop #'font-relative-size
+ \property Voice.Stem \pop #'font-relative-size
\property Voice.Stem \pop #'length
- \property Voice.Slur \pop #'font-size
+ \property Voice.Slur \pop #'font-relative-size
\property Score.PaperColumn \pop #'space-factor
\property Score.PaperColumn \pop #'to-musical-spacing-factor
<)gis'2 e>
\consists "Text_engraver";
%GURGURGU, text is initialised using TextScript
TextScript \push #'style = #"italic"
- %%% TextScript \push #'font-size = #2
+ %%% TextScript \push #'font-relative-size = #2
\consists "Skip_req_swallow_translator";
rh=\property Thread.NoteHead \push #'style = #'default
lh=\property Thread.NoteHead \push #'style = #'diamond
-n = \property Thread.NoteHead \pop #'font-size % = #'diamond %\property Thread.fontSize=#0
-sm=\property Thread.NoteHead \push #'font-size = #-1
+n = \property Thread.NoteHead \pop #'font-relative-size % = #'diamond %\property Thread.fontSize=#0
+sm=\property Thread.NoteHead \push #'font-relative-size = #-1
% su=\property Voice.verticalDirection=#1
% sd=\property Voice.verticalDirection=#-1
-\version "1.3.96"
+\version "1.3.98"
%{
See scm/chord-names.scm: chord::names-alist-american
James Hammons <jlhamm@pacificnet.net>
chord = \notes\transpose c''\chords{
\property ChordNames.ChordNames \push #'style = #"american"
-c
-cs:m
-df:m5-
-c:5^3
-c:4^3
-c:5+
-c:2^3
-c:m5-.7-
-c:7+
-c:7.4^3
-c:5+.7
-c:m5-.7
-c:5-.7+
-c:m7+
-c:m7
-c:7
-c:6
-c:m6
-c:9^7
-c:6.9^7
-c:9
-c:7+.9
-c:m7.9
+c % Major triad
+cs:m % Minor triad
+df:m5- % Diminished triad
+c:5^3 % Root-fifth chord
+c:4^3 % Suspended fourth triad
+c:5+ % Augmented triad
+c:2^3 % "2" chord
+c:m5-.7- % Diminished seventh
+c:7+ % Major seventh
+c:7.4^3 % Dominant seventh suspended fourth
+c:5+.7 % Augmented dominant seventh
+c:m5-.7 % "Half" diminished seventh
+c:5-.7 % Dominant seventh flat fifth
+c:5-.7+ % Major seventh flat fifth
+c:m7+ % Minor-major seventh
+c:m7 % Minor seventh
+c:7 % Dominant seventh
+c:6 % Major sixth
+c:m6 % Minor sixth
+c:9^7 % Major triad w/added ninth
+c:6.9^7 % Six/Nine chord
+c:9 % Dominant ninth
+c:7+.9 % Major ninth
+c:m7.9 % Minor ninth
}
\score{
}
}
}
-
-% (((0 . 0) (2 . -1) (4 . 0)) . ("Bar" . ("script" . "Baz")))
\translator {
\GraceContext
- NoteHead \push #'font-size = #-2
- NoteHead \push #'font-size = #-2
+ NoteHead \push #'font-relative-size = #-2
+ NoteHead \push #'font-relative-size = #-2
Stem \push #'flag-style = ##f
% The following determines the length of stems without beams
% default is between 2.8 and 4.0 depending on the number of flags
Stem \push #'length = #6
- Stem \push #'font-size = #-2
+ Stem \push #'font-relative-size = #-2
GraceAlignItem \push #'horizontal-space = #1
Stem \push #'flag-style = #""
\translator {
\OrchestralScoreContext
timeSignatureStyle = #"C"
- % 16 pt
- instrumentScriptPadding = #55 %% urg, this is in pt
- instrScriptPadding = #35
- % 20pt
- %instrumentScriptPadding = #60 %% urg, this is in pt
- %instrScriptPadding = #40
- marginScriptHorizontalAlignment = #1
}
}
}
CueVoiceContext = \translator {
\VoiceContext
\name CueVoice;
- basicNoteHeadProperties \push #'font-size = #-1
- basicStemProperties \push #'font-size = #-1
- basicBeamProperties \push #'font-size = #-1
- basicTextScriptProperties \push #'font-size = #-1
- basicSlurProperties \push #'font-size = #-1
- basicLocalKeyProperties \push #'font-size = #-1
+ basicNoteHeadProperties \push #'font-relative-size = #-1
+ basicStemProperties \push #'font-relative-size = #-1
+ basicBeamProperties \push #'font-relative-size = #-1
+ basicTextScriptProperties \push #'font-relative-size = #-1
+ basicSlurProperties \push #'font-relative-size = #-1
+ basicLocalKeyProperties \push #'font-relative-size = #-1
};
\translator{ \CueVoiceContext }
StaffContext = \translator{\StaffContext
\translator {
\HaraKiriStaffContext
}
- \translator {
- \ScoreContext
- %instrumentScriptPadding = #55 %% urg, this is in pt
- %instrScriptPadding = #35
- marginScriptHorizontalAlignment = #1
- %marginScriptPadding = #15
- %marginScriptHorizontalAlignment = #0
- }
}
\midi {
\tempo 1 = 60;
--- /dev/null
+
+
+\score {
+\notes \context Voice = VA \relative c'' {
+ \grace {[b8^1 c^2]} d4^3
+}
+\paper {linewidth = -1. ; }}
--- /dev/null
+
+%{
+
+this combines instrument names and multimeasure rests (there was an
+interesting bug in 1.3.98)
+
+%}
+
+\version "1.3.97";
+\score{
+ \context Staff <
+ \property Staff.instrument = "instrument"
+ \property Staff.instr = "instr"
+ \notes{c''1 \break R1 }
+ >
+ \paper {
+ \translator { \StaffContext
+ \consists Instrument_name_engraver;
+
+ }
+ }
+ }
+
;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (super "o7"))
;jazz: the delta, see jazz-chords.ly
- (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (super ((font-family . "math") "N")))
- (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") ((raise . 0.5) ((kern . -0.5) ((font-size . "-3") "/"))) "7")) ; slashed o
+ (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (super ((font-family . math) "N")))
+ (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") ((raise . 0.5) ((kern . -0.5) ((font-relative-size . -3) "/"))) "7")) ; slashed o
;(((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (super "x7"))
; slashed o
d-\textscript #'(lines "one" "two" "three")
e-\textscript #'(lines (bold "one")
- (rows "and" "there" "is" ((font-family . "number") "2"))
+ (rows "and" "there" "is" ((font-family . number) "2"))
(italic "three"))
f-\textscript #'(finger "3")
- g-\textscript #'(music (named "noteheads-2"))
+ g-\textscript #'(music (named "noteheads-2" "flags-u3"))
}
\paper{
linewidth = -1.\mm;
\translator{
\ScoreContext
- TextScript \push #'font-family = #"roman"
+ TextScript \push #'font-family = #'roman
TextScript \pop #'no-spacing-rods
TextScript \push #'direction = #1
}
%% URG: this changes dynamics too
%%textStyle = #"italic"
timeSignatureStyle = #"C"
- instrumentScriptPadding = #60 %% urg, this is in pt
- instrScriptPadding = #40 %% urg, this is in pt
- marginScriptHorizontalAlignment = #1
maximumRestCount = #1
}
}
%% URG: this changes dynamics too
%%textStyle = #"italic"
timeSignatureStyle = #"C"
- instrumentScriptPadding = #60 %% urg, this is in pt
- instrScriptPadding = #40 %% urg, this is in pt
- marginScriptHorizontalAlignment = #1
maximumRestCount = #1
}
}
%% URG: this changes dynamics too
%%textStyle = #"italic"
timeSignatureStyle = #"C"
- instrumentScriptPadding = #60 %% urg, this is in pt
- instrScriptPadding = #40 %% urg, this is in pt
- marginScriptHorizontalAlignment = #1
maximumRestCount = #1
}
}
\paper {
\translator { \VoiceContext
- NoteHead \push #'font-size = #-2
+ NoteHead \push #'font-relative-size = #-2
}
}
}
--- /dev/null
+\header {
+ crossRefNumber = "1";
+ tagline = "Lily was here 1.3.98 -- automatically converted from ABC";
+ title = "Scales";
+}
+voicedefault = \notes {
+\property Score.defaultBarType="empty"
+
+\key c \major; c'8 -"major" d'8 e'8 f'8 g'8 a'8 b'8
+c''8 \key c \ionian; c'8 -"ionian" d'8 e'8 f'8 g'8 a'8
+b'8 c''8 \key d \dorian; c'8 -"dorian" d'8 e'8 f'8 g'8
+a'8 b'8 c''8 \key e \phrygian; c'8 -"phrygian" d'8 e'8 f'8
+ g'8 a'8 b'8 c''8 \key f \lydian; c'8 -"lydian" d'8 e'8
+ f'8 g'8 a'8 b'8 c''8 \key g \mixolydian; c'8 -"mixolydian"
+ d'8 e'8 f'8 g'8 a'8 b'8 c''8 \key a \minor; c'8
+-"minor" d'8 e'8 f'8 g'8 a'8 b'8 c''8 \key a \aeolian;
+ c'8 -"aeolian" d'8 e'8 f'8 g'8 a'8 b'8 c''8
+\key b \locrian; c'8 -"locrian" d'8 e'8 f'8 g'8 a'8 b'8
+c''8 \key f \major; c'8 -"major" d'8 e'8 f'8 g'8 a'8
+bes'8 c''8 \key f \ionian; c'8 -"ionian" d'8 e'8 f'8 g'8
+ a'8 bes'8 c''8 \key g \dorian; c'8 -"dorian" d'8 e'8 f'8
+ g'8 a'8 bes'8 c''8 \key a \phrygian; c'8 -"phrygian" d'8
+e'8 f'8 g'8 a'8 bes'8 c''8 \key bes \lydian; c'8
+-"lydian" d'8 e'8 f'8 g'8 a'8 bes'8 c''8
+\key c \mixolydian; c'8 -"mixolydian" d'8 e'8 f'8 g'8 a'8
+bes'8 c''8 \key d \aeolian; c'8 -"aeolian" d'8 e'8 f'8 g'8
+ a'8 bes'8 c''8 \key d \minor; c'8 -"minor" d'8 e'8 f'8
+ g'8 a'8 bes'8 c''8 \key e \locrian; c'8 -"locrian" d'8
+e'8 f'8 g'8 a'8 bes'8 c''8
+}\score{
+ \notes <
+
+ \context Staff="default"
+ {
+ \$voicedefault
+ }
+
+ >
+ \paper {
+ }
+ \midi {}
+}
es,, f ges as bes ces d es
\key as\minor;
- as, bes ces des es fes g as
-
-
- }
+ as, bes ces des es fes g as}
+
\paper { }
\midi { }
}
\context Voice=one {
\shiftOff
\stemUp
- e4
+ e4 -5
}
\context Voice=two {
\shiftOn
\stemUp
- cis
+ cis-4
}
\context Voice=three {
\shiftOnn
\stemUp
- ais
+ ais-3
}
\context Voice=four {
\shiftOnnn
\stemUp
- fis
+ fis-2
}
>
$(outdir)/my-lily-parser.o: $(outdir)/parser.hh
$(outdir)/my-lily-lexer.o: $(outdir)/parser.hh
$(outdir)/lexer.o: $(outdir)/parser.hh
-$(outdir)/lily-version.o: $(outdir)/version.hh
-$(outdir)/lily-guile.o: $(outdir)/version.hh
+$(outdir)/lily-guile.o: $(outdir)/version.hh
+$(outdir)/lily-version.o: $(outdir)/version.hh
gh_number_p (gh_car (min_dims))
&& gh_number_p (gh_cdr (min_dims)))
{
- y.unite (Interval (gh_scm2double (gh_car (min_dims)),
- gh_scm2double (gh_cdr (min_dims))));
+ y.unite (ly_scm2interval (min_dims));
+
}
SCM extra_dims = e->remove_elt_property ("extra-space");
}
Real where_f=0;
- for (int i=0 ; i < elems.size(); i++)
+ for (int j=0 ; j < elems.size(); j++)
{
- Real dy = - stacking_dir * dims[i][-stacking_dir];
- if (i)
- dy += stacking_dir * dims[i-1][stacking_dir];
+ Real dy = - stacking_dir * dims[j][-stacking_dir];
+ if (j)
+ dy += stacking_dir * dims[j-1][stacking_dir];
- if (i)
+ if (j)
{
dy = (dy >? threshold[SMALLER] )
<? threshold[BIGGER];
}
where_f += stacking_dir * dy;
- elems[i]->translate_axis (where_f, a);
+ elems[j]->translate_axis (where_f, a);
}
}
*/
edge->set_extent_callback (Score_element::point_dimension_callback_proc, X_AXIS);
- align_l_->set_elt_property ("group-center-element", edge->self_scm ());
+ align_l_->set_elt_property ("self-alignment-X", edge->self_scm ());
announce_element (edge, 0);
column_alist_ = scm_assoc_set_x (column_alist_, edge_sym, edge->self_scm ());
Spanner * finished_cresc_p_;
Spanner * cresc_p_;
- Dynamic_script_req* script_req_l_;
+ Text_script_req* script_req_l_;
Span_req * current_cresc_req_;
Drul_array<Span_req*> accepted_spanreqs_drul_;
bool
Dynamic_engraver::do_try_music (Music * m)
{
- if (Dynamic_script_req* d = dynamic_cast <Dynamic_script_req*> (m))
+ if (dynamic_cast <Text_script_req*> (m)
+ && m->get_mus_property ("text-type") == ly_symbol2scm ("dynamic"))
{
- script_req_l_ = d;
+ script_req_l_ = dynamic_cast<Text_script_req*> (m);
return true;
}
else if (Span_req* s = dynamic_cast <Span_req*> (m))
Axis_group_interface::set_interface (line_spanner_);
Axis_group_interface::set_axes (line_spanner_, Y_AXIS, Y_AXIS);
- Request * rq = accepted_spanreqs_drul_[START];
- if (script_req_l_) rq = script_req_l_ ;
+ Music * rq = accepted_spanreqs_drul_[START];
+ if (script_req_l_)
+ rq = script_req_l_ ;
announce_element (line_spanner_, rq);
virtual void do_pre_move_processing ();
private:
- Dynamic_script_req* script_req_l_;
+ Music* script_req_l_;
Audio_dynamic* audio_p_;
};
{
if (!script_req_l_)
{
- if(Dynamic_script_req* d = dynamic_cast <Dynamic_script_req*> (r))
+ if( dynamic_cast <Text_script_req*> (r)
+ && r->get_mus_property ("text-type") == ly_symbol2scm ("dynamic"))
{
- script_req_l_ = d;
+ script_req_l_ = r;
return true;
}
}
virtual bool do_equal_b (Request const*) const;
};
-class Dynamic_script_req : public Script_req
-{
-protected:
- VIRTUAL_COPY_CONS (Music);
-};
/// request which has some kind of pitch
struct Melodic_req :virtual Request
class Script_req : public virtual Request
{
public:
- Direction dir_;
- void set_direction (Direction d ) { dir_ = d; }
- Direction get_direction () const { return dir_; }
+ void set_direction (Direction d);
+ Direction get_direction () const;
VIRTUAL_COPY_CONS(Music);
Script_req ();
request_with_dir:
script_dir request_that_take_dir {
if (Script_req * gs = dynamic_cast<Script_req*> ($2))
- gs->dir_ = Direction ($1);
+ gs->set_direction (Direction ($1));
else if ($1)
$2->origin ()->warning (_ ("Can't specify direction for this request"));
$$ = $2;
$$->set_spot (THIS->here_input ());
}
| DYNAMICSCRIPT embedded_scm {
- Dynamic_script_req *d = new Dynamic_script_req;
+ /*
+ TODO: junkme, use text-type == dynamic
+ */
+ Text_script_req *d = new Text_script_req;
+ d->set_mus_property ("text-type" , ly_symbol2scm ("dynamic"));
d->set_mus_property ("text", $2);
d->set_spot (THIS->here_input ());
$$ = d;
$$ = t;
}
| DIGIT {
- /*
- Maybe use Finger_script_request?
- */
+ String ds = to_str ($1);
Text_script_req* t = new Text_script_req;
- t->set_mus_property ("text",
- gh_cons (ly_symbol2scm ("finger"),
- ly_str02scm (to_str ($1).ch_C ())));
+
+ t->set_mus_property ("text", ly_str02scm (ds.ch_C()));
+ t->set_mus_property ("text-type" , ly_symbol2scm ("finger"));
t->set_spot (THIS->here_input ());
$$ = t;
}
{
set_mus_property ("type", ly_symbol2scm ("request"));
}
+
+void
+Script_req::set_direction (Direction d)
+{
+ set_mus_property ("direction", gh_int2scm (d));
+}
+
+Direction
+Script_req::get_direction () const
+{
+ SCM d = get_mus_property ("direction");
+
+ return (isdir_b (d)) ? to_dir (d) : CENTER;
+}
+
+
if (!lookup_l_)
{
Score_element * urg = (Score_element*)this;
- SCM sz = urg->remove_elt_property ("font-size");
+ SCM sz = urg->remove_elt_property ("font-relative-size");
int i = (gh_number_p (sz))
? gh_scm2int (sz)
: 0;
bool
Text_engraver::do_try_music (Music *m)
{
- if (Text_script_req *r = dynamic_cast<Text_script_req*> (m))
+ if (dynamic_cast<Text_script_req*> (m)
+ && m->get_mus_property ("text-type") != ly_symbol2scm ("dynamic"))
{
- reqs_.push (r);
+ reqs_.push (dynamic_cast<Text_script_req*> (m));
return true;
}
return false;
// URG: Text vs TextScript
String basic = "TextScript";
-#if 0
- // maybe use some sort of TYPE for script/dynamic/finger?
-
- // separate engraver?
- if (r->style_str_== "finger")
+ if (r->get_mus_property ("text-type") == ly_symbol2scm ("finger"))
{
basic = "Fingering";
}
-#endif
+
Item *text = new Item (get_property (basic.ch_C ()));
/*
if (paper == SCM_EOL)
paper = scm_string_to_symbol (me->paper_l ()->get_scmvar ("style_sheet"));
- SCM font_name;
+ // should move fallback to scm
+ SCM font_name = ly_str02scm ("cmr10");
if (gh_pair_p (style))
{
SCM f = get_elt_property (me, "style-to-font-name");
- font_name = gh_call2 (f, paper, gh_cdr (style));
+ if (gh_procedure_p (f))
+ font_name = gh_call2 (f, paper, gh_cdr (style));
}
else
{
SCM f = get_elt_property (me, "properties-to-font-name");
- font_name = gh_call2 (f, paper, properties);
+ if (gh_procedure_p (f))
+ font_name = gh_call2 (f, paper, properties);
}
- // should move fallback to scm
- if (!gh_string_p (font_name))
- font_name = ly_str02scm ("cmr10");
-
SCM lookup = scm_assoc (ly_symbol2scm ("lookup"), properties);
Molecule mol;
Stem \push #'stem-length = #6.0
Stem \push #'direction = #1
- NoteHead \push #'font-size = #-1
- Stem \push #'font-size = #-1
+ NoteHead \push #'font-relative-size = #-1
+ Stem \push #'font-relative-size = #-1
Stem \push #'stem-shorten = #'(0)
- Beam \push #'font-size = #-1
- TextScript \push #'font-size = #-1
- Slur \push #'font-size = #-1
- Accidentals \push #'font-size = #-1
+ Beam \push #'font-relative-size = #-1
+ TextScript \push #'font-relative-size = #-1
+ Slur \push #'font-relative-size = #-1
+ Accidentals \push #'font-relative-size = #-1
Beam \push #'thickness = #0.3
Beam \push #'space-function = #(lambda (x) 0.5)
% contributed by Paolo Zuliani <zuliap@easynet.it>
-\notenames #'
+\notenames #'(
(dobb . ( -1 0 -2 ))
(dob . ( -1 0 -1 ))
(do . ( -1 0 0 ))
(4 . 0)
(5 . 0)
(6 . 0)
-
)
+
minor = #'(
(0 . 0)
(1 . 0)
(5 . -1)
(6 . -1)
)
-
-
-%{ OUTDATED: someone please fix these
-ionian = 0
-locrian = 1
-aeolian = 3
-mixolydian = 5
-lydian = 7
-phrygian = 8
-dorian = 10
-%}
+
+
+ionian = #'(
+ (0 . 0)
+ (1 . 0)
+ (2 . 0)
+ (3 . 0)
+ (4 . 0)
+ (5 . 0)
+ (6 . 0)
+ )
+
+
+locrian = #'(
+ (0 . 0)
+ (1 . -1)
+ (2 . -1)
+ (3 . 0)
+ (4 . -1)
+ (5 . -1)
+ (6 . -1)
+ )
+
+
+aeolian = #'(
+ (0 . 0)
+ (1 . 0)
+ (2 . -1)
+ (3 . 0)
+ (4 . 0)
+ (5 . -1)
+ (6 . -1)
+ )
+
+
+mixolydian = #'(
+ (0 . 0)
+ (1 . 0)
+ (2 . 0)
+ (3 . 0)
+ (4 . 0)
+ (5 . 0)
+ (6 . -1)
+ )
+
+
+lydian = #'(
+ (0 . 0)
+ (1 . 0)
+ (2 . 0)
+ (3 . 1)
+ (4 . 0)
+ (5 . 0)
+ (6 . 0)
+ )
+
+
+phrygian = #'(
+ (0 . 0)
+ (1 . -1)
+ (2 . -1)
+ (3 . 0)
+ (4 . 0)
+ (5 . -1)
+ (6 . -1)
+)
+
+
+dorian = #'(
+ (0 . 0)
+ (1 . 0)
+ (2 . -1)
+ (3 . 0)
+ (4 . 0)
+ (5 . 0)
+ (6 . -1)
+ )
+
FONT_FILES = $(filter-out $(TEST_FILES),$(wildcard feta*[0-9].mf))
XPM_FONTS = feta20 feta-nummer10 feta-braces20
+#CM_AFM_FILES = cmr10
+
+$(outdir)/cmr10.afm:
+ -$(BASH) $(buildscripts)/tfmtoafm.sh `kpsewhich cmr10.tfm`
+ -mv $(@F) $@
LOG_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.log))
TEXTABLES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.tex))
-AFM_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.afm) $(AF_FILES:.af=.afm))
+AFM_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.afm) $(AF_FILES:.af=.afm) $(addsuffix .afm, $(CM_AFM_FILES)))
TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm))
PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa))
%% urg: in pt?
barNumberScriptPadding = #15
- %% URG: this changes dynamics too
- %%textStyle = #"italic"
- timeSignatureStyle = #"C"
- marginScriptHorizontalAlignment = #1
maximumRestCount = #1
}
}
;jazz: the delta, see jazz-chords.ly
;;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (super ((font-family . "math") "N"))
;; slashed o
- (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") ((raise . 0.5) ((kern . -0.5) ((font-size . "-3") "/"))) "7")) ; slashed o
+ (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows ((raise . 1) "o") ((raise . 0.5) ((kern . -0.5) ((font-relative-size . -3) "/"))) "7")) ; slashed o
(((0 . 0) (2 . 0) (4 . 1) (6 . -1)) . ("aug7"))
- (((0 . 0) (2 . 0) (4 . -1) (6 . 0)) . (rows "maj7" (music (named ("accidentals--1"))) "5"))
+ (((0 . 0) (2 . 0) (4 . -1) (6 . 0)) . (rows "maj7" ((font-relative-size . -2) ((raise . 0.2) (music (named "accidentals--1")))) "5"))
+ (((0 . 0) (2 . 0) (4 . -1) (6 . -1)) . (rows "7" ((font-relative-size . -2) ((raise . 0.2) (music (named "accidentals--1")))) "5"))
(((0 . 0) (3 . 0) (4 . 0) (6 . -1)) . ("7sus4"))
;; Common ninth chords
(((0 . 0) (2 . 0) (4 . 0) (5 . 0) (1 . 0)) . ("6/9")) ;; we don't want the '/no7'
- (((0 . 0) (2 . 0) (4 . 0) (5 . 0)) . ("maj6"))
+ (((0 . 0) (2 . 0) (4 . 0) (5 . 0)) . ("6"))
(((0 . 0) (2 . -1) (4 . 0) (5 . 0)) . ("m6"))
(((0 . 0) (2 . 0) (4 . 0) (1 . 0)) . ("add9"))
(((0 . 0) (2 . 0) (4 . 0) (6 . 0) (1 . 0)) . ("maj9"))
)
chord::names-alist-american))
+;; Jazz chords, by Atte André Jensen
+;; Note: This uses the american list as a base
+
+(define chord::names-alist-jazz '())
+(set! chord::names-alist-jazz
+ (append
+ '(
+ ; half diminished seventh chord = slashed o
+ (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (("o" (type . "super")) ("/" (size . -2) (offset . (-0.58 . 0.5))) ))
+ ; diminished seventh chord = o
+ (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (("o" (type . "super"))))
+ ; major seventh chord = triangle
+ (((0 . 0) (2 . 0) (4 . 0) (6 . 0)) . ((super ((font-family . "math") "N")) (size . -3)))
+ ; minor major seventh chord = m triangle
+ (((0 . 0) (2 . -1) (4 . 0) (6 . 0)) . (("m") ((super ((font-family . math) "N")) (size . -3))))
+ ; augmented dominant = +7
+ (((0 . 0) (2 . 0) (4 . +1) (6 . -1)) . (super "+7"))
+
+;; Missing jazz chord definitions go here (note new syntax: see american for hints)
+
+ )
+ chord::names-alist-american))
+
;;;;;;;;;;
(list
(append '(named)
(list
- (append '((font-size . "-2"))
+ (append '((font-relative-size . -2))
+ (list (append '((raise . 0.6))
(list
(string-append "accidentals-"
- (number->string (caddr pitch)))))))))))))
-
+ (number->string (caddr pitch)))))))))))))))
(define (step->text pitch)
(string-append
(subtractions #f))
(chord::inner-name-banter tonic user-name additions subtractions base-and-inversion)))
+;; Jazz style--basically similar to american with minor changes
+(define (chord::name-jazz tonic user-name pitches base-and-inversion)
+ (let ((additions (chord::additions pitches))
+ (subtractions #f))
+ (chord::inner-name-banter tonic user-name additions subtractions base-and-inversion)))
+
;; C++ entry point
;;
;; Check for each subset of chord, full chord first, if there's a
(style-to-font-name . ,style-to-font-name)
(markup-to-properties . ,markup-to-properties)
(font-family . roman)
- (font-size . "-1")
+ (font-relative-size . -1)
(meta . ,(element-description "BarNumber"
text-interface break-aligned-interface))
))
(properties-to-font-name . ,properties-to-font-name)
(style-to-font-name . ,style-to-font-name)
(markup-to-properties . ,markup-to-properties)
- (font-size . "0") ;; Hmm, 0 should be the default, maybe??
- (font-family . "roman")
+ (font-relative-size . 0)
+ (font-family . roman)
+ (font-shape . upright)
(meta . ,(element-description "ChordNames" chord-name-interface))
))
(LeftEdge . (
(break-align-symbol . Left_edge_item)
+ (X-offset-callbacks . (,Break_align_interface::alignment_callback))
(breakable . #t)
- (meta . ,(element-description "LeftEdge" break-aligned-interface))
+m (meta . ,(element-description "LeftEdge" break-aligned-interface))
))
(Fingering . (
(molecule-callback . ,Text_item::brew_molecule)
+ (X-offset-callbacks . (,Side_position::centered_on_parent ,Side_position::aligned_on_self))
(padding . 3.0)
(self-alignment-X . 0)
- (font-style . dynamic)
+ (font-style . finger)
(properties-to-font-name . ,properties-to-font-name)
(style-to-font-name . ,style-to-font-name)
(markup-to-properties . ,markup-to-properties)
-
(meta . ,(element-description "Fingering" finger-interface text-script-interface text-interface side-position-interface))
))
(properties-to-font-name . ,properties-to-font-name)
(style-to-font-name . ,style-to-font-name)
(markup-to-properties . ,markup-to-properties)
- (font-family . "roman")
+ (font-family . roman)
(meta . ,(element-description "InstrumentName" text-interface break-aligned-interface))
))
(properties-to-font-name . ,properties-to-font-name)
(style-to-font-name . ,style-to-font-name)
(markup-to-properties . ,markup-to-properties)
- (font-family . "roman")
+ (font-family . roman)
(meta . ,(element-description "LyricText" lyric-syllable-interface text-interface))
))
(properties-to-font-name . ,properties-to-font-name)
(style-to-font-name . ,style-to-font-name)
(markup-to-properties . ,markup-to-properties)
- (font-family . "roman")
- (font-size . "0")
+ (font-family . roman)
+ (font-relative-size . 0)
(meta . ,(element-description "NoteName"
note-name-interface
general-element-interface))
(X-offset-callbacks . (,Side_position::centered_on_parent ,Side_position::aligned_on_self))
(Y-offset-callbacks . (,Side_position::aligned_side))
(molecule-callback . ,Text_item::brew_molecule)
- (font-shape . "italic")
+ (font-shape . italic)
(properties-to-font-name . ,properties-to-font-name)
(style-to-font-name . ,style-to-font-name)
(markup-to-properties . ,markup-to-properties)
(properties-to-font-name . ,properties-to-font-name)
(style-to-font-name . ,style-to-font-name)
(markup-to-properties . ,markup-to-properties)
- (font-family . "roman")
+ (font-family . roman)
(meta . ,(element-description "StanzaNumber" break-aligned-interface text-interface))
))
(,Side_position::aligned_side
,Side_position::centered_on_parent))
(no-spacing-rods . #t)
- (font-shape . "italic")
+ (font-shape . italic)
(properties-to-font-name . ,properties-to-font-name)
(style-to-font-name . ,style-to-font-name)
(markup-to-properties . ,markup-to-properties)
(properties-to-font-name . ,properties-to-font-name)
(style-to-font-name . ,style-to-font-name)
(markup-to-properties . ,markup-to-properties)
- (font-family . "roman")
+ (font-family . roman)
(meta . ,(element-description "TextScript" text-script-interface text-interface side-position-interface ))
))
(TextSpanner . (
(molecule-callback . ,Text_spanner::brew_molecule)
- (font-shape . "italic")
+ (font-shape . italic)
(properties-to-font-name . ,properties-to-font-name)
(style-to-font-name . ,style-to-font-name)
(markup-to-properties . ,markup-to-properties)
(properties-to-font-name . ,properties-to-font-name)
(style-to-font-name . ,style-to-font-name)
(markup-to-properties . ,markup-to-properties)
- (font-shape . "italic")
- (meta . ,(element-description "TupletBracket"
+ (font-shape . italic)
+ (meta . ,(element-description "TupletBracket" text-interface
tuplet-bracket-interface))
))
(UnaChordaPdeal . (
(molecule-callback . ,Text_item::brew_molecule)
- (font-shape . "italic")
+ (font-shape . italic)
(properties-to-font-name . ,properties-to-font-name)
(style-to-font-name . ,style-to-font-name)
(markup-to-properties . ,markup-to-properties)
;;;
-;; Corresponding properties:
-;;
-;; font-series font-shape font-family font-name font-point font-size
-;;
+
(define style-to-font-alist
- '(
- (finger . "* * number * * -3")
- (volta . "* * number * * -2")
- (timesig . "* * number * * 0")
- (mmrest . "* * number * * 0")
- (mark . "* * number * * 1")
- (script . "* * roman * * -1")
- (large . "* * roman * * 1")
- (Large . "bold * roman * * 2")
- (dynamic . "bold * dynamic * * 0")
- ))
+ `(
+ (finger . ((font-family . number) (font-relative-size . -3)))
+ (volta . ((font-family . number) (font-relative-size . -2)))
+ (timesig . ((font-family . number) (font-relative-size . 0)))
+ (mmrest . ((font-family . number) (font-relative-size . -1)))
+ (mark . ((font-family . number) (font-relative-size . 1)))
+ (script . ((font-family . roman) (font-relative-size . -1)))
+ (large . ((font-family . roman) (font-relative-size . 1)))
+ (Large . ((font-series . bold) (font-family . roman) (font-relative-size . 2)))
+ (dynamic . ((font-series . bold) (font-family . dynamic) (font-relative-size . 0)))
+
+))
+
+(define (font-field name font-descr)
+ (list-ref
+ font-descr
+ (cond
+ ((eq? name 'font-relative-size) 0)
+ ((eq? name 'font-series) 1)
+ ((eq? name 'font-shape) 2)
+ ((eq? name 'font-family) 3)
+ ((eq? name 'font-name) 4)
+ ((eq? name 'font-point-size-size) 5)
+ )
+ ))
+
+
+;; return that part of LIST for which PRED is true.
+(define (filter-list pred? list)
+ (if (null? list) '()
+ (let* (
+ (rest (filter-list pred? (cdr list)))
+ )
+ (if (pred? (car list))
+ (cons (car list) rest)
+ rest
+ )
+ )
+ )
+ )
+
+;; return those descriptions from FONT-DESCR-LIST whose FIELD-NAME matches VALUE
+
+;;;;;;;;; TODO TODO . (should not use filtering?)
+;; this is bad, since we generate garbage every font-lookup.
+;; otoh, if the qualifiers is narrow enough , we don't generate much garbage.
+;;o
-(define paper20-style-sheet-alist-template
+
+;;; kut kut, het lukt gewoon niet, vandaag:
+
+;;;couldn't find font satisfying ((font-family . roman) (font-shape . upright) (font-relative-size . -3))
+
+
+(define (filter-field field-name value font-descr-alist)
+ (if (string? value)
+ (let ((err (current-error-port)))
+ (display "\nignoring string qualifier: " err)
+ (display value err)
+ (display "\n" err)
+ font-descr-alist)
+ (filter-list
+ (lambda (x) (eq? value (font-field field-name (car x))))
+ font-descr-alist)
+ ))
+
+(define paper20-style-sheet-alist
'(
- (("medium upright music feta 20" . 0) . "feta20")
- (("medium upright music feta 16" . -1) . "feta16")
- (("medium upright music feta 13" . -2) . "feta13")
- (("medium upright music feta 13" . -3) . "feta11")
- (("medium upright music feta 13" . -4) . "feta11")
- (("medium upright music feta 23" . 1) . "feta23")
- (("medium upright music feta 26" . 2) . "feta26")
- (("medium upright braces feta-braces 20" . 0) . "feta-braces20")
- (("bold italic dynamic feta-din 14" . 2) . "feta-din14")
- (("bold italic dynamic feta-din 13" . 1) . "feta-din13")
- (("bold italic dynamic feta-din 12" . 0) . "feta-din12")
- (("bold italic dynamic feta-din 10" . -1) . "feta-din10")
- (("bold italic dynamic feta-din 8" . -2) . "feta-din8")
- (("bold italic dynamic feta-din 7" . -3) . "feta-din7")
- (("bold italic dynamic feta-din 6" . -4) . "feta-din6")
- (("bold italic dynamic feta-din 5" . -5) . "feta-din5")
- (("bold italic dynamic feta-din 4" . -6) . "feta-din4")
- ;; Hmm
- (("medium upright number feta-nummer 13" . 3) . "feta-nummer14")
- (("medium upright number feta-nummer 13" . 2) . "feta-nummer13")
- (("medium upright number feta-nummer 12" . 1) . "feta-nummer12")
- (("medium upright number feta-nummer 10" . 0) . "feta-nummer10")
- (("medium upright number feta-nummer 8" . -1) . "feta-nummer8")
- (("medium upright number feta-nummer 7" . -2) . "feta-nummer7")
- (("medium upright number feta-nummer 6" . -3) . "feta-nummer6")
- (("medium upright number feta-nummer 5" . -4) . "feta-nummer5")
- (("medium upright number feta-nummer 4" . -5) . "feta-nummer4")
- (("medium upright roman cmr 8" . -3) . "cmr8" )
- (("medium upright roman cmr 8" . -2) . "cmr8" )
- (("medium upright roman cmr 8" . -1) . "cmr8" )
- (("medium upright roman cmr 10" . 0) . "cmr10")
- (("medium upright roman cmr 12" . 1) . "cmr12")
- (("bold upright roman cmbx 10" . 0) . "cmbx10")
- (("bold upright roman cmbx 12" . 1) . "cmbx12")
- (("medium italic roman cmbx 10" . 0) . "cmbx10")
- (("medium italic roman cmbx 12" . 1) . "cmbx12")
- (("medium upright math msam 10" . -3) . "msam10")
- (("medium upright math msam 10" . -2) . "msam10")
- (("medium upright math msam 10" . -1) . "msam10")
- (("medium upright math msam 10" . 0) . "msam10")
+ ((0 medium upright music feta 20) . "feta20")
+ ((-1 medium upright music feta 16) . "feta16")
+ ((-2 medium upright music feta 13) . "feta13")
+ ((-3 medium upright music feta 13) . "feta11")
+ ((-4 medium upright music feta 13) . "feta11")
+ ((1 medium upright music feta 23) . "feta23")
+ ((2 medium upright music feta 26) . "feta26")
+ ((0 medium upright braces feta-braces 20) . "feta-braces20")
+ ((0 medium italic roman cmti 10) . "cmti10")
+ ((1 medium italic roman cmti 12) . "cmti12")
+ ((3 bold italic dynamic feta 10) . "feta-din13")
+ ((2 bold italic dynamic feta 10) . "feta-din13")
+ ((1 bold italic dynamic feta 10) . "feta-din12")
+ ((0 bold italic dynamic feta 10) . "feta-din10")
+ ((-1 bold italic dynamic feta 10) . "feta-din8")
+ ((-2 bold italic dynamic feta 10) . "feta-din7")
+ ((-3 bold italic dynamic feta 10) . "feta-din6")
+ ((-4 bold italic dynamic feta 10) . "feta-din5")
+ ((-5 bold italic dynamic feta 10) . "feta-din4")
+ ((3 medium upright number feta-nummer 13) . "feta-nummer13")
+ ((2 medium upright number feta-nummer 13) . "feta-nummer13")
+ ((1 medium upright number feta-nummer 12) . "feta-nummer12")
+ ((0 medium upright number feta-nummer 10) . "feta-nummer10")
+ ((-1 medium upright number feta-nummer 8) . "feta-nummer8")
+ ((-2 medium upright number feta-nummer 6) . "feta-nummer6")
+ ((-3 medium upright number feta-nummer 5) . "feta-nummer5")
+ ((-4 medium upright number feta-nummer 4) . "feta-nummer4")
+ ((0 medium upright roman cmr 10) . "cmr10")
+ ((1 medium upright roman cmr 12) . "cmr12")
+ ((-1 medium upright roman cmr 8) . "cmr8" )
+ ((-2 medium upright roman cmr 7) . "cmr7" )
+ ((-3 medium upright roman cmr 6) . "cmr6" )
+ ((-4 medium upright roman cmr 5) . "cmr5" )
+ ((-5 medium upright roman cmr 4) . "cmr4" )
+ ((2 bold upright roman cmbx 10) . "cmbx10")
+ ((1 bold upright roman cmbx 12) . "cmbx12")
+ ((-3 medium upright math msam 10) . "msam10")
+ ((-2 medium upright math msam 10) . "msam10")
+ ((-1 medium upright math msam 10) . "msam10")
+ ((0 medium upright math msam 10) . "msam10")
))
-(define (style-sheet-template-entry-compile entry size)
- (cons
- (string-append (caar entry)
- " "
- (number->string (- (cdar entry) size))
- " ")
- (cdr entry)))
-
+
+;; return a FONT-DESCR with relative size incremented by INCREMENT
+(define (change-relative-size font-desc increment)
+ (cons (+ increment (car font-desc)) (cdr font-desc))
+ )
+
+;; map a function FUNC over the keys of an alist LIST, leaving the vals.
+(define (map-alist-keys func list)
+ (if (null? list)
+ '()
+ (cons (cons (func (caar list)) (cdar list))
+ (map-alist-keys func (cdr list)))
+ ))
+
+;; map a function FUNC over the vals of LIST, leaving the keys.
+(define (map-alist-vals func list)
+ (if (null? list)
+ '()
+ (cons (cons (caar list) (func (cdar list)))
+ (map-alist-vals func (cdr list)))
+ ))
+
+(define (change-style-sheet-relative-size sheet x)
+ (map-alist-keys (lambda (descr) (change-relative-size descr x)) sheet))
+
+
+;; make style sheet for each paper version.
(define style-sheet-alist
- `(
- (paper11 . ,(map (lambda (x) (style-sheet-template-entry-compile x -3))
- paper20-style-sheet-alist-template))
- (paper13 . ,(map (lambda (x) (style-sheet-template-entry-compile x -2))
- paper20-style-sheet-alist-template))
- (paper16 . ,(map (lambda (x) (style-sheet-template-entry-compile x -1))
- paper20-style-sheet-alist-template))
- (paper20 . ,(map (lambda (x) (style-sheet-template-entry-compile x 0))
- paper20-style-sheet-alist-template))
- (paper23 . ,(map (lambda (x) (style-sheet-template-entry-compile x 1))
- paper20-style-sheet-alist-template))
- (paper26 . ,(map (lambda (x) (style-sheet-template-entry-compile x 2))
- paper20-style-sheet-alist-template))
- ))
+ (map-alist-vals (lambda (x) (change-style-sheet-relative-size
+ paper20-style-sheet-alist x))
+ '((paper11 . -3)
+ (paper13 . -2)
+ (paper16 . -1)
+ (paper20 . 0)
+ (paper23 . 1)
+ (paper26 . 2)
+ ))
+ )
+
(define (font-regexp-to-font-name paper regexp)
(let ((style-sheet (cdr (assoc paper style-sheet-alist))))
(loop (cdr fonts))
'())))))
+;; reduce the font list by successively applying a font-qualifier.
+(define (qualifiers-to-fontname qualifiers font-descr-alist)
+ (if (null? qualifiers)
+ (if (null? font-descr-alist)
+ ""
+ (cdar font-descr-alist)) ; return the topmost.
+
+ (qualifiers-to-fontname
+ (cdr qualifiers)
+ (filter-field (caar qualifiers) (cdar qualifiers) font-descr-alist)
+ )
+ ))
+
(define (properties-to-font-name paper properties-alist)
- (let ((font-regexp (apply string-append
- (map (lambda (key)
- (string-append
- (let ((entry (assoc key properties-alist)))
- (if entry (cdr entry) "[^ ]+"))
- " "))
- '(font-series font-shape font-family font-name font-point font-size)))))
- ;;(display "font-regexp: `")
- ;;(display font-regexp)
- ;;(display "'\n")
- (font-regexp-to-font-name paper font-regexp)))
+ (let* (
+ (fonts (cdr (assoc paper style-sheet-alist)))
+
+ ;; change order to change priorities of qualifiers.
+ (q-order '(font-name font-family font-series font-shape font-point-size font-relative-size))
+ (rawqualifiers (map (lambda (x) (assoc x properties-alist))
+ q-order))
+
+ (qualifiers (filter-list pair? rawqualifiers))
+ (fontnm (qualifiers-to-fontname qualifiers fonts))
+ (err (current-error-port))
+ )
+
+ (if (eq? fontnm "")
+ (begin
+ (display "\ncouldn't find font satisfying " err)
+ (display qualifiers err)
+ (display "\n" err)
+ "cmr10"
+ )
+ fontnm)
+
+
+ ))
+
(define markup-abbrev-to-properties-alist
(append
'(
(rows . ((align . 0)))
(lines . ((align . 1)))
- (roman . ((font-family . "roman")))
- (music . ((font-family . "music")))
- (bold . ((font-series . "bold")))
- (italic . ((font-shape . "italic")))
+ (roman . ((font-family . roman)))
+ (music . ((font-family . music)))
+ (finger . ((font-style . finger)))
+ (bold . ((font-series . bold)))
+ (italic . ((font-shape . italic)))
(named . ((lookup . name)))
- (super . ((raise . 1) (font-size . "-1")))
- (sub . ((raise . -1) (font-size . "-1")))
+ (super . ((raise . 1) (font-relative-size . -1)))
+ (sub . ((raise . -1) (font-relative-size . -1)))
(text . ((lookup . value)))
)
(map (lambda (x) (cons (car x) (cons 'font-style (car x))))
(let ((entry (assoc markup markup-abbrev-to-properties-alist)))
(if entry (cdr entry)
(list (cons markup #t))))))
-
+
+; fixme, how's this supposed to work?
+; and why don't we import font-setting from elt?
(define (style-to-font-name paper style)
(let* ((entry (assoc style style-to-font-alist))
- (font (if entry (cdr entry) "* * * * * *"))
- (font-regexp
- (regexp-substitute/global #f "\\*" font 'pre "[^ ]+" 'post)))
- (font-regexp-to-font-name paper font-regexp)))
+ (qs (if entry (cdr entry) '()))
+ (sheet (cdr (assoc paper style-sheet-alist)))
+ (fontnm (qualifiers-to-fontname qs sheet))
+ (err (current-error-port)))
+ (if (eq? fontnm "")
+ (begin
+ (display "\ncouldn't find font satisfying " err)
+ (display qs err)
+ (display "\n" err)
+ "cmr10")
+ fontnm)))
+
+
+
+
+; (define (test-module)
+; (display (filter-list pair? '(1 2 (1 2) (1 .2)))
+;(display (filter-field 'font-name 'cmbx paper20-style-sheet-alist))
+
+; (display (qualifiers-to-fontname '((font-name . cmbx)) paper20-style-sheet-alist))
+; (display (style-to-font-name 'paper20 'large))
+; )
+
(define generic-All-properties
(cons 'all
- (list (list 'fontSize number? 'font-size))))
+ (list (list 'fontSize number? 'font-relative-size))))
(define generic-notehead-properties
(property-description 'Y-offset-callbacks list? "see <code> X-offset-callbacks</code>")
(property-description 'X-extent-callback procedure? "procedure taking an element and axis argument, returning a number-pair. The return value is the extent of the element.")
(property-description 'Y-extent-callback procedure? "see <code> X-extent-callback </code>")
- (property-description 'font-size integer? "")
+ (property-description 'font-relative-size integer? "")
(property-description 'extra-offset number-pair? "pair of reals (a cons) forcing an extra offset before outputting")
(property-description 'interfaces list? "list of symbols indicating the interfaces supported by this object. Is initialized from the <code>meta</code> field.")
(property-description 'dependencies list? "list of score-element pointers that indicate who to compute first for certain global passes")
(property-description 'side-relative-direction dir? "if set: get the direction from a different object, and multiply by this.")
(property-description 'minimum-space number? "minimum distance that the victim should move (after padding)")
(property-description 'padding number? "add this much extra space between victim and support")
- (property-description 'self-alignment-X number? "real number: -1 = left aligned, 0 = center, 1 right-aligned in X direction. Set to an element pointer, if you want that element to be the center. ")
+ (property-description 'self-alignment-X number? "real number: -1 =
+left aligned, 0 = center, 1 right-aligned in X direction. <p> Set to
+an element pointer, if you want that element to be the center. In
+this case, the center element should have this object as a reference
+point.
+")
(property-description 'self-alignment-Y number? "like self-alignment-X but for Y axis")
)
" Order elements top to bottom/left to right/right to left etc."
(list
(property-description 'stacking-dir dir? "stack contents of elements in which direction ?")
- (property-description 'align-dir dir? "Which side to align? -1: left side, 0: centered around center-element if not nil, or around center of width), 1: right side")
+ (property-description 'align-dir dir? "Which side to align? -1: left side, 0: around center of width, 1: right side")
(property-description 'threshold number-pair? "(cons MIN MAX), where MIN and MAX are dimensions in staffspace")
(property-description 'alignment-done boolean? "boolean to administrate whether we've done the alignment already (to ensure that the process is done only once)")
(property-description 'center-element ly-element? "element which will be at the
center of the group after aligning (when using
-Align_interface::center_on_element). The center element should have
-this object as a reference point.")
+Align_interface::center_on_element). ")
(property-description 'elements list? "to be aligned elements ")
(property-description 'axes list? "list of axis numbers. Should contain only one number.")
)))
<dt> any font-style<dd> finger volta timesig mmrest mark script large Large dynamic
</dl>
" )
- (property-description 'font-style string? "font definition for a special purpose, one of: finger volta timesig mark script large Large dynamic")
- (property-description 'font-series string? "partial font definition: medium, bold")
- (property-description 'font-shape string? "partial font definition: upright or italic")
- (property-description 'font-family string? "partial font definition: music roman braces dynamic math ...")
- (property-description 'font-name string? "partial font definition: base name of font file FIXME: should override other partials")
- (property-description 'font-point string? "partial font definition: exact font size in points FIXME: should override font-size")
- (property-description 'font-size string? "partial font definition: the relative size, 0 is style-sheet's normal size, -1 is smaller, +1 is bigger")
+ (property-description 'font-style symbol? "font definition for a special purpose, one of: finger volta timesig mark script large Large dynamic")
+ (property-description 'font-series symbol? "partial font definition: medium, bold")
+ (property-description 'font-shape symbol? "partial font definition: upright or italic")
+ (property-description 'font-family symbol? "partial font definition: music roman braces dynamic math ...")
+ (property-description 'font-name symbol? "partial font definition: base name of font file FIXME: should override other partials")
+ (property-description 'font-point-size number? "partial font definition: exact font size in points FIXME: should override font-relative-size")
+ (property-description 'font-relative-size number? "partial font definition: the relative size, 0 is style-sheet's normal size, -1 is smaller, +1 is bigger")
(property-description 'align number? "the alignment of the text, 0 is horizontal, 1 is vertical")
(property-description 'lookup symbol? "lookup method: 'value for plain text, 'name for character-name")
(property-description 'raise number? "height for text to be raised (a negative value lowers the text")
; We should repartition the entire scm side of lily in a
; more sane way, using namesspaces/modules?
-;(debug-enable 'backtrace)
+(debug-enable 'backtrace)
;;; library funtions
sys.stderr.write ('\nNot smart enough to convert \\octave')
raise FatalConversionError()
- return lines
+ return str
conversions.append (
((0,1,19), conv, 'deprecated \\octave; can\'t convert automatically'))
if 1:
def conv (str):
- return lines
+ return str
conversions.append (
((1,0,0), conv, '0.1.21 -> 1.0.0 '))
if 1:
def conv(str):
- if re.search ('\\\\header', lines):
+ if re.search ('\\\\header', str):
sys.stderr.write ('\nNot smart enough to convert to new \\header format')
- return lines
+ return str
conversions.append ((1,0,2), conv, '\\header { key = concat + with + operator }')
if 1:
def conv(str):
- return lines
+ return str
conversions.append ((1,0,12), conv, 'Chord syntax stuff')
if 1:
def conv (str):
str = re.sub ('ChordNames*', 'ChordNames', str)
+ if re.search ('\\\\textscript "[^"]* *"[^"]*"', str):
+ sys.stderr.write ('\nNot smart enough to convert to new \\textscript markup text')
+
+ str = re.sub ('\\textscript +\("[^"]*"\)', '\\textscript #\1', str)
return str