From: Han-Wen Nienhuys <hanwen@xs4all.nl> Date: Mon, 28 Jun 1999 10:43:05 +0000 (+0200) Subject: release: 1.1.51 X-Git-Tag: release/1.1.51 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0d11cc81d96ba3cbe5d3c221aba3ee16e916c4c9;p=lilypond.git release: 1.1.51 --- diff --git a/Documentation/faq.yo b/Documentation/faq.yo index f20726e49b..3ef3231a36 100644 --- a/Documentation/faq.yo +++ b/Documentation/faq.yo @@ -173,9 +173,10 @@ Yes, see the file(twinkle-pop) example. question(Do you support guitar chord diagrams?) -No, not yet. We ourselves don't play guitar, and don't know the -fine points of this notation. We would welcome anyone who could give -this a try. +No. Go ahead and send a patch. + +We ourselves don't play guitar, and don't know the fine points of this +notation. We would welcome anyone who could give this a try. question(Do you support TAB notation?) @@ -192,12 +193,11 @@ size of the staff, and fontSize for setting the size of the glyphs. question(Do you support Gregorian chant notation?) -No. There is no reason why LilyPond can't be extended to do so, but -we haven't done it yet (and there are currently no plans to do it). +No. Go ahead. question(Do you support grace notes?) -No. But they can kludged. See file(input/test/grace.ly) +Yes. See file(input/test/grace.ly) sect(How do I ....) diff --git a/Documentation/tex/lilypond-overview-0.2.7.tex b/Documentation/tex/lilypond-overview-0.2.7.tex deleted file mode 100644 index 6ba1a581a3..0000000000 --- a/Documentation/tex/lilypond-overview-0.2.7.tex +++ /dev/null @@ -1,225 +0,0 @@ -%created by: GNU LilyPond 1.1.48.uu1, at Fri Jun 18 14:13:33 1999 -% -% outputting Score, defined at: -% out-www/lilypond-overview-0.2.7.ly:3:7 -\def\mudelatagline{Lily was here, 1.1.48.uu1}% -\def\LilyPondVersion{1.1.48.uu1}% -\def\mudelapaperbeam_steep_slope{0.200000}% -\def\mudelapaperstem_max{3.000000}% -\def\mudelapaperfont_number-1{8.000000}% -\def\mudelapapermmrest_x_minimum{32.000000}% -\def\mudelapaperhsize{597.507874}% -\def\mudelapaperforced_stem_shorten2{2.000000}% -\def\mudelapaperslur_clip_ratio{1.200000}% -\def\mudelapaperminimum_stem_length3{4.000000}% -\def\mudelapaperlinewidth{-28.452756}% -\def\mudelapaperminimum_stem_length0{0.000000}% -\def\mudelapaperfont_normal{8.000000}% -\def\mudelapapernotewidth{6.600000}% -\def\mudelapaperrestcollision_minimum_dist{3.000000}% -\def\mudelapaperbeam_lengthened{0.800000}% -\def\mudelapaperfont_number{8.000000}% -\def\mudelapaperDOWN{-1.000000}% -\def\mudelapaperslur_clip_angle{100.000000}% -\def\mudelapaperwholewidth{7.920000}% -\def\mudelapaperbarthick_thick{2.400000}% -\def\mudelapapercastingalgorithm{1.000000}% -\def\mudelapaperslur_slope_follow_music_factor{0.800000}% -\def\mudelapaperpostBreakPadding{4.000000}% -\def\mudelapaperscmsetting{(display "\\input lilyponddefs \\musixsixteendefs");% - }% -\def\mudelapaperstemthickness{0.320000}% -\def\mudelapaperinterline{4.000000}% -\def\mudelapaperslur_height_limit{16.000000}% -\def\mudelapapertextheight{611.809858}% -\def\mudelapaperfont_large{12.000000}% -\def\mudelapaperfont_finger{4.000000}% -\def\mudelapaperrulethickness{0.400000}% -\def\mudelapaperstem_length1{10.000000}% -\def\mudelapaperslur_x_minimum{12.000000}% -\def\mudelapaperlinewidth20{557.507874}% -\def\mudelapaperfont_number+1{12.000000}% -\def\mudelapaperMEAN{3.000000}% -\def\mudelapaperpaperfile{a4.ly}% -\def\mudelapapertexsetting{\input lilyponddefs \musixsixteendefs }% -\def\mudelapaperforced_stem_shorten1{2.000000}% -\def\mudelapaperinterbeam4{3.376000}% -\def\mudelapaperminimum_stem_length2{5.000000}% -\def\mudelapapergourlay_maxmeasures{10.000000}% -\def\mudelapaperbeam_dir_algorithm{2.000000}% -\def\mudelapapervsize{844.762323}% -\def\mudelapaperstaffheight{16.000000}% -\def\mudelapapertuplet_thick{0.400000}% -\def\mudelapaperbarthick_score{0.640000}% -\def\mudelapaperbar_thinkern{1.200000}% -\def\mudelapapertie_x_gap{0.800000}% -\def\mudelapapervolta_thick{0.640000}% -\def\mudelapaperrestcollision_minimum_beamdist{1.500000}% -\def\mudelapapertextheight20{764.762323}% -\def\mudelapaperUP{1.000000}% -\def\mudelapaperslur_rc_factor{2.400000}% -\def\mudelapaperarithmetic_basicspace{2.000000}% -\def\mudelapaperslur_thickness{0.560000}% -\def\mudelapaperinterbeam{3.264000}% -\def\mudelapaperindent{31.857593}% -\def\mudelapaperfont_mark{10.000000}% -\def\mudelapaperslur_ratio{0.250000}% -\def\mudelapaperstem_length3{6.000000}% -\def\mudelapaperslur_x_gap{0.800000}% -\def\mudelapaperstem_length0{14.000000}% -\def\mudelapaperfont_Large{10.000000}% -\def\mudelapaperextender_height{0.320000}% -\def\mudelapapercrescendo_shorten{16.000000}% -\def\mudelapaperfont_volta{5.000000}% -\def\mudelapaperforced_stem_shorten3{2.000000}% -\def\mudelapaperslur_clip_height{48.000000}% -\def\mudelapaperquartwidth{5.280000}% -\def\mudelapaperforced_stem_shorten0{2.000000}% -\def\mudelapaperminimum_stem_length1{6.000000}% -\def\mudelapaperslur_slope_damping{0.600000}% -\def\mudelapapermagnification_dynamic{2.000000}% -\def\mudelapaperMEDIAN{4.000000}% -\def\mudelapaperpssetting{(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec}% - { /undefinedfilename signalerror }% - ifelse% - }% -\def\mudelapaperbarthick_thin{0.640000}% -\def\mudelapaperbar_kern{1.200000}% -\def\mudelapapertie_x_minimum{12.000000}% -\def\mudelapaperbeam_thickness{1.872000}% -\def\mudelapapertie_slope_damping{0.800000}% -\def\mudelapaperfont_dynamic{10.000000}% -\def\mudelapapergourlay_energybound{100000.000000}% -\def\mudelapaperMAJORITY{2.000000}% -\def\mudelapaperarithmetic_multiplier{4.800000}% -\def\mudelapaperstaffline{0.400000}% -\def\mudelapaperstem_length2{8.000000}% -\def\mudelapaperbarsize{16.000000}% -\input lilyponddefs \musixsixteendefs \turnOnExperimentalFeatures\turnOnPostScript\vbox to 32.0 pt {\hbox{% -\placebox{-24.0 pt }% - {31.8575928008999 pt }% - {\kern0.0 pt \vrule width 143.546637573243 pt depth 0.2 pt height 0.2 pt }% - \placebox{-20.0 pt }% - {31.8575928008999 pt }% - {\kern0.0 pt \vrule width 143.546637573243 pt depth 0.2 pt height 0.2 pt }% - \placebox{-16.0 pt }% - {31.8575928008999 pt }% - {\kern0.0 pt \vrule width 143.546637573243 pt depth 0.2 pt height 0.2 pt }% - \placebox{-12.0 pt }% - {31.8575928008999 pt }% - {\kern0.0 pt \vrule width 143.546637573243 pt depth 0.2 pt height 0.2 pt }% - \placebox{-8.0 pt }% - {31.8575928008999 pt }% - {\kern0.0 pt \vrule width 143.546637573243 pt depth 0.2 pt height 0.2 pt }% - \font\lilyfontA=feta16\lilyfontA\placebox{-20.0 pt }% - {35.8575928008999 pt }% - {\show{86}% - }% - \font\lilyfontB=feta-nummer8\lilyfontB\placebox{-16.0 pt }% - {50.3998138702358 pt }% - {\hbox{3}% - }% - \placebox{-24.0 pt }% - {49.8575928008999 pt }% - {\hbox{4}% - }% - \placebox{-16.0 pt }% - {127.564230374143 pt }% - {\kern0.0 pt \vrule width 0.64 pt depth 8.0 pt height 8.0 pt }% - \placebox{-16.0 pt }% - {174.764230374143 pt }% - {\kern0.0 pt \vrule width 0.64 pt depth 8.0 pt height 8.0 pt }% - \placebox{-27.264 pt }% - {79.5642303741425 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-24.0 pt }% - {79.5642303741425 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-27.264 pt }% - {69.9642303741424 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-24.0 pt }% - {69.9642303741424 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-27.264 pt }% - {60.3642303741423 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-24.0 pt }% - {60.3642303741423 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-16.0 pt }% - {60.5642303741423 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 11.264 pt height 1.03836152344995 pt }% - \lilyfontA\placebox{-14.0 pt }% - {60.3642303741423 pt }% - {\show{30}% - }% - \placebox{-16.0 pt }% - {70.1642303741424 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 11.264 pt height 1.03836152344995 pt }% - \placebox{-14.0 pt }% - {69.9642303741424 pt }% - {\show{30}% - }% - \placebox{-16.0 pt }% - {79.7642303741425 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 11.264 pt height 1.03836152344995 pt }% - \placebox{-14.0 pt }% - {79.5642303741425 pt }% - {\show{30}% - }% - \placebox{-16.0 pt }% - {89.3642303741427 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 11.264 pt height 1.03836152344995 pt }% - \placebox{-14.0 pt }% - {89.1642303741427 pt }% - {\show{30}% - }% - \placebox{-24.736 pt }% - {98.7642303741428 pt }% - {\embeddedps{14.8000000000002 0.0 1.872 draw_beam }% - }% - \placebox{-16.0 pt }% - {98.9642303741428 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 8.736 pt height 1.03836152344995 pt }% - \placebox{-14.0 pt }% - {98.7642303741428 pt }% - {\show{30}% - }% - \placebox{-16.0 pt }% - {113.364230374143 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 8.736 pt height 1.03836152344995 pt }% - \placebox{-14.0 pt }% - {113.164230374143 pt }% - {\show{30}% - }% - \placebox{-16.0 pt }% - {132.404230374143 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 6.0 pt height 7.03836152344995 pt }% - \placebox{-8.0 pt }% - {132.204230374143 pt }% - {\show{30}% - }% - \placebox{-16.0 pt }% - {151.688390374143 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 5.03836152344995 pt height 8.0 pt }% - \placebox{-22.0 pt }% - {146.604230374143 pt }% - {\show{30}% - }% - \placebox{-16.0 pt }% - {161.204230374143 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 6.0 pt height 7.03836152344995 pt }% - \placebox{-8.0 pt }% - {161.004230374143 pt }% - {\show{30}% - }% - }% - \vss}% -\EndLilyPondOutput \ No newline at end of file diff --git a/Documentation/tex/lilypond-overview-0.2.8.tex b/Documentation/tex/lilypond-overview-0.2.8.tex deleted file mode 100644 index 9aa2b0cbad..0000000000 --- a/Documentation/tex/lilypond-overview-0.2.8.tex +++ /dev/null @@ -1,320 +0,0 @@ -%created by: GNU LilyPond 1.1.48.uu1, at Fri Jun 18 14:13:29 1999 -% -% outputting Score, defined at: -% out-www/lilypond-overview-0.2.8.ly:3:7 -\def\mudelatagline{Lily was here, 1.1.48.uu1}% -\def\LilyPondVersion{1.1.48.uu1}% -\def\mudelapaperbeam_steep_slope{0.200000}% -\def\mudelapaperstem_max{3.000000}% -\def\mudelapaperfont_number-1{8.000000}% -\def\mudelapapermmrest_x_minimum{32.000000}% -\def\mudelapaperhsize{597.507874}% -\def\mudelapaperforced_stem_shorten2{2.000000}% -\def\mudelapaperslur_clip_ratio{1.200000}% -\def\mudelapaperminimum_stem_length3{4.000000}% -\def\mudelapaperlinewidth{-28.452756}% -\def\mudelapaperminimum_stem_length0{0.000000}% -\def\mudelapaperfont_normal{8.000000}% -\def\mudelapapernotewidth{6.600000}% -\def\mudelapaperrestcollision_minimum_dist{3.000000}% -\def\mudelapaperbeam_lengthened{0.800000}% -\def\mudelapaperfont_number{8.000000}% -\def\mudelapaperDOWN{-1.000000}% -\def\mudelapaperslur_clip_angle{100.000000}% -\def\mudelapaperwholewidth{7.920000}% -\def\mudelapaperbarthick_thick{2.400000}% -\def\mudelapapercastingalgorithm{1.000000}% -\def\mudelapaperslur_slope_follow_music_factor{0.800000}% -\def\mudelapaperpostBreakPadding{4.000000}% -\def\mudelapaperscmsetting{(display "\\input lilyponddefs \\musixsixteendefs");% - }% -\def\mudelapaperstemthickness{0.320000}% -\def\mudelapaperinterline{4.000000}% -\def\mudelapaperslur_height_limit{16.000000}% -\def\mudelapapertextheight{611.809858}% -\def\mudelapaperfont_large{12.000000}% -\def\mudelapaperfont_finger{4.000000}% -\def\mudelapaperrulethickness{0.400000}% -\def\mudelapaperstem_length1{10.000000}% -\def\mudelapaperslur_x_minimum{12.000000}% -\def\mudelapaperlinewidth20{557.507874}% -\def\mudelapaperfont_number+1{12.000000}% -\def\mudelapaperMEAN{3.000000}% -\def\mudelapaperpaperfile{a4.ly}% -\def\mudelapapertexsetting{\input lilyponddefs \musixsixteendefs }% -\def\mudelapaperforced_stem_shorten1{2.000000}% -\def\mudelapaperinterbeam4{3.376000}% -\def\mudelapaperminimum_stem_length2{5.000000}% -\def\mudelapapergourlay_maxmeasures{10.000000}% -\def\mudelapaperbeam_dir_algorithm{2.000000}% -\def\mudelapapervsize{844.762323}% -\def\mudelapaperstaffheight{16.000000}% -\def\mudelapapertuplet_thick{0.400000}% -\def\mudelapaperbarthick_score{0.640000}% -\def\mudelapaperbar_thinkern{1.200000}% -\def\mudelapapertie_x_gap{0.800000}% -\def\mudelapapervolta_thick{0.640000}% -\def\mudelapaperrestcollision_minimum_beamdist{1.500000}% -\def\mudelapapertextheight20{764.762323}% -\def\mudelapaperUP{1.000000}% -\def\mudelapaperslur_rc_factor{2.400000}% -\def\mudelapaperarithmetic_basicspace{2.000000}% -\def\mudelapaperslur_thickness{0.560000}% -\def\mudelapaperinterbeam{3.264000}% -\def\mudelapaperindent{31.857593}% -\def\mudelapaperfont_mark{10.000000}% -\def\mudelapaperslur_ratio{0.250000}% -\def\mudelapaperstem_length3{6.000000}% -\def\mudelapaperslur_x_gap{0.800000}% -\def\mudelapaperstem_length0{14.000000}% -\def\mudelapaperfont_Large{10.000000}% -\def\mudelapaperextender_height{0.320000}% -\def\mudelapapercrescendo_shorten{16.000000}% -\def\mudelapaperfont_volta{5.000000}% -\def\mudelapaperforced_stem_shorten3{2.000000}% -\def\mudelapaperslur_clip_height{48.000000}% -\def\mudelapaperquartwidth{5.280000}% -\def\mudelapaperforced_stem_shorten0{2.000000}% -\def\mudelapaperminimum_stem_length1{6.000000}% -\def\mudelapaperslur_slope_damping{0.600000}% -\def\mudelapapermagnification_dynamic{2.000000}% -\def\mudelapaperMEDIAN{4.000000}% -\def\mudelapaperpssetting{(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec}% - { /undefinedfilename signalerror }% - ifelse% - }% -\def\mudelapaperbarthick_thin{0.640000}% -\def\mudelapaperbar_kern{1.200000}% -\def\mudelapapertie_x_minimum{12.000000}% -\def\mudelapaperbeam_thickness{1.872000}% -\def\mudelapapertie_slope_damping{0.800000}% -\def\mudelapaperfont_dynamic{10.000000}% -\def\mudelapapergourlay_energybound{100000.000000}% -\def\mudelapaperMAJORITY{2.000000}% -\def\mudelapaperarithmetic_multiplier{4.800000}% -\def\mudelapaperstaffline{0.400000}% -\def\mudelapaperstem_length2{8.000000}% -\def\mudelapaperbarsize{16.000000}% -\input lilyponddefs \musixsixteendefs \turnOnExperimentalFeatures\turnOnPostScript\vbox to 38.2 pt {\hbox{% -\font\lilyfontA=feta-nummer8\lilyfontA\placebox{-22.2 pt }% - {50.1287033355679 pt }% - {\hbox{2}% - }% - \placebox{-30.2 pt }% - {49.8575928008999 pt }% - {\hbox{4}% - }% - \placebox{-30.2 pt }% - {31.8575928008999 pt }% - {\kern0.0 pt \vrule width 173.026317573245 pt depth 0.2 pt height 0.2 pt }% - \placebox{-26.2 pt }% - {31.8575928008999 pt }% - {\kern0.0 pt \vrule width 173.026317573245 pt depth 0.2 pt height 0.2 pt }% - \placebox{-22.2 pt }% - {31.8575928008999 pt }% - {\kern0.0 pt \vrule width 173.026317573245 pt depth 0.2 pt height 0.2 pt }% - \placebox{-18.2 pt }% - {31.8575928008999 pt }% - {\kern0.0 pt \vrule width 173.026317573245 pt depth 0.2 pt height 0.2 pt }% - \placebox{-14.2 pt }% - {31.8575928008999 pt }% - {\kern0.0 pt \vrule width 173.026317573245 pt depth 0.2 pt height 0.2 pt }% - \font\lilyfontB=feta16\lilyfontB\placebox{-26.2 pt }% - {35.8575928008999 pt }% - {\show{86}% - }% - \placebox{-22.2 pt }% - {89.1642303741433 pt }% - {\kern0.0 pt \vrule width 0.64 pt depth 8.0 pt height 8.0 pt }% - \placebox{-22.2 pt }% - {122.604230374144 pt }% - {\kern0.0 pt \vrule width 0.64 pt depth 8.0 pt height 8.0 pt }% - \placebox{-22.2 pt }% - {204.243910374144 pt }% - {\kern0.0 pt \vrule width 0.64 pt depth 8.0 pt height 8.0 pt }% - \placebox{-22.2 pt }% - {60.5642303741424 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 12.0 pt height 5.03836152344995 pt }% - \placebox{-20.2 pt }% - {60.3642303741424 pt }% - {\show{30}% - }% - \placebox{-16.2 pt }% - {60.3642303741424 pt }% - {\show{30}% - }% - \placebox{-22.2 pt }% - {74.9642303741429 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 10.0 pt height 7.03836152344995 pt }% - \placebox{-18.2 pt }% - {74.7642303741429 pt }% - {\show{30}% - }% - \placebox{-14.2 pt }% - {74.7642303741429 pt }% - {\show{30}% - }% - \placebox{-22.2 pt }% - {94.0042303741434 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 12.0 pt height 1.03836152344995 pt }% - \placebox{-20.2 pt }% - {93.8042303741434 pt }% - {\show{30}% - }% - \placebox{-22.2 pt }% - {98.8883903741434 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth -6.96163847655005 pt height 18.0 pt }% - \placebox{-16.2 pt }% - {93.8042303741434 pt }% - {\show{30}% - }% - \placebox{-22.2 pt }% - {108.404230374144 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 10.0 pt height 3.03836152344995 pt }% - \placebox{-18.2 pt }% - {108.204230374144 pt }% - {\show{30}% - }% - \placebox{-22.2 pt }% - {113.288390374144 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth -8.96163847655005 pt height 20.0 pt }% - \placebox{-14.2 pt }% - {108.204230374144 pt }% - {\show{30}% - }% - \placebox{-34.2 pt }% - {146.864070374144 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-30.936 pt }% - {146.864070374144 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-34.2 pt }% - {137.264070374144 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-30.936 pt }% - {137.264070374144 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-34.2 pt }% - {127.244230374144 pt }% - {\embeddedps{10.41984 0.0 1.872 draw_beam }% - }% - \placebox{-30.936 pt }% - {127.244230374144 pt }% - {\embeddedps{10.41984 0.0 1.872 draw_beam }% - }% - \placebox{-22.2 pt }% - {127.444230374144 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 12.0 pt height -0.961638476550048 pt }% - \placebox{-22.2 pt }% - {127.244230374144 pt }% - {\show{30}% - }% - \placebox{-0.199999999999999 pt }% - {132.328390374144 pt }% - {\show{74}% - }% - \placebox{-22.2 pt }% - {132.328390374144 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth -10.96163847655 pt height 22.0 pt }% - \placebox{-12.2 pt }% - {127.244230374144 pt }% - {\show{30}% - }% - \placebox{-22.2 pt }% - {137.464070374144 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 12.0 pt height -0.961638476550048 pt }% - \placebox{-22.2 pt }% - {137.264070374144 pt }% - {\show{30}% - }% - \placebox{-22.2 pt }% - {147.064070374144 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 12.0 pt height -0.961638476550048 pt }% - \placebox{-22.2 pt }% - {146.864070374144 pt }% - {\show{30}% - }% - \placebox{-22.2 pt }% - {151.948230374144 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth -10.96163847655 pt height 22.0 pt }% - \placebox{-12.2 pt }% - {146.864070374144 pt }% - {\show{30}% - }% - \placebox{-22.2 pt }% - {156.664070374144 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 12.0 pt height -0.961638476550048 pt }% - \placebox{-22.2 pt }% - {156.464070374144 pt }% - {\show{30}% - }% - \placebox{-34.2 pt }% - {185.264070374144 pt }% - {\embeddedps{10.41984 0.0 1.872 draw_beam }% - }% - \placebox{-30.936 pt }% - {185.264070374144 pt }% - {\embeddedps{10.41984 0.0 1.872 draw_beam }% - }% - \placebox{-34.2 pt }% - {175.664070374144 pt }% - {\embeddedps{10.0 0.0 1.872 draw_beam }% - }% - \placebox{-30.936 pt }% - {175.664070374144 pt }% - {\embeddedps{10.0 0.0 1.872 draw_beam }% - }% - \placebox{-34.2 pt }% - {166.064070374144 pt }% - {\embeddedps{10.0 0.0 1.872 draw_beam }% - }% - \placebox{-30.936 pt }% - {166.064070374144 pt }% - {\embeddedps{10.0 0.0 1.872 draw_beam }% - }% - \placebox{-22.2 pt }% - {166.264070374144 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 12.0 pt height -0.961638476550048 pt }% - \placebox{-22.2 pt }% - {166.064070374144 pt }% - {\show{30}% - }% - \placebox{-22.2 pt }% - {175.864070374144 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 12.0 pt height -0.961638476550048 pt }% - \placebox{-22.2 pt }% - {175.664070374144 pt }% - {\show{30}% - }% - \placebox{-22.2 pt }% - {185.464070374144 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 12.0 pt height -0.961638476550048 pt }% - \placebox{-22.2 pt }% - {185.264070374144 pt }% - {\show{30}% - }% - \placebox{-0.199999999999999 pt }% - {190.348230374144 pt }% - {\show{74}% - }% - \placebox{-22.2 pt }% - {190.348230374144 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth -10.96163847655 pt height 22.0 pt }% - \placebox{-12.2 pt }% - {185.264070374144 pt }% - {\show{30}% - }% - \placebox{-22.2 pt }% - {195.483910374144 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 12.0 pt height -0.961638476550048 pt }% - \placebox{-22.2 pt }% - {195.283910374144 pt }% - {\show{30}% - }% - }% - \vss}% -\EndLilyPondOutput \ No newline at end of file diff --git a/Documentation/tex/lilypond-overview-0.2.9.tex b/Documentation/tex/lilypond-overview-0.2.9.tex deleted file mode 100644 index a8834b8c57..0000000000 --- a/Documentation/tex/lilypond-overview-0.2.9.tex +++ /dev/null @@ -1,225 +0,0 @@ -%created by: GNU LilyPond 1.1.48.uu1, at Fri Jun 18 14:13:37 1999 -% -% outputting Score, defined at: -% out-www/lilypond-overview-0.2.9.ly:3:7 -\def\mudelatagline{Lily was here, 1.1.48.uu1}% -\def\LilyPondVersion{1.1.48.uu1}% -\def\mudelapaperbeam_steep_slope{0.200000}% -\def\mudelapaperstem_max{3.000000}% -\def\mudelapaperfont_number-1{8.000000}% -\def\mudelapapermmrest_x_minimum{32.000000}% -\def\mudelapaperhsize{597.507874}% -\def\mudelapaperforced_stem_shorten2{2.000000}% -\def\mudelapaperslur_clip_ratio{1.200000}% -\def\mudelapaperminimum_stem_length3{4.000000}% -\def\mudelapaperlinewidth{-28.452756}% -\def\mudelapaperminimum_stem_length0{0.000000}% -\def\mudelapaperfont_normal{8.000000}% -\def\mudelapapernotewidth{6.600000}% -\def\mudelapaperrestcollision_minimum_dist{3.000000}% -\def\mudelapaperbeam_lengthened{0.800000}% -\def\mudelapaperfont_number{8.000000}% -\def\mudelapaperDOWN{-1.000000}% -\def\mudelapaperslur_clip_angle{100.000000}% -\def\mudelapaperwholewidth{7.920000}% -\def\mudelapaperbarthick_thick{2.400000}% -\def\mudelapapercastingalgorithm{1.000000}% -\def\mudelapaperslur_slope_follow_music_factor{0.800000}% -\def\mudelapaperpostBreakPadding{4.000000}% -\def\mudelapaperscmsetting{(display "\\input lilyponddefs \\musixsixteendefs");% - }% -\def\mudelapaperstemthickness{0.320000}% -\def\mudelapaperinterline{4.000000}% -\def\mudelapaperslur_height_limit{16.000000}% -\def\mudelapapertextheight{611.809858}% -\def\mudelapaperfont_large{12.000000}% -\def\mudelapaperfont_finger{4.000000}% -\def\mudelapaperrulethickness{0.400000}% -\def\mudelapaperstem_length1{10.000000}% -\def\mudelapaperslur_x_minimum{12.000000}% -\def\mudelapaperlinewidth20{557.507874}% -\def\mudelapaperfont_number+1{12.000000}% -\def\mudelapaperMEAN{3.000000}% -\def\mudelapaperpaperfile{a4.ly}% -\def\mudelapapertexsetting{\input lilyponddefs \musixsixteendefs }% -\def\mudelapaperforced_stem_shorten1{2.000000}% -\def\mudelapaperinterbeam4{3.376000}% -\def\mudelapaperminimum_stem_length2{5.000000}% -\def\mudelapapergourlay_maxmeasures{10.000000}% -\def\mudelapaperbeam_dir_algorithm{2.000000}% -\def\mudelapapervsize{844.762323}% -\def\mudelapaperstaffheight{16.000000}% -\def\mudelapapertuplet_thick{0.400000}% -\def\mudelapaperbarthick_score{0.640000}% -\def\mudelapaperbar_thinkern{1.200000}% -\def\mudelapapertie_x_gap{0.800000}% -\def\mudelapapervolta_thick{0.640000}% -\def\mudelapaperrestcollision_minimum_beamdist{1.500000}% -\def\mudelapapertextheight20{764.762323}% -\def\mudelapaperUP{1.000000}% -\def\mudelapaperslur_rc_factor{2.400000}% -\def\mudelapaperarithmetic_basicspace{2.000000}% -\def\mudelapaperslur_thickness{0.560000}% -\def\mudelapaperinterbeam{3.264000}% -\def\mudelapaperindent{31.857593}% -\def\mudelapaperfont_mark{10.000000}% -\def\mudelapaperslur_ratio{0.250000}% -\def\mudelapaperstem_length3{6.000000}% -\def\mudelapaperslur_x_gap{0.800000}% -\def\mudelapaperstem_length0{14.000000}% -\def\mudelapaperfont_Large{10.000000}% -\def\mudelapaperextender_height{0.320000}% -\def\mudelapapercrescendo_shorten{16.000000}% -\def\mudelapaperfont_volta{5.000000}% -\def\mudelapaperforced_stem_shorten3{2.000000}% -\def\mudelapaperslur_clip_height{48.000000}% -\def\mudelapaperquartwidth{5.280000}% -\def\mudelapaperforced_stem_shorten0{2.000000}% -\def\mudelapaperminimum_stem_length1{6.000000}% -\def\mudelapaperslur_slope_damping{0.600000}% -\def\mudelapapermagnification_dynamic{2.000000}% -\def\mudelapaperMEDIAN{4.000000}% -\def\mudelapaperpssetting{(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec}% - { /undefinedfilename signalerror }% - ifelse% - }% -\def\mudelapaperbarthick_thin{0.640000}% -\def\mudelapaperbar_kern{1.200000}% -\def\mudelapapertie_x_minimum{12.000000}% -\def\mudelapaperbeam_thickness{1.872000}% -\def\mudelapapertie_slope_damping{0.800000}% -\def\mudelapaperfont_dynamic{10.000000}% -\def\mudelapapergourlay_energybound{100000.000000}% -\def\mudelapaperMAJORITY{2.000000}% -\def\mudelapaperarithmetic_multiplier{4.800000}% -\def\mudelapaperstaffline{0.400000}% -\def\mudelapaperstem_length2{8.000000}% -\def\mudelapaperbarsize{16.000000}% -\input lilyponddefs \musixsixteendefs \turnOnExperimentalFeatures\turnOnPostScript\vbox to 32.0 pt {\hbox{% -\placebox{-24.0 pt }% - {31.8575928008999 pt }% - {\kern0.0 pt \vrule width 143.546637573243 pt depth 0.2 pt height 0.2 pt }% - \placebox{-20.0 pt }% - {31.8575928008999 pt }% - {\kern0.0 pt \vrule width 143.546637573243 pt depth 0.2 pt height 0.2 pt }% - \placebox{-16.0 pt }% - {31.8575928008999 pt }% - {\kern0.0 pt \vrule width 143.546637573243 pt depth 0.2 pt height 0.2 pt }% - \placebox{-12.0 pt }% - {31.8575928008999 pt }% - {\kern0.0 pt \vrule width 143.546637573243 pt depth 0.2 pt height 0.2 pt }% - \placebox{-8.0 pt }% - {31.8575928008999 pt }% - {\kern0.0 pt \vrule width 143.546637573243 pt depth 0.2 pt height 0.2 pt }% - \font\lilyfontA=feta16\lilyfontA\placebox{-20.0 pt }% - {35.8575928008999 pt }% - {\show{86}% - }% - \font\lilyfontB=feta-nummer8\lilyfontB\placebox{-16.0 pt }% - {50.3998138702358 pt }% - {\hbox{3}% - }% - \placebox{-24.0 pt }% - {49.8575928008999 pt }% - {\hbox{4}% - }% - \placebox{-16.0 pt }% - {127.564230374143 pt }% - {\kern0.0 pt \vrule width 0.64 pt depth 8.0 pt height 8.0 pt }% - \placebox{-16.0 pt }% - {174.764230374143 pt }% - {\kern0.0 pt \vrule width 0.64 pt depth 8.0 pt height 8.0 pt }% - \placebox{-27.264 pt }% - {79.5642303741425 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-24.0 pt }% - {79.5642303741425 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-27.264 pt }% - {69.9642303741424 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-24.0 pt }% - {69.9642303741424 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-27.264 pt }% - {60.3642303741423 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-24.0 pt }% - {60.3642303741423 pt }% - {\embeddedps{10.0000000000001 0.0 1.872 draw_beam }% - }% - \placebox{-16.0 pt }% - {60.5642303741423 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 11.264 pt height 1.03836152344995 pt }% - \lilyfontA\placebox{-14.0 pt }% - {60.3642303741423 pt }% - {\show{30}% - }% - \placebox{-16.0 pt }% - {70.1642303741424 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 11.264 pt height 1.03836152344995 pt }% - \placebox{-14.0 pt }% - {69.9642303741424 pt }% - {\show{30}% - }% - \placebox{-16.0 pt }% - {79.7642303741425 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 11.264 pt height 1.03836152344995 pt }% - \placebox{-14.0 pt }% - {79.5642303741425 pt }% - {\show{30}% - }% - \placebox{-16.0 pt }% - {89.3642303741427 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 11.264 pt height 1.03836152344995 pt }% - \placebox{-14.0 pt }% - {89.1642303741427 pt }% - {\show{30}% - }% - \placebox{-24.736 pt }% - {98.7642303741428 pt }% - {\embeddedps{14.8000000000002 0.0 1.872 draw_beam }% - }% - \placebox{-16.0 pt }% - {98.9642303741428 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 8.736 pt height 1.03836152344995 pt }% - \placebox{-14.0 pt }% - {98.7642303741428 pt }% - {\show{30}% - }% - \placebox{-16.0 pt }% - {113.364230374143 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 8.736 pt height 1.03836152344995 pt }% - \placebox{-14.0 pt }% - {113.164230374143 pt }% - {\show{30}% - }% - \placebox{-16.0 pt }% - {132.404230374143 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 6.0 pt height 7.03836152344995 pt }% - \placebox{-8.0 pt }% - {132.204230374143 pt }% - {\show{30}% - }% - \placebox{-16.0 pt }% - {151.688390374143 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 5.03836152344995 pt height 8.0 pt }% - \placebox{-22.0 pt }% - {146.604230374143 pt }% - {\show{30}% - }% - \placebox{-16.0 pt }% - {161.204230374143 pt }% - {\kern-0.16 pt \vrule width 0.32 pt depth 6.0 pt height 7.03836152344995 pt }% - \placebox{-8.0 pt }% - {161.004230374143 pt }% - {\show{30}% - }% - }% - \vss}% -\EndLilyPondOutput \ No newline at end of file diff --git a/Documentation/tex/lilypond-regtest.doc b/Documentation/tex/lilypond-regtest.doc index 37452d42b9..5ff667defe 100644 --- a/Documentation/tex/lilypond-regtest.doc +++ b/Documentation/tex/lilypond-regtest.doc @@ -42,6 +42,15 @@ Beams, stems and noteheads often have communication troubles, since the two systems for y dimensions (1 unit = staffspace, 1 unit = 1 point) are mixed. +\section{Grace notes} + +Grace notes are typeset as an encapsulated piece of music. You can +have beams, notes, chords, stems etc. within a \verb|\grace| +section. Slurs that start within a grace section, but aren't ended are +attached to the next normal note. Grace notes have zero duration + +\mudelafile{grace.ly} + \section{Beams, slurs and other spanners} @@ -83,10 +92,14 @@ Unfolded behavior: \mudelafile{repeat-unfold.ly} -Semi (un)0folded behavior: +Semi (un)folded behavior: \mudelafile{repeat-semifold.ly} +Folded. This doesn't make sense without alternatives, but it works. + +\mudelafile{repeat-fold.ly} + \section{Multiple notes} Rests should not collide with beams, stems and noteheads. Rests may @@ -95,7 +108,6 @@ inside the staff, and by half spaces outside. Notice that the half and whole rests just outside the staff get ledger lines in different cases. - \mudelafile{rest-collision.ly} Normal collisions. We have support for four voice polyphony, where the @@ -134,7 +146,7 @@ Breathing signs, also used for phrasing, do normally not influence global spacing -- only if space gets tight, notes are shifted to make room for the breathing sign. Breathing signs break beams running through their voice. In the following example, the notes in the first -two bars all have the same distance from each other: +two measures all have the same distance from each other: \mudelafile{breathing-sign.ly} diff --git a/NEWS b/NEWS index d96fac1137..dffc1bfbdd 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,24 @@ + +pl 50.hwn1 + - grace notes: + * Grace_iterator + * Grace_music + * Grace_engraver_group + * move Score::run_translator to Global_translator::run_iterator_on_me + * stemLength property, Stem::length elt property + * Grace_align_item + * Note_head_side baseclasses Local_key_item, Grace_align_item + * Local_key_engraver moved to Voice. + * Grace_position_engraver + * Added Rhythmic_head::stem_l_ + * Various other robustifications. + - lily.scm: scm->string + - folded reps without alts. + - Paper_outputter uses scm->string + - stem params now in staff positions iso. real dimensions + - internal: Junk all G_ and g- prefixes + +************ pl 49.mb1 - bf: ly2dvi -N - Added dynamicPadding property (applies only to dynamic marks, diff --git a/TODO b/TODO index c59decc257..8b98d55d5c 100644 --- a/TODO +++ b/TODO @@ -15,34 +15,15 @@ Grep for TODO and ugh/ugr/urg. . * ps/lily.ps see comments. . * didot / big point. . * midi key. -. * Repeats -. * input/bugs/rep.ly (moved from test) -. * unfold broken: -. * without alternatives: repeat unfold 4 { a b c d } -. * count > alternatives: repeat unfold 79 { a b c d } -\alternative { { c c c c } { d d d d } } -. * kind of 'initial property' iso fold/volta(semi)/unfold strings . * fix singleStaffBracket . * declare performers in \midi . * input/test/stem-spacing.ly: 12/4 touches first note -4 too high? +. * timesig: sometimes bottom digit too high . * fix MIDI . * \shape 1st dim skipped? . * turn slope-damping on/off . * We need feta-din*.mf files for more sizes than 10. . * fix dynamics decently, ie. use kerning & ligatures. -. * -BUGS: -> + -> + Causes segfault: -> + -> + \score{ -> + \notes{ \context Voice { -> + \repeat fold 2 { a b c d } {} -> + } -> + } -> + } -> + . * dots & rest collisions? . * mudela-book.py . * fix \mudelafile{} to have decent functionality @@ -51,7 +32,6 @@ pre,postMudelaExample, whether MudelaExample is epsed or not: ( if this fragment is floating eps, than 1, otherwise 2). say preMudelaExample[eps]{}, and change it in document body sometimes. . * use less RE's -. * slurs colllide with lyrics. . * junk _ in lyric mode for " " . * Lyrics and scripts collide. . * a note with a circle after it, meaning: @@ -62,6 +42,7 @@ preMudelaExample[eps]{}, and change it in document body sometimes. page three, the c-sharp on the second line should be a quarter with a circle, not a quarter tied to a sixteenth. is this at all possible with lily? +. * grace_align_item -> stackingdir = left, weird placement. . * tuplets that are written as "number : note", for example "3 : [image of a half note here]". possible? @@ -72,10 +53,11 @@ preMudelaExample[eps]{}, and change it in document body sometimes. . * heavier beams? .* Cleanups needed -. * \$ and $ identifier syntax. +. * \$ and $ identifier syntax in examples. . * Y dimension units: staffspace vs. Point . * Beam . * Stem +. * Rhythmic_column and interaction stem/rhythmic_column/note_head/dots. . * Slur . * Rhythmic_grouping . * Duration @@ -418,11 +400,6 @@ hesitate to ask. . * account for rhythmic position in measure . * etc. -. * grace notes -. * make separate class for Grace_*_engravers - (which is at Voice_gravs level) -. * make encapsulated spacing problems. - . * accidentals per Voice_group . * Output class, handles : (smallish) diff --git a/VERSION b/VERSION index 0e7b01172e..c6ae35befa 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=1 -PATCH_LEVEL=50 +PATCH_LEVEL=51 MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a diff --git a/flower/include/rational.hh b/flower/include/rational.hh index 3a2b8fff31..7ea4e0aaf2 100644 --- a/flower/include/rational.hh +++ b/flower/include/rational.hh @@ -59,7 +59,7 @@ public: Rational (); Rational (int, int =1); Rational (double); - Rational (Rational const&); + Rational (Rational const&r) { copy (r);} Rational &operator = (Rational const &); Rational &operator *= (Rational); diff --git a/flower/rational.cc b/flower/rational.cc index ea9fb1ca46..15c576c686 100644 --- a/flower/rational.cc +++ b/flower/rational.cc @@ -53,11 +53,6 @@ Rational::Rational (int n, int d) normalise (); } -Rational::Rational (Rational const &r) -{ - copy (r); -} - static int gcd (int a, int b) { diff --git a/input/bugs/foo.ly b/input/bugs/foo.ly new file mode 100644 index 0000000000..fdf15b17fc --- /dev/null +++ b/input/bugs/foo.ly @@ -0,0 +1,9 @@ + +\score {\notes { + c2. + c1 + \grace { [c32 d] } + + + +}} diff --git a/input/test/grace.ly b/input/test/grace.ly index f74f3b14b5..fecf639c71 100644 --- a/input/test/grace.ly +++ b/input/test/grace.ly @@ -1,24 +1,8 @@ -\version "1.0.21"; - -\score{ - < - \context Staff = a \notes\relative c < -% {\grace b''8 \graceat a4 \ecarg g fis2 | a2 a } - {\tiny b''8*1/16 \normalsize a4*31/32 g fis2 | a2 a } - > - \context Staff = b \notes\relative c < -% {\grace g''16 b16 \graceat a4 \ecarg g fis2 | } - {\tiny g''16*1/16 b16*1/16 \normalsize a4*31/32 g fis2 | a1 } - > - \context Staff = c \notes\relative c < -% {\grace \times 2/48 { [ g''16 b g] } \graceat a4 \ecarg g fis2 | a1 } - {\tiny \times 2/48 { [ g''16 b g] } \normalsize a4*31/32 g fis2 | a1 } - > - > - \paper { - linewidth = 120.0\mm; - \translator { \VoiceContext } - } +\score {\notes \context Voice = VA \relative c'' { + \grace c8 c4 + \grace { [c32 c32] } c4 + \grace { [b32 ( c32] } c4 + \grace c16 [c8 c8] +} } - diff --git a/input/test/repeat-fold.ly b/input/test/repeat-fold.ly new file mode 100644 index 0000000000..2ee0bc8424 --- /dev/null +++ b/input/test/repeat-fold.ly @@ -0,0 +1,9 @@ + +\score { \notes\context Staff\relative c'' { +\repeat fold 3 { c^"3$\\times$ 0alt" d } +% less alts than body +\repeat fold 4 { c^"4$\\times$ 2alt" d } \alternative { e f } +% more alts than body +\repeat fold 2 { c^"2$\\times$ 3alt" d } \alternative { e f g } +}} + diff --git a/input/von-guten-maechten.ly b/input/von-guten-maechten.ly deleted file mode 100644 index a29e3a4690..0000000000 --- a/input/von-guten-maechten.ly +++ /dev/null @@ -1,110 +0,0 @@ - -\include "paper16.ly" -\include "deutsch.ly" - -melodie = \notes \relative c' { - d2 d4 e f2 f g4 f e d e2 e \breathe | - f d4 e f g a2 b g4 g f2 r2 | - c'2 c4 c a2 d c4 b a g f2 g \breathe | - a d,4 d g2 g f4 d e2 e d2-\fermata \bar "|."; -} - -righthand = \notes \relative c' { - a2 a4 cis4 | d2 d2 | d4 c2 a4 | d4 h cis2 \breathe | - d2 a4 c4 | c4 e f2 | f2 f4 e | c2 r2 | - e4 f g2 | f2 f2 | e4 d f e | d2. e4 \breathe | - f4 d b4 b | d2 d | d4 c d h | cis2 a2 | -} - -lefthand = \notes \relative c { - f2 f4 a | a2 a2 | b4 a g f | a2 a \breathe | - a2 f4 g | a c c2 | d2 c4 c | a2 r2 | - g2 c4 c | c2 b2 | g4 f c' c | a4 b2 cis4 \breathe | - d4 a f f | b2 b | a4 a a2 | a2 fis2 | -} - -pedal = \notes \relative c { - d2 d4 a d2 d g,4 a c d a2 a \breathe | - d2 d4 c f c f2 b,4 g c c f2 r2 | - c4 d e c f2 b, c4 d f c d b a2 \breathe | - d4 c b2 g4 a b2 d2 a a d_\fermata \bar "|."; -} - -\score { - < - \context PianoStaff < - \context Staff = treble < - \notes { \key f; \time 2/2; } - \context Voice = melody { - \stemup \melodie - } - \context Voice = right { - \stemdown \righthand - } - > - \context Staff = bass { - \notes { \key f; \clef "bass"; } - \lefthand - } - > - \context Staff = pedal { - \notes { \key f; \clef "bass"; } - \pedal - } - > - - \header { - title = "Von guten Mächten treu und still umgeben"; - composer = "Satz: Michael Krause 1999 (*1977)"; - enteredby = "Michael Krause"; - copyright = "dunno"; - poet = "Dietrich Bonhoeffer 1944"; - } - - \paper{ -% \paper_sixteen -% linewidth = 18.0 \cm; -% textheight = 28.0 \cm; - indent = 0.0 \mm; - \translator { \OrchestralScoreContext } - } -} - -\score { - \context StaffGroup < - \context Staff = treble < - \notes { \key f; \time 2/2; } - \context Voice = sop { - \stemup \melodie - } - \context Voice = alt { - \stemdown \righthand - } - > - \context Staff = bass < - \notes { \key f; \clef "bass"; } - \context Voice = ten { - \stemup \lefthand - } - \context Voice = bas { - \stemdown \pedal - } - > - > - - \header { - title = "Von guten Mächten treu und still umgeben"; - composer = "Satz: Michael Krause 1999 (*1977)"; - enteredby = "Michael Krause"; - copyright = "dunno"; - poet = "Dietrich Bonhoeffer 1944"; - } - - \paper{ -% \paper_sixteen -% linewidth = 18.0 \cm; -% textheight = 28.0 \cm; - indent = 0.0 \mm; - } -} - diff --git a/lily/align-note-column-engraver.cc b/lily/align-note-column-engraver.cc new file mode 100644 index 0000000000..3c1ff77b42 --- /dev/null +++ b/lily/align-note-column-engraver.cc @@ -0,0 +1,57 @@ +/* + align-note-column-engraver.cc -- implement Align_note_column_engraver + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#include "engraver.hh" +#include "grace-align-item.hh" +#include "note-column.hh" + +/** + catch notes, and put them in a row. + */ +class Align_note_column_engraver: public Engraver +{ + Axis_align_item * align_item_p_; + virtual void do_creation_processing (); + virtual void do_removal_processing (); + virtual void acknowledge_element (Score_element_info); +public: + VIRTUAL_COPY_CONS(Translator); + Align_note_column_engraver (); +}; + +Align_note_column_engraver::Align_note_column_engraver() +{ + align_item_p_ =0; +} + +void +Align_note_column_engraver::do_creation_processing () +{ + align_item_p_ = new Grace_align_item; + // needed for setting font size. + announce_element (Score_element_info (align_item_p_, 0)); +} + +void +Align_note_column_engraver::do_removal_processing () +{ + typeset_element (align_item_p_); + align_item_p_ =0; +} + +void +Align_note_column_engraver::acknowledge_element (Score_element_info inf) +{ + if (Note_column * n = dynamic_cast<Note_column*> (inf.elem_l_)) + { + align_item_p_->add_element (n); + } +} + +ADD_THIS_TRANSLATOR(Align_note_column_engraver); diff --git a/lily/bar-engraver.cc b/lily/bar-engraver.cc index e38ad23499..04eca12429 100644 --- a/lily/bar-engraver.cc +++ b/lily/bar-engraver.cc @@ -13,7 +13,7 @@ #include "multi-measure-rest.hh" #include "command-request.hh" #include "time-description.hh" -#include "engraver-group.hh" +#include "engraver-group-engraver.hh" Bar_engraver::Bar_engraver() { diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index ce4a0eb968..99eb26a26c 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -10,8 +10,8 @@ #include "bar-number-engraver.hh" #include "time-description.hh" #include "timing-engraver.hh" -#include "engraver-group.hh" -#include "g-text-item.hh" +#include "engraver-group-engraver.hh" +#include "text-item.hh" Bar_number_engraver::Bar_number_engraver() { diff --git a/lily/bar-script-engraver.cc b/lily/bar-script-engraver.cc index 2e5a2eb8e1..b319bdc4bc 100644 --- a/lily/bar-script-engraver.cc +++ b/lily/bar-script-engraver.cc @@ -10,8 +10,8 @@ #include "bar-script-engraver.hh" #include "bar.hh" #include "clef-item.hh" -#include "g-staff-side.hh" -#include "g-text-item.hh" +#include "staff-side.hh" +#include "text-item.hh" #include "lily-guile.hh" #include "p-col.hh" #include "paper-def.hh" @@ -132,12 +132,12 @@ Bar_script_engraver::create_items (Request *rq) if (staff_side_p_ || text_p_) return; - staff_side_p_ = new G_staff_side_item; + staff_side_p_ = new Staff_side_item; staff_side_p_->axis_ = axis_; staff_side_p_->set_elt_property (breakable_scm_sym, SCM_BOOL_T); // ugh - text_p_ = new G_text_item; + text_p_ = new Text_item; text_p_->set_elt_property (breakable_scm_sym, SCM_BOOL_T); // ugh Scalar prop = get_property (type_ + "Direction", 0); diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index d59d72c920..cb6ec3ef3c 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -132,55 +132,60 @@ Beam_engraver::do_removal_processing () void Beam_engraver::acknowledge_element (Score_element_info info) { - if (beam_p_) - { - Stem* stem_l = dynamic_cast<Stem *> (info.elem_l_); - if (!stem_l) - return; + if (beam_p_) + { + Stem* stem_l = dynamic_cast<Stem *> (info.elem_l_); + if (!stem_l || stem_l->beam_l_) + return; + bool self_grace = beam_p_->get_elt_property (grace_scm_sym) != SCM_BOOL_F; + bool stem_grace = stem_l->get_elt_property (grace_scm_sym) != SCM_BOOL_F; - Rhythmic_req *rhythmic_req = dynamic_cast <Rhythmic_req *> (info.req_l_); - if (!rhythmic_req) - { - String s = _ ("Stem must have Rhythmic structure."); - if (info.req_l_) - info.req_l_->warning (s); - else - ::warning (s); + if (!self_grace && stem_grace) + return; + + Rhythmic_req *rhythmic_req = dynamic_cast <Rhythmic_req *> (info.req_l_); + if (!rhythmic_req) + { + String s = _ ("Stem must have Rhythmic structure."); + if (info.req_l_) + info.req_l_->warning (s); + else + ::warning (s); - return; - } + return; + } - if (rhythmic_req->duration_.durlog_i_<= 2) - { - rhythmic_req->warning (_ ("stem doesn't fit in beam")); - prev_start_req_->warning (_ ("beam was started here")); - return; - } - - /* - TODO: do something sensible if it doesn't fit in the beam. - */ - Moment start = get_staff_info().time_C_->whole_in_measure_; - - if (!grouping_p_->child_fit_b (start)) - { - String s (_ ("please fix me") + ": " - + _f ("stem at %s doesn't fit in beam", now_mom ().str ())); - - if (info.req_l_) - info.req_l_->warning(s); - else - warning (s); - } - else - { - grouping_p_->add_child (start, rhythmic_req->length_mom ()); - stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_; - beam_p_->add_stem (stem_l); - } - } + if (rhythmic_req->duration_.durlog_i_<= 2) + { + rhythmic_req->warning (_ ("stem doesn't fit in beam")); + prev_start_req_->warning (_ ("beam was started here")); + return; + } + + /* + TODO: do something sensible if it doesn't fit in the beam. + */ + Moment start = get_staff_info().time_C_->whole_in_measure_; + + if (!grouping_p_->child_fit_b (start)) + { + String s (_ ("please fix me") + ": " + + _f ("stem at %s doesn't fit in beam", now_mom ().str ())); + + if (info.req_l_) + info.req_l_->warning(s); + else + warning (s); + } + else + { + grouping_p_->add_child (start, rhythmic_req->length_mom ()); + stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_; + beam_p_->add_stem (stem_l); + } + } } diff --git a/lily/beam.cc b/lily/beam.cc index 4626c1c5ee..264cdf5b10 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -320,11 +320,9 @@ Beam::set_steminfo () total_count_i++; } - Real internote_f = stems_[0]->staff_line_leading_f ()/2; int stem_max = (int)rint(paper_l ()->get_var ("stem_max")); Real shorten_f = paper_l ()->get_var (String ("forced_stem_shorten" - + to_str (multiple_i_ <? stem_max))) - / internote_f; + + to_str (multiple_i_ <? stem_max))); Real leftx = 0; for (int i=0; i < stems_.size (); i++) diff --git a/lily/breathing-sign-engraver.cc b/lily/breathing-sign-engraver.cc index d7a1a05d11..e9f243532b 100644 --- a/lily/breathing-sign-engraver.cc +++ b/lily/breathing-sign-engraver.cc @@ -17,7 +17,7 @@ TODO: #include "breathing-sign.hh" #include "musical-request.hh" #include "command-request.hh" -#include "engraver-group.hh" +#include "engraver-group-engraver.hh" #include "note-head.hh" #include "local-key-item.hh" diff --git a/lily/chord-name-engraver.cc b/lily/chord-name-engraver.cc index dbebdf6e08..e730763fcf 100644 --- a/lily/chord-name-engraver.cc +++ b/lily/chord-name-engraver.cc @@ -14,7 +14,7 @@ #include "paper-def.hh" #include "main.hh" #include "dimensions.hh" -#include "g-text-item.hh" +#include "text-item.hh" ADD_THIS_TRANSLATOR (Chord_name_engraver); @@ -69,7 +69,7 @@ Chord_name_engraver::do_process_requests () } } - G_text_item* item_p = new G_text_item; + Text_item* item_p = new Text_item; /* TODO: diff --git a/lily/clef-item.cc b/lily/clef-item.cc index 9eb8d1b261..1e8ce2dae9 100644 --- a/lily/clef-item.cc +++ b/lily/clef-item.cc @@ -12,7 +12,7 @@ #include "molecule.hh" #include "paper-def.hh" #include "lookup.hh" -#include "g-text-item.hh" +#include "text-item.hh" #include "p-score.hh" void @@ -49,13 +49,13 @@ Clef_item::do_add_processing () { if (!break_status_dir ()) // broken stuff takes care of their own texts { - G_text_item *g =0; + Text_item *g =0; SCM octave_dir = remove_elt_property (octave_dir_scm_sym); if (octave_dir != SCM_BOOL_F) { Direction d = Direction (gh_scm2int (SCM_CDR(octave_dir))); - g = new G_text_item; + g = new Text_item; pscore_l_->typeset_element (g); g->text_str_ = "8"; diff --git a/lily/collision-engraver.cc b/lily/collision-engraver.cc index 9433c4f5c3..c895dac10d 100644 --- a/lily/collision-engraver.cc +++ b/lily/collision-engraver.cc @@ -30,7 +30,8 @@ Collision_engraver::acknowledge_element (Score_element_info i) { if (Note_column * c = dynamic_cast<Note_column *> (i.elem_l_)) { - if (c->rest_b ()) + if (c->rest_b () || c->dim_cache_[X_AXIS]->parent_l_ + || c->dim_cache_[X_AXIS]->parent_l_) return ; note_column_l_arr_.push (c); diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index e02325ee5e..833e40c83b 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -14,8 +14,8 @@ #include "score-column.hh" #include "staff-symbol.hh" #include "note-column.hh" -#include "g-text-item.hh" -#include "g-staff-side.hh" +#include "text-item.hh" +#include "staff-side.hh" #include "engraver.hh" #include "stem.hh" #include "note-head.hh" @@ -25,10 +25,10 @@ */ class Dynamic_engraver : public Engraver { - G_text_item * text_p_; - G_staff_side_item * staff_side_p_; - G_staff_side_spanner * ss_span_p_; - G_staff_side_spanner * to_end_ss_span_p_; + Text_item * text_p_; + Staff_side_item * staff_side_p_; + Staff_side_spanner * ss_span_p_; + Staff_side_spanner * to_end_ss_span_p_; Crescendo * to_end_cresc_p_; @@ -99,7 +99,7 @@ void Dynamic_engraver::do_process_requests() { Crescendo* new_cresc_p=0; - G_staff_side_spanner * new_sss_p =0; + Staff_side_spanner * new_sss_p =0; for (int i=0; i < dynamic_req_l_arr_.size(); i++) { if (Text_script_req *absd = @@ -113,13 +113,13 @@ Dynamic_engraver::do_process_requests() String loud = absd->text_str_; - text_p_ = new G_text_item; + text_p_ = new Text_item; text_p_->text_str_ = loud; // ugh Scalar prop = get_property ("dynamicStyle", 0); text_p_->style_str_ = prop.length_i () ? prop : "dynamic"; - staff_side_p_ = new G_staff_side_item; + staff_side_p_ = new Staff_side_item; staff_side_p_->set_elt_property (script_priority_scm_sym, gh_int2scm (100)); @@ -175,7 +175,7 @@ Dynamic_engraver::do_process_requests() new_cresc_p->grow_dir_ = (span_l->span_type_str_ == "crescendo") ? BIGGER : SMALLER; announce_element (Score_element_info (new_cresc_p, span_l)); - new_sss_p = new G_staff_side_spanner; + new_sss_p = new Staff_side_spanner; new_sss_p->set_victim (new_cresc_p); new_sss_p->axis_ = Y_AXIS; announce_element (Score_element_info (new_sss_p, span_l)); diff --git a/lily/engraver-group.cc b/lily/engraver-group.cc index 5c35cd74e8..4636dcad3c 100644 --- a/lily/engraver-group.cc +++ b/lily/engraver-group.cc @@ -7,7 +7,7 @@ */ #include "proto.hh" -#include "engraver-group.hh" +#include "engraver-group-engraver.hh" #include "engraver.hh" #include "debug.hh" #include "p-score.hh" diff --git a/lily/engraver.cc b/lily/engraver.cc index a94d69eedb..f8ed5e5d6a 100644 --- a/lily/engraver.cc +++ b/lily/engraver.cc @@ -9,7 +9,7 @@ #include "music-list.hh" #include "musical-request.hh" #include "engraver.hh" -#include "engraver-group.hh" +#include "engraver-group-engraver.hh" #include "debug.hh" #include "paper-def.hh" diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index 1f616ec795..7b6712be70 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -9,7 +9,7 @@ #include "extender-engraver.hh" #include "extender-spanner.hh" #include "score-column.hh" -#include "g-text-item.hh" +#include "text-item.hh" ADD_THIS_TRANSLATOR (Extender_engraver); @@ -22,7 +22,7 @@ Extender_engraver::Extender_engraver () void Extender_engraver::acknowledge_element (Score_element_info i) { - if (G_text_item* t = dynamic_cast<G_text_item*> (i.elem_l_)) + if (Text_item* t = dynamic_cast<Text_item*> (i.elem_l_)) { Rhythmic_req * rh = dynamic_cast<Rhythmic_req*> (i.req_l_); if (!rh) @@ -125,7 +125,7 @@ Text_lyric_tuple::Text_lyric_tuple () end_ = 0; } -Text_lyric_tuple::Text_lyric_tuple (G_text_item *h, Rhythmic_req*m, Moment mom) +Text_lyric_tuple::Text_lyric_tuple (Text_item *h, Rhythmic_req*m, Moment mom) { text_l_ = h; req_l_ = m; diff --git a/lily/font-size-engraver.cc b/lily/font-size-engraver.cc index 0edf7e5901..30f47498c9 100644 --- a/lily/font-size-engraver.cc +++ b/lily/font-size-engraver.cc @@ -30,10 +30,11 @@ Font_size_engraver::do_process_requests () void Font_size_engraver::acknowledge_element (Score_element_info e) { - if (size_i_) - e.elem_l_->set_elt_property (fontsize_scm_sym, - gh_int2scm (size_i_)); + if (size_i_ && e.elem_l_->get_elt_property (fontsize_scm_sym) == SCM_BOOL_F) + { + e.elem_l_->set_elt_property (fontsize_scm_sym, + gh_int2scm (size_i_)); + } } - ADD_THIS_TRANSLATOR (Font_size_engraver); diff --git a/lily/g-script-column-engraver.cc b/lily/g-script-column-engraver.cc deleted file mode 100644 index d7116dcf76..0000000000 --- a/lily/g-script-column-engraver.cc +++ /dev/null @@ -1,93 +0,0 @@ -/* - g-script-column-engraver.cc -- implement G_script_column_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> - - */ - -#include "engraver.hh" -#include "g-script-column.hh" -#include "g-staff-side.hh" - -/** - Find potentially colliding scripts, and put them in a - G_script_column, that will fix the collisions. */ -class G_script_column_engraver : public Engraver -{ - G_script_column *scol_p_; - Link_array<Item> script_l_arr_; - Link_array<G_staff_side_item> staff_side_l_arr_; -public: - G_script_column_engraver (); - VIRTUAL_COPY_CONS(Translator); -protected: - virtual void acknowledge_element (Score_element_info); - virtual void process_acknowledged (); - virtual void do_pre_move_processing (); - virtual void do_post_move_processing (); -}; - - -G_script_column_engraver::G_script_column_engraver() -{ - scol_p_ =0; -} - -void -G_script_column_engraver::do_pre_move_processing () -{ - if (scol_p_) - { - typeset_element (scol_p_); - scol_p_ =0; - } -} - -void -G_script_column_engraver::do_post_move_processing () -{ - script_l_arr_.clear (); - staff_side_l_arr_.clear (); -} - -void -G_script_column_engraver::acknowledge_element( Score_element_info inf) -{ - Item *thing = dynamic_cast<Item*>(inf.elem_l_); - if (!thing) - return; - - Dimension_cache * parcache = thing->dim_cache_[Y_AXIS]->parent_l_; - if (!parcache || !thing) - return ; - - Graphical_element *parent = parcache->element_l (); - - if (G_staff_side_item * ss = dynamic_cast<G_staff_side_item*>(parent)) - { - if (!ss->breakable_b ()) - { - script_l_arr_.push (thing); - } - } -} - -void -G_script_column_engraver::process_acknowledged () -{ - if (!scol_p_ && script_l_arr_.size () > 1) - { - scol_p_ = new G_script_column; - announce_element (Score_element_info (scol_p_, 0)); - } - - if (scol_p_) - { - for (int i=0; i < script_l_arr_.size (); i++) - scol_p_->add_staff_sided (script_l_arr_[i]); - script_l_arr_.clear (); - } -} -ADD_THIS_TRANSLATOR(G_script_column_engraver); diff --git a/lily/g-script-column.cc b/lily/g-script-column.cc deleted file mode 100644 index d16a9cb795..0000000000 --- a/lily/g-script-column.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* - g-script-column.cc -- implement G_script_column - - source file of the GNU LilyPond music typesetter - - (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> - - */ -#include "g-script-column.hh" -#include "g-staff-side.hh" - -static G_staff_side_item * -get_g_staff_side (Item *i) -{ - Graphical_element *e1 = i->dim_cache_[Y_AXIS]->parent_l_->element_l (); - - return dynamic_cast<G_staff_side_item*>(e1); -} - -void -G_script_column::add_staff_sided (Item *i) -{ - SCM p = get_g_staff_side (i)->get_elt_property (script_priority_scm_sym); - if (p == SCM_BOOL_F) - return; - - staff_sided_item_l_arr_.push (i); - add_dependency (i); -} - -static int -staff_side_compare (Item * const &i1, - Item * const &i2) -{ - Score_element *e1 = get_g_staff_side (i1); - Score_element *e2 = get_g_staff_side (i2); - - SCM p1 = e1->get_elt_property (script_priority_scm_sym); - SCM p2 = e2->get_elt_property (script_priority_scm_sym); - - return gh_scm2int (SCM_CDR(p1)) - gh_scm2int (SCM_CDR(p2)); -} - -void -G_script_column::do_pre_processing () -{ - Drul_array<Link_array<Item> > arrs; - - for (int i=0; i < staff_sided_item_l_arr_.size (); i++) - { - G_staff_side_item * ip = get_g_staff_side (staff_sided_item_l_arr_[i]); - arrs[ip->dir_].push (staff_sided_item_l_arr_[i]); - } - - Direction d = DOWN; - do { - Link_array<Item> &arr(arrs[d]); - - arr.sort (staff_side_compare); - - Item * last = 0; - for (int i=0; i < arr.size (); i++) - { - G_staff_side_item * gs = get_g_staff_side (arr[i]); - if (last) - { - gs->add_support (last); - gs->add_support (get_g_staff_side (last)); - } - - gs->remove_elt_property (script_priority_scm_sym); - last = arr[i]; - } - - } while (flip (&d) != DOWN); -} diff --git a/lily/g-script-engraver.cc b/lily/g-script-engraver.cc deleted file mode 100644 index bac7b55cb2..0000000000 --- a/lily/g-script-engraver.cc +++ /dev/null @@ -1,143 +0,0 @@ -/* - script-engraver.cc -- implement G_script_engraver - - (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> -*/ - -#include "g-script-engraver.hh" -#include "g-script.hh" -#include "g-stem-staff-side.hh" -#include "musical-request.hh" -#include "stem.hh" -#include "staff-symbol.hh" -#include "rhythmic-head.hh" - -G_script_engraver::G_script_engraver() -{ - do_post_move_processing(); -} - -bool -G_script_engraver::do_try_music (Music *r_l) -{ - if (Articulation_req *mr = dynamic_cast <Articulation_req *> (r_l)) - { - for (int i=0; i < script_req_l_arr_.size(); i++) - { - if (script_req_l_arr_[i]->equal_b (mr)) - return true; - } - script_req_l_arr_.push (mr); - return true; - } - return false; -} - -void -G_script_engraver::do_process_requests() -{ - for (int i=0; i < script_req_l_arr_.size(); i++) - { - Articulation_req* l=script_req_l_arr_[i]; - - - SCM list = gh_eval_str (("(articulation-to-scriptdef \"" + l->articulation_str_ + "\")").ch_C()); - - if (list == SCM_BOOL_F) - { - l->warning(_f("don't know how to interpret articulation `%s'\n", - l->articulation_str_.ch_C())); - continue; - } - G_script *p =new G_script; - G_stem_staff_side_item * ss =new G_stem_staff_side_item; - list = SCM_CDR (list); - - p->set_elt_property (molecule_scm_sym, - SCM_CAR(list)); - - list = SCM_CDR(list); - bool follow_staff = gh_scm2bool (SCM_CAR(list)); - list = SCM_CDR(list); - int relative_stem_dir = gh_scm2int (SCM_CAR(list)); - list = SCM_CDR(list); - int force_dir =gh_scm2int (SCM_CAR(list)); - list = SCM_CDR(list); - SCM priority = SCM_CAR(list); - - if (relative_stem_dir) - ss->relative_dir_ = relative_stem_dir; - else - ss->dir_ = force_dir; - - if (l->dir_) - ss->dir_ = l->dir_; - - Real padding = 1.0; - Scalar paddingprop = get_property ("articulationScriptPadding", 0); - if (paddingprop.length_i() && paddingprop.isnum_b ()) - { - padding = (Real)paddingprop; - } - - ss->staff_support_b_ = !follow_staff; - p->set_staff_side (ss); - ss->set_elt_property (script_priority_scm_sym, priority); - ss->set_elt_property (padding_scm_sym, gh_double2scm(padding)); - script_p_arr_.push (p); - staff_side_p_arr_.push (ss); - - announce_element (Score_element_info (p, l)); - announce_element (Score_element_info (ss, l)); - } -} - -void -G_script_engraver::acknowledge_element (Score_element_info inf) -{ - if (Stem *s = dynamic_cast<Stem*>(inf.elem_l_)) - { - for (int i=0; i < staff_side_p_arr_.size(); i++) - if (G_stem_staff_side_item * ss = dynamic_cast<G_stem_staff_side_item*>(staff_side_p_arr_[i])) - { - ss->set_stem (s); - ss->add_support (s); - } - } - else if (Rhythmic_head * rh = dynamic_cast<Rhythmic_head*>(inf.elem_l_)) - { - for (int i=0; i < staff_side_p_arr_.size(); i++) - { - G_staff_side_item * ss = dynamic_cast<G_staff_side_item*>(staff_side_p_arr_[i]); - - if (!ss->dim_cache_[X_AXIS]->parent_l_) - { - ss->dim_cache_[X_AXIS]->parent_l_ = inf.elem_l_->dim_cache_[X_AXIS]; - } - ss->add_support (rh); - } - } -} - -void -G_script_engraver::do_pre_move_processing() -{ - for (int i=0; i < script_p_arr_.size(); i++) - { - typeset_element (script_p_arr_[i]); - typeset_element (staff_side_p_arr_[i]); - } - script_p_arr_.clear(); - staff_side_p_arr_.clear (); -} - -void -G_script_engraver::do_post_move_processing() -{ - script_req_l_arr_.clear(); -} - - - -ADD_THIS_TRANSLATOR(G_script_engraver); - diff --git a/lily/g-script.cc b/lily/g-script.cc deleted file mode 100644 index 5be3683831..0000000000 --- a/lily/g-script.cc +++ /dev/null @@ -1,93 +0,0 @@ -/* - g-script.cc -- implement G_script - - source file of the GNU LilyPond music typesetter - - (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> - - */ - -/* - - TODO: Quantisation support (staccato dots between stafflines) - -*/ -#include "debug.hh" -#include "g-script.hh" -#include "lookup.hh" -#include "g-staff-side.hh" -#include "paper-def.hh" - -G_script::G_script () -{ - staff_side_l_ =0; -} - -void -G_script::do_substitute_element_pointer (Score_element*o, Score_element*n) -{ - if (o == staff_side_l_) - staff_side_l_ = dynamic_cast<G_staff_side_item*>(n); -} - - - -Molecule -G_script::get_molecule(Direction d) const -{ - SCM s = get_elt_property (molecule_scm_sym); - assert (s != SCM_BOOL_F); - - s = SCM_CDR(s); - SCM key = SCM_CAR (s); - if (key == ly_symbol ("feta")) - { - return lookup_l ()->afm_find ("scripts-" + - ly_scm2string (index_cell (SCM_CDR (s), d))); - } - else if (key == ly_symbol ("accordion")) - { - return lookup_l ()->accordion (SCM_CDR(s), paper_l()->get_realvar(interline_scm_sym)); - } - - else assert (false); - - return Molecule (); -} - - -void -G_script::do_pre_processing () -{ - Graphical_element * e - = staff_side_l_->dim_cache_[X_AXIS]->parent_l_->element_l(); - translate_axis (e->extent (X_AXIS).center (), X_AXIS); -} - -void -G_script::do_post_processing () -{ - Direction d = staff_side_l_->dir_; - Molecule m (get_molecule(d)); - translate_axis (- m.dim_[Y_AXIS][Direction (-d)], Y_AXIS); -} - -void -G_script::set_staff_side (G_staff_side_item*g) -{ - staff_side_l_ = g; - add_dependency (g); - dim_cache_[Y_AXIS]->parent_l_ = g->dim_cache_[Y_AXIS]; -} - -Molecule* -G_script::do_brew_molecule_p () const -{ - return new Molecule (get_molecule (staff_side_l_->dir_)); -} - -void -G_script::do_print () const -{ - -} diff --git a/lily/g-staff-side.cc b/lily/g-staff-side.cc deleted file mode 100644 index 437f34fe21..0000000000 --- a/lily/g-staff-side.cc +++ /dev/null @@ -1,178 +0,0 @@ -/* - g-staff-side.cc -- implement G_staff_side_element - - source file of the GNU LilyPond music typesetter - - (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> - - */ - -#include "g-staff-side.hh" -#include "staff-symbol.hh" -#include "debug.hh" -#include "warn.hh" -#include "dimensions.hh" - -G_staff_side_element::G_staff_side_element () -{ - dir_ = CENTER; - to_position_l_ = 0; - set_elt_property (transparent_scm_sym, SCM_BOOL_T); - staff_support_b_ = true; - axis_ = Y_AXIS; -} - - - -void -G_staff_side_element::do_pre_processing () -{ - if (!dir_) - dir_ = get_default_direction (); - - if (axis_ == X_AXIS) - position_self (); -} - -Direction -G_staff_side_element::get_default_direction () const -{ - return DOWN; -} - - -void -G_staff_side_element::set_victim (Score_element *e) -{ - add_dependency (e); - to_position_l_ = e; - to_position_l_->dim_cache_[axis_]->parent_l_ = dim_cache_[axis_]; -} - -void -G_staff_side_element::add_support (Score_element*e) -{ - add_dependency (e); - support_l_arr_.push (e); -} - - -void -G_staff_side_element::do_substitute_element_pointer (Score_element*o, Score_element*n) -{ - Staff_symbol_referencer::do_substitute_element_pointer (o,n); - if (o == to_position_l_) - to_position_l_ = n; - else - support_l_arr_.unordered_substitute (o,n); -} - -void -G_staff_side_element::position_self () -{ - if (to_position_l_ && - to_position_l_->get_elt_property (transparent_scm_sym) != SCM_BOOL_F) - return; - - Interval dim; - Dimension_cache *common = 0; - if (support_l_arr_.size ()) - { - common = common_group (typecast_array (support_l_arr_, (Graphical_element*)0), - axis_); - - for (int i=0; i < support_l_arr_.size (); i++) - { - Score_element * e = support_l_arr_ [i]; - Real coord = e->relative_coordinate (common, axis_); - - dim.unite (coord + e->extent (axis_)); - } - } - else - common = dim_cache_[axis_]->parent_l_; - - if (dim.empty_b ()) - { - dim = Interval(0,0); - } - - - Interval sym_dim - = to_position_l_ - ? to_position_l_->extent (axis_) - : Interval(0,0); - - Real off = dim_cache_[axis_]->relative_coordinate (common); - - SCM pad = remove_elt_property (padding_scm_sym); - if (pad != SCM_BOOL_F) - { - off += gh_scm2double (SCM_CDR(pad)) * dir_; - } - Real total_off = dim[dir_] - sym_dim[-dir_] + off; - dim_cache_[axis_]->set_offset (total_off); - if (fabs (total_off) > 100 CM) - programming_error ("Huh ? Improbable staff side dim."); -} - -void -G_staff_side_element::do_post_processing () -{ - if (axis_ == Y_AXIS) - position_self (); -} - - -void -G_staff_side_element::do_add_processing () -{ - if (staff_support_b_ - && axis_ == Y_AXIS && staff_symbol_l ()) - { - add_support (staff_symbol_l ()); - } -} - -Interval -G_staff_side_element::do_height () const -{ - Interval i; - if (to_position_l_) - return to_position_l_->extent (Y_AXIS); - return i; -} - -void -G_staff_side_element::do_print () const -{ -#ifndef NPRINT - if (to_position_l_) - DOUT << "positioning " << to_position_l_->name(); - - DOUT << "axis == " << axis_name_str (axis_) - << ", dir == " << to_str (dir_ ); -#endif -} - - -Interval -G_staff_side_item::do_width () const -{ - Interval i; - if (to_position_l_) - return to_position_l_->extent (X_AXIS); - return i; -} - -void -G_staff_side_item::do_print () const -{ - G_staff_side_element::do_print (); -} - -void -G_staff_side_spanner::do_print () const -{ - G_staff_side_element::do_print (); -} diff --git a/lily/g-stem-staff-side.cc b/lily/g-stem-staff-side.cc deleted file mode 100644 index 4d96f2ff52..0000000000 --- a/lily/g-stem-staff-side.cc +++ /dev/null @@ -1,55 +0,0 @@ -/* - g-stem-staff-side.cc -- implement G_stem_staff_side - - source file of the GNU LilyPond music typesetter - - (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> - - */ - -#include "g-stem-staff-side.hh" -#include "stem.hh" - -G_stem_staff_side_item::G_stem_staff_side_item () -{ - stem_l_ =0; - relative_dir_ = CENTER; -} - -void -G_stem_staff_side_item::do_substitute_element_pointer (Score_element*o, - Score_element*n) -{ - if (o == stem_l_) - { - stem_l_ = dynamic_cast<Stem*> (n); - } -} - -void -G_stem_staff_side_item::set_stem (Stem*s) -{ - stem_l_ =s; - add_dependency (s); -} - - -Direction -G_stem_staff_side_item::get_default_direction () const -{ - return relative_dir_ * stem_l_->dir_; -} - -void -G_stem_staff_side_item::do_pre_processing () -{ - SCM p = remove_elt_property (padding_scm_sym); - if (p != SCM_BOOL_F && stem_l_) - { - p = SCM_CDR (p); - set_elt_property (padding_scm_sym, - gh_double2scm(stem_l_->staff_line_leading_f () - * gh_scm2double (p))); - } - G_staff_side_item::do_pre_processing (); -} diff --git a/lily/g-text-item.cc b/lily/g-text-item.cc deleted file mode 100644 index 6578cf8bb4..0000000000 --- a/lily/g-text-item.cc +++ /dev/null @@ -1,33 +0,0 @@ -/* - g-text-item.cc -- implement G_text_item - - source file of the GNU LilyPond music typesetter - - (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> - - */ - -#include "g-text-item.hh" -#include "debug.hh" -#include "molecule.hh" -#include "paper-def.hh" -#include "lookup.hh" - -Molecule* -G_text_item::do_brew_molecule_p () const -{ - Molecule a= paper_l ()->lookup_l(0)->text (style_str_,text_str_, paper_l ()); - - return new Molecule (a); -} - -G_text_item::G_text_item () -{ - style_str_ = "roman"; -} - -void -G_text_item::do_print () const -{ - DOUT << "text= " << text_str_; -} diff --git a/lily/global-translator.cc b/lily/global-translator.cc index 2ab5844210..d38f7bd8c6 100644 --- a/lily/global-translator.cc +++ b/lily/global-translator.cc @@ -7,6 +7,8 @@ */ #include "global-translator.hh" +#include "music-iterator.hh" +#include "debug.hh" Global_translator::Global_translator() { @@ -59,3 +61,42 @@ Global_translator::get_output_p() { return 0; } + +void +Global_translator::process () +{ +} +void +Global_translator::start () +{ +} +void +Global_translator::finish () +{ +} + +void +Global_translator::run_iterator_on_me (Music_iterator * iter) +{ + while (iter->ok() || moments_left_i ()) + { + Moment w; + w.set_infinite (1); + if (iter->ok()) + { + w = iter->next_moment(); + DOUT << "proccing: " << w << '\n'; + if (!monitor->silent_b ("walking")) + iter->print(); + } + + modify_next (w); + prepare (w); + + if (!monitor->silent_b ("walking")) + print(); + + iter->process_and_next (w); + process(); + } +} diff --git a/lily/grace-align-item.cc b/lily/grace-align-item.cc new file mode 100644 index 0000000000..74e551bfa4 --- /dev/null +++ b/lily/grace-align-item.cc @@ -0,0 +1,36 @@ +/* + grace-align-item.cc -- implement Grace_align_item + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#include "grace-align-item.hh" +#include "lookup.hh" + +Grace_align_item::Grace_align_item () +{ + stacking_dir_ = RIGHT; + set_axis (X_AXIS); +} + +void +Grace_align_item::do_pre_processing () +{ + Real nhw = lookup_l ()->notehead (2, "").dim_[X_AXIS].length(); + threshold_interval_[MIN] = nhw* 1.5; + + Axis_align_item::do_pre_processing (); + Note_head_side::do_pre_processing (); + + translate_axis (-0.5* nhw, X_AXIS); // ugh. +} + +void +Grace_align_item::do_substitute_element_pointer (Score_element*o, Score_element*n) +{ + Axis_align_item::do_substitute_element_pointer (o,n); + Note_head_side::do_substitute_element_pointer( o,n); +} diff --git a/lily/grace-engraver-group.cc b/lily/grace-engraver-group.cc new file mode 100644 index 0000000000..8a9db8b171 --- /dev/null +++ b/lily/grace-engraver-group.cc @@ -0,0 +1,110 @@ +/* + grace-engraver-group.cc -- implement Grace_engraver_group + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ +#include "grace-engraver-group.hh" +#include "lily-guile.hh" +#include "ly-symbols.hh" +#include "score-element.hh" + +void +Grace_engraver_group::start () +{ +} +/* + We're really finished with this context. Get rid of everything. + */ +void +Grace_engraver_group::finish () +{ + calling_self_b_ = true; + removal_processing (); // ugr. We'd want to have this done by our parents.g + for (int i=0; i < announce_to_top_.size (); i++) + { + Engraver::announce_element (announce_to_top_[i]); + } + + for (int i=0; i < typeset_us_.size (); i++) + { + Engraver::typeset_element (typeset_us_[i]); + } + typeset_us_.clear (); + calling_self_b_ = false; +} + +void +Grace_engraver_group::do_removal_processing () +{ + Engraver_group_engraver::do_removal_processing (); +} + +void +Grace_engraver_group::announce_element (Score_element_info inf) +{ + announce_info_arr_.push (inf); + // do not propagate to top + announce_to_top_.push (inf); + + inf.elem_l_->set_elt_property (grace_scm_sym, SCM_BOOL_T); +} + +void +Grace_engraver_group::typeset_element (Score_element*e) +{ + typeset_us_.push (e); +} + + +Grace_engraver_group::Grace_engraver_group() +{ + calling_self_b_ = false; +} + +void +Grace_engraver_group::process () +{ + calling_self_b_ = true; + process_requests (); + do_announces(); + pre_move_processing(); + check_removal(); + calling_self_b_ = false; +} + + +void +Grace_engraver_group::each (Method_pointer method) +{ + if (calling_self_b_) + Engraver_group_engraver::each (method); +} + + +void +Grace_engraver_group::each (Const_method_pointer method) const +{ + if (calling_self_b_) + Engraver_group_engraver::each (method); +} +ADD_THIS_TRANSLATOR(Grace_engraver_group); + + +/* + don't let the commands trickle up. + */ +bool +Grace_engraver_group::do_try_music (Music *m) +{ + bool hebbes_b =false; + + Link_array<Translator> nongroups (nongroup_l_arr ()); + + for (int i =0; !hebbes_b && i < nongroups.size() ; i++) + hebbes_b =nongroups[i]->try_music (m); + + return hebbes_b; +} diff --git a/lily/grace-iterator.cc b/lily/grace-iterator.cc new file mode 100644 index 0000000000..3fdf4303f4 --- /dev/null +++ b/lily/grace-iterator.cc @@ -0,0 +1,47 @@ +/* + grace-iterator.cc -- implement Grace_iterator + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#include "grace-iterator.hh" +#include "global-translator.hh" +#include "warn.hh" + +void +Grace_iterator::construct_children () +{ + Translator_group * t = report_to_l ()->find_create_translator_l ("Grace", ""); // umgh. + + if (t) + set_translator (t); + Music_wrapper_iterator::construct_children (); +} + +void +Grace_iterator::do_process_and_next (Moment m) +{ + Global_translator * t = dynamic_cast<Global_translator*>(report_to_l ()); + if (t) + { + t->start (); + t->run_iterator_on_me (child_iter_p_); + delete child_iter_p_; + child_iter_p_ = 0; + t->finish (); + Music_iterator::do_process_and_next (m); + } + else + { + warning (_("No Grace context available!")); + } +} + +Moment +Grace_iterator::next_moment () const +{ + return 0; +} diff --git a/lily/grace-music.cc b/lily/grace-music.cc new file mode 100644 index 0000000000..d93d4829b3 --- /dev/null +++ b/lily/grace-music.cc @@ -0,0 +1,27 @@ +/* + grace-music.cc -- implement Grace_music + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#include "grace-music.hh" + +void +Grace_music::compress (Moment) +{ + +} + +Moment +Grace_music::length_mom () const +{ + return 0; +} + +Grace_music::Grace_music (Music *p) + : Music_wrapper (p) +{ +} diff --git a/lily/grace-position-engraver.cc b/lily/grace-position-engraver.cc new file mode 100644 index 0000000000..189c2e54d8 --- /dev/null +++ b/lily/grace-position-engraver.cc @@ -0,0 +1,69 @@ +/* + grace-position-engraver.cc -- implement Grace_position_engraver + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#include "engraver.hh" +#include "grace-align-item.hh" +#include "note-head.hh" +#include "local-key-item.hh" + +class Grace_position_engraver:public Engraver +{ +protected: + VIRTUAL_COPY_CONS(Translator); + virtual void acknowledge_element (Score_element_info); + virtual void process_acknowledged (); + virtual void do_post_move_processing (); + Grace_align_item*align_l_; + Link_array<Item> support_; +public: + Grace_position_engraver(); +}; + + +Grace_position_engraver::Grace_position_engraver () +{ + align_l_ =0; +} + +void +Grace_position_engraver::acknowledge_element (Score_element_info i) +{ + if (Grace_align_item*g =dynamic_cast<Grace_align_item*>(i.elem_l_)) + { + align_l_ = g; + } + else if (Note_head * n = dynamic_cast <Note_head*> (i.elem_l_)) + { + support_.push (n); + } + else if (Local_key_item*it = dynamic_cast<Local_key_item*>(i.elem_l_)) + { + support_.push (it); + } +} + +void +Grace_position_engraver::process_acknowledged () +{ + if (align_l_) + { + for (int i=0; i < support_.size (); i++) + align_l_->add_support (support_[i]); + support_.clear (); + } +} + +void +Grace_position_engraver::do_post_move_processing () +{ + support_.clear (); + align_l_ =0; +} + +ADD_THIS_TRANSLATOR(Grace_position_engraver); diff --git a/lily/include/bar-script-engraver.hh b/lily/include/bar-script-engraver.hh index 7b9ddbfde7..6944762d2d 100644 --- a/lily/include/bar-script-engraver.hh +++ b/lily/include/bar-script-engraver.hh @@ -19,8 +19,8 @@ class Bar_script_engraver : public Engraver { protected: - G_staff_side_item* staff_side_p_; - G_text_item* text_p_; + Staff_side_item* staff_side_p_; + Text_item* text_p_; Protected_scm visibility_lambda_; String type_; Axis axis_; diff --git a/lily/include/engraver-group-engraver.hh b/lily/include/engraver-group-engraver.hh new file mode 100644 index 0000000000..975a33d87a --- /dev/null +++ b/lily/include/engraver-group-engraver.hh @@ -0,0 +1,40 @@ + +/* + engraver-group-engraver.hh -- declare Engraver_group_engraver + + source file of the GNU LilyPond music typesetter + + (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> +*/ + + +#ifndef ENGRAVERGROUP_HH +#define ENGRAVERGROUP_HH + +#include "lily-proto.hh" +#include "parray.hh" +#include "score-element-info.hh" +#include "engraver.hh" +#include "translator-group.hh" + + +/** + Group a number of engravers. Usually delegates everything to its contents. + Postfix: group + */ +class Engraver_group_engraver : public Engraver, + public virtual Translator_group +{ +protected: + Array<Score_element_info> announce_info_arr_; +public: + VIRTUAL_COPY_CONS(Translator); + + virtual Staff_info get_staff_info() const; + virtual void do_announces(); + virtual void announce_element (Score_element_info); +}; + +#endif // ENGRAVERGROUP_HH + + diff --git a/lily/include/engraver-group.hh b/lily/include/engraver-group.hh deleted file mode 100644 index fdebf2a0cb..0000000000 --- a/lily/include/engraver-group.hh +++ /dev/null @@ -1,39 +0,0 @@ -/* - engraver-group.hh -- declare Engraver_group_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> -*/ - - -#ifndef ENGRAVERGROUP_HH -#define ENGRAVERGROUP_HH - -#include "lily-proto.hh" -#include "parray.hh" -#include "score-element-info.hh" -#include "engraver.hh" -#include "translator-group.hh" - - -/** - Group a number of engravers. Usually delegates everything to its contents. - Postfix: group - */ -class Engraver_group_engraver : public Engraver, - public virtual Translator_group -{ -protected: - Array<Score_element_info> announce_info_arr_; -public: - VIRTUAL_COPY_CONS(Translator); - - virtual Staff_info get_staff_info() const; - virtual void do_announces(); - virtual void announce_element (Score_element_info); -}; - -#endif // ENGRAVERGROUP_HH - - diff --git a/lily/include/extender-engraver.hh b/lily/include/extender-engraver.hh index 1b6335bb51..76f724c63a 100644 --- a/lily/include/extender-engraver.hh +++ b/lily/include/extender-engraver.hh @@ -16,11 +16,11 @@ struct Text_lyric_tuple { Rhythmic_req *req_l_ ; - G_text_item *text_l_; + Text_item *text_l_; Moment end_; Text_lyric_tuple (); - Text_lyric_tuple (G_text_item*, Rhythmic_req*, Moment); + Text_lyric_tuple (Text_item*, Rhythmic_req*, Moment); static int time_compare (Text_lyric_tuple const &, Text_lyric_tuple const &); }; @@ -36,7 +36,7 @@ inline int compare (Text_lyric_tuple const &a, Text_lyric_tuple const &b) Generate an extender. Should make an Extender_spanner that typesets a nice extender line. - We remember all G_text_items that come across, and store their + We remember all Text_items that come across, and store their termination times. When we get a request, we create the spanner, and attach the left point to the finished lyrics, and the right point to any lyrics we receive by then. diff --git a/lily/include/font-size-engraver.hh b/lily/include/font-size-engraver.hh index 841bf839bf..0edef5be86 100644 --- a/lily/include/font-size-engraver.hh +++ b/lily/include/font-size-engraver.hh @@ -12,6 +12,13 @@ #include "engraver.hh" +/** + Set font size on elements that do not have a fontsize set yet. + + Reads context property fontSize. + + Writes element property fontsize + */ class Font_size_engraver : public Engraver { int size_i_; protected: diff --git a/lily/include/g-script-column.hh b/lily/include/g-script-column.hh deleted file mode 100644 index 62caab8b48..0000000000 --- a/lily/include/g-script-column.hh +++ /dev/null @@ -1,30 +0,0 @@ -/* - g-script-column.hh -- declare G_script_column - - source file of the GNU LilyPond music typesetter - - (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> - - */ - -#ifndef G_SCRIPT_COLUMN_HH -#define G_SCRIPT_COLUMN_HH - -#include "item.hh" - -class G_script_column : public Item -{ - /** - Array of objects that are placed by staffsides - */ - Link_array<Item> staff_sided_item_l_arr_; -public: - void add_staff_sided (Item*); -protected: - virtual void do_pre_processing (); -}; - - -#endif /* G_SCRIPT_COLUMN_HH */ - - diff --git a/lily/include/g-script-engraver.hh b/lily/include/g-script-engraver.hh deleted file mode 100644 index 7f1774c6de..0000000000 --- a/lily/include/g-script-engraver.hh +++ /dev/null @@ -1,31 +0,0 @@ -/* - script-engraver.hh -- part of GNU LilyPond - - (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> -*/ - - -#ifndef G_SCRIPT_GRAV -#define G_SCRIPT_GRAV - -#include "engraver.hh" - - -class G_script_engraver : public Engraver { - Link_array<G_script> script_p_arr_; - Link_array<G_staff_side_item> staff_side_p_arr_; - Link_array<Articulation_req> script_req_l_arr_; - -public: - VIRTUAL_COPY_CONS(Translator); - - G_script_engraver(); -protected: - virtual bool do_try_music (Music*); - virtual void do_process_requests (); - virtual void do_pre_move_processing (); - virtual void do_post_move_processing (); - virtual void acknowledge_element (Score_element_info); -}; - -#endif // G_SCRIPT_GRAV diff --git a/lily/include/g-script.hh b/lily/include/g-script.hh deleted file mode 100644 index 3ee811f3fe..0000000000 --- a/lily/include/g-script.hh +++ /dev/null @@ -1,41 +0,0 @@ -/* - g-script.hh -- declare G_script - - source file of the GNU LilyPond music typesetter - - (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> - - */ - -#ifndef G_STEM_SCRIPT_HH -#define G_STEM_SCRIPT_HH - -#include "item.hh" -#include "drul-array.hh" - -/** - Articulation marks (and the like) that are attached to notes/stems. - Needs support from G_staff_side for proper operation. G_staff_side - handles the positioning. - -*/ -class G_script : public Item -{ - G_staff_side_item * staff_side_l_; - - Molecule get_molecule (Direction d) const; -public: - G_script (); - void set_staff_side (G_staff_side_item*); - -protected: - virtual void do_print () const; - virtual void do_substitute_element_pointer (Score_element*o, - Score_element*n); - virtual void do_pre_processing (); - virtual void do_post_processing (); - Molecule* do_brew_molecule_p () const; -}; - -#endif /* G_STEM_SCRIPT_HH */ - diff --git a/lily/include/g-staff-side.hh b/lily/include/g-staff-side.hh deleted file mode 100644 index 9acdbca344..0000000000 --- a/lily/include/g-staff-side.hh +++ /dev/null @@ -1,72 +0,0 @@ -/* - g-staff-side.hh -- declare G_staff_side_item - - source file of the GNU LilyPond music typesetter - - (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> - - */ - -#ifndef G_STAFF_SIDE_HH -#define G_STAFF_SIDE_HH - -#include "spanner.hh" -#include "item.hh" -#include "staff-symbol-referencer.hh" - -/** - Position myself next to a set of elements. Configurable in axis - and direction. - - Properties: - - padding :: Real - - Amount of extra space to add. -*/ -class G_staff_side_element : public Staff_symbol_referencer -{ - void position_self (); - -public: - Score_element * to_position_l_; - Direction dir_; - Link_array<Score_element> support_l_arr_; - Axis axis_; - //junkme. - bool staff_support_b_; - - G_staff_side_element (); - void set_victim (Score_element*); - void add_support (Score_element*); - - VIRTUAL_COPY_CONS(Score_element); - virtual Direction get_default_direction () const; -protected: - virtual Interval do_height () const; - virtual void do_print () const; - virtual void do_add_processing (); - virtual void do_substitute_element_pointer (Score_element*,Score_element*); - virtual void do_pre_processing (); - virtual void do_post_processing (); -}; - -class G_staff_side_item : public G_staff_side_element, public Item -{ -public: - VIRTUAL_COPY_CONS(Score_element); -protected: - virtual Interval do_width () const; - virtual void do_print () const; -}; - -class G_staff_side_spanner : public G_staff_side_element, public Spanner -{ -public: - VIRTUAL_COPY_CONS(Score_element); -protected: - virtual void do_print () const; -}; - -#endif /* G_STAFF_SIDE_HH */ - diff --git a/lily/include/g-stem-staff-side.hh b/lily/include/g-stem-staff-side.hh deleted file mode 100644 index 59e51cec9d..0000000000 --- a/lily/include/g-stem-staff-side.hh +++ /dev/null @@ -1,40 +0,0 @@ -/* - g-stem-staff-side.hh -- declare G_stem_staff_side - - source file of the GNU LilyPond music typesetter - - (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> - - */ - -#ifndef G_STEM_STAFF_SIDE_HH -#define G_STEM_STAFF_SIDE_HH - -#include "g-staff-side.hh" -/** - Position self, analogous to G_staff_side_item, but use Stem direction - for determining direction. - - Properties: - - padding :: Real - - Padding in staffline leading - - */ -class G_stem_staff_side_item : public G_staff_side_item -{ - Stem *stem_l_; -public: - Direction relative_dir_; - - void set_stem (Stem*); - G_stem_staff_side_item (); -protected: - virtual Direction get_default_direction ()const; - virtual void do_pre_processing (); - virtual void do_substitute_element_pointer (Score_element*o,Score_element*e); -}; - -#endif /* G_STEM_STAFF_SIDE_HH */ - diff --git a/lily/include/g-text-item.hh b/lily/include/g-text-item.hh deleted file mode 100644 index 3edfe6c72c..0000000000 --- a/lily/include/g-text-item.hh +++ /dev/null @@ -1,32 +0,0 @@ -/* - g-text-item.hh -- declare G_text_item - - source file of the GNU LilyPond music typesetter - - (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> - - */ - -#ifndef G_TEXT_ITEM_HH -#define G_TEXT_ITEM_HH - -#include "item.hh" - -/** - Print a text in specified style. - */ -class G_text_item : public Item -{ -public: - String text_str_; - String style_str_; - - G_text_item (); - VIRTUAL_COPY_CONS (Score_element); -protected: - virtual void do_print () const; - virtual Molecule *do_brew_molecule_p () const; -}; - -#endif /* G_TEXT_ITEM_HH */ - diff --git a/lily/include/global-translator.hh b/lily/include/global-translator.hh index 00e4250930..721f97ddaf 100644 --- a/lily/include/global-translator.hh +++ b/lily/include/global-translator.hh @@ -14,6 +14,10 @@ #include "rational.hh" #include "pqueue.hh" + +class Iteration_interface_translator : public virtual Translator_group { +}; + class Global_translator : public virtual Translator_group{ PQueue<Moment> extra_mom_pq_; public: @@ -25,17 +29,19 @@ public: int moments_left_i() const; void modify_next (Moment&); void add_moment_to_process (Moment); - + void run_iterator_on_me (Music_iterator*); + virtual Music_output *get_output_p (); virtual void prepare (Moment); - virtual void process() {} - virtual void finish() {} - virtual void start() {} + virtual void process(); + virtual void finish(); + virtual void start(); + + virtual Moment now_mom () const; protected: - virtual Moment now_mom () const; - virtual Global_translator *global_l() { return this; } + }; diff --git a/lily/include/grace-align-item.hh b/lily/include/grace-align-item.hh new file mode 100644 index 0000000000..4305875b55 --- /dev/null +++ b/lily/include/grace-align-item.hh @@ -0,0 +1,26 @@ +/* + grace-align-item.hh -- declare Grace_align_item + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#ifndef GRACE_ALIGN_ITEM_HH +#define GRACE_ALIGN_ITEM_HH + +#include "note-head-side.hh" +#include "axis-align-item.hh" + +class Grace_align_item : public Axis_align_item, public Note_head_side +{ +public: + VIRTUAL_COPY_CONS (Score_element); + Grace_align_item (); +protected: + virtual void do_substitute_element_pointer (Score_element*,Score_element*); + virtual void do_pre_processing (); +}; +#endif /* GRACE_ALIGN_ITEM_HH */ + diff --git a/lily/include/grace-engraver-group.hh b/lily/include/grace-engraver-group.hh new file mode 100644 index 0000000000..cb31244aeb --- /dev/null +++ b/lily/include/grace-engraver-group.hh @@ -0,0 +1,37 @@ +/* + grace-engraver-group.hh -- declare + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#ifndef GRACE_ENGRAVER_GROUP_HH +#define GRACE_ENGRAVER_GROUP_HH + +#include "engraver-group-engraver.hh" +#include "global-translator.hh" + +class Grace_engraver_group : public Engraver_group_engraver, public Global_translator +{ + Link_array<Score_element> typeset_us_; + Array<Score_element_info> announce_to_top_; + bool calling_self_b_; +public: + VIRTUAL_COPY_CONS(Translator); + Grace_engraver_group (); +protected: + virtual void announce_element (Score_element_info); + virtual void start (); + virtual void finish (); + virtual void process (); + virtual void each (Method_pointer); + virtual void each (Const_method_pointer) const; + virtual void do_removal_processing () ; + virtual void typeset_element (Score_element*); + virtual bool do_try_music (Music *m); +}; + + +#endif /* GRACE_ENGRAVER_GROUP_HH */ diff --git a/lily/include/grace-iterator.hh b/lily/include/grace-iterator.hh new file mode 100644 index 0000000000..5d63bcf603 --- /dev/null +++ b/lily/include/grace-iterator.hh @@ -0,0 +1,27 @@ +/* + grace-iterator.hh -- declare + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#ifndef GRACE_ITERATOR_HH +#define GRACE_ITERATOR_HH + +#include "music-wrapper-iterator.hh" + +class Grace_iterator : public Music_wrapper_iterator +{ +public: + virtual void construct_children () ; + virtual void do_process_and_next (Moment); + Moment next_moment () const; +}; + + + +#endif /* GRACE_ITERATOR_HH */ + + diff --git a/lily/include/grace-music.hh b/lily/include/grace-music.hh new file mode 100644 index 0000000000..ad995b0482 --- /dev/null +++ b/lily/include/grace-music.hh @@ -0,0 +1,26 @@ +/* + grace-music.hh -- declare + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#ifndef GRACE_MUSIC_HH +#define GRACE_MUSIC_HH + +#include "music-wrapper.hh" + +class Grace_music : public Music_wrapper +{ +public: + VIRTUAL_COPY_CONS(Music); + Grace_music (Music*); +protected: + virtual void compress (Moment); + virtual Moment length_mom () const; +}; + +#endif /* GRACE_MUSIC_HH */ + diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index 76a1095bed..97d9d57970 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -35,6 +35,7 @@ struct Auto_beam_engraver; struct Axis_group_element; struct Axis_group_spanner; struct Axis_group_item; +struct Axis_align_item; struct Axis_group; struct Bar; struct Bar_column_engraver; @@ -86,10 +87,10 @@ struct Engraver; struct Engraver_group_engraver; struct Extender; struct Extender_req; -struct G_script; -struct G_script_req; -struct G_staff_side_item; -struct G_text_item; +struct Script; +struct Script_req; +struct Staff_side_item; +struct Text_item; struct General_script_def; struct Graphical_element; @@ -146,6 +147,7 @@ struct Multi_measure_rest; struct Multi_measure_rest_req; struct Multi_measure_rest_engraver; struct Music; +struct Music_iterator; struct Musical_req; struct Musical_span_req; struct Musical_script_req; @@ -208,11 +210,6 @@ struct Score_column; struct Score_element; struct Score_element_info; struct Score_performer; -struct Script; -struct Script_column; -struct Script_def; -struct Script_engraver; -struct Script_req; struct Simple_music; struct Simultaneous_music; struct Single_malt_grouping_item; diff --git a/lily/include/line-group-group-engraver.hh b/lily/include/line-group-group-engraver.hh index 1feaa57f97..274301e8b3 100644 --- a/lily/include/line-group-group-engraver.hh +++ b/lily/include/line-group-group-engraver.hh @@ -10,11 +10,13 @@ #ifndef LINE_GROUP_GRAV_HH #define LINE_GROUP_GRAV_HH -#include "engraver-group.hh" +#include "engraver-group-engraver.hh" #include "lily-proto.hh" /** - Engravers put elements on the same or lowel level in a line + Engravers put elements on the same or lowel level in a line. + + DEPRECATED. */ class Line_group_engraver_group : public Engraver_group_engraver { protected: diff --git a/lily/include/local-key-item.hh b/lily/include/local-key-item.hh index edba5ec7ca..e4007af316 100644 --- a/lily/include/local-key-item.hh +++ b/lily/include/local-key-item.hh @@ -10,6 +10,7 @@ #include "array.hh" #include "musical-pitch.hh" #include "staff-symbol-referencer.hh" +#include "note-head-side.hh" struct Local_key_cautionary_tuple { @@ -37,16 +38,15 @@ struct Local_key_cautionary_tuple figure out private/public */ -class Local_key_item : public Item, public Staff_symbol_referencer { +class Local_key_item : public Note_head_side, public Staff_symbol_referencer { Array<Local_key_cautionary_tuple> accidental_arr_; - Link_array<Item> support_items_; + public: int c0_position_i_; Local_key_item (); - void add_support (Item*); void add_pitch (Musical_pitch, bool cautionary); protected: - virtual void do_pre_processing(); + virtual void do_pre_processing(); virtual void do_substitute_element_pointer (Score_element*,Score_element*); virtual Molecule* do_brew_molecule_p() const; }; diff --git a/lily/include/ly-symbols.hh b/lily/include/ly-symbols.hh index 489bcc98e9..dee6c5f0aa 100644 --- a/lily/include/ly-symbols.hh +++ b/lily/include/ly-symbols.hh @@ -10,6 +10,8 @@ #ifndef LY_SYMBOLS_HH #define LY_SYMBOLS_HH +#include "lily-guile.hh" + #ifndef DECLARE_LY_SYMBOL #define DECLARE_LY_SYMBOL(a) extern SCM a ## _scm_sym #endif @@ -34,11 +36,13 @@ DECLARE_LY_SYMBOL(dir_list); DECLARE_LY_SYMBOL(extender_height); DECLARE_LY_SYMBOL(filledbox); DECLARE_LY_SYMBOL(fontsize); +DECLARE_LY_SYMBOL(grace); DECLARE_LY_SYMBOL(header); DECLARE_LY_SYMBOL(horizontal_shift); DECLARE_LY_SYMBOL(interbeam); DECLARE_LY_SYMBOL(interbeam4); DECLARE_LY_SYMBOL(interline); +DECLARE_LY_SYMBOL(length); DECLARE_LY_SYMBOL(linewidth); DECLARE_LY_SYMBOL(minimum_space); DECLARE_LY_SYMBOL(molecule); diff --git a/lily/include/lyric-engraver.hh b/lily/include/lyric-engraver.hh index 1736d593dd..d986205efd 100644 --- a/lily/include/lyric-engraver.hh +++ b/lily/include/lyric-engraver.hh @@ -31,7 +31,7 @@ public: private: Lyric_req * req_l_; - G_text_item* text_p_; + Text_item* text_p_; }; diff --git a/lily/include/music-wrapper-iterator.hh b/lily/include/music-wrapper-iterator.hh index c9275fc763..f691270056 100644 --- a/lily/include/music-wrapper-iterator.hh +++ b/lily/include/music-wrapper-iterator.hh @@ -31,8 +31,6 @@ public: protected: virtual void do_print () const; virtual void do_process_and_next (Moment) ; - -private: Music_iterator *child_iter_p_; }; diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index 1ac291c871..28ce7bf4cd 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -55,7 +55,7 @@ public: }; -class Articulation_req : public G_script_req +class Articulation_req : public Script_req { public: String articulation_str_; @@ -65,7 +65,7 @@ protected: VIRTUAL_COPY_CONS(Music); }; -class Text_script_req : public G_script_req { +class Text_script_req : public Script_req { public: String text_str_; diff --git a/lily/include/note-head-side.hh b/lily/include/note-head-side.hh new file mode 100644 index 0000000000..7ecc0f2588 --- /dev/null +++ b/lily/include/note-head-side.hh @@ -0,0 +1,33 @@ +/* + note-head-side.hh -- declare Note_head_side + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#ifndef NOTE_HEAD_SIDE_HH +#define NOTE_HEAD_SIDE_HH + +#include "item.hh" + +/** + be next to noteheads. + + UGH. another reduplication of Staff_side + */ +class Note_head_side: public virtual Item +{ + Link_array<Item> support_l_arr_; +public: + void add_support (Item*); + VIRTUAL_COPY_CONS (Score_element); +protected: + virtual void do_substitute_element_pointer (Score_element*,Score_element*); + virtual void do_pre_processing(); +}; + + +#endif /* NOTE_HEAD_SIDE_HH */ + diff --git a/lily/include/parseconstruct.hh b/lily/include/parseconstruct.hh index 2cf3b7a05e..527dafbd35 100644 --- a/lily/include/parseconstruct.hh +++ b/lily/include/parseconstruct.hh @@ -11,7 +11,6 @@ String * get_scriptdef (char c); Request* get_script_req (char); -Request*get_script_req (int d , Script_def*def); Request*get_grouping_req (Array<int> i_arr); #endif // PARSECONSTRUCT_HH diff --git a/lily/include/request.hh b/lily/include/request.hh index 0c47398e5e..4531df4811 100644 --- a/lily/include/request.hh +++ b/lily/include/request.hh @@ -36,31 +36,13 @@ protected: -class G_script_req : public virtual Request +class Script_req : public virtual Request { public: Direction dir_; VIRTUAL_COPY_CONS(Music); }; -#if 0 -/** Put a script above or below this ``note'' or bar. eg upbow, downbow. Why - a request? These symbols may conflict with slurs and brackets, so - this also a request */ - -class Script_req : public virtual G_script_req { -public: - General_script_def *scriptdef_p_; - - bool do_equal_b (Request*) const; - - Script_req(); - VIRTUAL_COPY_CONS(Music); - virtual void do_print () const; - ~Script_req(); - Script_req (Script_req const&); -}; -#endif /** Requests to start or stop something. diff --git a/lily/include/rhythmic-column-engraver.hh b/lily/include/rhythmic-column-engraver.hh index c4514f00bb..a830da1f27 100644 --- a/lily/include/rhythmic-column-engraver.hh +++ b/lily/include/rhythmic-column-engraver.hh @@ -15,6 +15,7 @@ class Rhythmic_column_engraver :public Engraver { Link_array<Rhythmic_head> rhead_l_arr_; + Link_array<Slur> grace_slur_endings_; Stem * stem_l_; Note_column *ncol_p_; Dot_column *dotcol_l_; diff --git a/lily/include/rhythmic-head.hh b/lily/include/rhythmic-head.hh index a9cfca3355..21988a85d7 100644 --- a/lily/include/rhythmic-head.hh +++ b/lily/include/rhythmic-head.hh @@ -16,8 +16,7 @@ class Rhythmic_head : public Item, public Staff_symbol_referencer { public: - - + Stem * stem_l_; int balltype_i_; int dots_i_; Dots * dots_l_; diff --git a/lily/include/score-engraver.hh b/lily/include/score-engraver.hh index 60f767d351..731f489921 100644 --- a/lily/include/score-engraver.hh +++ b/lily/include/score-engraver.hh @@ -10,7 +10,7 @@ #ifndef SCORE_GRAV_HH #define SCORE_GRAV_HH -#include "engraver-group.hh" +#include "engraver-group-engraver.hh" #include "global-translator.hh" /** diff --git a/lily/include/script-column.hh b/lily/include/script-column.hh new file mode 100644 index 0000000000..366a4f7f18 --- /dev/null +++ b/lily/include/script-column.hh @@ -0,0 +1,30 @@ +/* + g-script-column.hh -- declare Script_column + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#ifndef Script_COLUMN_HH +#define Script_COLUMN_HH + +#include "item.hh" + +class Script_column : public Item +{ + /** + Array of objects that are placed by staffsides + */ + Link_array<Item> staff_sided_item_l_arr_; +public: + void add_staff_sided (Item*); +protected: + virtual void do_pre_processing (); +}; + + +#endif /* Script_COLUMN_HH */ + + diff --git a/lily/include/script-engraver.hh b/lily/include/script-engraver.hh new file mode 100644 index 0000000000..fef7fce66b --- /dev/null +++ b/lily/include/script-engraver.hh @@ -0,0 +1,31 @@ +/* + script-engraver.hh -- part of GNU LilyPond + + (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> +*/ + + +#ifndef Script_GRAV +#define Script_GRAV + +#include "engraver.hh" + + +class Script_engraver : public Engraver { + Link_array<Script> script_p_arr_; + Link_array<Staff_side_item> staff_side_p_arr_; + Link_array<Articulation_req> script_req_l_arr_; + +public: + VIRTUAL_COPY_CONS(Translator); + + Script_engraver(); +protected: + virtual bool do_try_music (Music*); + virtual void do_process_requests (); + virtual void do_pre_move_processing (); + virtual void do_post_move_processing (); + virtual void acknowledge_element (Score_element_info); +}; + +#endif // Script_GRAV diff --git a/lily/include/script.hh b/lily/include/script.hh new file mode 100644 index 0000000000..a9beecb022 --- /dev/null +++ b/lily/include/script.hh @@ -0,0 +1,41 @@ +/* + script.hh -- declare Script + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#ifndef SCRIPT_HH +#define SCRIPT_HH + +#include "item.hh" +#include "drul-array.hh" + +/** + Articulation marks (and the like) that are attached to notes/stems. + Needs support from Staff_side for proper operation. Staff_side + handles the positioning. + +*/ +class Script : public Item +{ + Staff_side_item * staff_side_l_; + + Molecule get_molecule (Direction d) const; +public: + Script (); + void set_staff_side (Staff_side_item*); + +protected: + virtual void do_print () const; + virtual void do_substitute_element_pointer (Score_element*o, + Score_element*n); + virtual void do_pre_processing (); + virtual void do_post_processing (); + Molecule* do_brew_molecule_p () const; +}; + +#endif /* Stem_SCRIPT_HH */ + diff --git a/lily/include/spring-spacer.hh b/lily/include/spring-spacer.hh index a76c7d47aa..de2d4b4aee 100644 --- a/lily/include/spring-spacer.hh +++ b/lily/include/spring-spacer.hh @@ -47,7 +47,8 @@ class Spring_spacer : public Line_spacer { friend class Durations_iter; private: - Spring_spacer (Spring_spacer const&){} + // can't copy me. + Spring_spacer (Spring_spacer const&s); Cons<Idealspacing> *ideal_p_list_; Array<Column_info> cols_; Array<Column_info> loose_col_arr_; diff --git a/lily/include/staff-side.hh b/lily/include/staff-side.hh new file mode 100644 index 0000000000..76e764b13b --- /dev/null +++ b/lily/include/staff-side.hh @@ -0,0 +1,73 @@ +/* + staff-side.hh -- declare Staff_side_{element,spanner,item} + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#ifndef STAFF_SIDE_HH +#define STAFF_SIDE_HH + + +#include "spanner.hh" +#include "item.hh" +#include "staff-symbol-referencer.hh" + +/** + Position myself next to a set of elements. Configurable in axis + and direction. + + Properties: + + padding :: Real + + Amount of extra space to add. +*/ +class Staff_side_element : public Staff_symbol_referencer +{ + void position_self (); + +public: + Score_element * to_position_l_; + Direction dir_; + Link_array<Score_element> support_l_arr_; + Axis axis_; + //junkme. + bool staff_support_b_; + + Staff_side_element (); + void set_victim (Score_element*); + void add_support (Score_element*); + + VIRTUAL_COPY_CONS(Score_element); + virtual Direction get_default_direction () const; +protected: + virtual Interval do_height () const; + virtual void do_print () const; + virtual void do_add_processing (); + virtual void do_substitute_element_pointer (Score_element*,Score_element*); + virtual void do_pre_processing (); + virtual void do_post_processing (); +}; + +class Staff_side_item : public Staff_side_element, public Item +{ +public: + VIRTUAL_COPY_CONS(Score_element); +protected: + virtual Interval do_width () const; + virtual void do_print () const; +}; + +class Staff_side_spanner : public Staff_side_element, public Spanner +{ +public: + VIRTUAL_COPY_CONS(Score_element); +protected: + virtual void do_print () const; +}; + +#endif /* STAFF_SIDE_HH */ + diff --git a/lily/include/stem-staff-side.hh b/lily/include/stem-staff-side.hh new file mode 100644 index 0000000000..4cbea4c089 --- /dev/null +++ b/lily/include/stem-staff-side.hh @@ -0,0 +1,40 @@ +/* + stem-staff-side.hh -- declare Stem_staff_side + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#ifndef Stem_STAFF_SIDE_HH +#define Stem_STAFF_SIDE_HH + +#include "staff-side.hh" +/** + Position self, analogous to Staff_side_item, but use Stem direction + for determining direction. + + Properties: + + padding :: Real + + Padding in staffline leading + + */ +class Stem_staff_side_item : public Staff_side_item +{ + Stem *stem_l_; +public: + Direction relative_dir_; + + void set_stem (Stem*); + Stem_staff_side_item (); +protected: + virtual Direction get_default_direction ()const; + virtual void do_pre_processing (); + virtual void do_substitute_element_pointer (Score_element*o,Score_element*e); +}; + +#endif /* Stem_STAFF_SIDE_HH */ + diff --git a/lily/include/text-item.hh b/lily/include/text-item.hh new file mode 100644 index 0000000000..8b73e999bb --- /dev/null +++ b/lily/include/text-item.hh @@ -0,0 +1,32 @@ +/* + text-item.hh -- declare Text_item + + source file of the GNU LilyPond music typesetter + + (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#ifndef Text_ITEM_HH +#define Text_ITEM_HH + +#include "item.hh" + +/** + Print a text in specified style. + */ +class Text_item : public Item +{ +public: + String text_str_; + String style_str_; + + Text_item (); + VIRTUAL_COPY_CONS (Score_element); +protected: + virtual void do_print () const; + virtual Molecule *do_brew_molecule_p () const; +}; + +#endif /* Text_ITEM_HH */ + diff --git a/lily/include/translator-group.hh b/lily/include/translator-group.hh index a34dc222b0..b907c452b5 100644 --- a/lily/include/translator-group.hh +++ b/lily/include/translator-group.hh @@ -32,6 +32,7 @@ class Translator_group : public virtual Translator { int iterator_count_; friend class Interpretation_context_handle; + Cons_list<Translator> trans_p_list_; public: @@ -81,8 +82,8 @@ protected: virtual void do_post_move_processing(); virtual void do_creation_processing(); virtual void do_removal_processing(); - void each (Method_pointer); - void each (Const_method_pointer) const; + virtual void each (Method_pointer); + virtual void each (Const_method_pointer) const; }; #endif // TRANSLATOR_GROUP_HH diff --git a/lily/local-key-engraver.cc b/lily/local-key-engraver.cc index 22bb2d1540..c5230c0905 100644 --- a/lily/local-key-engraver.cc +++ b/lily/local-key-engraver.cc @@ -14,7 +14,7 @@ #include "tie.hh" #include "note-head.hh" #include "time-description.hh" -#include "engraver-group.hh" +#include "engraver-group-engraver.hh" Local_key_engraver::Local_key_engraver() diff --git a/lily/local-key-item.cc b/lily/local-key-item.cc index a04237bd95..9953c7550d 100644 --- a/lily/local-key-item.cc +++ b/lily/local-key-item.cc @@ -19,15 +19,6 @@ Local_key_item::Local_key_item () c0_position_i_ = 0; } -void -Local_key_item::add_support (Item*head_l) -{ - if (support_items_.find_l(head_l)) - return ; - support_items_.push (head_l); - add_dependency (head_l); -} - void Local_key_item::add_pitch (Musical_pitch p, bool cautionary) { @@ -41,10 +32,12 @@ Local_key_item::add_pitch (Musical_pitch p, bool cautionary) accidental_arr_.push (t); } + void Local_key_item::do_pre_processing() { accidental_arr_.sort (Local_key_cautionary_tuple::compare); + Note_head_side::do_pre_processing (); } Molecule* @@ -97,31 +90,13 @@ Local_key_item::do_brew_molecule_p() const output->add_at_edge (X_AXIS, RIGHT, m, 0); } - Interval x_int; - for (int i=0; i < support_items_.size(); i++) - { - Dimension_cache *common = - common_group (support_items_[i], X_AXIS); - - Real x = support_items_[i]->relative_coordinate (common, X_AXIS) - - relative_coordinate (common, X_AXIS); - - x_int.unite (x + support_items_[i]->extent (X_AXIS)); - } - - if (x_int.empty_b ()) - x_int = Interval(0,0); - - output->translate_axis (-output->extent()[X_AXIS][RIGHT] + x_int[LEFT], X_AXIS); - return output; } - - void -Local_key_item::do_substitute_element_pointer (Score_element*o,Score_element*n) +Local_key_item::do_substitute_element_pointer (Score_element *o, Score_element*n) { - if (Item* o_l = dynamic_cast <Item *> (o)) - support_items_.substitute (o_l,dynamic_cast <Item *> (n)); + Note_head_side::do_substitute_element_pointer (o,n); + Staff_symbol_referencer::do_substitute_element_pointer (o,n); + } diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index d93c7b48d9..7171fc7200 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -9,7 +9,7 @@ #include "lyric-engraver.hh" #include "musical-request.hh" -#include "g-text-item.hh" +#include "text-item.hh" #include "paper-def.hh" #include "lookup.hh" @@ -40,7 +40,7 @@ Lyric_engraver::do_process_requests() { if (req_l_) { - text_p_= new G_text_item; + text_p_= new Text_item; text_p_->text_str_ = req_l_->text_str_; text_p_->text_str_ += " "; // ugh. diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index f641a2df31..345c4f8e42 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -7,8 +7,8 @@ */ #include "command-request.hh" #include "mark-engraver.hh" -#include "engraver-group.hh" -#include "g-text-item.hh" +#include "engraver-group-engraver.hh" +#include "text-item.hh" ADD_THIS_TRANSLATOR (Mark_engraver); diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index bcb465f22b..1590f4fc49 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -24,6 +24,8 @@ #include "new-repeated-music.hh" #include "folded-repeat-iterator.hh" #include "unfolded-repeat-iterator.hh" +#include "grace-iterator.hh" +#include "grace-music.hh" void Music_iterator::do_print() const @@ -124,6 +126,8 @@ Music_iterator::static_get_iterator_p (Music const *m) p = new Change_iterator; else if (dynamic_cast<Time_scaled_music const *> (m)) p = new Time_scaled_music_iterator; + else if (dynamic_cast<Grace_music const*> (m)) + p = new Grace_iterator; else if (dynamic_cast<Music_wrapper const *> (m)) p = new Music_wrapper_iterator; else if (New_repeated_music const * n = dynamic_cast<New_repeated_music const *> (m)) diff --git a/lily/music-wrapper-iterator.cc b/lily/music-wrapper-iterator.cc index 7d34f9218f..f25dd82f39 100644 --- a/lily/music-wrapper-iterator.cc +++ b/lily/music-wrapper-iterator.cc @@ -40,7 +40,7 @@ Music_wrapper_iterator::~Music_wrapper_iterator () bool Music_wrapper_iterator::ok () const { - return child_iter_p_->ok (); + return child_iter_p_ && child_iter_p_->ok (); } void diff --git a/lily/music-wrapper.cc b/lily/music-wrapper.cc index 17c0fefa7b..dff9d1fc87 100644 --- a/lily/music-wrapper.cc +++ b/lily/music-wrapper.cc @@ -1,5 +1,5 @@ /* - music-wrapper.cc -- implement + music-wrapper.cc -- implement Music_wrapper source file of the GNU LilyPond music typesetter diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index eee264255d..048dd1856b 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -37,6 +37,7 @@ static Keyword_ent the_key_tab[]={ {"duration", DURATION}, {"font", FONT}, {"grouping", GROUPING}, + {"grace", GRACE}, {"header", HEADER}, {"in", IN_T}, {"lyrics", LYRICS}, diff --git a/lily/note-head-side.cc b/lily/note-head-side.cc new file mode 100644 index 0000000000..5d073f0a10 --- /dev/null +++ b/lily/note-head-side.cc @@ -0,0 +1,47 @@ +/* + note-head-side.cc -- implement Note_head_side + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#include "note-head-side.hh" + +void +Note_head_side::add_support (Item*head_l) +{ + if (support_l_arr_.find_l(head_l)) + return ; + support_l_arr_.push (head_l); + add_dependency (head_l); +} + +void +Note_head_side::do_pre_processing () +{ + Interval x_int; + for (int i=0; i < support_l_arr_.size(); i++) + { + Dimension_cache *common = + common_group (support_l_arr_[i], X_AXIS); + + Real x = support_l_arr_[i]->relative_coordinate (common, X_AXIS) + - relative_coordinate (common, X_AXIS); + + x_int.unite (x + support_l_arr_[i]->extent (X_AXIS)); + } + + if (x_int.empty_b ()) + x_int = Interval(0,0); + + translate_axis (-extent(X_AXIS)[RIGHT] + x_int[LEFT], X_AXIS); +} + +void +Note_head_side::do_substitute_element_pointer (Score_element*o,Score_element*n) +{ + if (Item* o_l = dynamic_cast <Item *> (o)) + support_l_arr_.substitute (o_l,dynamic_cast <Item *> (n)); +} diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index d22f151e1c..1df5d85a38 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -26,14 +26,17 @@ #include "lily-version.hh" #include "atom.hh" -// urg -static SCM port = 0; - Paper_outputter::Paper_outputter (Paper_stream *s) { - port = 0; outstream_l_ = s; output_header (); + if (output_global_ch == String ("scm")) + *outstream_l_->os << "" + "(primitive-load-path 'lily.scm)\n" + "(eval (tex-scm 'all-definitions))\n" + ";(eval (ps-scm 'all-definitions))\n" + "(display (map (lambda (x) (string-append (eval x) \"\\n\")) '(\n" + ; } Paper_outputter::~Paper_outputter () @@ -43,12 +46,7 @@ Paper_outputter::~Paper_outputter () if (String (output_global_ch) == "scm") { -#if 1 - scm_display (gh_str02scm (")))\n"), port); - scm_fflush (port); -#else *outstream_l_->os << ")"; -#endif } } @@ -172,73 +170,8 @@ Paper_outputter::output_scheme (SCM scm) { if (String (output_global_ch) == "scm") { -#if 1 - /* - we'd rather use C++ i/o iso Guile's, but how? - and: they can't be mixed (or synchronised) easily? - */ - - // urg - if (!port) - { - int fd = 1; - ofstream * of = dynamic_cast<ofstream*> (outstream_l_->os); - if (of) - fd = of->rdbuf()->fd(); - FILE *file = fdopen (fd, "a"); - port = scm_standard_stream_to_port (file, "a", ""); - scm_display (gh_str02scm ( - "(primitive-load-path 'lily.scm)\n" - "(eval (tex-scm 'all-definitions))\n" - ";(eval (ps-scm 'all-definitions))\n" - "(display (map (lambda (x) (string-append (eval x) \"%\\n\")) '(\n" - ), port); - } - - scm_write (scm, port); - // duh - scm_display (gh_str02scm ("\n"), port); - scm_fflush (port); -#else - static bool first = true; - if (first) - { - *outstream_l_->os << "" - "(primitive-load-path 'lily.scm)\n" - "(eval (tex-scm 'all-definitions))\n" - ";(eval (ps-scm 'all-definitions))\n" - "(display (map (lambda (x) (string-append (eval x) \"\\n\")) '(\n" - ; - } - - /* - why doesn't this work? - - ERROR: In procedure gh_scm2newstr: - ERROR: Wrong type argument in position 3: - (header "GNU LilyPond 1.1.49.jcn1" ", at Tue Jun 22 20:58:17 1999") - - or: - - ERROR: In procedure symbol->string: - ERROR: Wrong type argument in position 1: - (header "GNU LilyPond 1.1.49.jcn2" ", at Wed Jun 23 18:42:14 1999") - - eg, two ways to print '(foo bar)' - - SCM scm = gh_list (ly_symbol ("foo"), gh_str2scm ("bar"), SCM_UNDEFINED); - scm_write (scm, port); - puts (gh_xxx2newstr (scm, 0)); - */ - - char* p; - //p = gh_scm2newstr (scm, 0); - //p = gh_symbol2newstr (scm, 0); - //p = gh_scm2newstr (scm_symbol_to_string (scm), 0); - //p = gh_symbol2newstr (scm_symbol_to_string (scm), 0); - //*outstream_l_->os << p << endl; - *outstream_l_->os << symbol_to_string (scm) << endl; -#endif + SCM result = scm_eval (scm_listify (ly_symbol ("scm->string"), ly_quote_scm (scm), SCM_UNDEFINED)); + *outstream_l_->os << ly_scm2string (result) << endl; } else { diff --git a/lily/parser.yy b/lily/parser.yy index 70f1b62846..adc565e244 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -53,7 +53,7 @@ #include "time-scaled-music.hh" #include "new-repeated-music.hh" #include "version.hh" - +#include "grace-music.hh" // mmm Mudela_version oldest_version ("1.0.20"); @@ -151,6 +151,7 @@ yylex (YYSTYPE *s, void * v_l) %token EXTENDER %token FONT %token GROUPING +%token GRACE %token HEADER %token IN_T %token KEY @@ -775,6 +776,9 @@ Composite_music: $$ = csm; } + | GRACE Music { + $$ = new Grace_music ($2); + } | CONTEXT STRING '=' STRING Music { Context_specced_music *csm = new Context_specced_music ($5); @@ -1033,7 +1037,7 @@ request_that_take_dir: request_with_dir: script_dir request_that_take_dir { - if (G_script_req * gs = dynamic_cast<G_script_req*> ($2)) + if (Script_req * gs = dynamic_cast<Script_req*> ($2)) gs->dir_ = Direction ($1); else if ($1) $2->warning ("Can't specify direction for this request"); diff --git a/lily/repeat-engraver.cc b/lily/repeat-engraver.cc index b6c7e01bfc..650b5b3dd4 100644 --- a/lily/repeat-engraver.cc +++ b/lily/repeat-engraver.cc @@ -13,7 +13,7 @@ #include "multi-measure-rest.hh" #include "command-request.hh" #include "time-description.hh" -#include "engraver-group.hh" +#include "engraver-group-engraver.hh" #include "new-repeated-music.hh" #include "time-description.hh" #include "volta-spanner.hh" diff --git a/lily/repeated-music-iterator.cc b/lily/repeated-music-iterator.cc index 0c168dde63..23fb55f790 100644 --- a/lily/repeated-music-iterator.cc +++ b/lily/repeated-music-iterator.cc @@ -102,12 +102,15 @@ void Folded_repeat_iterator::enter_alternative () { New_repeated_music const * mus = dynamic_cast<New_repeated_music const*> (music_l_); - Simultaneous_music_iterator * s = new Simultaneous_music_iterator; - s->separate_contexts_b_ = true; - s->init_translator (mus->alternatives_p_, report_to_l ()); + if (mus->alternatives_p_) + { + Simultaneous_music_iterator * s = new Simultaneous_music_iterator; + s->separate_contexts_b_ = true; + s->init_translator (mus->alternatives_p_, report_to_l ()); - alternative_iter_p_ = s; - alternative_iter_p_->construct_children (); + alternative_iter_p_ = s; + alternative_iter_p_->construct_children (); + } } void diff --git a/lily/rhythmic-column-engraver.cc b/lily/rhythmic-column-engraver.cc index ed45fef5da..8aab13a276 100644 --- a/lily/rhythmic-column-engraver.cc +++ b/lily/rhythmic-column-engraver.cc @@ -6,6 +6,7 @@ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> */ +#include "slur.hh" #include "rhythmic-column-engraver.hh" #include "note-head.hh" #include "stem.hh" @@ -34,7 +35,8 @@ Rhythmic_column_engraver::process_acknowledged () for (int i=0; i < rhead_l_arr_.size (); i++) { - ncol_p_->add_head (rhead_l_arr_[i]); + if (!rhead_l_arr_[i]->dim_cache_[X_AXIS]->parent_l_) + ncol_p_->add_head (rhead_l_arr_[i]); } rhead_l_arr_.set_size (0); } @@ -42,16 +44,27 @@ Rhythmic_column_engraver::process_acknowledged () if (ncol_p_) { - if (dotcol_l_) + if (dotcol_l_ + && !dotcol_l_->dim_cache_[X_AXIS]->parent_l_) { ncol_p_->set_dotcol (dotcol_l_); } - if (stem_l_) + if (stem_l_ + && !stem_l_->dim_cache_[X_AXIS]->parent_l_) { ncol_p_->set_stem (stem_l_); stem_l_ = 0; } + + /* + since ncol_p_ is announced, it already has its grace_scm_sym set, if we're + in a Grace context. + */ + if (ncol_p_->get_elt_property (grace_scm_sym) == SCM_BOOL_F) + for (int i=0; i < grace_slur_endings_.size(); i++) + grace_slur_endings_[i]->add_column (ncol_p_); + grace_slur_endings_.clear (); } } @@ -59,20 +72,27 @@ void Rhythmic_column_engraver::acknowledge_element (Score_element_info i) { Item * item = dynamic_cast <Item *> (i.elem_l_); - if (!item) - return; - if (Stem*s=dynamic_cast<Stem *> (item)) + if (Stem*s=dynamic_cast<Stem *> (item)) { stem_l_ = s; } - else if (Rhythmic_head*r=dynamic_cast<Rhythmic_head *> (item)) + else if (Rhythmic_head*r=dynamic_cast<Rhythmic_head *> (item)) { rhead_l_arr_.push (r); } - else if (Dot_column*d =dynamic_cast<Dot_column *> (item)) + else if (Dot_column*d =dynamic_cast<Dot_column *> (item)) { dotcol_l_ = d; } + else if (Slur *s = dynamic_cast<Slur*> (i.elem_l_)) + { + /* + end slurs starting on grace notes + */ + + if (s->get_elt_property (grace_scm_sym) != SCM_BOOL_F) + grace_slur_endings_.push (s); + } } void @@ -96,6 +116,7 @@ Rhythmic_column_engraver::do_pre_move_processing() void Rhythmic_column_engraver::do_post_move_processing() { + grace_slur_endings_.clear (); dotcol_l_ =0; stem_l_ =0; } diff --git a/lily/rhythmic-head.cc b/lily/rhythmic-head.cc index 2541fb068f..e188abe59e 100644 --- a/lily/rhythmic-head.cc +++ b/lily/rhythmic-head.cc @@ -15,6 +15,7 @@ #include "dots.hh" #include "axis-group-element.hh" #include "p-score.hh" +#include "stem.hh" void Rhythmic_head::do_add_processing () @@ -22,14 +23,6 @@ Rhythmic_head::do_add_processing () if (dots_i_ && !dots_l_) { assert (false); - /* Dots *d = new Dots; - add_dots (d); - pscore_l_->typeset_element (d); - - - - axis_group_l_a_[Y_AXIS]->add_element (d); - axis_group_l_a_[X_AXIS]->add_element (d);*/ } if (dots_l_) { @@ -50,13 +43,16 @@ Rhythmic_head::Rhythmic_head () dots_l_ =0; balltype_i_ =0; dots_i_ = 0; + stem_l_ =0; } void Rhythmic_head::do_substitute_element_pointer (Score_element*o,Score_element*n) { if (o == dots_l_) - dots_l_ = n ? dynamic_cast<Dots *> (n) :0; + dots_l_ = dynamic_cast<Dots *> (n) ; + else if (o == stem_l_) + stem_l_ = dynamic_cast<Stem*>(n); } diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 250267faf9..3d73c012c4 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -49,15 +49,20 @@ Score_engraver::finish() removal_processing(); } +/* + use start/finish? + */ void -Score_engraver::do_creation_processing() +Score_engraver::do_creation_processing () { scoreline_l_ = pscore_p_->line_l_; scoreline_l_->set_bounds(LEFT,command_column_l_); command_column_l_->set_elt_property (breakable_scm_sym, SCM_BOOL_T); + Engraver_group_engraver::do_creation_processing(); } + void Score_engraver::do_removal_processing() { @@ -95,6 +100,9 @@ Score_engraver::announce_element (Score_element_info info) Engraver_group_engraver::do_announces, then announce_info_arr_.size() will be nonzero again */ +/* junkme? Done by Engraver_group_engraver::do_announces ()? + */ + void Score_engraver::do_announces() { diff --git a/lily/score.cc b/lily/score.cc index c6d51acd45..bda4e464df 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -72,33 +72,10 @@ Score::run_translator (Music_output_def *odef_l) return ; } - trans_p->start(); - - while (iter->ok() || trans_p->moments_left_i ()) - { - Moment w; - w.set_infinite (1); - if (iter->ok()) - { - w = iter->next_moment(); - DOUT << "proccing: " << w << '\n'; - if (!monitor->silent_b ("walking")) - iter->print(); - } - - trans_p->modify_next (w); - trans_p->prepare (w); - - if (!monitor->silent_b ("walking")) - trans_p->print(); - - iter->process_and_next (w); - trans_p->process(); - } - + trans_p->start (); + trans_p->run_iterator_on_me (iter); delete iter; - trans_p->finish(); - + trans_p->finish (); if (errorlevel_i_) { diff --git a/lily/script-column-engraver.cc b/lily/script-column-engraver.cc new file mode 100644 index 0000000000..4112e44970 --- /dev/null +++ b/lily/script-column-engraver.cc @@ -0,0 +1,93 @@ +/* + g-script-column-engraver.cc -- implement Script_column_engraver + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#include "engraver.hh" +#include "script-column.hh" +#include "staff-side.hh" + +/** + Find potentially colliding scripts, and put them in a + Script_column, that will fix the collisions. */ +class Script_column_engraver : public Engraver +{ + Script_column *scol_p_; + Link_array<Item> script_l_arr_; + Link_array<Staff_side_item> staff_side_l_arr_; +public: + Script_column_engraver (); + VIRTUAL_COPY_CONS(Translator); +protected: + virtual void acknowledge_element (Score_element_info); + virtual void process_acknowledged (); + virtual void do_pre_move_processing (); + virtual void do_post_move_processing (); +}; + + +Script_column_engraver::Script_column_engraver() +{ + scol_p_ =0; +} + +void +Script_column_engraver::do_pre_move_processing () +{ + if (scol_p_) + { + typeset_element (scol_p_); + scol_p_ =0; + } +} + +void +Script_column_engraver::do_post_move_processing () +{ + script_l_arr_.clear (); + staff_side_l_arr_.clear (); +} + +void +Script_column_engraver::acknowledge_element( Score_element_info inf) +{ + Item *thing = dynamic_cast<Item*>(inf.elem_l_); + if (!thing) + return; + + Dimension_cache * parcache = thing->dim_cache_[Y_AXIS]->parent_l_; + if (!parcache || !thing) + return ; + + Graphical_element *parent = parcache->element_l (); + + if (Staff_side_item * ss = dynamic_cast<Staff_side_item*>(parent)) + { + if (!ss->breakable_b ()) + { + script_l_arr_.push (thing); + } + } +} + +void +Script_column_engraver::process_acknowledged () +{ + if (!scol_p_ && script_l_arr_.size () > 1) + { + scol_p_ = new Script_column; + announce_element (Score_element_info (scol_p_, 0)); + } + + if (scol_p_) + { + for (int i=0; i < script_l_arr_.size (); i++) + scol_p_->add_staff_sided (script_l_arr_[i]); + script_l_arr_.clear (); + } +} +ADD_THIS_TRANSLATOR(Script_column_engraver); diff --git a/lily/script-column.cc b/lily/script-column.cc new file mode 100644 index 0000000000..a14c02c29e --- /dev/null +++ b/lily/script-column.cc @@ -0,0 +1,76 @@ +/* + g-script-column.cc -- implement Script_column + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ +#include "script-column.hh" +#include "staff-side.hh" + +static Staff_side_item * +get_Staff_side (Item *i) +{ + Graphical_element *e1 = i->dim_cache_[Y_AXIS]->parent_l_->element_l (); + + return dynamic_cast<Staff_side_item*>(e1); +} + +void +Script_column::add_staff_sided (Item *i) +{ + SCM p = get_Staff_side (i)->get_elt_property (script_priority_scm_sym); + if (p == SCM_BOOL_F) + return; + + staff_sided_item_l_arr_.push (i); + add_dependency (i); +} + +static int +staff_side_compare (Item * const &i1, + Item * const &i2) +{ + Score_element *e1 = get_Staff_side (i1); + Score_element *e2 = get_Staff_side (i2); + + SCM p1 = e1->get_elt_property (script_priority_scm_sym); + SCM p2 = e2->get_elt_property (script_priority_scm_sym); + + return gh_scm2int (SCM_CDR(p1)) - gh_scm2int (SCM_CDR(p2)); +} + +void +Script_column::do_pre_processing () +{ + Drul_array<Link_array<Item> > arrs; + + for (int i=0; i < staff_sided_item_l_arr_.size (); i++) + { + Staff_side_item * ip = get_Staff_side (staff_sided_item_l_arr_[i]); + arrs[ip->dir_].push (staff_sided_item_l_arr_[i]); + } + + Direction d = DOWN; + do { + Link_array<Item> &arr(arrs[d]); + + arr.sort (staff_side_compare); + + Item * last = 0; + for (int i=0; i < arr.size (); i++) + { + Staff_side_item * gs = get_Staff_side (arr[i]); + if (last) + { + gs->add_support (last); + gs->add_support (get_Staff_side (last)); + } + + gs->remove_elt_property (script_priority_scm_sym); + last = arr[i]; + } + + } while (flip (&d) != DOWN); +} diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc new file mode 100644 index 0000000000..6842e4f4ed --- /dev/null +++ b/lily/script-engraver.cc @@ -0,0 +1,143 @@ +/* + script-engraver.cc -- implement Script_engraver + + (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> +*/ + +#include "script-engraver.hh" +#include "script.hh" +#include "stem-staff-side.hh" +#include "musical-request.hh" +#include "stem.hh" +#include "staff-symbol.hh" +#include "rhythmic-head.hh" + +Script_engraver::Script_engraver() +{ + do_post_move_processing(); +} + +bool +Script_engraver::do_try_music (Music *r_l) +{ + if (Articulation_req *mr = dynamic_cast <Articulation_req *> (r_l)) + { + for (int i=0; i < script_req_l_arr_.size(); i++) + { + if (script_req_l_arr_[i]->equal_b (mr)) + return true; + } + script_req_l_arr_.push (mr); + return true; + } + return false; +} + +void +Script_engraver::do_process_requests() +{ + for (int i=0; i < script_req_l_arr_.size(); i++) + { + Articulation_req* l=script_req_l_arr_[i]; + + + SCM list = gh_eval_str (("(articulation-to-scriptdef \"" + l->articulation_str_ + "\")").ch_C()); + + if (list == SCM_BOOL_F) + { + l->warning(_f("don't know how to interpret articulation `%s'\n", + l->articulation_str_.ch_C())); + continue; + } + Script *p =new Script; + Stem_staff_side_item * ss =new Stem_staff_side_item; + list = SCM_CDR (list); + + p->set_elt_property (molecule_scm_sym, + SCM_CAR(list)); + + list = SCM_CDR(list); + bool follow_staff = gh_scm2bool (SCM_CAR(list)); + list = SCM_CDR(list); + int relative_stem_dir = gh_scm2int (SCM_CAR(list)); + list = SCM_CDR(list); + int force_dir =gh_scm2int (SCM_CAR(list)); + list = SCM_CDR(list); + SCM priority = SCM_CAR(list); + + if (relative_stem_dir) + ss->relative_dir_ = relative_stem_dir; + else + ss->dir_ = force_dir; + + if (l->dir_) + ss->dir_ = l->dir_; + + Real padding = 1.0; + Scalar paddingprop = get_property ("articulationScriptPadding", 0); + if (paddingprop.length_i() && paddingprop.isnum_b ()) + { + padding = (Real)paddingprop; + } + + ss->staff_support_b_ = !follow_staff; + p->set_staff_side (ss); + ss->set_elt_property (script_priority_scm_sym, priority); + ss->set_elt_property (padding_scm_sym, gh_double2scm(padding)); + script_p_arr_.push (p); + staff_side_p_arr_.push (ss); + + announce_element (Score_element_info (p, l)); + announce_element (Score_element_info (ss, l)); + } +} + +void +Script_engraver::acknowledge_element (Score_element_info inf) +{ + if (Stem *s = dynamic_cast<Stem*>(inf.elem_l_)) + { + for (int i=0; i < staff_side_p_arr_.size(); i++) + if (Stem_staff_side_item * ss = dynamic_cast<Stem_staff_side_item*>(staff_side_p_arr_[i])) + { + ss->set_stem (s); + ss->add_support (s); + } + } + else if (Rhythmic_head * rh = dynamic_cast<Rhythmic_head*>(inf.elem_l_)) + { + for (int i=0; i < staff_side_p_arr_.size(); i++) + { + Staff_side_item * ss = dynamic_cast<Staff_side_item*>(staff_side_p_arr_[i]); + + if (!ss->dim_cache_[X_AXIS]->parent_l_) + { + ss->dim_cache_[X_AXIS]->parent_l_ = inf.elem_l_->dim_cache_[X_AXIS]; + } + ss->add_support (rh); + } + } +} + +void +Script_engraver::do_pre_move_processing() +{ + for (int i=0; i < script_p_arr_.size(); i++) + { + typeset_element (script_p_arr_[i]); + typeset_element (staff_side_p_arr_[i]); + } + script_p_arr_.clear(); + staff_side_p_arr_.clear (); +} + +void +Script_engraver::do_post_move_processing() +{ + script_req_l_arr_.clear(); +} + + + +ADD_THIS_TRANSLATOR(Script_engraver); + diff --git a/lily/script.cc b/lily/script.cc new file mode 100644 index 0000000000..984d20063a --- /dev/null +++ b/lily/script.cc @@ -0,0 +1,93 @@ +/* + g-script.cc -- implement Script + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +/* + + TODO: Quantisation support (staccato dots between stafflines) + +*/ +#include "debug.hh" +#include "script.hh" +#include "lookup.hh" +#include "staff-side.hh" +#include "paper-def.hh" + +Script::Script () +{ + staff_side_l_ =0; +} + +void +Script::do_substitute_element_pointer (Score_element*o, Score_element*n) +{ + if (o == staff_side_l_) + staff_side_l_ = dynamic_cast<Staff_side_item*>(n); +} + + + +Molecule +Script::get_molecule(Direction d) const +{ + SCM s = get_elt_property (molecule_scm_sym); + assert (s != SCM_BOOL_F); + + s = SCM_CDR(s); + SCM key = SCM_CAR (s); + if (key == ly_symbol ("feta")) + { + return lookup_l ()->afm_find ("scripts-" + + ly_scm2string (index_cell (SCM_CDR (s), d))); + } + else if (key == ly_symbol ("accordion")) + { + return lookup_l ()->accordion (SCM_CDR(s), paper_l()->get_realvar(interline_scm_sym)); + } + + else assert (false); + + return Molecule (); +} + + +void +Script::do_pre_processing () +{ + Graphical_element * e + = staff_side_l_->dim_cache_[X_AXIS]->parent_l_->element_l(); + translate_axis (e->extent (X_AXIS).center (), X_AXIS); +} + +void +Script::do_post_processing () +{ + Direction d = staff_side_l_->dir_; + Molecule m (get_molecule(d)); + translate_axis (- m.dim_[Y_AXIS][Direction (-d)], Y_AXIS); +} + +void +Script::set_staff_side (Staff_side_item*g) +{ + staff_side_l_ = g; + add_dependency (g); + dim_cache_[Y_AXIS]->parent_l_ = g->dim_cache_[Y_AXIS]; +} + +Molecule* +Script::do_brew_molecule_p () const +{ + return new Molecule (get_molecule (staff_side_l_->dir_)); +} + +void +Script::do_print () const +{ + +} diff --git a/lily/sequential-music-iterator.cc b/lily/sequential-music-iterator.cc index d75713e307..a50a0de9a5 100644 --- a/lily/sequential-music-iterator.cc +++ b/lily/sequential-music-iterator.cc @@ -5,7 +5,7 @@ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> */ - +#include "grace-iterator.hh" #include "translator-group.hh" #include "debug.hh" #include "sequential-music-iterator.hh" @@ -66,7 +66,8 @@ Sequential_music_iterator::start_next_element() void Sequential_music_iterator::set_sequential_music_translator() { - if (iter_p_->report_to_l()->depth_i () > report_to_l ()->depth_i ()) + if (iter_p_->report_to_l()->depth_i () > report_to_l ()->depth_i () + && ! dynamic_cast<Grace_iterator*> (iter_p_)) // UGH.! set_translator (iter_p_->report_to_l()); } diff --git a/lily/simultaneous-music-iterator.cc b/lily/simultaneous-music-iterator.cc index 72e59e1d61..80dbc9d2da 100644 --- a/lily/simultaneous-music-iterator.cc +++ b/lily/simultaneous-music-iterator.cc @@ -28,7 +28,8 @@ Simultaneous_music_iterator::construct_children() int j = 0; Music_sequence const *sim = dynamic_cast<Music_sequence const*> (music_l_); - for (Cons<Music> *i = sim->music_p_list_p_->head_; i; i = i->next_, j++) + Cons<Music> *i = (sim->music_p_list_p_) ? sim->music_p_list_p_->head_ : 0; + for (; i; i = i->next_, j++) { Music_iterator * mi = static_get_iterator_p (i->car_); diff --git a/lily/staff-margin-engraver.cc b/lily/staff-margin-engraver.cc index 11d66d7587..6d083e01ee 100644 --- a/lily/staff-margin-engraver.cc +++ b/lily/staff-margin-engraver.cc @@ -9,8 +9,8 @@ #include "staff-margin-engraver.hh" #include "bar.hh" #include "time-description.hh" -#include "g-text-item.hh" -#include "g-staff-side.hh" +#include "text-item.hh" +#include "staff-side.hh" ADD_THIS_TRANSLATOR (Staff_margin_engraver); diff --git a/lily/staff-side.cc b/lily/staff-side.cc new file mode 100644 index 0000000000..4ffb6059b7 --- /dev/null +++ b/lily/staff-side.cc @@ -0,0 +1,178 @@ +/* + g-staff-side.cc -- implement Staff_side_element + + source file of the GNU LilyPond music typesetter + + (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#include "staff-side.hh" +#include "staff-symbol.hh" +#include "debug.hh" +#include "warn.hh" +#include "dimensions.hh" + +Staff_side_element::Staff_side_element () +{ + dir_ = CENTER; + to_position_l_ = 0; + set_elt_property (transparent_scm_sym, SCM_BOOL_T); + staff_support_b_ = true; + axis_ = Y_AXIS; +} + + + +void +Staff_side_element::do_pre_processing () +{ + if (!dir_) + dir_ = get_default_direction (); + + if (axis_ == X_AXIS) + position_self (); +} + +Direction +Staff_side_element::get_default_direction () const +{ + return DOWN; +} + + +void +Staff_side_element::set_victim (Score_element *e) +{ + add_dependency (e); + to_position_l_ = e; + to_position_l_->dim_cache_[axis_]->parent_l_ = dim_cache_[axis_]; +} + +void +Staff_side_element::add_support (Score_element*e) +{ + add_dependency (e); + support_l_arr_.push (e); +} + + +void +Staff_side_element::do_substitute_element_pointer (Score_element*o, Score_element*n) +{ + Staff_symbol_referencer::do_substitute_element_pointer (o,n); + if (o == to_position_l_) + to_position_l_ = n; + else + support_l_arr_.unordered_substitute (o,n); +} + +void +Staff_side_element::position_self () +{ + if (to_position_l_ && + to_position_l_->get_elt_property (transparent_scm_sym) != SCM_BOOL_F) + return; + + Interval dim; + Dimension_cache *common = 0; + if (support_l_arr_.size ()) + { + common = common_group (typecast_array (support_l_arr_, (Graphical_element*)0), + axis_); + + for (int i=0; i < support_l_arr_.size (); i++) + { + Score_element * e = support_l_arr_ [i]; + Real coord = e->relative_coordinate (common, axis_); + + dim.unite (coord + e->extent (axis_)); + } + } + else + common = dim_cache_[axis_]->parent_l_; + + if (dim.empty_b ()) + { + dim = Interval(0,0); + } + + + Interval sym_dim + = to_position_l_ + ? to_position_l_->extent (axis_) + : Interval(0,0); + + Real off = dim_cache_[axis_]->relative_coordinate (common); + + SCM pad = remove_elt_property (padding_scm_sym); + if (pad != SCM_BOOL_F) + { + off += gh_scm2double (SCM_CDR(pad)) * dir_; + } + Real total_off = dim[dir_] - sym_dim[-dir_] + off; + dim_cache_[axis_]->set_offset (total_off); + if (fabs (total_off) > 100 CM) + programming_error ("Huh ? Improbable staff side dim."); +} + +void +Staff_side_element::do_post_processing () +{ + if (axis_ == Y_AXIS) + position_self (); +} + + +void +Staff_side_element::do_add_processing () +{ + if (staff_support_b_ + && axis_ == Y_AXIS && staff_symbol_l ()) + { + add_support (staff_symbol_l ()); + } +} + +Interval +Staff_side_element::do_height () const +{ + Interval i; + if (to_position_l_) + return to_position_l_->extent (Y_AXIS); + return i; +} + +void +Staff_side_element::do_print () const +{ +#ifndef NPRINT + if (to_position_l_) + DOUT << "positioning " << to_position_l_->name(); + + DOUT << "axis == " << axis_name_str (axis_) + << ", dir == " << to_str (dir_ ); +#endif +} + + +Interval +Staff_side_item::do_width () const +{ + Interval i; + if (to_position_l_) + return to_position_l_->extent (X_AXIS); + return i; +} + +void +Staff_side_item::do_print () const +{ + Staff_side_element::do_print (); +} + +void +Staff_side_spanner::do_print () const +{ + Staff_side_element::do_print (); +} diff --git a/lily/staff-switching-translator.cc b/lily/staff-switching-translator.cc index ffeda7fc26..570631c3a7 100644 --- a/lily/staff-switching-translator.cc +++ b/lily/staff-switching-translator.cc @@ -9,7 +9,7 @@ #include "engraver.hh" #include "interpretation-context-handle.hh" #include "drul-array.hh" -#include "engraver-group.hh" +#include "engraver-group-engraver.hh" #include "musical-request.hh" class Staff_switching_translator : public Engraver diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index 457911bdc1..a78be1a199 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -40,6 +40,9 @@ Stem_engraver::acknowledge_element(Score_element_info i) { if (Rhythmic_head * h = dynamic_cast<Rhythmic_head *> (i.elem_l_)) { + if (h->stem_l_) + return; + Rhythmic_req * r = dynamic_cast <Rhythmic_req *> (i.req_l_); int duration_log = r->duration_.durlog_i_; if (!stem_p_) @@ -115,6 +118,12 @@ Stem_engraver::do_pre_move_processing() ((Translator_group*)which)->set_property ("stemRightBeamCount", ""); } + prop = get_property ("stemLength", 0); + if (prop.isnum_b ()) + { + stem_p_->set_elt_property (length_scm_sym, gh_double2scm (prop.to_f ())); + } + typeset_element(stem_p_); stem_p_ = 0; } diff --git a/lily/stem-info.cc b/lily/stem-info.cc index 6935bf3909..0cbab88f4d 100644 --- a/lily/stem-info.cc +++ b/lily/stem-info.cc @@ -62,7 +62,7 @@ Stem_info::Stem_info (Stem*s, int mult) Real min_stem_f = paper_l->get_var (String ("minimum_stem_length") + to_str (mult_i_ <? stem_max)); Real stem_f = paper_l->get_var (String ("stem_length") - + to_str (mult_i_ <? stem_max)); + + to_str (mult_i_ <? stem_max))* internote_f; if (!beam_dir_ || (beam_dir_ == dir_)) /* normal beamed stem */ diff --git a/lily/stem-staff-side.cc b/lily/stem-staff-side.cc new file mode 100644 index 0000000000..4df6a8e9c9 --- /dev/null +++ b/lily/stem-staff-side.cc @@ -0,0 +1,55 @@ +/* + g-stem-staff-side.cc -- implement Stem_staff_side + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#include "stem-staff-side.hh" +#include "stem.hh" + +Stem_staff_side_item::Stem_staff_side_item () +{ + stem_l_ =0; + relative_dir_ = CENTER; +} + +void +Stem_staff_side_item::do_substitute_element_pointer (Score_element*o, + Score_element*n) +{ + if (o == stem_l_) + { + stem_l_ = dynamic_cast<Stem*> (n); + } +} + +void +Stem_staff_side_item::set_stem (Stem*s) +{ + stem_l_ =s; + add_dependency (s); +} + + +Direction +Stem_staff_side_item::get_default_direction () const +{ + return relative_dir_ * stem_l_->dir_; +} + +void +Stem_staff_side_item::do_pre_processing () +{ + SCM p = remove_elt_property (padding_scm_sym); + if (p != SCM_BOOL_F && stem_l_) + { + p = SCM_CDR (p); + set_elt_property (padding_scm_sym, + gh_double2scm(stem_l_->staff_line_leading_f () + * gh_scm2double (p))); + } + Staff_side_item::do_pre_processing (); +} diff --git a/lily/stem.cc b/lily/stem.cc index 97fa1565cc..1adaafbfb1 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -119,6 +119,7 @@ Stem::type_i () const void Stem::add_head (Rhythmic_head *n) { + n->stem_l_ = this; n->add_dependency (this); // ? if (Note_head *nh = dynamic_cast<Note_head *> (n)) { @@ -164,9 +165,16 @@ Stem::get_dir () const void Stem::set_default_stemlen () { - Real internote_f = staff_line_leading_f ()/2.0; - Real length_f = paper_l ()->get_var ("stem_length0") / internote_f; - Real shorten_f = paper_l ()->get_var ("forced_stem_shorten0") / internote_f; + Real length_f = 0.; + SCM scm_len = get_elt_property(length_scm_sym); + if (scm_len != SCM_BOOL_F) + { + length_f = gh_scm2double (SCM_CDR(scm_len)); + } + else + length_f = paper_l ()->get_var ("stem_length0"); + + Real shorten_f = paper_l ()->get_var ("forced_stem_shorten0"); if (!dir_) dir_ = get_default_dir (); @@ -311,7 +319,7 @@ Stem::do_brew_molecule_p () const if (!invisible_b ()) { Real stem_width = paper_l ()->get_var ("stemthickness"); - Molecule ss =lookup_l ()->filledbox (Box (Interval (-stem_width/2, stem_width/2), + Molecule ss =lookup_l ()->filledbox (Box (Interval (-stem_width/2, stem_width/2), Interval (stem_y[DOWN]*dy, stem_y[UP]*dy))); mol_p->add_molecule (ss); } diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index 0f0a5d27d9..74a0d33fc1 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -8,8 +8,8 @@ */ #include "engraver.hh" -#include "g-staff-side.hh" -#include "g-text-item.hh" +#include "staff-side.hh" +#include "text-item.hh" #include "musical-request.hh" #include "note-head.hh" #include "stem.hh" @@ -18,8 +18,8 @@ class Text_engraver : public Engraver { Link_array<Text_script_req> reqs_; - Link_array<G_staff_side_item> positionings_; - Link_array<G_text_item> texts_; + Link_array<Staff_side_item> positionings_; + Link_array<Text_item> texts_; public: Text_engraver(); VIRTUAL_COPY_CONS(Translator); @@ -74,8 +74,8 @@ Text_engraver::do_process_requests () { Text_script_req * r = reqs_[i]; - G_text_item *text = new G_text_item; - G_staff_side_item *ss = new G_staff_side_item; + Text_item *text = new Text_item; + Staff_side_item *ss = new Staff_side_item; ss->set_victim (text); ss->set_elt_property (script_priority_scm_sym, diff --git a/lily/text-item.cc b/lily/text-item.cc new file mode 100644 index 0000000000..3f19466ee1 --- /dev/null +++ b/lily/text-item.cc @@ -0,0 +1,33 @@ +/* + text-item.cc -- implement Text_item + + source file of the GNU LilyPond music typesetter + + (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl> + + */ + +#include "text-item.hh" +#include "debug.hh" +#include "molecule.hh" +#include "paper-def.hh" +#include "lookup.hh" + +Molecule* +Text_item::do_brew_molecule_p () const +{ + Molecule a= paper_l ()->lookup_l(0)->text (style_str_,text_str_, paper_l ()); + + return new Molecule (a); +} + +Text_item::Text_item () +{ + style_str_ = "roman"; +} + +void +Text_item::do_print () const +{ + DOUT << "text= " << text_str_; +} diff --git a/lily/time-signature-engraver.cc b/lily/time-signature-engraver.cc index 54c6278e97..67eac37314 100644 --- a/lily/time-signature-engraver.cc +++ b/lily/time-signature-engraver.cc @@ -10,7 +10,7 @@ #include "time-signature.hh" #include "command-request.hh" #include "timing-engraver.hh" -#include "engraver-group.hh" +#include "engraver-group-engraver.hh" Time_signature_engraver::Time_signature_engraver() { diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 8c244b705b..2959bb7280 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -50,10 +50,6 @@ Translator_group::check_removal() } } - - - - void Translator_group::add_translator (Translator *trans_p) { diff --git a/ly/engraver.ly b/ly/engraver.ly index 85e811b5e3..4be101d52d 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -13,7 +13,6 @@ StaffContext=\translator { \consists "Bar_engraver"; \consists "Clef_engraver"; \consists "Key_engraver"; - \consists "Local_key_engraver"; \consists "Time_signature_engraver"; \consists "Staff_symbol_engraver"; \consists "Collision_engraver"; @@ -95,6 +94,7 @@ VoiceContext = \translator { \consists "Dynamic_engraver"; % must come before text_engraver. \name Voice ; beamAuto = "1"; + \consists "Local_key_engraver"; \consists "Breathing_sign_engraver"; \consists "Rest_engraver"; @@ -108,17 +108,36 @@ VoiceContext = \translator { % ugh. Order matters here. \consists "Text_engraver"; - \consists "G_script_engraver"; - \consists "G_script_column_engraver"; + \consists "Script_engraver"; + \consists "Script_column_engraver"; \consists "Rhythmic_column_engraver"; \consists "Font_size_engraver"; \consists "Slur_engraver"; \consists "Tie_engraver"; - \consists "Tuplet_engraver"; + \consists "Tuplet_engraver"; + \consists "Grace_position_engraver"; \consists "Skip_req_swallow_translator"; \accepts Thread; % bug if you leave out this! + \accepts Grace; }; +GraceContext=\translator { + \type "Grace_engraver_group"; + \name "Grace"; + \consists "Note_heads_engraver"; + \consists "Stem_engraver"; + \consists "Slur_engraver"; + \consists "Timing_engraver"; %UGH. + \consists "Beam_engraver"; + \consists "Align_note_column_engraver"; + \consists "Font_size_engraver"; + \consists "Rhythmic_column_engraver"; + + fontSize = "-1"; + stemLength = "6.0"; + verticalDirection = "1"; +}; +\translator{\GraceContext} \translator {\VoiceContext} ThreadContext = \translator{ diff --git a/ly/params.ly b/ly/params.ly index 33fabb80ab..8762d5bb87 100644 --- a/ly/params.ly +++ b/ly/params.ly @@ -20,23 +20,24 @@ interbeam4 = (3.0 * \interline - \beam_thickness) / 3.0; % % poor man's array size stem_max = 3.0; -% -stem_length0 = 3.5*\interline; -stem_length1 = 2.5 * \interline; -stem_length2 = 2.0 * \interline; -stem_length3 = 1.5 * \interline; + +% stem stuff measured in staff positions. +stem_length0 = 7.; +stem_length1 = 5.; +stem_length2 = 4.; +stem_length3 = 3.; % only used for beams -minimum_stem_length0 = 0.0; % not used -minimum_stem_length1 = 1.5 * \interline; -minimum_stem_length2 = 1.25 * \interline; -minimum_stem_length3 = 1.0 * \interline; +minimum_stem_length0 = 0.0 ; % not used +minimum_stem_length1 = 3. ; +minimum_stem_length2 = 2.5; +minimum_stem_length3 = 2.0; % stems in unnatural (forced) direction should be shortened, % according to [Roush & Gourlay]. Their suggestion to knock off % a whole staffspace seems a bit drastical: we'll do half. % -forced_stem_shorten0 = 0.5 * \interline; +forced_stem_shorten0 = 1.0; forced_stem_shorten1 = \forced_stem_shorten0; forced_stem_shorten2 = \forced_stem_shorten1; forced_stem_shorten3 = \forced_stem_shorten2; diff --git a/make/out/lelievijver.lsm b/make/out/lelievijver.lsm index 7d8962208c..7f82930eba 100644 --- a/make/out/lelievijver.lsm +++ b/make/out/lelievijver.lsm @@ -1,15 +1,15 @@ Begin3 Titel: LilyPond -Versie: 1.1.50 -Inschrijf datum: 25JUN99 +Versie: 1.1.51 +Inschrijf datum: 28JUN99 Beschrijving: @FLAPTEKST@ Trefwoorden: muziek typezetten midi notatie Auteur: hanwen@stack.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Onderhouden door: hanwen@cs.ruu.nl (Han-Wen Nienhuys) Voornaamste plek: sunsite.unc.edu /pub/Linux/apps - 770k lilypond-1.1.50.tar.gz + 770k lilypond-1.1.51.tar.gz Oorspronkelijke plek: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 770k lilypond-1.1.50.tar.gz + 770k lilypond-1.1.51.tar.gz Copi-eer voorwaarden: GPL End diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 65c7688fa9..1a007b35c3 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,7 +1,7 @@ Begin3 Title: LilyPond -Version: 1.1.50 -Entered-date: 25JUN99 +Version: 1.1.51 +Entered-date: 28JUN99 Description: LilyPond is the GNU Project music typesetter. This program can print beautiful sheet music from a music definition file. It can also play @@ -14,8 +14,8 @@ Author: hanwen@cs.ruu.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 - 770k lilypond-1.1.50.tar.gz + 770k lilypond-1.1.51.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 770k lilypond-1.1.50.tar.gz + 770k lilypond-1.1.51.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index 159a0f9376..3289839bfc 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.1.50 +Version: 1.1.51 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.50.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.51.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond Packager: Han-Wen Nienhuys <hanwen@cs.uu.nl> diff --git a/mudela-mode.el b/mudela-mode.el index 25b9517188..076362af23 100644 --- a/mudela-mode.el +++ b/mudela-mode.el @@ -34,7 +34,7 @@ (let* ((keywords '("alternative" "repeat" "accepts" "accidentals" "break" "bar" "cadenza" "clef" "cm" "consists" "consistsend" "contains" "duration" - "spanrequest" "scmfile" "lyrics" + "spanrequest" "grace" "scmfile" "lyrics" "in" "translator" "context" "key" "maininput" "notes" "musical_pitch" "time" "midi" "mm" "header" "notenames" "octave" "output" "partial" "paper" "plet" "name" diff --git a/mutopia/F.Schubert/AnSylvia.ly b/mutopia/F.Schubert/AnSylvia.ly index 5c6687cd6b..e20b01ace9 100644 --- a/mutopia/F.Schubert/AnSylvia.ly +++ b/mutopia/F.Schubert/AnSylvia.ly @@ -10,7 +10,7 @@ title = "An Sylvia"; } -\version "1.0.16"; +\version "1.0.20"; \include "paper16.ly"; \include "paper13.ly"; @@ -18,8 +18,8 @@ title = "An Sylvia"; pianoRH=\notes \relative c'' { \clef "G"; %1 - <[b,8-.(\pp d-. g-.> <b8-. d-. g-.> <b-. d-. g-.> <)b-. d-. g-.>] - <[b8-. d-. g-.(> <b8-. d-. g-.> <b-. d-. g-.> <)b-. d-. g-.>] + <[b,8-.(\pp d-. g-.> <b-. d-. g-.> <b-. d-. g-.> <)b-. d-. g-.>] + <[b8-. d-. g-.(> <b-. d-. g-.> <b-. d-. g-.> <)b-. d-. g-.>] | %2 <[c d g_"{\it simile}" \< > <c d g> <c d fis> <c d fis>] @@ -33,7 +33,7 @@ pianoRH=\notes \relative c'' { <[d a' b> <d a' b> <d g! b> <d g b>] <[d g a> <d g a> <d fis a> <d fis a>] | %5 - \repeat 2 { + \repeat semi 2 { <[b_. d g( \pp > <b_. d g> <b_. d g> <)b_. d g>] <[b_. d g(> <b_. d g> <b_. d g> <)b_. d g>] | @@ -144,7 +144,7 @@ pianoLH=\notes \relative c { )b4-. [d,8.( d16] )c'4-. [d,8. d16] | %4 d'4-. d,-. d'-. [d,8.( d16 ] - \repeat 2 { + \repeat semi 2 { %5 )g4-. d_. r4 [g8.( g16] | %6 @@ -206,7 +206,7 @@ tune=\notes \relative c'' { \property Voice.dynamicdir = "1" r1 | r1 |r1 | r1 | - \repeat 2 { + \repeat semi 2 { %5 b2. g4 | %6 @@ -393,8 +393,8 @@ Vocals= < > > \paper { - % \paper_thirteen; - \paper_sixteen; + % \paper_thirteen + \paper_sixteen linewidth = 18.0\cm; textheight = 26.0\cm; gourlay_maxmeasures=15.0; diff --git a/mutopia/W.A.Mozart/cadenza.ly b/mutopia/W.A.Mozart/cadenza.ly index 88b7220fd6..ba73aee319 100644 --- a/mutopia/W.A.Mozart/cadenza.ly +++ b/mutopia/W.A.Mozart/cadenza.ly @@ -9,9 +9,7 @@ copyright = "public domain"; %{ Tested Features: cadenza mode - -Ugh.. Wish we had grace notes.... It adds another dimension to this -piece of music. %} +%} \version "1.0.21"; @@ -29,7 +27,7 @@ cad = \notes \relative c' { [e'^"accel" () d c b] [b() c] g-\fermata \bar "empty"; - c, [c_"rubato" e g c] + c, ~ [c^\turn_"rubato" e g c] e4. e8 [g () f_"rit" e d] dis4() e4 @@ -43,11 +41,12 @@ cad = \notes \relative c' { \bar "" ; r8 a [b cis] +% \grace e16 [d16 cis d e] - f4( [ )f16 e d c] + f4 ~ [f16 e d c] b4-\turn \times 2/3 { [ d8 c8 a8] } - g2 + g2~ \bar "" ; [g16 c, e g] [c e, g c] [e g, c e] g4^\fermata @@ -55,11 +54,13 @@ cad = \notes \relative c' { [g8.(_"a tempo" e16 g8. )e16] a4. g8 [f8 e8 d8 c8] g2 d'2-\trill - c4 - }} +% \grace { [c32 d] } + c4 + } } + \score { \notes { \cad } - \midi { \tempo 4 = 90; } \paper { } + \midi { \tempo 4 = 90; } } diff --git a/scm/lily.scm b/scm/lily.scm index 682a0ae46c..660166e878 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -612,3 +612,34 @@ ((null? alist) #t) (set! ret-ls (cons (fn (car (car alist)) (cdr (car alist))) ret-ls))))) + +;;;; print a SCM expression. Isn't this part of the std lib? + +(define (scmlist->string exp) + (cond + ((pair? (cdr exp)) (string-append (scm->string (car exp)) " " (scmlist->string (cdr exp)))) + ((eq? '() (cdr exp)) (string-append (scm->string (car exp)) ")")) + (else (string-append (scm->string (car exp)) " . " (scm->string (cdr exp)) ")")) + )) + +(define (scm->string exp) + (cond + ((pair? exp) (string-append "(" (scmlist->string exp))) + ((number? exp) (number->string exp)) + ((symbol? exp) (symbol->string exp)) + ((string? exp) (string-append "\"" exp "\"")) + )) + +(define (test-scm->string) +(list (scmlist->string '(a)) +(scmlist->string '(a b)) +(scmlist->string '(a b . c)) + + +(scm->string '(a)) +(scm->string '(a b )) +(scm->string '(a b . c)) +(scm->string '(a b (c . d))) +(scm->string '(a "bla" (c . 1.5))) +) +) diff --git a/scripts/abc-2-ly.py b/scripts/abc-2-ly.py index c3b28363ae..342b3d2d2c 100644 --- a/scripts/abc-2-ly.py +++ b/scripts/abc-2-ly.py @@ -470,12 +470,11 @@ def try_parse_chord_delims (str): def try_parse_grace_delims (str): if str and str[0] == '{': str = str[1:] - sys.stderr.write ("warning: expanding grace notes\n") - print '\\tiny ' + print '\\grace { ' if str and str[0] == '}': str = str[1:] - print '\\normalsize ' + print '}' return str