From 5d04488bc3a94ee9c84c075874831e31f6a888d2 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 4 Oct 2002 23:32:41 +0000 Subject: [PATCH] (midi_error): take two arguments. merge from 1.6.4 on. --- ChangeLog | 183 +++++++++++++++++++++++++++- Documentation/user/refman.itely | 1 + Documentation/user/tutorial.itely | 2 +- NEWS | 42 +++++++ lily/a2-engraver.cc | 16 +-- lily/bar-check-iterator.cc | 1 + lily/grob-pq-engraver.cc | 17 +-- lily/hara-kiri-group-spanner.cc | 8 +- lily/include/music.hh | 1 - lily/lily-guile.cc | 1 + lily/music-iterator.cc | 2 + lily/note-head-line-engraver.cc | 4 +- lily/parser.yy | 6 +- lily/part-combine-music-iterator.cc | 4 +- lily/sequential-music.cc | 1 - lily/simultaneous-music.cc | 1 + lily/stem.cc | 2 +- python/midi.c | 21 ++-- scm/drums.scm | 1 + scm/lily.scm | 3 + 20 files changed, 277 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index d28a769b8f..71699b26c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,185 @@ +2002-10-05 Han-Wen Nienhuys + + * python/midi.c (midi_error): take two arguments. + + * Merge 1.6.5 changes: + +2002-10-04 Jan Nieuwenhuizen + + * scm/grob-description.scm (minimum-beam-collision-distance): 0.75 + staff-space. Previous 1.5 was probably meant as half-spaces. + (cautionary-style): parentheses (was: smaller). This is what doco + says, and it seems more logical. + + * Documentation/user/refman.itely (Chromatic alterations): Bugfix + for 2nd sentence. + +2002-10-04 Han-Wen Nienhuys + + * make/lilypond.redhat.spec.in: various fixes for RedHat 8.0 + +2002-10-03 Jan Nieuwenhuizen + + * lily/beam.cc (rest_collision_callback): Fixed: partial rewrite. + +2002-09-30 Han-Wen Nienhuys + + * scripts/lilypond-book.py (make_pixmap): don't produce empty pages. + +2002-09-28 Han-Wen Nienhuys + + * scm/translator-property-description.scm (voltaOnThisStaff): add + property. + +2002-09-28 Werner Lemberg + + * scm/tex.scm (header-end): Suppress page numbering. + + * scripts/lilypond-book.py (output_dict) : + Fix quotation for HTML output. + +2002-09-28 Graham Percival + + * Documentation/user/refman.itely: grammar and phrasing + fixes to "Note Entry" section. Also adds a few new examples. + +2002-09-27 Han-Wen Nienhuys + + * flower/include/string-data.icc: include string.h + +2002-09-25 Han-Wen Nienhuys + + * scm/chord-name.scm (chord::inner-name-banter): remove space. + +2002-09-27 Jan Nieuwenhuizen + + * Documentation/user/GNUmakefile (extra-local-help): Add. + + * stepmake/stepmake/www-targets.make (local-help): Add. + +2002-09-26 Han-Wen Nienhuys + + * Documentation/topdocs/INSTALL.texi (Top): recommend binary + packages. + + * Documentation/topdocs/README.texi (Top): building documentation + (not website.) + +2002-09-26 Jan Nieuwenhuizen + + * Documentation/user/refman.itely: + * Documentation/user/tutorial.itely: + * Documentation/user/music-glossary.tely: Merge changes. + + * Documentation/user/glossary.html.in: + * Documentation/index.texi: + * Documentation/header.html.in: Accomodate renaming of glossary. + + * Documentation/user/tutorial.itely: Add some glossary references. + + * Documentation/user/refman.itely: Minor fixes. + + * Documentation/user/lilypond.tely: Add glossary do direntry. + + * Documentation/user/music-glossary.tely: Rename (previously: + glossary.tely). Fix anchor placement. + + * Documentation/user/GNUmakefile: Make music-glossary.info too. + +2002-09-23 Werner Lemberg + + * scripts/lilypond-book.py (output_dict): Fix handling of + various environments by avoid extraneous newlines. + Rename `output-all' regexp for html to `output-html'. + Replace `output-all' regexp for texi with `output-texi-quote' + and `output-texi-noquote'. + (compose_full_body): Don't override `linewidth' user option + for `singleline'. + (schedule_lilypond_block): Don't indent text specified with + `intertext' option. + Add new option `noquote'. + (compile_all_files): Use latex instead of tex to compile ly + files directly. + + * Documentation/user/lilypond-book.itely: Updated and revised. + Improve layout. + + * Documentation/user/glossary.tely, + Documentation/user/introduction.itely, + Documentation/user/tutorial.itely, + Documentation/user/refman.itely, + Documentation/user/appendices.itely: Fix overfull LilyPond + boxes caused by the new lilypond-book code. Other minor + fixes. + + * Documentation/user/macros.itexi (@texiflat): Don't emit + trailing space. + + * scm/tex.scm (end-output, header-end): Add preamble and + postamble to make lilypond output directly compilable with + latex. + + +2002-09-23 Han-Wen Nienhuys + + * Documentation/topdocs/INSTALL.texi (Top): bugfix for RH RPM + instructions. + +2002-09-25 Jan Nieuwenhuizen + + * Documentation/user/glossary.tely: Add titling and hyperlinks. + +2002-09-24 Han-Wen Nienhuys + + * lily/beam.cc (connect_beams): don't crash if there are quarter + notes in beams. + +2002-09-24 Juergen Reuter + + * Documentation/user/refman.itely: corrected ancient clef + docu; added docu on ligatures + +2002-09-21 Juergen Reuter + + * Documentation/user/glossary.tely, + Documentation/user/refman.itely, input/les-nereides.ly, + input/mutopia/W.A.Mozart/mozart-hrn3-defs.ly, + input/test/bagpipe.ly, lily/stem.cc, ly/grace-init.ly, + scm/grob-property-description.scm, scripts/convert-ly.py: renamed + Stem properties: flag-style -> stroke-style, style -> flag-style. + + +2002-09-22 Werner Lemberg + + * scripts/lilypond-book.py: Add option `notime' to suppress + printing of a time signature. Specify default indentation of 0pt + if single line fragment. Don't emit redundant `\paper{ }'. + + * Documentation/user/lilypond-book.itely: Updated. + + * Documentation/user/glossary.tely: Completely reformatting. + +2002-09-23 Han-Wen Nienhuys + + * GNUmakefile.in (top-web): generate (possibly empty) examples.html + +2002-09-22 Jan Nieuwenhuizen + + * Documentation/user/tutorial.itely: Fix links. + + * Documentation/topdocs/index.tely: + * Documentation/index.texi: + * Documentation/header.html.in: Small website fixes and updates. + + * debian/: Debian patch by Anthony Fok. + +2002-09-21 Jan Nieuwenhuizen + + * Documentation/footer.html.in: How time flies: It's already 2002! + + * Documentation/topdocs/index.tely: Stable/development fix. Use + more descriptive link names than 'here'. + 2002-10-03 Jan Nieuwenhuizen * lily/beam.cc (rest_collision_callback): Fixed: partial rewrite. @@ -27,7 +209,6 @@ 2002-09-29 Jan Nieuwenhuizen - * lily/: some (c) header fixes. * lily/request-chord.cc: Remove. diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 24ce16ed5a..d85545b73f 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -4315,6 +4315,7 @@ LilyPond may crash. @node Tuning per object @subsection Tuning per object +@cindex \once Tuning a single object is most often done with @code{\property}. The form, @example diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index af2f10b08a..2664ff2f65 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -2930,7 +2930,7 @@ Don't forget to check out the @ifnothtml templates, examples and feature tests. @end ifnothtml -If you want to see real action LilyPond, head over to +If you want to see real action lilypond then head over to @uref{http://www.mutopiaproject.org}, which has many examples of classical music typeset with LilyPond. diff --git a/NEWS b/NEWS index 128ad15be7..d291fc40e2 100644 --- a/NEWS +++ b/NEWS @@ -3,3 +3,45 @@ New features in 1.7 since 1.6 * Deeper integration of the input language and Scheme. You can now use LilyPond identifiers in Scheme, and use Scheme expressions instead of LilyPond identifiers. + +* Music types cleaned up and Schemified. + +New features in 1.6 since 1.4 + +* Support for figured bass and tablature. + +* Completely rewritten beam formatting: provides much better output +now. + +* Completely revised and improved music font. + +* Completely rewritten MIDI import support. + +* Completely rewritten grace note support. Practically speaking this +means that grace notes can be slurred to normal normal notes. + +* Improved accidental handling and formatting: styles for producing +cautionaries may vary, and complex collisions between accidentals of a +chord are handled much better. + +* Better spacing: both globally and locally. This includes subtle +details like optical stem spacing. + +* More support for ancient notation: mensural ligatures, ambitus +(pitch range) of voices, more shapes, etc. + +* More support for piano notation: bracket pedals, directed arpeggios, +arpeggio brackets. + +* Easier music polyphonic music entry. + +* More extensibility, many speedups and bugfixes + +* The manual has been thoroughly revised. + +* Development is now hosted at http://savannah.gnu.org, and sources +can be downloaded through anonymous CVS. + +* Support for windows: LilyPond is part of the cygwin distribution, +which comes with a user-friendly installer. + diff --git a/lily/a2-engraver.cc b/lily/a2-engraver.cc index f0bc17f137..2897e39f95 100644 --- a/lily/a2-engraver.cc +++ b/lily/a2-engraver.cc @@ -200,14 +200,14 @@ A2_engraver::stop_translation_timestep () } ENTER_DESCRIPTION(A2_engraver, -/* descr */ "Part combine engraver for orchestral scores. - -The markings @emph{a2}, @emph{Solo} and @emph{Solo II}, are -created by this engraver. It also acts upon instructions of the part -combiner. Another thing that the this engraver, is forcing of stem, -slur and tie directions, always when both threads are not identical; -up for the musicexpr called @code{one}, down for the musicexpr called -@code{two}. +/* descr */ "Part combine engraver for orchestral scores. \ + \ +The markings @emph{a2}, @emph{Solo} and @emph{Solo II}, are \ +created by this engraver. It also acts upon instructions of the part \ +combiner. Another thing that the this engraver, is forcing of stem, \ +slur and tie directions, always when both threads are not identical; \ +up for the musicexpr called @code{one}, down for the musicexpr called \ +@code{two}. \ ", /* creats*/ "TextScript", diff --git a/lily/bar-check-iterator.cc b/lily/bar-check-iterator.cc index 5870e7a5ef..e14b9bd6e3 100644 --- a/lily/bar-check-iterator.cc +++ b/lily/bar-check-iterator.cc @@ -26,6 +26,7 @@ public: }; IMPLEMENT_CTOR_CALLBACK(Bar_check_iterator); + Bar_check_iterator::Bar_check_iterator() { } diff --git a/lily/grob-pq-engraver.cc b/lily/grob-pq-engraver.cc index 4aa8a63cd6..4e50e5c50c 100644 --- a/lily/grob-pq-engraver.cc +++ b/lily/grob-pq-engraver.cc @@ -139,11 +139,14 @@ Grob_pq_engraver::start_translation_timestep () ENTER_DESCRIPTION(Grob_pq_engraver, -/* descr */ "Administrate when certain grobs (eg. note heads) stop playing; this -engraver is a sort-of a failure, since it doesn't handle all sorts of borderline cases very well. -", -/* creats*/ "", -/* accepts */ "", -/* acks */ "grob-interface", -/* reads */ "busyGrobs", + +/* descr */ "Administrate when certain grobs (eg. note heads) stop playing; this \ +engraver is a sort-of a failure, since it doesn't handle all sorts of \ +borderline cases very well. \ +", \ + +/* creats*/ "", \ +/* accepts */ "", \ +/* acks */ "grob-interface", \ +/* reads */ "busyGrobs", \ /* write */ "busyGrobs"); diff --git a/lily/hara-kiri-group-spanner.cc b/lily/hara-kiri-group-spanner.cc index 8a3f6d0558..664b540b16 100644 --- a/lily/hara-kiri-group-spanner.cc +++ b/lily/hara-kiri-group-spanner.cc @@ -94,9 +94,9 @@ Hara_kiri_group_spanner::add_interesting_item (Grob* me,Grob* n) ADD_INTERFACE (Hara_kiri_group_spanner,"hara-kiri-group-interface", - " As Vertical_group_spanner, but keep track of interesting items. If -we don't contain any interesting items after linebreaking, then -gracefully commit suicide. Objective: don't disgrace Lily by -typesetting empty lines in orchestral scores.", + " As Vertical_group_spanner, but keep track of interesting items. If \ +we don't contain any interesting items after linebreaking, then \ +gracefully commit suicide. Objective: don't disgrace Lily by \ +typesetting empty lines in orchestral scores.", \ "items-worth-living"); diff --git a/lily/include/music.hh b/lily/include/music.hh index 7f6c4e8950..ac462525ee 100644 --- a/lily/include/music.hh +++ b/lily/include/music.hh @@ -72,5 +72,4 @@ DECLARE_UNSMOB(Music,music); Music* make_music_by_name (SCM sym); - #endif // MUSIC_HH diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 39bb53649a..357800bbdb 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -193,6 +193,7 @@ void add_scm_init_func (void (*f) ()) scm_init_funcs_->push (f); } + void ly_init_ly_module (void *data) { diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 7524190cd0..c880e9bf96 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -17,6 +17,8 @@ #include "simple-music-iterator.hh" #include "ly-smobs.icc" +#include "ly-smobs.icc" + Music_iterator::Music_iterator () { music_ = 0; diff --git a/lily/note-head-line-engraver.cc b/lily/note-head-line-engraver.cc index 0e346e410f..fd9a8ea72f 100644 --- a/lily/note-head-line-engraver.cc +++ b/lily/note-head-line-engraver.cc @@ -148,8 +148,8 @@ Note_head_line_engraver::stop_translation_timestep () ENTER_DESCRIPTION(Note_head_line_engraver, -/* descr */ "Engrave a line between two note heads, for example a glissando. -If followVoice is set, staff switches also generate a line.", +/* descr */ "Engrave a line between two note heads, for example a glissando. If +followVoice is set, staff switches also generate a line.", /* creats*/ "Glissando VoiceFollower", /* accepts */ "glissando-event", /* acks */ "rhythmic-head-interface", diff --git a/lily/parser.yy b/lily/parser.yy index aef363d8e2..ed572e7182 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -23,7 +23,6 @@ this. */ -#include #include #include "translator-def.hh" @@ -63,6 +62,7 @@ regular_identifier_b (SCM id) } + bool is_duration_b (int t) { @@ -790,7 +790,7 @@ Simple_music: THIS->parser_error (_ ("First argument must be a procedure taking one argument")); } - Music*m = MY_MAKE_MUSIC("OutputPropertySetMusic"); + Music*m = MY_MAKE_MUSIC("OutputPropertySetMusic"); m->set_mus_property ("predicate", pred); m->set_mus_property ("grob-property", $3); m->set_mus_property ("grob-value", $5); @@ -822,6 +822,7 @@ Composite_music: | AUTOCHANGE STRING Music { Music*chm = MY_MAKE_MUSIC("AutoChangeMusic"); chm->set_mus_property ("element", $3->self_scm ()); + chm->set_mus_property ("iterator-ctor", Auto_change_iterator::constructor_proc); scm_gc_unprotect_object ($3->self_scm ()); chm->set_mus_property ("what", $2); @@ -1060,7 +1061,6 @@ simple_property_def: = gh_equal_p ($4, scm_makfrom0str ("autoBeamSettings")); bool itc = internal_type_checking_global_b; Music *t = MY_MAKE_MUSIC("OverrideProperty"); - t->set_mus_property ("symbol", scm_string_to_symbol ($4)); t->set_mus_property ("pop-first", SCM_BOOL_T); if (autobeam) diff --git a/lily/part-combine-music-iterator.cc b/lily/part-combine-music-iterator.cc index d71f53e268..3f59f10948 100644 --- a/lily/part-combine-music-iterator.cc +++ b/lily/part-combine-music-iterator.cc @@ -19,7 +19,6 @@ Part_combine_music_iterator::Part_combine_music_iterator () second_iter_ = 0; first_until_ = 0; second_until_ = 0; - state_ = 0; } @@ -87,8 +86,7 @@ void Part_combine_music_iterator::construct_children () { SCM lst = get_music ()->get_mus_property ("elements"); - - + first_iter_ = unsmob_iterator (get_iterator (unsmob_music (gh_car (lst)))); second_iter_ = unsmob_iterator (get_iterator (unsmob_music (gh_cadr (lst)))); } diff --git a/lily/sequential-music.cc b/lily/sequential-music.cc index 7100dd3a76..caba59421a 100644 --- a/lily/sequential-music.cc +++ b/lily/sequential-music.cc @@ -7,7 +7,6 @@ Sequential_music::Sequential_music () { } - Moment Sequential_music::get_length () const { diff --git a/lily/simultaneous-music.cc b/lily/simultaneous-music.cc index f5930cdaab..108ba5dbb6 100644 --- a/lily/simultaneous-music.cc +++ b/lily/simultaneous-music.cc @@ -18,6 +18,7 @@ Simultaneous_music::start_mom () const Simultaneous_music::Simultaneous_music() { + } Pitch diff --git a/lily/stem.cc b/lily/stem.cc index 543fd67c11..80bc16bbb7 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -537,7 +537,7 @@ Stem::flag (Grob*me) SCM flag_style_scm = me->get_grob_property ("flag-style"); if (gh_symbol_p (flag_style_scm)) { - flag_style = (ly_scm2string (scm_symbol_to_string (flag_style_scm))); + flag_style = ly_scm2string (scm_symbol_to_string (flag_style_scm)); } else { diff --git a/python/midi.c b/python/midi.c index 0026201651..05d6160706 100644 --- a/python/midi.c +++ b/python/midi.c @@ -53,9 +53,14 @@ static PyObject *Midi_error; static PyObject *Midi_warning; static PyObject * -midi_error (char *s) +midi_error (char * func, char *s) { - PyErr_SetString (Midi_error, s); + char*dest = (char*) malloc (sizeof (char) * (strlen (func) + strlen (s) + 1)); + strcpy (dest, func); + strcat (dest, s); + PyErr_SetString (Midi_error, dest); + free (dest); + return 0; } @@ -280,7 +285,7 @@ midi_parse_track (unsigned char **track, unsigned char *track_end) debug_print ("%s", "\n"); if (strcmp (*track, "MTrk")) - return midi_error (__FUNCTION__ ": MTrk expected"); + return midi_error (__FUNCTION__, ": MTrk expected"); *track += 4; @@ -293,7 +298,7 @@ midi_parse_track (unsigned char **track, unsigned char *track_end) debug_print ("track end: %p\n", track + track_len); if (track_len > track_size) - return midi_error (__FUNCTION__ ": track size corrupt"); + return midi_error (__FUNCTION__, ": track size corrupt"); pytrack = PyList_New (0); @@ -335,7 +340,7 @@ pymidi_parse_track (PyObject *self, PyObject *args) return 0; if (track_size < 0) - return midi_error (__FUNCTION__ ": negative track size"); + return midi_error (__FUNCTION__, ": negative track size"); track_end = track + track_size; @@ -358,13 +363,13 @@ midi_parse (unsigned char **midi,unsigned char *midi_end) if (header_len < 6) - return midi_error (__FUNCTION__ ": header too short"); + return midi_error (__FUNCTION__, ": header too short"); format = get_number (midi, *midi + 2, 2); tracks = get_number (midi, *midi + 2, 2); if (tracks > 32) - return midi_error (__FUNCTION__ ": too many tracks"); + return midi_error (__FUNCTION__, ": too many tracks"); division = get_number (midi, *midi + 2, 2) * 4; @@ -398,7 +403,7 @@ pymidi_parse (PyObject *self, PyObject *args) return 0; if (strcmp (midi, "MThd")) - return midi_error (__FUNCTION__ ": MThd expected"); + return midi_error (__FUNCTION__, ": MThd expected"); midi += 4; diff --git a/scm/drums.scm b/scm/drums.scm index 5ba3310780..7ccdc7dd02 100644 --- a/scm/drums.scm +++ b/scm/drums.scm @@ -197,6 +197,7 @@ (grob-value . ,t) (pop-first . #t))) m + ) ) diff --git a/scm/lily.scm b/scm/lily.scm index b4554475ac..ec68b2aeb3 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -9,6 +9,9 @@ (use-modules (ice-9 regex)) +;;(write standalone (current-error-port)) + + ;;; General settings ;; debugging evaluator is slower. -- 2.39.5