X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fdefine-context-properties.scm;h=08440d1a093f1ae60fb6137ce49322b941da7088;hb=058370efc7e9710f149d0f444328bb1fcd7bdec1;hp=5853474179985733fa8675e8c309f4b5fab7847d;hpb=8e4928b9fefc6e68ecef9b0bb3316b2b4203f9cb;p=lilypond.git diff --git a/scm/define-context-properties.scm b/scm/define-context-properties.scm index 5853474179..06f307b843 100644 --- a/scm/define-context-properties.scm +++ b/scm/define-context-properties.scm @@ -1,6 +1,6 @@ ;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; Copyright (C) 1998--2011 Han-Wen Nienhuys +;;;; Copyright (C) 1998--2014 Han-Wen Nienhuys ;;;; Jan Nieuwenhuizen ;;;; ;;;; LilyPond is free software: you can redistribute it and/or modify @@ -21,9 +21,9 @@ (define (translator-property-description symbol type? description) (if (not (and - (symbol? symbol) - (procedure? type?) - (string? description))) + (symbol? symbol) + (procedure? type?) + (string? description))) (throw 'init-format-error)) @@ -44,13 +44,25 @@ ;; TODO FIXME + (accidentalGrouping ,symbol? "If set to @code{'voice}, accidentals +on the same note in different octaves may be horizontally staggered +if in different voices.") (aDueText ,markup? "Text to print at a unisono passage.") + (additionalPitchPrefix ,string? "Text with which to prefix +additional pitches within a chord name.") (alignAboveContext ,string? "Where to insert newly created context in vertical alignment.") (alignBassFigureAccidentals ,boolean? "If true, then the accidentals are aligned in bass figure context.") (alignBelowContext ,string? "Where to insert newly created context in vertical alignment.") + (alternativeNumberingStyle ,symbol? "The style of an alternative's bar +numbers. Can be @code{numbers} for going back to the same number or +@code{numbers-with-letters} for going back to the same number with letter +suffixes. No setting will not go back in measure-number time.") + (alternativeRestores ,symbol-list? "Timing variables that are +restored to their value at the end of the first alternative in +subsequent alternatives.") (associatedVoice ,string? "Name of the @code{Voice} that has the melody for this @code{Lyrics} line.") (autoAccidentals ,list? "List of different ways to typeset an @@ -98,7 +110,7 @@ printed. @code{(#t . #f)} does not make sense. @end table") (autoBeamCheck ,procedure? "A procedure taking three -arguments, @var{context}, @var{dir} [start/stop (-1 or 1)], and +arguments, @var{context}, @var{dir} [start/@/stop (-1 or 1)], and @var{test} [shortest note in the beam]. A non-@code{#f} return value starts or stops the auto beam.") (autoBeaming ,boolean? "If set to true then beams are generated @@ -118,9 +130,43 @@ count if this property is unset.") each note.") (barCheckSynchronize ,boolean? "If true then reset @code{measurePosition} when finding a bar check.") - (barNumberVisibility ,procedure? "A Procedure that takes an -integer and returns whether the corresponding bar number should be -printed.") + (barNumberFormatter ,procedure? "A procedure that takes a bar +number, measure position, and alternative number and returns a markup +of the bar number to print.") + (barNumberVisibility ,procedure? "A procedure that takes a bar +number and a measure position and returns whether the corresponding +bar number should be printed. Note that the actual print-out of +bar numbers is controlled with the @code{break-visibility} property. + +The following procedures are predefined: + +@table @code +@item all-bar-numbers-visible +Enable bar numbers for all bars, including the first one and broken +bars (which get bar numbers in parentheses). + +@item first-bar-number-invisible +Enable bar numbers for all bars (including broken bars) except the +first one. If the first bar is broken, it doesn't get a bar number +either. + +@item first-bar-number-invisible-save-broken-bars +Enable bar numbers for all bars (including broken bars) except the +first one. A broken first bar gets a bar number. + +@item first-bar-number-invisible-and-no-parenthesized-bar-numbers +Enable bar numbers for all bars except the first bar and broken bars. +This is the default. + +@item (every-nth-bar-number-visible @var{n}) +Assuming @var{n} is value@tie{}2, for example, this enables bar numbers +for bars 2, 4, 6, etc. + +@item (modulo-bar-number-visible @var{n} @var{m}) +If bar numbers 1, 4, 7, etc., should be enabled, @var{n}@tie{}(the modulo) +must be set to@tie{}3 and @var{m}@tie{}(the division remainder) to@tie{}1. +@end table") + (baseMoment ,ly:moment? "Smallest unit of time that will stand on its own as a subdivided section.") (bassFigureFormatFunction ,procedure? "A procedure that is @@ -132,6 +178,8 @@ apply for the down staff of @code{PianoStaff}. Used by @code{\\autochange}.") (beamExceptions ,list? "An alist of exceptions to autobeam rules that normally end on beats.") + (beamHalfMeasure ,boolean? "Whether to allow a beam to begin +halfway through the measure in triple time, which could look like 6/8.") (beatStructure ,list? "List of @code{baseMoment}s that are combined to make beats.") @@ -145,9 +193,12 @@ exceptions. Contains @code{(@var{chord} . (@var{prefix-markup} @var{suffix-markup}))} entries.") (chordNameFunction ,procedure? "The function that converts lists of pitches to chord names.") - (chordNameLowercaseMinor ,boolean? "Downcase roots of minor chords?") + (chordNameLowercaseMinor ,boolean? "Downcase roots of minor chords?") (chordNameSeparator ,markup? "The markup object used to separate parts of a chord name.") + (slashChordSeparator ,markup? "The markup object used to separate +a chord name from its root note in case of inversions or slash +chords.") (chordNoteNamer ,procedure? "A function that converts from a pitch object to a text markup. Used for single pitches.") (chordPrefixSpacer ,number? "The space added between the root @@ -155,12 +206,30 @@ symbol and the prefix of a chord name.") (chordRootNamer ,procedure? "A function that converts from a pitch object to a text markup. Used for chords.") (clefGlyph ,string? "Name of the symbol within the music font.") - (clefOctavation ,integer? "Add this much extra octavation. + (clefTransposition ,integer? "Add this much extra transposition. Values of 7 and -7 are common.") + (clefTranspositionFormatter ,procedure? "A procedure that takes the +Transposition number as a string and the style as a symbol and returns a +markup.") + (clefTranspositionStyle ,symbol? "Determines the way the ClefModifier +grob is displayed. Possible values are @samp{default}, @samp{parenthesized} +and @samp{bracketed}.") (clefPosition ,number? "Where should the center of the clef symbol go, measured in half staff spaces from the center of the staff.") (completionBusy ,boolean? "Whether a completion-note head is playing.") + (completionFactor ,rational-or-procedure? +"When @code{Completion_heads_engraver} and +@code{Completion_rest_engraver} need to split a note or rest with a +scaled duration, such as @code{c2*3}, this specifies the scale factor +to use for the newly-split notes and rests created by the engraver. + +If @code{#f}, the completion engraver uses the scale-factor of +each duration being split. + +If set to a callback procedure, that procedure is called with the +context of the completion engraver, and the duration to be split.") + (completionUnit ,ly:moment? "Sub-bar unit of completion.") (connectArpeggios ,boolean? "If set, connect arpeggios across piano staff.") (countPercentRepeats ,boolean? "If set, produce counters for @@ -175,8 +244,14 @@ a hairpin crescendo is used.") (crescendoText ,markup? "The text to print at start of non-hairpin crescendo, i.e., @samp{cresc.}.") (cueClefGlyph ,string? "Name of the symbol within the music font.") - (cueClefOctavation ,integer? "Add this much extra octavation. + (cueClefTransposition ,integer? "Add this much extra transposition. Values of 7 and -7 are common.") + (cueClefTranspositionFormatter ,procedure? "A procedure that +takes the Transposition number as a string and the style as a symbol +and returns a markup.") + (cueClefTranspositionStyle ,symbol? "Determines the way the ClefModifier +grob is displayed. Possible values are @samp{default}, @samp{parenthesized} +and @samp{bracketed}.") (cueClefPosition ,number? "Where should the center of the clef symbol go, measured in half staff spaces from the center of the staff.") @@ -197,6 +272,8 @@ This variable is read by @rinternals{Timing_translator} at (defaultStrings ,list? "A list of strings to use in calculating frets for tablatures and fretboards if no strings are provided in the notes for the current moment.") + (doubleRepeatSegnoType ,string? "Set the default bar line for +the combinations double repeat with segno. Default is @samp{:|.S.|:}.") (doubleRepeatType ,string? "Set the default bar line for double repeats.") (doubleSlurs ,boolean? "If set, two slurs are created for every @@ -213,20 +290,22 @@ the symbol @samp{hihat}) as keys, and a list @code{(@var{notehead-style} @var{script} @var{vertical-position})} as values.") - + (endRepeatSegnoType ,string? "Set the default bar line for the +combinations ending of repeat with segno. Default is @samp{:|.S}.") + (endRepeatType ,string? "Set the default bar line for the ending +of repeats.") (explicitClefVisibility ,vector? "@samp{break-visibility} function for clef changes.") (explicitCueClefVisibility ,vector? "@samp{break-visibility} function for cue clef changes.") (explicitKeySignatureVisibility ,vector? "@samp{break-visibility} function for explicit key changes. @samp{\\override} of the -@code{break-visibility} property will set the visibility for normal -(i.e., at the start of the line) key signatures.") +@code{break-visibility} property will set the visibility for +normal (i.e., at the start of the line) key signatures.") (extendersOverRests ,boolean? "Whether to continue extenders as they cross a rest.") (extraNatural ,boolean? "Whether to typeset an extra natural sign -before accidentals changing from a non-natural to another -non-natural.") +before accidentals that reduce the effect of a previous alteration.") (figuredBassAlterationDirection ,ly:dir? "Where to put alterations @@ -239,7 +318,7 @@ for a bass figure.") (figuredBassPlusDirection ,ly:dir? "Where to put plus signs relative to the main figure.") (fingeringOrientations ,list? "A list of symbols, containing -@samp{left}, @samp{right}, @samp{up} and/or @samp{down}. This list +@samp{left}, @samp{right}, @samp{up} and/@/or @samp{down}. This list determines where fingerings are put relative to the chord being fingered.") (firstClef ,boolean? "If true, create a new clef when starting a @@ -247,7 +326,7 @@ staff.") (followVoice ,boolean? "If set, note heads are tracked across staff switches by a thin line.") (fontSize ,number? "The relative size of all grobs in a context.") - (forbidBreak ,boolean? "If set to @code{##t}, prevent a line break + (forbidBreak ,boolean? "If set to @code{#t}, prevent a line break at this point.") (forceClef ,boolean? "Show clef symbol, even if it has not changed. Only active for the first clef after the property is set, not @@ -257,6 +336,13 @@ containing, in the correct order, the labels to be used for lettered frets in tablature.") + (glissandoMap ,list? "A map in the form of +'((source1 . target1) (source2 . target2) (sourcen . targetn)) +showing the glissandi to be drawn for note columns. +The value '() will default to +'((0 . 0) (1 . 1) (n . n)), +where n is the minimal number of note-heads in +the two note columns between which the glissandi occur.") (gridInterval ,ly:moment? "Interval for which to generate @code{GridPoint}s.") @@ -287,17 +373,16 @@ the default time signature.") @rinternals{Lyrics}.") (instrumentCueName ,markup? "The name to print if another instrument is to be taken.") - (instrumentEqualizer ,procedure? "A function taking a string -(instrument name), and returning a @code{(@var{min} . @var{max})} pair -of numbers for the loudness range of the instrument.") + (instrumentEqualizer ,procedure? "A function taking a +string (instrument name), and returning a @code{(@var{min} . @var{max})} +pair of numbers for the loudness range of the instrument.") (instrumentName ,markup? "The name to print left of a staff. The @code{instrumentName} property labels the staff in the first system, and the @code{shortInstrumentName} property labels following lines.") - ;; the definition is reversed wrt traditional transposition - ;; otherwise \transpose { \transposition .. } won't work (instrumentTransposition ,ly:pitch? "Define the transposition of -the instrument. Its value is the pitch that sounds like middle@tie{}C. -This is used to transpose the MIDI output, and @code{\\quote}s.") +the instrument. Its value is the pitch that sounds when the instrument +plays written middle C. This is used to transpose the MIDI output, +and @code{\\quote}s.") (internalBarNumber ,integer? "Contains the current barnumber. This property is used for internal timekeeping, among others by the @code{Accidental_engraver}.") @@ -307,17 +392,19 @@ This property is used for internal timekeeping, among others by the interfaces that are worth keeping a staff with @code{remove-empty} set around for.") (keyAlterationOrder ,list? "An alist that defines in what order -alterations should be printed. The format is @code{(@var{step} -. @var{alter})}, where @var{step} is a number from 0 to@tie{}6 and +alterations should be printed. The format is +@code{(@var{step} . @var{alter})}, +where @var{step} is a number from 0 to@tie{}6 and @var{alter} from -2 (sharp) to 2 (flat).") (keySignature ,list? "The current key signature. This is an alist -containing @code{(@var{step} . @var{alter})} or @code{((@var{octave} . -@var{step}) . @var{alter})}, where @var{step} is a number in the range -0 to@tie{}6 and @var{alter} a fraction, denoting alteration. For -alterations, use symbols, e.g. @code{keySignature = #`((6 . ,FLAT))}.") +containing @code{(@var{step} . @var{alter})} or +@code{((@var{octave} . @var{step}) . @var{alter})}, where @var{step} +is a number in the range 0 to@tie{}6 and @var{alter} a fraction, +denoting alteration. For alterations, use symbols, e.g. +@code{keySignature = #`((6 . ,FLAT))}.") - (lyricMelismaAlignment ,ly:dir? "Alignment to use for a melisma syllable.") + (lyricMelismaAlignment ,number? "Alignment to use for a melisma syllable.") (majorSevenSymbol ,markup? "How should the major 7th be formatted @@ -334,12 +421,12 @@ we had. This can be set manually to create incomplete measures.") (melismaBusyProperties ,list? "A list of properties (symbols) to determine whether a melisma is playing. Setting this property will influence how lyrics are aligned to notes. For example, if set to -@code{#'(melismaBusy beamMelismaBusy)}, only manual melismata and +@code{'(melismaBusy beamMelismaBusy)}, only manual melismata and manual beams are considered. Possible values include @code{melismaBusy}, @code{slurMelismaBusy}, @code{tieMelismaBusy}, and @code{beamMelismaBusy}.") (metronomeMarkFormatter ,procedure? "How to produce a metronome -markup. Called with four arguments: text, duration, count and context.") +markup. Called with two arguments: a @code{TempoChangeEvent} and context.") (middleCClefPosition ,number? "The position of the middle C, as determined only by the clef. This can be calculated by looking at @code{clefPosition} and @code{clefGlyph}.") @@ -353,10 +440,30 @@ is used for ottava brackets.") half staff-spaces. Usually determined by looking at @code{middleCClefPosition} and @code{middleCOffset}.") (midiInstrument ,string? "Name of the MIDI instrument to use.") + (midiMergeUnisons ,boolean? "If true, output only one MIDI note-on +event when notes with the same pitch, in the same MIDI-file track, overlap.") (midiMaximumVolume ,number? "Analogous to @code{midiMinimumVolume}.") (midiMinimumVolume ,number? "Set the minimum loudness for MIDI. Ranges from 0 to@tie{}1.") + (midiChannelMapping ,symbol? "How to map MIDI channels: per +@code{staff} (default), @code{instrument} or @code{voice}.") + (midiBalance ,number? "Stereo balance for the MIDI channel +associated with the current context. Ranges from@tie{}@w{-1} to@tie{}1, +where the values@tie{}@w{-1} (@code{#LEFT}),@tie{}0 (@code{#CENTER}) +and@tie{}1 (@code{#RIGHT}) correspond to leftmost emphasis, center +balance, and rightmost emphasis, respectively.") + (midiPanPosition ,number? "Pan position for the MIDI channel +associated with the current context. Ranges from@tie{}@w{-1} to@tie{}1, +where the values@tie{}@w{-1} (@code{#LEFT}),@tie{}0 (@code{#CENTER}) +and@tie{}1 (@code{#RIGHT}) correspond to hard left, center, and hard +right, respectively.") + (midiReverbLevel ,number? "Reverb effect level for the MIDI +channel associated with the current context. Ranges from 0 +to@tie{}1 (0=off,@tie{}1=full effect).") + (midiChorusLevel ,number? "Chorus effect level for the MIDI +channel associated with the current context. Ranges from 0 +to@tie{}1 (0=off,@tie{}1=full effect).") (minimumFret ,number? "The tablature auto string-selecting mechanism selects the highest string with a fret at least @code{minimumFret}.") @@ -365,6 +472,8 @@ page turn to be allowed.") (minimumRepeatLengthForPageTurn ,ly:moment? "Minimum length of a repeated section for a page turn to be allowed within that section.") + (minorChordModifier ,markup? "Markup displayed following the root +for a minor chord") (noChordSymbol ,markup? "Markup to be displayed for rests in a ChordNames context.") @@ -413,10 +522,17 @@ of the form @code{(list 'volta @var{x})}, where @var{x} is a string or arguments an integer and context, returning whether the corresponding percent repeat number should be printed when @code{countPercentRepeats} is set.") + (restCompletionBusy ,boolean? "Signal whether a completion-rest is active.") (restNumberThreshold ,number? "If a multimeasure rest has more measures than this, a number is printed.") - - + (restrainOpenStrings ,boolean? "Exclude open strings from the +automatic fret calculator.") + + (searchForVoice ,boolean? "Signal whether a search should be made +of all contexts in the context hierarchy for a voice to provide rhythms +for the lyrics.") + (segnoType ,string? "Set the default bar line for a requested segno. +Default is @samp{S}.") (shapeNoteStyles ,vector? "Vector of symbols, listing style for each note head relative to the tonic (qv.) of the scale.") (shortInstrumentName ,markup? "See @code{instrumentName}.") @@ -448,10 +564,16 @@ part-combining.") @code{traditional}, or @code{semitone}.") (stanza ,markup? "Stanza @q{number} to print before the start of a verse. Use in @code{Lyrics} context.") + (startRepeatSegnoType ,string? "Set the default bar line for the +combinations beginning of repeat with segno. Default is @samp{S.|:}.") + (startRepeatType ,string? "Set the default bar line for the beginning +of repeats.") (stemLeftBeamCount ,integer? "Specify the number of beams to draw on the left side of the next note. Overrides automatic beaming. The value is only used once, and then it is erased.") (stemRightBeamCount ,integer? "See @code{stemLeftBeamCount}.") + (strictBeatBeaming ,boolean? "Should partial beams reflect the +beat structure even if it causes flags to hang out?") (stringNumberOrientations ,list? "See @code{fingeringOrientations}.") (stringOneTopmost ,boolean? "Whether the first string is @@ -466,7 +588,7 @@ subdivided at @code{baseMoment} positions by only drawing one beam over the beat (suggestAccidentals ,boolean? "If set, accidentals are typeset as cautionary suggestions over the note.") (systemStartDelimiter ,symbol? "Which grob to make for the start -of the system/staff? Set to @code{SystemStartBrace}, +of the system/@/staff? Set to @code{SystemStartBrace}, @code{SystemStartBracket} or @code{SystemStartBar}.") (systemStartDelimiterHierarchy ,pair? "A nested list, indicating the nesting of a start delimiters.") @@ -478,17 +600,14 @@ fret number. It returns the text as a markup.") (tabStaffLineLayoutFunction ,procedure? "A function determining the staff position of a tablature note head. Called with two arguments: the context and the string.") - (tempoHideNote ,boolean? "Hide the note=count in tempo marks.") - (tempoText ,markup? "Text for tempo marks.") - (tempoUnitCount ,number-or-pair? "Count for specifying tempo.") - (tempoUnitDuration ,ly:duration? "Unit for specifying tempo.") + (tempoHideNote ,boolean? "Hide the note = count in tempo marks.") (tempoWholesPerMinute ,ly:moment? "The tempo in whole notes per minute.") (tieWaitForNote ,boolean? "If true, tied notes do not have to follow each other directly. This can be used for writing out arpeggios.") - (timeSignatureFraction ,number-pair? "A pair of numbers, -signifying the time signature. For example, @code{#'(4 . 4)} is a + (timeSignatureFraction ,fraction? "A pair of numbers, +signifying the time signature. For example, @code{'(4 . 4)} is a 4/4 time signature.") (timeSignatureSettings ,cheap-list? "A nested alist of settings for time signatures. Contains elements for various time signatures. The @@ -503,8 +622,6 @@ will create a @var{VerticalAlignment}; otherwise, it will create a (trebleStaffProperties ,list? "An alist of property settings to apply for the up staff of @code{PianoStaff}. Used by @code{\\autochange}.") - (tremoloFlags ,integer? "The number of tremolo flags to add if no -number is specified.") (tupletFullLength ,boolean? "If set, the tuplet is printed up to the start of the next note.") (tupletFullLengthNote ,boolean? "If set, end at the next note, @@ -537,12 +654,12 @@ of bar line to create. Example: @example -\\set Staff.whichBar = \"|:\" +\\set Staff.whichBar = \".|:\" @end example @noindent This will create a start-repeat bar in this staff only. Valid values -are described in @rinternals{bar-line-interface}.") +are described in @file{scm/bar-line.scm}.") ))) @@ -562,7 +679,7 @@ are described in @rinternals{bar-line-interface}.") barcheck fail?") (beamMelismaBusy ,boolean? "Signal if a beam is present.") (busyGrobs ,list? "A queue of @code{(@var{end-moment} . -@var{GROB})} cons cells. This is for internal (C++) use only. This +@var{grob})} cons cells. This is for internal (C++) use only. This property contains the grobs which are still busy (e.g. note heads, spanners, etc.).") @@ -586,10 +703,13 @@ proceeding to next time step. This is an internal variable.") should be manipulated through the @code{add-grace-property} function.") + (hasAxisGroup ,boolean? "True if the current context is contained +in an axis group.") (hasStaffSpacing ,boolean? "True if the current @code{CommandColumn} contains items that will affect spacing.") + (lastChord ,markup? "Last chord, used for detecting chord changes.") (lastKeySignature ,list? "Last key signature before a key signature change.") (localKeySignature ,list? "The key signature at this point in the @@ -616,7 +736,7 @@ is not set") (scriptDefinitions ,list? "The description of scripts. This is used by the @code{Script_engraver} for typesetting note-superscripts -and subscripts. See @file{scm/script.scm} for more information.") +and subscripts. See @file{scm/@/script.scm} for more information.") (slurMelismaBusy ,boolean? "Signal if a slur is present.") (stavesFound ,grob-list? "A list of all staff-symbols found.") @@ -626,7 +746,7 @@ and subscripts. See @file{scm/script.scm} for more information.") (define-public all-translation-properties (append all-user-translation-properties - all-internal-translation-properties)) + all-internal-translation-properties)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;