X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fparams.ly;h=5e89fd3f35b4e9de43e11c47362951e632b86768;hb=7181c77e5d46a271f5f76e99bee7f844611e23e4;hp=33fabb80abc481860820e0c567e27e460eb42bf9;hpb=a1d72ee4c631e40978415d31666337beaebceabc;p=lilypond.git diff --git a/ly/params.ly b/ly/params.ly index 33fabb80ab..5e89fd3f35 100644 --- a/ly/params.ly +++ b/ly/params.ly @@ -1,154 +1,142 @@ % params.ly % generic paper parameters +%{ + +TODO: + +* cleanup +* use elt properties, iso. paper variables. + +%} + + +papersizename = \papersize ; + paperfile = \papersize + ".ly"; % paperfile = "a4.ly"; \include \paperfile; \include "paper.ly"; -interline = \staffheight / 4.0; - - -% thickness of stafflines -staffline = \interline / 10.0; - -beam_thickness = 0.52 * (\interline - \staffline); -interbeam = (2.0 * \interline + \staffline - \beam_thickness) / 2.0; -interbeam4 = (3.0 * \interline - \beam_thickness) / 3.0; - -% stems and beams -% -% 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; - -% 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; - -% 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_shorten1 = \forced_stem_shorten0; -forced_stem_shorten2 = \forced_stem_shorten1; -forced_stem_shorten3 = \forced_stem_shorten2; - -% 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; -% [Ross]: majority -beam_dir_algorithm = \MAJORITY; - -% catch suspect beam slopes, set slope to zero if -% outer stem is lengthened more than -beam_lengthened = 0.2 * \interline; -% and slope is running away steeper than -beam_steep_slope = 0.2 / 1.0; - -% OSU: suggested gap = ss / 5; -slur_x_gap = \interline / 5.0; -slur_x_minimum = 3.0 * \interline; - -% slope damping: keep dy/dx < slur_slope_damping -slur_slope_damping = 0.6; - -% dy_slur := dy_music * factor -slur_slope_follow_music_factor = 0.8; - -tie_x_minimum = \slur_x_minimum; -tie_x_gap = \slur_x_gap; -tie_slope_damping = 0.8; - -% ugh: rename to bow (in bezier.cc and fonts.doc too...) -% slur_thickness = 1.8 * \staffline; -slur_thickness = 1.4 * \staffline; -slur_height_limit = \staffheight; - -% 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; - -% ugh -barsize = \staffheight; -rulethickness = \staffline; - -gourlay_energybound = 100000.; +staffspace = \staffheight / 4.0; +stafflinethickness = \staffspace / 10.0; + %{ -The following bounds the number of measures -on a line. Decreasing it greatly reduces computation time -%} -gourlay_maxmeasures = 10.; -castingalgorithm = \Gourlay; +The space taken by a note is determined by the formula + + SPACE = arithmetic_multiplier * ( C + log2 (TIME) )) + +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): + + 2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) )) + + { using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) } + { assuming: SHORTEST <= 1/8 } + + = arithmetic_multiplier * + ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) ) + + = arithmetic_multiplier * arithmetic_basicspace + + { choose: arithmetic_multiplier = 1.0*quartwidth (why?)} + + = quartwidth * arithmetic_basicspace -%{ 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; + arithmetic_basicspace = 2/1 = 2 + +If you want to space your music wider, use something like: + + arithmetic_basicspace = 4.; %} +% We use 0.9*\quartwidth, because 1.0 seems to wide. +% quartwidth == 1.32 * staffspace +% We don't adjust arithmetic_basicspace accordingly (why not?) +arithmetic_multiplier = 0.9 * 1.32 * \staffspace ; +arithmetic_basicspace = 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; -bar_kern = 3.0 * \staffline; -bar_thinkern = 3.0 * \staffline; -barthick_thick = 6.0* \staffline; -barthick_thin = 1.6*\staffline; -barthick_score = 1.6*\staffline; -tuplet_thick = 1.0*\staffline; -volta_thick = 1.6*\staffline; +% vertical space between lines of text. +line_kern = \staffspace; -% relative thickness of thin lines 1.6 : 1 : 0.8 -stemthickness = 0.8*\staffline; -rulethickness = \staffline; +% optical correction amount. +stemSpacingCorrection = 0.5*\staffspace; -extender_height = 0.8*\staffline; -% Multi-measure rests -mmrest_x_minimum = 2.0*\staffheight; +%{ + relative strength of space following breakable columns (eg. prefatory matter) + %} +breakable_column_space_strength = 2.0; + +% space after inline clefs and such get this much stretched +decrease_nonmus_spacing_factor = 1.0 ; +%{ + space before musical columns (eg. taken by accidentals) get this much + stretched when they follow a musical column, in absence of grace notes. + + 0.0 means no extra space (accidentals are ignored) +%} +musical_to_musical_left_spacing_factor = 0.4; + +%{ + stretch space this much if there are grace notes before the column +%} +before_grace_spacing_factor = 1.2; + +%{ +If columns do not have spacing information set, set it to this much +%} +loose_column_distance = 2.0 * \staffspace; + +%{ +Relative cost of compressing (vs. stretching). Increasing this +will cause scores to be set looser +. +%} -% chop off this much when next to pp / ff sign. -crescendo_shorten = 4.0 * \interline; +compression_energy_factor = 0.6; -% in internote. -restcollision_minimum_dist = 3.0; -restcollision_minimum_beamdist = 1.5; +\translator { \NoteNamesContext } +\translator { \ScoreContext } +\translator { \ChoirStaffContext} +\translator { \GraceContext} +\translator { \RhythmicStaffContext} +\translator { \StaffContext } +\translator { \VoiceContext} +\translator { \StaffGroupContext } +\translator { \ChordNameContext } +\translator { \ChordNameVoiceContext} +\translator { \GrandStaffContext} +\translator { \LyricsContext } +\translator { \ThreadContext} +\translator { \PianoStaffContext} +\translator { \LyricsVoiceContext } -% deprecated! -postBreakPadding = 0.0; -stemSpacingCorrection = 0.5*\interline; -\include "engraver.ly";