-*** WARNING(reminder): all output via TeX (ie: using ly2dvi or plain
-*** lilypond) still yields broken stems, bars and staff lines.
+1.5.1.hwn1
+==========
+
+* small bugfixes for grace-init.ly
+
+* Bugfix: don't mess up spacing when combining different tuplets.
+
+* Small bugfixes for lilypond-mode.el.
+
+* property-init.ly: bugfix for dot directions in polyphonic music.
1.5.1.jcn3
==========
+* Bugfix: text2html: escape entities inside <pre>.
+
* Added some template .ly's for evaluation.
* Make blot work without -fps too.
1.5.0
=====
-
1.5.0.jcn1
==========
@html
<p align=center>
-<img src="Documentation/pictures/out-www/lelie-logo.png" alt="[logo]">
+<a href="Documentation/pictures/out-www/lelie-logo.png">
+<img border=0 src="Documentation/pictures/out-www/lelie-logo.png"
+ alt="[picture of lily-cello-girl]">
+</a>
@end html
@item printfilename
Prints the file name before the music example. Useful in conjunction
with @code{\lilypondfile}.
+@item relative, relative @var{N}
+ Use relative octave mode. By default, notes are specified relative
+ central C. The optional integer argument specifies how many octaves
+ higher (positive number) or lower (negative number) to place the
+ starting note.
@end table
@section Invocation
@item papersize
The paper size (as a name, e.g. @code{a4}). It is normally read from
the @code{\paper} block.
+
+@item pagenumber
+ If set to @code{no}, no page numbers will be printed.
@end table
@unnumberedsubsec Environment variables
@lilypond[fragment, relative, singleline, verbatim]
\property Voice.tupletSpannerDuration = #(make-moment 1 4)
-\times 2/3 { c''8 c c c c c }
+\times 2/3 { c'8 c c c c c }
@end lilypond
The format of the number is determined by the property
@lilypond[fragment,relative,verbatim]
\context Staff {
- r4 [r8 g'' a r8] r8 [g | a] r8
+ r4 [r8 g' a r8] r8 [g | a] r8
}
@end lilypond
Whenever an manual beam is busy, the automatic beamer will not produce
@lilypond[fragment,relative,verbatim]
\context Staff {
- [f'8 r16 f g a]
+ [f8 r16 f g a]
[f8 r16 \property Voice.stemLeftBeamCount = #1 f g a]
}
@end lilypond
@lilypond[fragment,relative,verbatim]
\property Voice.Beam \set #'direction = #1
\property Voice.Beam \set #'height = #0
- [a''8 e' d c]
+ [a'8 e' d c]
@end lilypond
Here's how you'd specify a weird looking beam that instead of being
@lilypond[fragment,relative,verbatim]
\property Voice.Beam \set #'staff-position = #4
\property Voice.Beam \set #'height = #-4
- [c'8 c]
+ [c8 c]
@end lilypond
@cindex @code{default-neutral-direction}
@lilypond[fragment,relative,verbatim]
\property Voice.Slur \set #'direction = #1
\property Voice.Stem \set #'length = #5.5
- g''8(g)g4
+ g'8(g)g4
\property Voice.Slur \set #'attachment = #'(stem . stem)
g8(g)g4
@end lilypond
@lilypond[fragment,relative,verbatim]
\property Voice.Stem \set #'direction = #1
\property Voice.Slur \set #'direction = #1
- d'32( d'4 )d8..
+ d32( d'4 )d8..
\property Voice.Slur \set #'attachment = #'(stem . stem)
d,32( d'4 )d8..
@end lilypond
@lilypond[verbatim,singleline,relative]
\property Voice.Beam \override #'direction = #-1
\property Voice.Slur \override #'direction = #1
- c'16( a' f' a a f a, )c,
+ c16( a' f' a a f a, )c,
c( a' f' a a f d, )c
\property Voice.Slur \override #'beautiful = #5.0
c( a' f' a a f d, )c
respectively.
@lilypond[fragment,verbatim,center,relative]
- \time 6/4 c'' \( ( d ) e f ( e ) \) d
+ \time 6/4 c' \( ( d ) e f ( e ) \) d
@end lilypond
Typographically, the phrasing slur behaves almost exactly like a normal
@code{\glissando} to a note:
@lilypond[fragment,relative,verbatim]
- c''-\glissando c'
+ c'-\glissando c'
@end lilypond
@refbugs
@code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}.
@lilypond[verbatim,singleline,fragment,relative]
- c''\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
+ c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
c2\sf c\rfz
@end lilypond
\context Voice {
\property Voice.crescendoText = "cresc."
\property Voice.crescendoSpanner = #'dashed-line
- a''2\mf\< a a \!a
+ a'2\mf\< a a \!a
}
@end lilypond
@lilypond[fragment,relative,verbatim]
- \context Voice <c'\arpeggio e g c>
+ \context Voice <c\arpeggio e g c>
@end lilypond
When an arpeggio crosses staffs in piano music, you attach an arpeggio
@lilypond[fragment,relative,verbatim]
\context PianoStaff <
\property PianoStaff.connectArpeggios = ##t
- \context Voice = one { <c''\arpeggio e g c> }
+ \context Voice = one { <c'\arpeggio e g c> }
\context Voice = other { \clef bass <c,,\arpeggio e g>}
>
@end lilypond
\context PianoStaff <
\property PianoStaff.followVoice = ##t
\context Staff \context Voice {
- c'1
+ c1
\translator Staff=two
b2 a
}
output}).
@lilypond[fragment,relative,verbatim]
- a''^"3 $\\times$ \\`a deux"
+ a'^"3 $\\times$ \\`a deux"
@end lilypond
You can also use raw PostScript commands embedded in text scripts. This
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=5
-PATCH_LEVEL=1
-MY_PATCH_LEVEL=jcn4
+PATCH_LEVEL=2
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
warn_b=yes
fi
-
+ GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'`
+ GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'`
+
## The GUILE_FLAGS macro.
echo $ac_n "checking for Guile""... $ac_c" 1>&6
-echo "configure:2884: checking for Guile" >&5
+echo "configure:2886: checking for Guile" >&5
if ! $guile_config link > /dev/null ; then
echo "$ac_t"""cannot execute $guile_config"" 1>&6
{ echo "configure: error: "cannot find guile-config; is Guile installed?"" 1>&2; exit 1; }
# Extract the first word of "guile", so it can be a program name with args.
set dummy guile; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2899: checking for $ac_word" >&5
+echo "configure:2901: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GUILE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
+ cat >> confdefs.h <<EOF
+#define GUILE_MAJOR_VERSION $GUILE_MAJOR_VERSION
+EOF
+
+ cat >> confdefs.h <<EOF
+#define GUILE_MINOR_VERSION $GUILE_MINOR_VERSION
+EOF
+
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2949: checking for $ac_hdr" >&5
+echo "configure:2959: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2954 "configure"
+#line 2964 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
done
echo $ac_n "checking for kpse_find_file in -lkpathsea""... $ac_c" 1>&6
-echo "configure:2986: checking for kpse_find_file in -lkpathsea" >&5
+echo "configure:2996: checking for kpse_find_file in -lkpathsea" >&5
ac_lib_var=`echo kpathsea'_'kpse_find_file | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lkpathsea $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2994 "configure"
+#line 3004 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
kpse_find_file()
; return 0; }
EOF
-if { (eval echo configure:3008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
for ac_func in kpse_find_file
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3038: checking for $ac_func" >&5
+echo "configure:3048: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3043 "configure"
+#line 3053 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
fi
echo $ac_n "checking whether to use kpathsea""... $ac_c" 1>&6
-echo "configure:3096: checking whether to use kpathsea" >&5
+echo "configure:3106: checking whether to use kpathsea" >&5
if test "$kpathsea_b" = yes; then
echo "$ac_t""yes" 1>&6
KPATHSEA=1
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3117: checking for $ac_word" >&5
+echo "configure:3127: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BIBTEX2HTML'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:3158: checking for 8-bit clean memcmp" >&5
+echo "configure:3168: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 3166 "configure"
+#line 3176 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int) throw();
}
EOF
-if { (eval echo configure:3179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:3197: checking for vprintf" >&5
+echo "configure:3207: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3202 "configure"
+#line 3212 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
; return 0; }
EOF
-if { (eval echo configure:3228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:3252: checking for _doprnt" >&5
+echo "configure:3262: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3257 "configure"
+#line 3267 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
; return 0; }
EOF
-if { (eval echo configure:3283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
for ac_func in memmem snprintf vsnprintf gettext isinf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3310: checking for $ac_func" >&5
+echo "configure:3320: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3315 "configure"
+#line 3325 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:3341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3381: checking for $ac_word" >&5
+echo "configure:3391: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$MAKEINFO" != "error"; then
echo $ac_n "checking whether makeinfo can split html by @node""... $ac_c" 1>&6
-echo "configure:3413: checking whether makeinfo can split html by @node" >&5
+echo "configure:3423: checking whether makeinfo can split html by @node" >&5
mkdir -p out
makeinfo --html --output=out/split <<EOF
\input texinfo
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3441: checking for $ac_word" >&5
+echo "configure:3451: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
return r;
}
+
+/*
+ lookup with binsearch, return array index.
+*/
+template<class T>
+int
+binary_search (Array<T> const &table,
+ T const &key, int (*compare) (T const&, T const &),
+ int lo = 0,
+ int hi = -1
+ )
+{
+ int cmp;
+ int result;
+ if (hi < 0)
+ hi = table.size ();
+
+ /* binary search */
+ do
+ {
+ cmp = (lo + hi) / 2;
+
+ result = (*compare) (key, table[cmp]);
+
+ if (result < 0)
+ hi = cmp;
+ else
+ lo = cmp;
+ }
+ while (hi - lo > 1);
+ if (! (*compare) (key, table[lo]))
+ {
+ return lo;
+ }
+ else
+ return -1; /* not found */
+}
+
template<class T>
int
binsearch_link_array (Link_array<T> const &arr, T *t,
- int (*compare) (T *const&,T *const&))
+ int (*compare) (T *const&,T *const&),
+ int lo = 0, int hi = -1 )
{
- int lo;
- int hi;
int cmp;
int result;
- lo = 0;
- hi = arr.size ();
+ if (hi< 0)
+ hi = arr.size ();
if (hi == 0)
return -1;
--- /dev/null
+
+\score {\notes \relative c'' <
+\context Staff = SA { \times 6/7 { [c8 c c c c c c] } }
+\context Staff = SB { \times 6/6 { [c c c c c c] } }
+>
+
+\paper { linewidth = -1. }
+}
--- /dev/null
+
+\score {
+\notes \relative c' <
+\context Staff = SA { c4. c8 \times 2/3 { [c8 c c] } }
+\context Staff = SB { c8 c c c c c }
+>
+
+\paper { linewidth = -1. }
+}
\version "1.3.146"
%K000.ly LilyPond 1.2.16
-
+\header {
+title="John's Scarlatti quotes"
+composer = "Domenico Scarlatti"
+}
\include "scarlatti-properties.ly"
\context Voice=va< \zs
\su
\context Thread=ta{ \n
-\rh \sm[\times 2/3{a'32_"John's Scarlatti quotes" d'' fis''}\n a''16]a'8 g'~
+\rh \sm[\times 2/3{a'32 d'' fis''}\n a''16]a'8 g'~
%a2
g'8 _"1 Aug 2000" \times 2/3{a'16 b' cis'' d'' fis'' g''}|
%a3
--- /dev/null
+\version "1.3.146"
+\header{
+filename = "chord-table.ly"
+copyright = "public domain"
+enteredby = "jcn"
+}
+
+tab = \notes\transpose c'''\chords{
+ c1 c:m c:4 c:m4 c:5+ \break
+ c:5- c:dim c:5-.5+ c:6 c:m6\break
+ c:4.6 c:7 c:m7 c:4.7 c:m4.7\break
+ c:5+.7 c:5-.7 c:m5-.7 c:maj c:m.maj\break
+ c:4.maj c:m4.maj c:5+.maj c:m4+.maj c:5-.maj\break
+ c1:m5-.maj c:dim7 c:5-.5+.7 c:6.maj c:m6.maj\break
+ c:4.6.maj c:9 c:m9 c:4.9 c:m.4.9\break
+}
+
+\score{
+% \context StaffGroup <
+ <
+ \context Staff=c \notes\transpose c\tab
+ \context ChordNames=c \notes\transpose c\tab
+%{
+ \context Staff=cis \notes\transpose cis\tab
+ \context ChordNames=cis \notes\transpose cis\tab
+ \context Staff=des \notes\transpose des\tab
+ \context ChordNames=des \notes\transpose des\tab
+ \context Staff=d \notes\transpose d\tab
+ \context ChordNames=d \notes\transpose d\tab
+ \context Staff=es \notes\transpose es\tab
+ \context ChordNames=es \notes\transpose es\tab
+ \context Staff=e \notes\transpose e\tab
+ \context ChordNames=e \notes\transpose e\tab
+ \context Staff=fis \notes\transpose fis\tab
+ \context ChordNames=fis \notes\transpose fis\tab
+ \context Staff=g \notes\transpose g\tab
+ \context ChordNames=g \notes\transpose g\tab
+ \context Staff=as \notes\transpose as\tab
+ \context ChordNames=as \notes\transpose as\tab
+ \context Staff=a \notes\transpose a\tab
+ \context ChordNames=a \notes\transpose a\tab
+ \context Staff=bes \notes\transpose bes,\tab
+ \context ChordNames=bes \notes\transpose bes,\tab
+ \context Staff=b \notes\transpose b,\tab
+ \context ChordNames=b \notes\transpose b,\tab
+%}
+ >
+ \paper{
+ textheight = \vsize - 4.0 * \staffheight
+ }
+
+}
+
+
for (SCM i = add; gh_pair_p (i); i = gh_cdr (i))
{
Pitch* p = unsmob_pitch (gh_car (i));
+ /* Ugr
+ This chord modifier stuff should really be fixed
+ Cmaj7 yields C 7/7-
+ */
if (p->octave_i () == -100)
{
p->octave_i_ = 0;
if (highest_step < 5)
tmp = ly_snoc (fifth, tmp);
else if (dim_b)
- add = lower_step (tonic, add, gh_int2scm (5));
+ {
+ add = lower_step (tonic, add, gh_int2scm (5));
+ add = lower_step (tonic, add, gh_int2scm (7));
+ }
/* find missing thirds */
SCM missing = missing_thirds (tmp);
#ifndef KEYWORD_HH
#define KEYWORD_HH
+#include "array.hh"
+
/* for the keyword table */
struct Keyword_ent
{
- char const *name;
- int tokcode;
+ char const *name_;
+ int tokcode_;
};
/*
*/
struct Keyword_table
{
- Keyword_ent *table;
- int maxkey;
+ Array<Keyword_ent> table_;
+
Keyword_table (Keyword_ent *);
int lookup (char const *s) const;
};
static int rank_i (Grob*);
Paper_column (SCM);
- bool musical_b () const;
+ static bool musical_b (Grob *);
static Moment when_mom (Grob*);
static bool used_b (Grob*) ;
/* for qsort */
-int
- tabcmp (void const * p1, void const * p2)
+int tabcmp (Keyword_ent const &p1, Keyword_ent const &p2)
{
- return strcmp (( (Keyword_ent const *) p1)->name,
- ((Keyword_ent const *) p2)->name);
+ return strcmp (p1.name_, p2.name_);
}
Keyword_table::Keyword_table (Keyword_ent *tab)
{
- table = tab;
-
- /* count keywords */
- for (maxkey = 0; table[maxkey].name; maxkey++)
- ;
+ while (tab->name_)
+ {
+ table_.push (*tab++);
+ }
- /* sort them */
- qsort (table, maxkey, sizeof (Keyword_ent), tabcmp);
+ table_.sort (tabcmp);
}
-/*
- lookup with binsearch, return tokencode.
-*/
int
Keyword_table::lookup (char const *s) const
{
- int lo;
- int hi;
- int cmp;
- int result;
- lo = 0;
- hi = maxkey;
-
- /* binary search */
- do
- {
- cmp = (lo + hi) / 2;
-
- result = strcmp (s, table[cmp].name);
-
- if (result < 0)
- hi = cmp;
- else
- lo = cmp;
- }
- while (hi - lo > 1);
- if (!strcmp (s, table[lo].name))
- {
- return table[lo].tokcode;
- }
+ Keyword_ent e ;
+ e.name_ = s;
+ int idx = binary_search (table_, e, tabcmp);
+ if (idx >= 0)
+ return table_[idx].tokcode_;
else
- return -1; /* not found */
+ return -1;
}
-
}
return s;
}
-
+
bool
-Paper_column::musical_b () const
+Paper_column::musical_b (Grob *me)
{
- SCM m = get_grob_property ("shortest-starter-duration");
+ SCM m = me->get_grob_property ("shortest-starter-duration");
Moment s (0);
if (unsmob_moment (m))
{
s = *unsmob_moment (m);
}
return s != Moment (0);
+
}
-
+
bool
Paper_column::used_b (Grob*me)
{
$$ = gh_cons ($1, SCM_EOL);
}
| CHORDMODIFIER_PITCH {
- $$ = gh_cons ($1, SCM_EOL);
+ $$ = gh_cons (unsmob_pitch ($1)->smobbed_copy (), SCM_EOL);
}
| CHORDMODIFIER_PITCH chord_note { /* Ugh. */
- $$ = gh_list ($1, $2, SCM_UNDEFINED);
+ $$ = gh_list (unsmob_pitch ($1)->smobbed_copy (),
+ $2, SCM_UNDEFINED);
}
;
me->set_extent_callback (SCM_EOL, Y_AXIS) ;
}
+#if 0
+struct Note_run
+{
+ Array<int> idxes;
+ int start, end;
+ Moment duration;
+ int count;
+};
+
+int
+column_compare (Grob *const &t1, Grob *const &t2)
+{
+ return Moment::compare (Paper_column::when_mom (t1),
+ Paper_column::when_mom (t2));
+}
+
+
+Note_run
+run_length (Moment dt, int i, Array<Moment> const &moms,
+ Link_array<Note_run> runs)
+{
+ int k = 0;
+ Array<int> idxes;
+
+ idxes.push (i);
+ while (1)
+ {
+ Moment next = moms[i] + dt;
+ while (i < moms.size () && moms[i] < next)
+ i++;
+ if (i == moms.size () || moms[i] != next)
+ break;
+
+ idxes.push (i);
+ k++;
+ }
+
+ Moment dur = idxes.size ()
+}
+
+void
+find_runs (Grob*me, Link_array<Grob> cols)
+{
+ Link_array<Grob> filter_cols;
+ Array<Moment> col_moments;
+ for (int i = 0; i < cols.size (); i++)
+ {
+ Moment w = Paper_column::when_mom (cols[i]);
+
+ if (!w.grace_mom_ && Paper_column::musical_b (cols[i]))
+ {
+ filter_cols.push (cols[i]);
+ col_moments.push (w);
+ }
+ }
+
+ Moment end_mom = col_moments.top ();
+ for (int i = 0; i < col_moments.size () ; i++)
+ {
+ for (int j = i+1; j < col_moments.size (); j++)
+ {
+ Moment dt = Paper_column::col_momentsfilter_cols
+ }
+ }
+}
+#endif
+
/*
The algorithm is partly taken from :
int n = 0;
for (int i =0 ; i < cols.size (); i++)
{
- if (dynamic_cast<Paper_column*> (cols[i])->musical_b ())
+ if (Paper_column::musical_b (cols[i]))
{
Moment *when = unsmob_moment (cols[i]->get_grob_property ("when"));
left_distance = gh_scm2double (gh_cdr (hint));
}
// 2nd condition should be (i+1 < col_count ()), ie. not the last column in score. FIXME
- else if (!lc->musical_b () && i+1 < cols.size ())
+ else if (!Paper_column::musical_b (lc) && i+1 < cols.size ())
{
left_distance= default_bar_spacing (me,lc,rc,shortest <? base_shortest_duration);
}
- else if (lc->musical_b ())
+ else if (Paper_column::musical_b ( lc))
{
left_distance = note_spacing (me,lc, rc, shortest <? base_shortest_duration);
}
/*
don't want to create too much extra space for accidentals
*/
- if (rc->musical_b ())
+ if (Paper_column::musical_b (rc))
{
if (to_boolean (rc->get_grob_property ("contains-grace")))
right_dist *= gh_scm2double (rc->get_grob_property ("before-grace-spacing-factor")); // fixme.
}
Moment delta_t = Paper_column::when_mom (rc) - Paper_column::when_mom (lc);
Real dist = get_duration_space (me, shortest_playing_len, shortest);
- dist *= (double) (delta_t / shortest_playing_len);
+
+
+ /*
+ ugh: 0.1 is an arbitrary distance.
+ */
+ dist *= (double) (delta_t.main_part_ / shortest_playing_len.main_part_)
+ + 0.1 * (double) (delta_t.grace_mom_ / shortest_playing_len.main_part_);
(defvar LilyPond-kick-xdvi nil
"If true, no simultaneous xdvi's are started, but reload signal is sent.")
+(defvar LilyPond-command-history nil
+ "Command history list.")
+
(defvar LilyPond-regexp-alist
'(("\\([a-zA-Z]?:?[^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2))
"Regexp used to match LilyPond errors. See `compilation-error-regexp-alist'.")
(answer (or LilyPond-command-force
(completing-read
(concat "Command: (default " default ") ")
- LilyPond-command-alist nil t))))
+ LilyPond-command-alist nil t nil 'LilyPond-command-history))))
;; If the answer is "LilyPond" it will not be expanded to "LilyPond"
(let ((answer (car-safe (assoc answer LilyPond-command-alist))))
(setq comment-start-skip "%{? *")
(make-local-variable 'comment-end)
- (setq comment-end "\n")
+ (setq comment-end "")
(make-local-variable 'block-comment-start)
(setq block-comment-start "%{")
-
- #(define (grace-beam-space-function multiplicity)
- (* (if (<= multiplicity 3) 0.816 0.844) 0.8))
-
-
- #(define (make-text-checker text)
- (lambda (elt) (equal? text (ly-get-grob-property elt 'text))))
+#(define (grace-beam-space-function multiplicity)
+ (* (if (<= multiplicity 3) 0.816 0.844) 0.8))
startGraceMusic = {
-
-%{
-from GraceContext
- Stem \override #'flag-style = #"grace"
- Stem \override #'stem-length = #6.0
- Stem \override #'direction = #1
-
- NoteHead \override #'font-relative-size = #-1
- Stem \override #'font-relative-size = #-1
- Stem \override #'stem-shorten = #'(0)
- Beam \override #'font-relative-size = #-1
- TextScript \override #'font-relative-size = #-1
- Slur \override #'font-relative-size = #-1
- Accidentals \override #'font-relative-size = #-1
- Beam \override #'thickness = #0.3
- Beam \override #'space-function = #(lambda (x) 0.5)
-
- Stem \override #'lengths = #(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0))
- Stem \override #'beamed-lengths =
- #'(0.0 2.5 2.0 1.5)
- Stem \override #'beamed-minimum-lengths
- = #(map (lambda (x) (* 0.8 x)) '(0.0 2.5 2.0 1.5))
-%}
-
-
- \property Voice.NoteHead \override #'font-relative-size = #-1
+ \property Voice.Stem \override #'direction = #1
\property Voice.Stem \override #'length = #6
+ \property Voice.Stem \override #'lengths =
+ #(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0))
\property Voice.Stem \override #'beamed-lengths =
#(map (lambda (x) (* 1.25 x)) '(0.0 2.5 2.0 1.5))
\property Voice.Stem \override #'beamed-minimum-lengths =
#(map (lambda (x) (* 1.25 x)) '(0.0 1.5 1.25 1.0))
- \property Voice.Beam \override #'space-function = #grace-beam-space-function
- \property Voice.fontSize = #-2
\property Voice.Stem \override #'no-stem-extend = ##t
+ \property Voice.Stem \override #'flag-style = #"grace"
-% \property Voice.Stem \override #'flag-style = #"grace"
+ \property Voice.Beam \override #'space-function = #grace-beam-space-function
+ \property Voice.Beam \override #'thickness = #0.3
+
+ % must use staff. Accidentals should also be smaller.
+ \property Staff.fontSize = #-2
}
stopGraceMusic = {
-% \property Voice.Stem \revert #'flag-style
- \property Voice.Stem \override #'no-stem-extend = ##f
- \property Voice.Stem \revert #'length
+ \property Voice.Beam \revert #'space-function
+ \property Voice.Beam \revert #'thickness
+
+ \property Voice.Stem \revert #'flag-style
+ \property Voice.Stem \revert #'no-stem-extend
\property Voice.Stem \revert #'beamed-lengths
\property Voice.Stem \revert #'beamed-minimum-lengths
- \property Voice.Beam \revert #'space-function
- \property Voice.fontSize \unset
+ \property Voice.Stem \revert #'lengths
+ \property Voice.Stem \revert #'length
+ \property Voice.Stem \revert #'direction
+
+ \property Staff.fontSize \unset
}
\property Voice.Script \revert #'direction
}
+dotsUp = \property Voice.Dots \override #'direction = #1
+dotsDown = \property Voice.Dots \override #'direction = #-1
+dotsBoth = \property Voice.Dots \revert #'direction
+
+% why doubly?
tupletUp = {
\property Voice.TupletBracket \override #'direction = #1
\property Voice.TupletBracket \override #'direction = #1
\stemUp
\slurUp
\tieUp
+ \dotsUp
}
voiceTwo = {
\stemDown
\slurDown
\tieDown
+ \dotsDown
+
}
voiceThree = {
\slurUp
\tieUp
\shiftOn
+ \dotsUp
}
voiceFour = {
\slurDown
\tieDown
\shiftOn
+ \dotsDown
}
% There's also dash, but setting dash period/length should be fixed.
Begin3
Title: LilyPond
-Version: 1.5.1
-Entered-date: 03JUL01
+Version: 1.5.2
+Entered-date: 15JUL01
Description: @BLURB@
Keywords: music notation typesetting midi fonts engraving
Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
janneke@gnu.org (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 1000k lilypond-1.5.1.tar.gz
+ 1000k lilypond-1.5.2.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.5.1.tar.gz
+ 1000k lilypond-1.5.2.tar.gz
Copying-policy: GPL
End
%define info yes
Name: lilypond
-Version: 1.5.1
+Version: 1.5.2
Release: 1
License: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.1.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.2.tar.gz
Summary: Create and print music notation
URL: http://www.cs.uu.nl/~hanwen/lilypond
BuildRoot: /tmp/lilypond-install
Distribution: SuSE Linux 7.0 (i386)
Name: lilypond
-Version: 1.5.1
+Version: 1.5.2
Release: 2
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.1.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.2.tar.gz
# music notation software for.. ?
Summary: A program for printing sheet music.
URL: http://www.lilypond.org/
(((0 . 0) (3 . 0) (4 . 0)) . ("" (super "4") " " ))
;; Cdim iso Cm5-
(((0 . 0) (2 . -1) (4 . -1)) . ("dim"))
- ; Co iso Cm5-7-
+ ; URG: Simply C:m5-/maj7 iso Cdim maj7
+ (((0 . 0) (2 . -1) (4 . -1) (6 . 0)) . ("m" (super "5-/maj7" " ")))
+ ; URG: Simply C:m5-/7 iso Cdim7
+ (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . ("m" (super "5-/7" " ")))
+ ; Co iso C:m5-/7-
(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . ("" (super "o") " "))
; Cdim9
(((0 . 0) (2 . -1) (4 . -1) (6 . -2) (1 . -1)) . ("dim" (super "9") " "))
;; additions, subtractions and bass or inversion into chord name
(define (chord::inner-name-banter tonic exception-part additions subtractions
bass-and-inversion steps)
- (let ((tonic-text (pitch->chord-name-text-banter tonic steps))
- (except-text exception-part)
- (sep-text (if (and (string-match "super" (format "~s" exception-part))
+ (let* ((tonic-text (pitch->chord-name-text-banter tonic steps))
+ (except-text exception-part)
+ (sep-text (if (and (string-match "super" (format "~s" except-text))
(or (pair? additions)
(pair? subtractions)))
(list simple-super "/")))
- (adds-text (chord::additions->text-banter additions subtractions))
- (subs-text (chord::subtractions->text-banter subtractions))
- (b+i-text (chord::bass-and-inversion->text-banter bass-and-inversion)))
+ (adds-text (chord::additions->text-banter additions subtractions))
+ (subs-text (chord::subtractions->text-banter subtractions))
+ (b+i-text (chord::bass-and-inversion->text-banter bass-and-inversion)))
(text-append
- tonic-text except-text sep-text
- (list (list simple-super) adds-text subs-text)
+ tonic-text except-text " " sep-text
+ ;;(list (list simple-super) adds-text subs-text)
+ (list (list '((raise . 1) (font-relative-size . -1))) adds-text subs-text)
b+i-text)))
(define (chord::name-banter tonic exception-part unmatched-steps
@end tex
@html
<p>
-<img src="%(fn)s.png" alt="">
+<a href="%(fn)s.png">
+<img border=0 src="%(fn)s.png" alt="[picture of music]">
+</a>
@end html
""",
}
#@PYTHON@
import os
+import re
import string
import sys
+
+entities = {
+ "&" : 'amp',
+ "`" : 'apos',
+ '>' : 'gt',
+ '<' : 'lt',
+ '"' : 'quot',
+ }
+
+def txt2html (s):
+ for i in entities.keys ():
+ s = re.sub (i, '\001' + entities[i] + ';', s);
+ s = re.sub ('\001', '&', s);
+ return s
+
for a in sys.argv[1:]:
# hmm, we need: text2html out/foe.txt -> out/foe.html,
# -o is a bit overkill?
<html><body><pre>
%s
</pre></body></html>
-""" % open (a).read ()
+""" % txt2html (open (a).read ())
open (outfile, 'w').write (s)