-1.3.50
+* Bugfix in smob handling. Delete the C-part of freed smobs. Be
+honest about amount of allocation and deletion, so GUILE doesn't
+overestimate the amount of memory.
+
+* Faq update: nicer blank note paper, courtesy Mats Bengtsson.
+
+* Bugfix: don't crash on durations that are not a power of 2.
+
+* Build manpages during `make all'
+
+* Bugfix: don't do absolute comparisons in Polynomial::clean ().
+
+* Bugfix: set visibility-lambda for key signature created by
+createKeyOnClefChange. Fixes disappearing key signatures.
+
+* Bugfix: make System_start_delimiter of bar-line type invisible when
+it spans only one staff.
+
+1.3.51
======
* Item cleanups. Copying items and rearranging pointers are done in
* Use Scheme for Key_item data members.
* Don't use regex in chord-names.scm under windows; hybrid chordnames
- user+calculated will be partly broken.
-
+user+calculated will be partly broken.
1.3.50
======
@subsubsection Can I make blank manuscript paper with LilyPond?
-Theoretically, yes but it is easier to do with TeX:
+Theoretically, yes but it is easier to do with (La)TeX. This LaTeX file
+will do the trick for you:
+
@example
-\def\foo@{\hbox@{\vrule width 15.0cm height 0.5pt depth 0.0pt@}
-\nointerlineskip
-\vskip 5pt\nointerlineskip@}
-\def\musicline@{\vbox @{
- \foo\foo\foo\foo\foo
-@}\par@}
-
-\musicline
-\musicline
-\musicline
-\musicline
-\bye
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% notepaper.tex
+% Mats Bengtsson, 18/5 2000
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\documentclass[a4paper]@{article@}
+
+\usepackage@{ifthen@}
+\usepackage[noheadfoot,hmargin=15mm,vmargin=20mm]@{geometry@}
+
+\pagestyle@{empty@}
+
+\newcounter@{staffnumber@}
+\newlength@{\interstaffline@}
+
+\newcommand@{\drawline@}@{\hbox@{\rule@{\textwidth@}@{0.5pt@}@}
+ \nointerlineskip\vskip\interstaffline\nointerlineskip@}
+
+\newcommand@{\printstaff@}@{\vfill
+ \vbox@{\drawline\drawline\drawline\drawline\drawline@}
+ \vfill@}
+
+\begin@{document@}
+\typeout@{@}\typeout@{@}
+\typein[\staffsize]@{Type in the staff size (20pt is a common value):@}
+\setlength@{\interstaffline@}@{\staffsize@}
+\setlength@{\interstaffline@}@{.25\interstaffline@}
+\typeout@{@}
+\typein[\num]@{Type in the number of staffs:@}
+\setcounter@{staffnumber@}@{\num@}
+
+\mbox@{@} % To get a starting point for the \vfill
+\whiledo@{\value@{staffnumber@}>0@}@{%
+ \printstaff \addtocounter@{staffnumber@}@{-1@}@}
+\end@{document@}
@end example
@mudelafile{clefs.ly}
+
+Key signatures appear on key changes. They may also
+appear without barlines. The restoration accidentals are not printed at
+the start of the line. If @code{createKeyOnClefChange} is set, they're
+also created on a clef change.
+
+@mudelafile{keys.ly}
+
@ignore
@c the input file is too long and does not test for specific bugs
+
By default, time signatures are written with two numbers. With style
``C'', 4/4 and 2/2 are written with their corresponding symbols and
with style ``old'', 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and
\mu delafile{time.ly}
@end ignore
+
+
@section Hacks and Features
As a last resort, the placement of items can be adjusted manually.
putting @uref{http://www4.smart.net/~jcovey/scores/,guitar music} on the
net. The @uref{http://sca.uwaterloo.ca/Mutopia/,Mutopia project} is a
large archive of public domain sheet music under construction. Dirk
-Latterman also put some works
+Lattermann also put some works
@uref{http://www.alqualonde.de/lilypond.html,on the web}.
@html
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=51
+PATCH_LEVEL=52
MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
int e = exponent;
Polynomial dest(1), base(src);
- // classicint power. invariant: src^exponent = dest * src ^ e
- // greetings go out to Lex Bijlsma & Jaap vd Woude
+ /*
+ classic int power. invariant: src^exponent = dest * src ^ e
+ greetings go out to Lex Bijlsma & Jaap vd Woude */
while (e > 0)
{
if (e % 2)
void
Polynomial::clean()
{
- int i;
- for (i = 0; i <= degree (); i++)
- {
- if (abs(coefs_[i]) < FUDGE)
- coefs_[i] = 0.0;
- }
-
+/*
+ We only do relative comparisons. Absolute comparisons break down in
+ degenerate cases. */
while (degree () > 0 &&
(fabs (coefs_.top ()) < FUDGE * fabs (coefs_.top (1)))
|| !coefs_.top ())
--- /dev/null
+\score { \notes {
+ \property Voice.tupletSpannerDuration = #(make-moment 1 4)
+ \property Voice.tupletNumberVisibility = #'if-no-beam
+ \property Voice.tupletBracketVisibility = #'if-no-beam
+ % Gm7 / F | A7 / Dm |
+ \times 2/3 {
+ [f,8 bes, d] [g d bes,] [f, a, c] [f c a,] | e, a, cis e cis a, d, f, a, d a, f, |
+ % Db |
+ des, aes, des f des aes, des, aes, des f des aes, | }
+}}
--- /dev/null
+
+voice4 = \notes {
+\clef bass;
+ \property Staff.instrument = "Bass"
+ \property Staff.instr = "B"
+ \time 4/4; f,2 ( ) f,8 r8 f8 e8
+\repeat volta 2
+{
+ d8. d16 e8. f16 f8 c8 c16 c8.
+}
+\alternative
+{
+ { f,2 ( ) f,8 r8 f8 e8 \break }
+ { f,2. r8 c16 c16 |
+ }
+}
+}
+voicedefault = \notes {
+ \property Staff.timeSignatureStyle="C"
+ \time 4/4; \key f;
+ \tempo 4 = 200;
+}
+\score{
+ \notes <
+
+
+ \context Staff="4"
+ {
+ \$voicedefault
+ \$voice4
+ }
+
+ >
+ \paper {
+ font_normal = 12.;
+ \translator {
+ \StaffContext
+ \consists Instrument_name_engraver;
+ }
+ }
+}
\version "1.3.42";
-%{
-test key itemv breaking
-%}
\score {
\notes \relative c''
{
+ \property Staff. createKeyOnClefChange = ##t
\key bes; c2 \key c \minor; c2
\break
- \key bes \major; c1 \key d;\break c1
+ \key bes \major; c2 \clef alto; c2 \key d; c1
}
}
\version "1.3.42";
m = \notes \relative c''{
+
c1 | c2 c | c c | c c | \break c c | c c | c c | c c |
}
\translator {
\OrchestralScoreContext
barNumberScriptPadding = 10;
- minVerticalAlign = 2.2*\staffheight;
+ minVerticalAlign = 2.2*\staffheight;
+
}
\translator { \StaffContext
\consists "Instrument_name_engraver";
Align_interface (this).set_interface();
Align_interface (this).set_axis (X_AXIS);
}
-
+
+/*
+ TODO: cfg-able
+ */
void
Grace_align_item::before_line_breaking ()
{
Make the key signature.
*/
class Key_engraver : public Engraver {
- void create_key();
+ void create_key(bool);
void read_req (Key_change_req const * r);
public:
Key key_;
Key_change_req * keyreq_l_;
Key_item * item_p_;
+
Array<Musical_pitch> accidental_idx_arr_;
Array<Musical_pitch> old_accidental_idx_arr_;
SCM_CAR(self_scm_) = SCM_EOL; \
SCM_CDR(self_scm_) = SCM_EOL; \
self_scm_ = SCM_EOL; \
+\
+ scm_done_malloc ( - sizeof (CL));\
} \
\
SCM \
self_scm_ = s; \
scm_protect_object (s); \
\
-/* no scm_done_malloc() ! */ \
+ scm_done_malloc(sizeof(CL));\
do_smobify_self(); \
return s; \
} \
/* someone else did the deed already; this might be an automatic var.*/ \
if (s->self_scm_ != ses)\
return 0; \
+\
+ /* no need to call scm_unprotect_object, since this call \
+ implies that the object is not protected. */ \
SCM_CAR(ses) = SCM_EOL;\
- \
- return 0;\
-} \
+ delete s;\
+ return sizeof (CL);\
+} \
ADD_SCM_INIT_FUNC(CL, CL::init_smobs)\
/**
auto resizing hash table. This should come from GUILE.
+
+ ALWAYS USE THIS AS VIA A POINTER, i.e.
+
+ class Foo {
+ Scheme_hash_table * tab;
+ };
+
+ and NOT
+
+ class Foo {
+ Scheme_hash_table tab;
+ }
*/
class Scheme_hash_table : private Scm_stl_map
{
System_start_delimiter ();
VIRTUAL_COPY_CONS (Score_element);
protected:
+ virtual void after_line_breaking();
virtual Molecule do_brew_molecule () const;
Molecule staff_bracket (Real) const;
Molecule staff_brace (Real) const;
}
void
-Key_engraver::create_key ()
+Key_engraver::create_key (bool def)
{
if (!item_p_)
{
item_p_->add_old (m_l.notename_i_, a);
}
}
+
+
+ if (!def)
+ item_p_->set_elt_property ("visibility-lambda",
+ scm_eval (ly_symbol2scm ("all-visible")));
+
}
{
SCM c = get_property ("createKeyOnClefChange");
if (to_boolean (c))
- create_key ();
+ {
+ create_key (false);
+
+ }
}
else if (dynamic_cast<Bar *> (info.elem_l_)
&& accidental_idx_arr_.size ())
{
- create_key ();
+ create_key (true);
}
}
{
if (keyreq_l_)
{
- create_key ();
+ create_key (false);
}
}
{
if (item_p_)
{
- if (keyreq_l_)
- item_p_->set_elt_property ("visibility-lambda",
- scm_eval (ly_symbol2scm ("all-visible")));
-
typeset_element (item_p_);
item_p_ = 0;
}
return gh_str02scm (str);
}
+// #define TEST_GC
+
+#ifdef TEST_GC
+#include <libguile/gc.h>
+
+static void *
+greet_sweep (void *dummy1, void *dummy2, void *dummy3)
+{
+ fprintf(stderr, "entering sweep\n");
+}
+
+static void *
+wave_sweep_goodbye (void *dummy1, void *dummy2, void *dummy3)
+{
+ fprintf(stderr, "leaving sweep\n");
+}
+#endif
static void
init_functions ()
scm_make_gsubr ("ly-gulp-file", 1,0, 0, (SCM(*)(...))ly_gulp_file);
scm_make_gsubr ("dir?", 1,0, 0, (SCM(*)(...))ly_isdir_p);
scm_make_gsubr ("ly-number->string", 1, 0,0, (SCM(*)(...)) ly_number2string);
+
+
+#ifdef TEST_GC
+ scm_c_hook_add (&scm_before_mark_c_hook, greet_sweep, 0, 0);
+ scm_c_hook_add (&scm_before_sweep_c_hook, wave_sweep_goodbye, 0, 0);
+#endif
+
}
ADD_SCM_INIT_FUNC(funcs, init_functions);
pads[RIGHT] = get_elt_property ("right-padding");
pads[LEFT] = get_elt_property ("left-padding");
+
+ // unused ?
Direction d = LEFT;
do {
if (!gh_number_p (pads[d]))
#include <math.h>
#include "misc.hh"
+/*
+ Return the 2-log, rounded down
+ */
int
intlog2(int d)
{
assert (d);
int i=0;
- while (!(d&1))
+ while ((d != 1))
{
- d/= 2;
- i++;
+ d/= 2;
+ i++;
}
+
assert (!(d/2));
return i;
}
Score_element::handle_broken_smobs (SCM src, SCM criterion)
{
again:
-
-
Score_element *sc = unsmob_element (src);
if (sc)
{
- if (criterion == SCM_UNDEFINED)
- return SCM_UNDEFINED;
- else if (gh_number_p (criterion))
+ if (gh_number_p (criterion))
{
Item * i = dynamic_cast<Item*> (sc);
Direction d = to_dir (criterion);
Score_element * br = sc->find_broken_piece (line);
return (br) ? br->self_scm_ : SCM_UNDEFINED;
}
- if (!dep_line)
- return SCM_UNDEFINED;
-
- if (!sc->common_refpoint (line, X_AXIS)
- || !sc->common_refpoint (line, Y_AXIS))
+ if (line
+ && (!dep_line
+ || !sc->common_refpoint (line, X_AXIS)
+ || !sc->common_refpoint (line, Y_AXIS)))
{
return SCM_UNDEFINED;
}
}
else if (gh_pair_p (src))
{
+ SCM oldcar =gh_car (src);
/*
UGH! breaks on circular lists.
*/
- SCM car = handle_broken_smobs (gh_car (src), criterion);
- SCM cdr = gh_cdr (src);
+ SCM newcar = handle_broken_smobs (oldcar, criterion);
+ SCM oldcdr = gh_cdr (src);
- if (car == SCM_UNDEFINED
- && (gh_pair_p (cdr) || cdr == SCM_EOL))
+ if (newcar == SCM_UNDEFINED
+ && (gh_pair_p (oldcdr) || oldcdr == SCM_EOL))
{
/*
This is tail-recursion, ie.
We don't want to rely on the compiler to do this. Without
tail-recursion, this easily crashes with a stack overflow. */
- src = cdr;
+ src = oldcdr;
goto again;
}
- return gh_cons (car, handle_broken_smobs (cdr, criterion));
+ SCM newcdr = handle_broken_smobs (oldcdr, criterion);
+ return gh_cons (newcar, newcdr);
}
else
return src;
= handle_broken_smobs (element_property_alist_,
line ? line->self_scm_ : SCM_UNDEFINED);
}
- else
+ else if (!dynamic_cast <Line_of_score*> (this))
{
/*
- This element is `invalid'; it has been removed from all dependencies, so
- let's junk the element itself.
+ This element is `invalid'; it has been removed from all
+ dependencies, so let's junk the element itself.
+
+ do not do this for Line_of_score , since that would free
+ up originals of score-elts (a bad thing.)
*/
+
element_property_alist_ = SCM_EOL;
set_extent_callback (0, Y_AXIS);
set_extent_callback (0, X_AXIS);
IMPLEMENT_UNSMOB(Score_element, element);
IMPLEMENT_SMOBS(Score_element);
+
SCM
Score_element::mark_smob (SCM ses)
{
Real w = paper_l ()->get_var ("barthick_score");
return lookup_l ()->filledbox (Box (Interval(0,w), Interval(-h/2, h/2)));
}
-
+
+void
+System_start_delimiter::after_line_breaking ()
+{
+ SCM gl = get_elt_property ("glyph");
+
+ if (scm_ilength (get_elt_property ("elements")) <= 1 && gl == ly_symbol2scm ("bar-line"))
+ {
+ set_elt_property ("transparent", SCM_BOOL_T);
+ set_extent_callback (0, X_AXIS);
+ set_extent_callback (0, Y_AXIS);
+ }
+}
Molecule
System_start_delimiter::do_brew_molecule ()const
s = get_elt_property ("glyph");
- if (gh_symbol_p (s) && s == ly_symbol2scm ("bracket"))
+ if (!gh_symbol_p(s))
+ return m;
+
+ if (s == ly_symbol2scm ("bracket"))
m = staff_bracket (l);
- else if (gh_symbol_p (s) && s == ly_symbol2scm ("brace"))
+ else if ( s == ly_symbol2scm ("brace"))
m = staff_brace (l);
- else
+ else if (s == ly_symbol2scm ("bar-line"))
m = simple_bar (l);
alignmentReference = \down;
defaultClef = #"treble"
defaultBarType = #"|"
+ systemStartDelimiterGlyph = #'bar-line
+
\accepts "Staff";
\accepts "StaffGroup";
\accepts "RhythmicStaff";
Begin3
Title: LilyPond
-Version: 1.3.51
-Entered-date: 16MAY00
+Version: 1.3.52
+Entered-date: 18MAY00
Description:
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.3.51.tar.gz
+ 1000k lilypond-1.3.52.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.3.51.tar.gz
+ 1000k lilypond-1.3.52.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 1.3.51
+Version: 1.3.52
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.51.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.52.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
# Icon: lilypond-icon.gif
+default: man
localinstall: install-help2man