]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/params.ly
release: 1.3.92
[lilypond.git] / ly / params.ly
index e38599966666d3293d9479620c4db051d122b25c..5e89fd3f35b4e9de43e11c47362951e632b86768 100644 (file)
 % params.ly
 % generic paper parameters
 
-paperfile = \papersize + ".ly";
-% paperfile = "a4.ly";
-\include \paperfile;
-\include "paper.ly";
+%{
 
-interline = \staffheight / 4.0;
+TODO:
 
+* cleanup
+* use elt properties, iso. paper variables.
 
-stafflinethickness = \interline / 10.0;
+%}
 
-% urg, need grace_ versions of these too?
-beam_thickness = 0.52 * (\interline - \stafflinethickness);
 
-#'beam-thickness = \beam_thickness;  %% UGR
+papersizename = \papersize ;
 
+paperfile = \papersize + ".ly";
+% paperfile = "a4.ly";
+\include \paperfile;
+\include "paper.ly";
 
-interbeam = (2.0 * \interline + \stafflinethickness - \beam_thickness) / 2.0;
-interbeam4 = (3.0 * \interline - \beam_thickness) / 3.0;
+staffspace = \staffheight / 4.0;
+stafflinethickness = \staffspace / 10.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)) 
 
-#'Stem_tremolo::beam-width = 1.5 * \quartwidth ; 
+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):
 
-#'Clef_item::visibility-lambda = #postbreak-only-visibility
-#'Key_item::visibility-lambda = #postbreak-only-visibility
-#'Breathing_sign::visibility-lambda = #non-postbreak-visibility
+   2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
 
-% 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;
+   { using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) }
+   { assuming: SHORTEST <= 1/8 }
 
-%{
-dit(code(slur_x_gap)) Horizontal space between note and slur.  Set to
-code(\interline / 5) by default.  
+               = arithmetic_multiplier *
+              ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
 
-%}
-% 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;
+               = arithmetic_multiplier * arithmetic_basicspace
 
-%{
-Like beams, slurs often aren't as steep as the notes they encompass.
-This sets the amount of damping.
-%}
-% 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;
-% OSU: tie gap == slur gap
-tie_x_gap = \slur_x_gap;
-tie_y_gap = 0.25 * \interline;
-% length of a tie that's a staffspace high
-tie_staffspace_length = 4.0 * \interline;
-
-% ugh: rename to bow (in bezier.cc and fonts.doc too...)
-
-% used to be 1.4 .
-slur_thickness = 1.2 * \stafflinethickness;
-tie_thickness = 1.2 * \stafflinethickness;
+   { choose: arithmetic_multiplier = 1.0*quartwidth (why?)}
 
-%{
- Specifies the maximum height of slurs.
-%}
-slur_height_limit = \staffheight;
+               = quartwidth * arithmetic_basicspace
 
+   =>         
 
-%{
-Specifes the ratio of slur hight to slur width
-to aim for.  Default value is 0.3. 
-%}
+   arithmetic_basicspace = 2/1 = 2
 
-% 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;
+If you want to space your music wider, use something like:
 
-% ugh
-notewidth = (\quartwidth + \wholewidth) / 2.0;
+   arithmetic_basicspace = 4.;
 
-gourlay_energybound = 100000.;
-%{
-Maximum number of measures per line to try when using Gourlay
-method. 
 %}
-gourlay_maxmeasures = 10.;
-
-
-%{ 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 = 3.0 * \stafflinethickness;
-bar_thinkern = 3.0 * \stafflinethickness;
-barthick_thick = 6.0* \stafflinethickness;
-barthick_thin = 1.6*\stafflinethickness;
-barthick_score = 1.6*\stafflinethickness;
-
-bracket_arch_thick = \interline / 3.0;
-bracket_width = 2.0 * \interline;
-bracket_thick = 2.0 * \stafflinethickness;
-bracket_arch_height = 1.5 * \interline;
-bracket_arch_width = \bracket_arch_height;
-bracket_arch_angle = 50.0;
+% 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;
 
-tuplet_spanner_gap = 2.0 * \interline;
-tuplet_thick = 1.0*\stafflinethickness;
-volta_thick = 1.6*\stafflinethickness;
-volta_spanner_height = 2.0 *\interline;
 
-% relative thickness of thin lines  1.6 : 1 : 0.8
-stemthickness = 0.8*\stafflinethickness;
-rulethickness = \stafflinethickness;
 
+% 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;
 
-extender_height = 0.8*\stafflinethickness;
 
-hyphen_thickness = 0.05*\font_normal;
-hyphen_height = 0.2*\font_normal;
-hyphen_minimum_length = 0.25*\font_normal;
+% vertical space between lines of text.
+line_kern = \staffspace;
 
-% Multi-measure rests
-multi_measure_rest_x_minimum = 2.5*\staffheight;
-multi_measure_rest_padding = 2.0 *\interline;
-multi_measure_rest_expand_limit = 10.0;
-
-% chop off this much when next to pp / ff sign.
-crescendo_shorten = 4.0 * \interline;
-crescendo_thickness   = \stafflinethickness;
-crescendo_height = 0.666 * \interline;
-
-% in internote.
-restcollision_minimum_dist = 3.0;
-restcollision_minimum_beamdist = 1.5;
-
-
-% unit for note collision resolving
-collision_note_width = \notewidth;     %ugh.
-
-% deprecated!
-postBreakPadding = 0.0;
 
 % optical correction amount.
-stemSpacingCorrection = 0.5*\interline;
+stemSpacingCorrection = 0.5*\staffspace;
 
 
 %{
@@ -209,7 +109,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
@@ -219,26 +119,24 @@ will cause scores to be set looser
 
 compression_energy_factor = 0.6;
 
-% if stem is on middle line, choose this direction.
-stem_default_neutral_direction = 1.0;
-
-% in interline
-articulation_script_padding_default = 1.0;
-
-% Backward compatibility -- has no function; 
-Gourlay = 0.0;
-Wordwrap =0.0;
-
-\include "engraver.ly";
+\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 }
 
 
-#'margin-shape = #'()
 
 
-% 
-#'Local_key_item::left-padding = #'0.2
-#'Local_key_item::right-padding = #'0.4
 
-#'Staff_symbol::staff-space = \interline ;
-#'Staff_symbol::line-count = #5