[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sugar
From: |
Han-Wen Nienhuys |
Subject: |
Re: Sugar |
Date: |
Sun, 25 Mar 2001 14:19:51 +0200 |
address@hidden writes:
> > that's hard to do, because you'd have to insert music "on the fly",
> > necessitating hairy communication between music, music-iterators and
> > contexts.
> > Why not just fix the score?
>
> Yes, but the problem is that you only find one error at a time and
> for a large score, the processing time for Lilypond to find the
> next bar alignment error may be very long. This gives a very time
> consuming debug loop.
>
> Would it be possible to add an option where Lilypond only typesets
> music after a certain bar number? Of course, it still has to
> parse and process the full file but the processing for the initial
> bars that shouldn't be printed should be possible to do very quickly.
> This would be very useful when you enter large scores.
I added such an option by not typesetting the note heads. The speed
goes up with a factor 3, but unfortunately, lots of other spurious
error messages are generated. Perhaps you it's useful, but you have
to write a filter to remove unnecessary warnings from the logs.
Do you want this to go in?
[half an hour later]
I had a better idea to implement this idea; find the patch
attached. Amazingly, it mostly seems to work. ...
Generated by address@hidden,
>From = lilypond-1.3.141.hwn2, To = lilypond-1.3.141.hwn3
usage
cd lilypond-source-dir; patch -E -p1 < lilypond-1.3.141.hwn3.diff
Patches do not contain automatically generated files
or (urg) empty directories,
i.e., you should rerun autoconf, configure
diff -urN ../lilypond-1.3.141.hwn2/CHANGES ./CHANGES
--- ../lilypond-1.3.141.hwn2/CHANGES Sun Mar 25 00:23:24 2001
+++ ./CHANGES Sun Mar 25 13:30:43 2001
@@ -1,6 +1,11 @@
1.3.141.hwn2
============
+* property silencedNotes
+
+1.3.141.hwn2
+============
+
* Fix: instrument names on piano staffs.
* Bugfix: don't left-align absolute dynamics.
diff -urN ../lilypond-1.3.141.hwn2/Documentation/user/refman.itely
./Documentation/user/refman.itely
--- ../lilypond-1.3.141.hwn2/Documentation/user/refman.itely Sun Mar 25
00:37:46 2001
+++ ./Documentation/user/refman.itely Sun Mar 25 14:07:08 2001
@@ -3297,7 +3297,10 @@
A bar check is entered using the bar symbol, @code{|}
address@hidden Speeding up debugging
address@hidden Speeding up debugging
+[TODO: describe skipTypesetting here]
@c . {Point and click}
@node Point and click
diff -urN ../lilypond-1.3.141.hwn2/VERSION ./VERSION
--- ../lilypond-1.3.141.hwn2/VERSION Sun Mar 25 00:03:02 2001
+++ ./VERSION Sun Mar 25 13:23:19 2001
@@ -2,7 +2,7 @@
MAJOR_VERSION=1
MINOR_VERSION=3
PATCH_LEVEL=141
-MY_PATCH_LEVEL=hwn2
+MY_PATCH_LEVEL=hwn3
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
diff -urN ../lilypond-1.3.141.hwn2/lily/grace-engraver-group.cc
./lily/grace-engraver-group.cc
--- ../lilypond-1.3.141.hwn2/lily/grace-engraver-group.cc Sun Mar 11
19:10:33 2001
+++ ./lily/grace-engraver-group.cc Sun Mar 25 13:55:22 2001
@@ -71,7 +71,7 @@
calling_self_b_ = true;
process_music ();
announces ();
- pre_move_processing ();
+ stop_translation_timestep ();
check_removal ();
calling_self_b_ = false;
}
diff -urN ../lilypond-1.3.141.hwn2/lily/grace-performer-group.cc
./lily/grace-performer-group.cc
--- ../lilypond-1.3.141.hwn2/lily/grace-performer-group.cc Sun Mar 11
19:10:33 2001
+++ ./lily/grace-performer-group.cc Sun Mar 25 13:55:31 2001
@@ -73,7 +73,7 @@
calling_self_b_ = true;
// process_music ();
announces ();
- pre_move_processing ();
+ stop_translation_timestep ();
check_removal ();
calling_self_b_ = false;
}
diff -urN ../lilypond-1.3.141.hwn2/lily/include/translator.hh
./lily/include/translator.hh
--- ../lilypond-1.3.141.hwn2/lily/include/translator.hh Sun Mar 11 19:10:33 2001
+++ ./lily/include/translator.hh Sun Mar 25 14:00:07 2001
@@ -38,9 +38,8 @@
Translator_group * daddy_trans_l_ ;
- void pre_move_processing ();
void announces ();
- void post_move_processing ();
+
void removal_processing ();
/**
ask daddy for a feature
diff -urN ../lilypond-1.3.141.hwn2/lily/note-heads-engraver.cc
./lily/note-heads-engraver.cc
--- ../lilypond-1.3.141.hwn2/lily/note-heads-engraver.cc Sun Mar 11
19:10:34 2001
+++ ./lily/note-heads-engraver.cc Sun Mar 25 14:05:07 2001
@@ -26,7 +26,7 @@
Moment note_end_mom_;
public:
VIRTUAL_COPY_CONS (Translator);
-
+
protected:
virtual void start_translation_timestep ();
virtual bool try_music (Music *req_l) ;
@@ -35,7 +35,6 @@
virtual void stop_translation_timestep ();
};
-
bool
Note_heads_engraver::try_music (Music *m)
{
@@ -131,6 +130,7 @@
void
Note_heads_engraver::start_translation_timestep ()
{
+
/* TODO:make this settable?
*/
if (note_end_mom_ > now_mom ())
@@ -147,6 +147,8 @@
else
e->forbid_breaks (); // guh. Use properties!
}
+
+
}
diff -urN ../lilypond-1.3.141.hwn2/lily/score-engraver.cc
./lily/score-engraver.cc
--- ../lilypond-1.3.141.hwn2/lily/score-engraver.cc Sun Mar 11 19:10:34 2001
+++ ./lily/score-engraver.cc Sun Mar 25 14:07:08 2001
@@ -59,7 +59,7 @@
Global_translator::prepare (w);
make_columns (w);
- post_move_processing ();
+ start_translation_timestep ();
}
void
@@ -115,9 +115,14 @@
void
Score_engraver::one_time_step ()
{
- process_music ();
- announces ();
- pre_move_processing ();
+ if (!to_boolean (get_property (ly_symbol2scm("skipTypesetting"))))
+ {
+ process_music ();
+ announces ();
+ }
+
+
+ stop_translation_timestep ();
check_removal ();
}
diff -urN ../lilypond-1.3.141.hwn2/lily/score-performer.cc
./lily/score-performer.cc
--- ../lilypond-1.3.141.hwn2/lily/score-performer.cc Sun Mar 11 19:10:34 2001
+++ ./lily/score-performer.cc Sun Mar 25 14:00:29 2001
@@ -60,7 +60,7 @@
Global_translator::prepare (m);
audio_column_l_ = new Audio_column (m);
play_element (audio_column_l_);
- post_move_processing ();
+ start_translation_timestep ();
}
@@ -70,7 +70,7 @@
// fixme: put this back.
// process_music ();
announces ();
- pre_move_processing ();
+ stop_translation_timestep ();
check_removal ();
}
diff -urN ../lilypond-1.3.141.hwn2/lily/translator-group.cc
./lily/translator-group.cc
--- ../lilypond-1.3.141.hwn2/lily/translator-group.cc Fri Mar 16 01:42:02 2001
+++ ./lily/translator-group.cc Sun Mar 25 13:59:54 2001
@@ -372,13 +372,13 @@
void
Translator_group::stop_translation_timestep ()
{
- each (&Translator::pre_move_processing);
+ each (&Translator::stop_translation_timestep);
}
void
Translator_group::start_translation_timestep ()
{
- each (&Translator::post_move_processing);
+ each (&Translator::start_translation_timestep);
}
void
diff -urN ../lilypond-1.3.141.hwn2/lily/translator.cc ./lily/translator.cc
--- ../lilypond-1.3.141.hwn2/lily/translator.cc Sat Mar 17 00:49:30 2001
+++ ./lily/translator.cc Sun Mar 25 14:00:07 2001
@@ -82,11 +82,6 @@
-void
-Translator::post_move_processing ()
-{
- start_translation_timestep ();
-}
void
Translator::removal_processing ()
@@ -100,14 +95,6 @@
{
do_announces ();
}
-
-
-void
-Translator::pre_move_processing ()
-{
- stop_translation_timestep ();
-}
-
Music_output_def *
diff -urN ../lilypond-1.3.141.hwn2/scm/translator-property-description.scm
./scm/translator-property-description.scm
--- ../lilypond-1.3.141.hwn2/scm/translator-property-description.scm Sun Mar
18 18:32:22 2001
+++ ./scm/translator-property-description.scm Sun Mar 25 14:05:07 2001
@@ -259,6 +259,11 @@
@end example
")
+(translator-property-description 'skipTypesetting boolean?
+ "When true, all no typesetting is done at
+this moment, causing the interpretation phase to go a lot faster. This can
+help with debugging large scores.")
+
(translator-property-description 'slurBeginAttachment symbol?
"translates to the car of grob-property 'attachment of NoteColumn. See
@ref{Slur}.")
--
Han-Wen Nienhuys | address@hidden | http://www.cs.uu.nl/~hanwen/
- Sugar, Rune Zedeler, 2001/03/03
- Sugar, Han-Wen Nienhuys, 2001/03/24
- Re: Sugar, Mats Bengtsson, 2001/03/25
- Re: Sugar,
Han-Wen Nienhuys <=