* Bugfix: Key_performer::create_audio_elements: transpose list to
`do', before determining tonality.
+1.4.8.moh1
+==========
+
+* new property "end-alignment" to control non-centered lyric alignment
+
+1.5.17.hwn1
+===========
+
+* Be quicker in Grob::handle_broken_dependencies().
+
+* --strict option for abc2ly, exit if an error is found.
+
+* GUILE 1.3.4 fix.
+
+
1.5.17
======
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=5
-PATCH_LEVEL=17
-MY_PATCH_LEVEL=jcn6
+PATCH_LEVEL=18
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
shutil.rmtree (temp_dir)
-#what a name.
-def set_setting (dict, key, val):
- try:
- val = string.atof (val)
- except ValueError:
- #warning (_ ("invalid value: %s") % `val`)
- pass
-
- try:
- dict[key].append (val)
- except KeyError:
- warning (_ ("no such setting: %s") % `key`)
- dict[key] = [val]
-
-
def strip_extension (f, ext):
(p, e) = os.path.splitext (f)
if e == ext:
-%
-% This is NOT a lilypond input file. It is an ABC file, see
-% http://www.gre.ac.uk/~c.walshaw/abc/
-%
-% LilyPond includes import tools for Finale, Musedata, ABC, MIDI and PMX
-%
-X:1
-T:Paddy O'Rafferty
-C:Trad.
-M:6/8
-K:D
-dff cee|def gfe|dff cee|dfe dBA|dff cee|def gfe|faf gfe|1 dfe dBA:|2 dfe dcB||
-~A3 B3|gfe fdB|AFA B2c|dfe dcB|~A3 ~B3|efe efg|faf gfe|1 dfe dcB:|2 dfe dBA||
-fAA eAA|def gfe|fAA eAA|dfe dBA|fAA eAA|def gfe|faf gfe|dfe dBA:|
+\header {
+ composer = "Trad."
+ crossRefNumber = "1"
+ footnotes = ""
+ tagline = "Lily was here (unknown version) -- automatically converted from ABC"
+ title = "Paddy O'Rafferty"
+}
+voicedefault = \notes {
+\property Score.defaultBarType="empty"
+% This is NOT a lilypond input file. It is an ABC file, see
+ % http://www.gre.ac.uk/~c.walshaw/abc/
+ %
+ % LilyPond includes import tools for Finale, Musedata, ABC, MIDI and PMX
+ \time 6/8 \key d \major d''8 fis''8 fis''8 cis''8 e''8 e''8
+\bar "|" d''8 e''8 fis''8 g''8 fis''8 e''8 \bar "|" d''8
+fis''8 fis''8 cis''8 e''8 e''8 \bar "|" d''8 fis''8 e''8
+ d''8 b'8 a'8 \bar "|" d''8 fis''8 fis''8 cis''8 e''8
+e''8 \bar "|" d''8 e''8 fis''8 g''8 fis''8 e''8 \bar "|"
+fis''8 a''8 fis''8 g''8 fis''8 e''8 \bar "|" d''8 fis''8
+ e''8 d''8 b'8 a'8 \bar ":|" d''8 fis''8 e''8 d''8
+cis''8 b'8 \bar "||" a'4. ^"~" b'4. \bar "|" g''8 fis''8
+e''8 fis''8 d''8 b'8 \bar "|" a'8 fis'8 a'8 b'4 cis''8
+\bar "|" d''8 fis''8 e''8 d''8 cis''8 b'8 \bar "|" a'4.
+^"~" b'4. ^"~" \bar "|" e''8 fis''8 e''8 e''8 fis''8 g''8
+\bar "|" fis''8 a''8 fis''8 g''8 fis''8 e''8 \bar "|" d''8
+ fis''8 e''8 d''8 cis''8 b'8 \bar ":|" d''8 fis''8 e''8
+ d''8 b'8 a'8 \bar "||" fis''8 a'8 a'8 e''8 a'8 a'8
+\bar "|" d''8 e''8 fis''8 g''8 fis''8 e''8 \bar "|" fis''8
+ a'8 a'8 e''8 a'8 a'8 \bar "|" d''8 fis''8 e''8 d''8
+ b'8 a'8 \bar "|" fis''8 a'8 a'8 e''8 a'8 a'8 \bar "|"
+d''8 e''8 fis''8 g''8 fis''8 e''8 \bar "|" fis''8 a''8
+fis''8 g''8 fis''8 e''8 \bar "|" d''8 fis''8 e''8 d''8
+b'8 a'8 \bar ":|"
+}\score{
+ \notes <
+ \context Staff="default"
+ {
+ \voicedefault
+ }
+
+ >
+ \paper {
+ }
+ \midi {}
+}
}
\context LyricsVoice = "v-2" \lyrics {
\property LyricsVoice . stanza = "2:"
- x x x __ x
+ x x x __ x.
}
>
}
# input/test/Makefile
depth = ../..
-examples= font20
-LOCALSTEPMAKE_TEMPLATES=ly mutopia
+examples= font20 ancient-font
+LOCALSTEPMAKE_TEMPLATES=ly mutopia
EXTRA_DISTFILES=features.abc
CRITERION is either a SMOB pointer to the desired line, or a number
representing the break direction. Do not modify SRC.
- It is rather tightly coded, since it takes a lot of time.
+ It is rather tightly coded, since it takes a lot of time; it is
+ one of the top functions in the profile.
+
*/
SCM
Grob::handle_broken_grobs (SCM src, SCM criterion)
Grob *sc = unsmob_grob (src);
if (sc)
{
- if (gh_number_p (criterion))
+ if (SCM_INUMP (criterion))
{
Item * i = dynamic_cast<Item*> (sc);
Direction d = to_dir (criterion);
return SCM_UNDEFINED;
/* now: sc && sc->line_l () == line */
- if (!line
+ if (!line)
+ return sc->self_scm();
/*
This was introduced in 1.3.49 as a measure to prevent
programming errors. It looks expensive (?). TODO:
benchmark , document when (what kind of programming
errors) this happens.
*/
- || (sc->common_refpoint (line, X_AXIS)
- && sc->common_refpoint (line, Y_AXIS)))
+ if (sc->common_refpoint (line, X_AXIS)
+ && sc->common_refpoint (line, Y_AXIS))
{
return sc->self_scm ();
}
return SCM_UNDEFINED;
}
}
- else if (gh_pair_p (src))
+ else if (SCM_CONSP (src))
{
SCM oldcar =ly_car (src);
/*
}
SCM newcdr = handle_broken_grobs (oldcdr, criterion);
- return gh_cons (newcar, newcdr);
+ return scm_cons (newcar, newcdr);
}
else
return src;
/* Guile 1.3.4 compatibility */
#if GUILE_MINOR_VERSION < 4
+
+#ifndef SCM_CELL_TYPE
+#define SCM_CELL_TYPE(X) SCM_CAR (X)
+#endif
+
+#ifndef SCM_CELL_WORD_1
+#define SCM_CELL_WORD_1(X) SCM_CDR (X)
+#endif
+
#define scm_bits_t SCM
#define fix_guile_1_3_4_scm_puts(scm_data, port) scm_puts ((char*)scm_data, port)
/** determine the distance to translate lyrics to get correct alignment
Rules: If alignment is centre, translate = 0
Otherwise,
- If (length of longest lyric) < 2 * (length of shortest lyric),
+ If (length of longest lyric) < property("end-alignment") * (length of shortest lyric),
- centre longest lyric on notehead
Otherwise
- move so shortest lyric just reaches notehead centre
Real translate = 0.0;
if (alignment_i_ != CENTER) {
// FIXME: do we really know the lyric extent here? Some font sizing comes later?
- Real l1 = longest_lyric_l_->extent (longest_lyric_l_, X_AXIS).length () / 2;
+ Real l1 = longest_lyric_l_->extent (longest_lyric_l_, X_AXIS).length () / gh_scm2double (longest_lyric_l_->get_grob_property("end-alignment"));
Real l2 = shortest_lyric_l_->extent (shortest_lyric_l_, X_AXIS).length ();
translate = l1 <? l2;
ln -f $< $@
$(outdir)/%.ly: %.abc
- $(PYTHON) $(ABC2LY) -o $@ $<
+ $(PYTHON) $(ABC2LY) --strict -o $@ $<
$(outdir)/%.dvi: $(outdir)/%.ly
$(PYTHON) $(LY2DVI) --output=$@ --dependencies $<
Begin3
Title: LilyPond
-Version: 1.5.17
-Entered-date: 14OKT01
+Version: 1.5.18
+Entered-date: 18OKT01
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.17.tar.gz
+ 1000k lilypond-1.5.18.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.5.17.tar.gz
+ 1000k lilypond-1.5.18.tar.gz
Copying-policy: GPL
End
%define name lilypond
-%define version 1.5.17
+%define version 1.5.18
%define release 1mdk
Name: %{name}
%define info yes
Name: lilypond
-Version: 1.5.17
+Version: 1.5.18
Release: 1
License: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.17.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.18.tar.gz
Summary: Create and print music notation
URL: http://www.lilypond.org/
BuildRoot: /tmp/lilypond-install
Distribution: SuSE Linux 7.0 (i386)
Name: lilypond
-Version: 1.5.17
+Version: 1.5.18
Release: 2
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.17.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.5.18.tar.gz
# music notation software for.. ?
Summary: A program for printing sheet music.
URL: http://www.lilypond.org/
depth = ..
-NAME = midi2ly
-MODULE_NAME = midi2ly
+NAME = midi2ly-old
+MODULE_NAME = midi2ly-old
SUBDIRS = include
MODULE_LIBS=$(depth)/flower
(self-alignment-X . 0)
(non-rhythmic . #t)
(word-space . 0.6)
+ (end-alignment . 5)
(font-family . roman)
(font-shape . upright)
(meta . ,(grob-description lyric-syllable-interface text-interface font-interface ))
(grob-property-description 'visibility-lambda procedure? "a function that takes the break direction and returns a cons of booleans containing (TRANSPARENT . EMPTY).")
(grob-property-description 'when moment? "when does this column happen?.")
(grob-property-description 'word-space number? "elongate left by this much (FIXME: cumbersome semantics).")
+(grob-property-description 'end-alignment number? "proportion of lyric length to align with note-head for non-centered lyrics.")
(grob-property-description 'x-gap number? "horizontal gap between notehead and tie.")
(grob-property-description 'y-free number? "minimal vertical gap between slur and noteheads or stems.")
(grob-property-description 'y-offset number? "extra vertical offset for ties away from the center line.")
'lyric-syllable-interface
"a single piece of lyrics"
'(
- word-space
+ word-space
+ end-alignment
))
depth = ..
-SEXECUTABLES=convert-ly lilypond-book ly2dvi abc2ly as2text etf2ly musedata2ly pmx2ly mup2ly
+SEXECUTABLES=convert-ly lilypond-book ly2dvi abc2ly as2text etf2ly musedata2ly pmx2ly mup2ly midi2ly
STEPMAKE_TEMPLATES=script help2man po
HELP2MAN_EXECS = $(SEXECUTABLES)
UNDEF = 255
state = UNDEF
+strict = 0
voice_idx_dict = {}
header = {}
header['footnotes'] = ''
alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
HSPACE=' \t'
midi_specs = ''
+
+
+def error (msg):
+ sys.stderr.write (msg)
+ if strict:
+ sys.exit (1)
+
def check_clef(s):
if not s:
key_count = flat_key_seq.index (keytup)
accseq = map (lambda x: (3*x + 3 ) % 7, range (1, key_count + 1))
else:
+ error ("Huh?")
raise "Huh"
key_table = [0] * 7
ln = junk_space (ln)
if ln:
- msg = "%s: %d: Huh? Don't understand\n" % (fn, lineno)
- sys.stderr.write (msg)
+ error ("%s: %d: Huh? Don't understand\n" % (fn, lineno))
left = orig_ln[0:-len (ln)]
sys.stderr.write (left + '\n')
sys.stderr.write (' ' * len (left) + ln + '\n')
-h, --help this help
-o, --output=FILE set output filename to FILE
-v, --version version information
-
+ -s, --strict be strict about succes.
+
This program converts ABC music files (see
http://www.gre.ac.uk/~c.walshaw/abc2mtex/abc.txt) To LilyPond input.
"""
-(options, files) = getopt.getopt (sys.argv[1:], 'vo:h', ['help','version', 'output='])
+(options, files) = getopt.getopt (sys.argv[1:], 'vo:hs', ['help','version', 'output=', 'strict'])
out_filename = ''
for opt in options:
if o== '--help' or o == '-h':
help ()
sys.exit (0)
- if o == '--version' or o == '-v':
+ elif o == '--version' or o == '-v':
print_version ()
sys.exit(0)
-
- if o == '--output' or o == '-o':
+ elif o == '--strict' or o == '-s':
+ strict = 1
+ elif o == '--output' or o == '-o':
out_filename = a
else:
print o
elif name[-5:] == 'paper':
self.m_papersize = name
else:
- self._set_dimen('m_geo_'+name, value)
+ pass
+ # what is _set_dimen ?? /MB
+ #self._set_dimen('m_geo_'+name, value)
def __setattr__(self, name, value):
if type(value) == type("") and \
dimension_conversion_dict.has_key (value[-2:]):
import tempfile
import traceback
-datadir = '@datadir@'
-sys.path.append ('@datadir@/python')
-sys.path.append ('@datadir@/buildscripts/out')
+datadir = ''
+
+if '@datadir@' == ('@' + 'datadir' + '@'):
+ datadir = os.environ['LILYPONDPREFIX']
+else:
+ datadir = '@datadir@'
+
+while datadir[-1] == os.sep:
+ datadir = datadir[:-1]
+
+
+sys.path.append (os.path.join (datadir, 'python'))
+sys.path.append (os.path.join (datadir, 'buildscripts/out'))
try:
import gettext
from lilylib import *
+# verbose_p = 1 # arg!
layout_fields = ['dedication', 'title', 'subtitle', 'subsubtitle',
'footer', 'head', 'composer', 'arranger', 'instrument',
'GS_LIB' : datadir + '/ps',
}
+
def setup_environment ():
for key in environment.keys ():
val = environment[key]
val = os.environ[key] + os.pathsep + val
os.environ[key] = val
+#what a name.
+def set_setting (dict, key, val):
+ try:
+ val = string.atof (val)
+ except ValueError:
+ #warning (_ ("invalid value: %s") % `val`)
+ pass
+
+ try:
+ dict[key].append (val)
+ except KeyError:
+ warning (_ ("no such setting: %s") % `key`)
+ dict[key] = [val]
+
+
+def print_environment ():
+ for (k,v) in os.environ.items ():
+ sys.stderr.write ("%s=\"%s\"\n" % (k,v))
+
def run_lilypond (files, outbase, dep_prefix):
opts = ''
# opts = opts + '--output=%s.tex' % outbase
fs = string.join (files)
if not verbose_p:
- progress ( _("Running %s...") % 'LilyPond')
# cmd = cmd + ' 1> /dev/null 2> /dev/null'
+ progress ( _("Running %s...") % 'LilyPond')
else:
opts = opts + ' --verbose'
-
+
+ # for better debugging!
+ print_environment ()
+ print opts, fs
system ('lilypond %s %s ' % (opts, fs))
def analyse_lilypond_output (filename, extra):