X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fparams.ly;h=e0382e13e8f8a301342a74c74190fe8f2edcc40a;hb=a2441ac8c77d09651f4418bdb96bffea43066108;hp=beb538c9b44119f59b82af42e3c528cbd1085d93;hpb=685452c8675e89a84692420fb9891756d318e771;p=lilypond.git diff --git a/ly/params.ly b/ly/params.ly index beb538c9b4..e0382e13e8 100644 --- a/ly/params.ly +++ b/ly/params.ly @@ -1,182 +1,148 @@ % params.ly % generic paper parameters +#'staff-height = \staffheight; + paperfile = \papersize + ".ly"; % paperfile = "a4.ly"; \include \paperfile; \include "paper.ly"; -interline = \staffheight / 4.0; +staffspace = \staffheight / 4.0; +stafflinethickness = \staffspace / 10.0; +% deprecated +interline = \staffspace; -stafflinethickness = \interline / 10.0; % urg, need grace_ versions of these too? -beam_thickness = 0.52 * (\interline - \stafflinethickness); -interbeam = (2.0 * \interline + \stafflinethickness - \beam_thickness) / 2.0; -interbeam4 = (3.0 * \interline - \beam_thickness) / 3.0; - -% stems and beams -% -% poor man's array size -stem_max = 3.0; - -%{ Specify length of stems for notes in the staff -that don't have beams. - Measured in staff positions. -%} -stem_length0 = 7.; -stem_length1 = 5.; -stem_length2 = 4.; -stem_length3 = 3.; +beam_thickness = 0.52 * (\staffspace - \stafflinethickness); + +#'beam-thickness = \beam_thickness; %% UGR + + +interbeam = (2.0 * \staffspace + \stafflinethickness - \beam_thickness) / 2.0; +interbeam4 = (3.0 * \staffspace - \beam_thickness) / 3.0; %{ The space taken by a note is determined by the formula -arithmetic_multiplier * ( c + log2 (time) )) + SPACE = arithmetic_multiplier * ( C + log2 (TIME) )) -where code(time) is the amount of time a note occupies. The value -of code(c) is chosen such that the smallest space within a measure is -arithmetic_basicspace. The smallest space is the one following the -shortest note in the measure. Typically arithmetic_basicspace is set -to the width of a quarter note head. -%} -arithmetic_basicspace = 2.; -arithmetic_multiplier = 0.9 * \quartwidth ; +where TIME is the amount of time a note occupies. The value of C is +chosen such that the smallest space within a measure is +arithmetic_basicspace: + C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) +The smallest space is the one following the shortest note in the +measure, or the space following a hypothetical 1/8 note. Typically +arithmetic_basicspace is set to a value so that the shortest note +takes about two noteheads of space (ie, is followed by a notehead of +space): -% urg. -% if only these ugly arrays were scm, -% we could override them in the Grace context -grace_factor = 0.8; -grace_stem_length0 = \stem_length0 * \grace_factor; -grace_stem_length1 = \stem_length1 * \grace_factor; -grace_stem_length2 = \stem_length2 * \grace_factor; -grace_stem_length3 = \stem_length3 * \grace_factor; + 2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) )) -% only used for beams -minimum_stem_length0 = 0.0 ; % not used -minimum_stem_length1 = 3. ; -minimum_stem_length2 = 2.5; -minimum_stem_length3 = 2.0; + { using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) } + { assuming: SHORTEST <= 1/8 } -grace_minimum_stem_length0 = 0.0 ; % not used -grace_minimum_stem_length1 = \minimum_stem_length1 * \grace_factor; -grace_minimum_stem_length2 = \minimum_stem_length2 * \grace_factor; -grace_minimum_stem_length3 = \minimum_stem_length3 * \grace_factor; + = arithmetic_multiplier * + ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) ) -%{ - 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. -%} + = arithmetic_multiplier * arithmetic_basicspace -forced_stem_shorten0 = 1.0; -forced_stem_shorten1 = \forced_stem_shorten0; -forced_stem_shorten2 = \forced_stem_shorten1; -forced_stem_shorten3 = \forced_stem_shorten2; + { choose: arithmetic_multiplier = 1.0*quartwidth (why?)} -% don't shorten grace stems, always up -grace_forced_stem_shorten0 = 0.; -grace_forced_stem_shorten1 = \grace_forced_stem_shorten0; -grace_forced_stem_shorten2 = \grace_forced_stem_shorten1; -grace_forced_stem_shorten3 = \grace_forced_stem_shorten2; + = quartwidth * arithmetic_basicspace -% there are several ways to calculate the direction of a beam -% -% * MAJORITY : number count of up or down notes -% * MEAN : mean centre distance of all notes -% * MEDIAN : mean centre distance weighted per note -% -% enum Dir_algorithm { DOWN=-1, UP=1, MAJORITY=2, MEAN, MEDIAN }; -% -DOWN = -1.0; -UP = 1.0; -MAJORITY = 2.0; -MEAN = 3.0; -MEDIAN = 4.0; - -#'beam_dir_algorithm = #'majority -#'slope_quantisation = #'normal + => + arithmetic_basicspace = 2/1 = 2 + +If you want to space your music wider, use something like: + + arithmetic_basicspace = 4.; -%{ -dit(code(beam_dir_algorithm)) Specify algorithm for determining -whether beams go up or down. It is real valued. If set to 2.0 then -majority selection is used. If set to 3.0, then mean selection is -used based on the mean center distance. If set to 4.0 then median -selection is used, based on the median center distance. %} +% We use 0.9*\quartwidth, because 1.0 seems to wide. +% We don't adjust arithmetic_basicspace accordingly (why not?) +arithmetic_multiplier = 0.9 * \quartwidth ; +arithmetic_basicspace = 2.0; + + +#'Stem_tremolo::beam-width = 1.5 * \quartwidth ; -% [Ross]: majority -beam_dir_algorithm = \MAJORITY; +#'Left_edge_item::visibility-lambda = #begin-of-line-visible +#'Clef_item::visibility-lambda = #begin-of-line-visible +#'Key_item::visibility-lambda = #begin-of-line-visible +#'Breathing_sign::visibility-lambda = #begin-of-line-invisible % catch suspect beam slopes, set slope to zero if % outer stem is lengthened more than -beam_lengthened = 0.2 * \interline; +beam_lengthened = 0.2 * \staffspace; % and slope is running away steeper than beam_steep_slope = 0.2 / 1.0; + + %{ -dit(code(slur_x_gap)) Horizontal space between note and slur. Set to -code(\interline / 5) by default. + Slur parameters. + + See Documentation/programmer/fonts.doc +%} +% Height-limit (h_inf) = factor * staff_space +slur_height_limit_factor = 2.0; +slur_ratio = 1.0 / 3.0; + +slur_thickness = 1.2 * \stafflinethickness; + +slur_force_blowfit = 0.5; +slur_beautiful = 0.5; + +%{ +Horizontal space between centre of notehead and slur. %} % OSU: suggested gap = ss / 5; -slur_x_gap = \interline / 5.0; -slur_y_gap = 0.25 * \interline; -slur_y_free = 0.75 * \interline; -slur_x_minimum = 1.5 * \interline; +slur_x_gap = \staffspace / 5.0; +slur_y_gap = 0.25 * \staffspace; +slur_y_free = 0.75 * \staffspace; +slur_x_minimum = 1.5 * \staffspace; + + +% The constants that define the valid areas for the middle control points +% Used in de_uglyfy. Bit empirical. +bezier_control1 = 1.5; +bezier_control2 = 0.8; +bezier_control3 = -2.0; + +% URG: the magic constants for area asymmetry +bezier_pct_c0 = -0.2; +bezier_pct_c3 = 0.000006; +bezier_pct_out_max = 0.8; +bezier_pct_in_max = 1.2; +bezier_area_steps = 1.0; + %{ -Like beams, slurs often aren't as steep as the notes they encompass. -This sets the amount of damping. + Tie parameters %} -% slope damping: keep dy/dx < slur_slope_damping -slur_slope_damping = 0.3; -slur_interstaff_slope_damping = 0.6; -% height damping: keep h/dx < slur_height_damping -slur_height_damping = 0.4; -slur_interstaff_height_damping = 0.5; -% snap to stem if slur ends closer to stem than -slur_snap_to_stem = 1.75 * \interline; -slur_interstaff_snap_to_stem = 2.5 * \interline; -% maximum dy change allowed by snapping -slur_snap_max_slope_change = 0.5; -slur_interstaff_snap_max_slope_change = 0.5; - - - -tie_x_minimum = \interline + \slur_x_minimum; + +tie_height_limit_factor = \slur_height_limit_factor; +tie_ratio = \slur_ratio; +tie_thickness = \slur_thickness; + +tie_x_minimum = \staffspace + \slur_x_minimum; % OSU: tie gap == slur gap tie_x_gap = \slur_x_gap; -tie_y_gap = 0.25 * \interline; +tie_y_gap = 0.25 * \staffspace; % length of a tie that's a staffspace high -tie_staffspace_length = 4.0 * \interline; +tie_staffspace_length = 4.0 * \staffspace; -% ugh: rename to bow (in bezier.cc and fonts.doc too...) -% slur_thickness = 1.8 * \stafflinethickness; -slur_thickness = 1.4 * \stafflinethickness; - -%{ - Specifies the maximum height of slurs. -%} -slur_height_limit = \staffheight; +tie_staffline_clearance = 2.0 *\tie_thickness; -%{ -Specifes the ratio of slur hight to slur width -to aim for. Default value is 0.3. -%} -% slur_ratio = 0.3; -% try bit flatter slurs -slur_ratio = 0.25; -slur_clip_ratio = 1.2; -slur_clip_height = 3.0 * \staffheight; -slur_clip_angle = 100.0; -slur_rc_factor = 2.4; % ugh notewidth = (\quartwidth + \wholewidth) / 2.0; @@ -189,14 +155,16 @@ method. gourlay_maxmeasures = 10.; +line_kern = \staffspace; + %{ Ross. page 151 lists these values, but we think that thick lines and kernings are too thick. -bar_kern = 0.5 * \interline; -bar_thinkern = 0.75 * \interline; -barthick_thick = 0.5* \interline; -barthick_score = 0.13333* \interline; -barthick_thin = 0.1*\interline; +bar_kern = 0.5 * \staffspace; +bar_thinkern = 0.75 * \staffspace; +barthick_thick = 0.5* \staffspace; +barthick_score = 0.13333* \staffspace; +barthick_thin = 0.1*\staffspace; %} @@ -206,10 +174,17 @@ barthick_thick = 6.0* \stafflinethickness; barthick_thin = 1.6*\stafflinethickness; barthick_score = 1.6*\stafflinethickness; -tuplet_spanner_gap = 2.0 * \interline; +bracket_arch_thick = \staffspace / 4.0; +bracket_width = 2.0 * \staffspace; +bracket_thick = \staffspace / 4.0; +bracket_arch_height = 1.5 * \staffspace; +bracket_arch_width = \bracket_arch_height; +bracket_arch_angle = 50.0; + +tuplet_spanner_gap = 2.0 * \staffspace; tuplet_thick = 1.0*\stafflinethickness; volta_thick = 1.6*\stafflinethickness; -volta_spanner_height = 2.0 *\interline; +volta_spanner_height = 2.0 *\staffspace; % relative thickness of thin lines 1.6 : 1 : 0.8 stemthickness = 0.8*\stafflinethickness; @@ -223,13 +198,16 @@ hyphen_height = 0.2*\font_normal; hyphen_minimum_length = 0.25*\font_normal; % Multi-measure rests -mmrest_x_minimum = 1.4*\staffheight; - +multi_measure_rest_x_minimum = 2.5*\staffheight; +multi_measure_rest_padding = 2.0 *\staffspace; +multi_measure_rest_expand_limit = 10.0; % chop off this much when next to pp / ff sign. -crescendo_shorten = 4.0 * \interline; +crescendo_shorten = 4.0 * \staffspace; crescendo_thickness = \stafflinethickness; -crescendo_height = 0.666 * \interline; +crescendo_height = 0.666 * \staffspace; +crescendo_dash_thickness = 1.2*\stafflinethickness; +crescendo_dash = 4.0*\staffspace; % in internote. restcollision_minimum_dist = 3.0; @@ -243,7 +221,7 @@ collision_note_width = \notewidth; %ugh. postBreakPadding = 0.0; % optical correction amount. -stemSpacingCorrection = 0.5*\interline; +stemSpacingCorrection = 0.5*\staffspace; %{ @@ -270,7 +248,7 @@ before_grace_spacing_factor = 1.2; %{ If columns do not have spacing information set, set it to this much %} -loose_column_distance = 2.0 * \interline; +loose_column_distance = 2.0 * \staffspace; %{ Relative cost of compressing (vs. stretching). Increasing this @@ -283,7 +261,7 @@ compression_energy_factor = 0.6; % if stem is on middle line, choose this direction. stem_default_neutral_direction = 1.0; -% in interline +% in staffspace articulation_script_padding_default = 1.0; % Backward compatibility -- has no function; @@ -293,4 +271,13 @@ Wordwrap =0.0; \include "engraver.ly"; +#'margin-shape = #'() + + +% +#'Local_key_item::left-padding = #'0.2 +#'Local_key_item::right-padding = #'0.4 + +#'Staff_symbol::staff-space = \staffspace ; +#'Staff_symbol::line-count = #5