From: fred Date: Tue, 26 Mar 2002 21:44:57 +0000 (+0000) Subject: lilypond-1.1.13 X-Git-Tag: release/1.5.59~2700 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=94c79dfe97dca9c3f00175162995b57e16ae1831;p=lilypond.git lilypond-1.1.13 --- diff --git a/init/engraver.ly b/init/engraver.ly index a2c9db5990..a7c13b6bbc 100644 --- a/init/engraver.ly +++ b/init/engraver.ly @@ -68,6 +68,7 @@ StaffContext=\translator { \accepts "RhythmicStaff"; \accepts "GrandStaff"; \accepts "Lyrics"; + \accepts "ChordNames"; } @@ -102,7 +103,7 @@ VoiceContext = \translator { \consists "Font_size_engraver"; \consists "Slur_engraver"; \consists "Ties_engraver"; -% \consists "Tuplet_engraver"; + \consists "Tuplet_engraver"; \consists "Note_heads_engraver" ; \consists "Skip_req_swallow_translator"; }; @@ -132,6 +133,7 @@ GrandStaffContext=\translator{ \accepts "RhythmicStaff"; \accepts "GrandStaff"; \accepts "Lyrics"; + \accepts "ChordNames"; } \translator{ @@ -152,6 +154,21 @@ GrandStaffContext=\translator{ \accepts "LyricVoice"; } +\translator{ + \type "Line_group_engraver_group"; + + \name ChordNameVoice ; + \consists "Separating_line_group_engraver"; + \consists "Chord_name_engraver"; +} + +\translator { + \type "Line_group_engraver_group"; + \name ChordNames; + \consists "Vertical_align_engraver"; + \accepts "ChordNameVoice"; +} + ScoreContext = \translator { \type Score_engraver; \name Score; @@ -169,6 +186,7 @@ ScoreContext = \translator { \accepts "Staff"; \accepts "RhythmicStaff"; \accepts "Lyrics"; + \accepts "ChordNames"; \accepts "GrandStaff"; \accepts "ChoirStaff"; }; @@ -259,5 +277,6 @@ OrchestralScoreContext= \translator { \accepts "Staff"; \accepts "RhythmicStaff"; \accepts "Lyrics"; + \accepts "ChordNames"; \accepts "GrandStaff"; }; diff --git a/lily/include/chord-name-engraver.hh b/lily/include/chord-name-engraver.hh new file mode 100644 index 0000000000..f7b44b588f --- /dev/null +++ b/lily/include/chord-name-engraver.hh @@ -0,0 +1,35 @@ +/* + chord-name-engraver.hh -- declare Chord_name_engraver + + source file of the GNU LilyPond music typesetter + + (c) 1998 Jan Nieuwenhuizen +*/ + +#ifndef CHORD_NAME_ENGRAVER_HH +#define CHORD_NAME_ENGRAVER_HH + +#include "engraver.hh" +#include "array.hh" +#include "musical-pitch.hh" + +#include "lily-proto.hh" + +class Chord_name_engraver : public Engraver +{ +protected: + virtual void do_pre_move_processing (); + virtual void acknowledge_element (Score_element_info i); + virtual void do_process_requests (); + virtual bool do_try_music (Music* m); + +public: + Chord_name_engraver (); + VIRTUAL_COPY_CONS (Translator); + +private: + Array pitch_arr_; + Link_array text_p_arr_; +}; + +#endif // CHORD_NAME_ENGRAVER_HH diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index 20a49da261..3bd510b231 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -46,7 +46,7 @@ struct Break_req; struct Cadenza_req; struct Change_iterator; struct Change_translator; -struct Simultaneous_music; +struct Chord_name_engraver; struct Clef_change_req; struct Clef_item; struct Clef_engraver; @@ -186,7 +186,6 @@ struct Rhythmic_grouping; struct Rhythmic_head; struct Rhythmic_grouping_req; struct Rhythmic_req; -struct Single_malt_grouping_item; struct Scope; struct Separating_group_spanner; struct Score; @@ -200,6 +199,8 @@ struct Script_def; struct Script_engraver; struct Script_req; struct Simple_music; +struct Simultaneous_music; +struct Single_malt_grouping_item; struct Skip_req; struct Slur; struct Slur_engraver; diff --git a/lily/include/lyric-engraver.hh b/lily/include/lyric-engraver.hh index 15b5f510e0..0087e21e5e 100644 --- a/lily/include/lyric-engraver.hh +++ b/lily/include/lyric-engraver.hh @@ -20,7 +20,6 @@ protected: virtual void do_pre_move_processing(); virtual bool do_try_music (Music*); virtual void do_process_requests(); - virtual void do_post_move_processing(); public: Lyric_engraver(); diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index bac629b385..9fb403f2da 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -65,11 +65,6 @@ Lyric_engraver::do_process_requests() } } -void -Lyric_engraver::do_post_move_processing() -{ -} - void Lyric_engraver::do_pre_move_processing() { diff --git a/lily/paper-def.cc b/lily/paper-def.cc index a98af9d389..93193f1508 100644 --- a/lily/paper-def.cc +++ b/lily/paper-def.cc @@ -102,7 +102,7 @@ Paper_def::duration_to_dist (Moment d,Real k) const /** - Get the measure wide constant for arithmetic. + Get the measure wide constant for arithmetic spacing. @see John S. Gourlay. ``Spacing a Line of Music,'' Technical Report @@ -122,13 +122,6 @@ Paper_def::arithmetic_spacing (Moment d ,Real k) const return (log_2 (d) + k)* get_var ("arithmetic_multiplier"); } -Real -Paper_def::geometric_spacing (Moment d) const -{ - Real dur_f = (d) ?pow (get_var ("geometric"), log_2 (d)) : 0; - return get_var ("basicspace") + get_var ("unitspace") * dur_f; -} - void Paper_def::set_lookup (int i, Lookup*l) {