From bdf90bd675fdf0686dbab071fea7eed3aeba45a8 Mon Sep 17 00:00:00 2001 From: Carl Sorensen Date: Sat, 9 Aug 2008 18:41:52 -0600 Subject: [PATCH] Add 'none to barre-type and update documentation --- Documentation/user/fretted-strings.itely | 7 +++-- scm/define-grob-properties.scm | 37 ++++++++++++++---------- scm/fret-diagrams.scm | 5 +++- 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/Documentation/user/fretted-strings.itely b/Documentation/user/fretted-strings.itely index 335f4e4727..3c2d64d28b 100644 --- a/Documentation/user/fretted-strings.itely +++ b/Documentation/user/fretted-strings.itely @@ -637,7 +637,7 @@ are stored in a lookup table: The default predefined fret diagrams are contained in the file @code{predefined-guitar-fretboards.ly}. Fret diagrams are stored based on the pitches of a chord and the value of -@code{StringTunings} that is currently in use. +@code{stringTunings} that is currently in use. @code{predefined-guitar-fretboards.ly} contains predefined fret diagrams only for @code{guitar-tuning}. Predefined fret diagrams can be added for other instruments or other tunings @@ -812,7 +812,8 @@ mychords = \chordmode{ The graphical layout of a fret diagram can be customized according to user preference through the properties of the @code{fret-diagram-interface}. Details are found at @rinternals{fret-diagram-interface}. For a -predefined fret diagram, the interface properties belong to @code{FretBoards}. +predefined fret diagram, the interface properties belong to +@code{FretBoards.FretBoard}. @c @snippets @@ -955,7 +956,7 @@ The graphical layout of a fret diagram can be customized according to user preference through the properties of the @code{fret-diagram-interface}. Details are found at @rinternals{fret-diagram-interface}. For a @code{FretBoards} fret diagram, the interface properties belong to -@code{FretBoards}. +@code{FretBoards.FretBoard}. @snippets The minimum fret to be used in calculating strings and frets for diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index 8d2de51b14..ccffd3b497 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -169,7 +169,7 @@ be used: @code{#UP}=@code{1}, @code{#DOWN}=@code{-1}, @code{#LEFT}=@code{-1}, @code{#RIGHT}=@code{1}, @code{#CENTER}=@code{0}.") (dot-count ,integer? "The number of dots.") (dot-placement-list ,list? "List -consisting of @code{@var{description} (@var{string-number} +consisting of @code{(@var{description} @var{string-number} @var{fret-number} @var{finger-number})} entries used to define fret diagrams.") (duration-log ,integer? "The 2-log of the note head duration, @@ -245,21 +245,24 @@ include the following: @itemize @bullet @item @code{barre-type} -- Type of barre indication used. -Choices include @code{curved} and @code{straight}. +Choices include @code{curved}, @code{straight}, and +@code{none}. Default @code{curved}. @item @code{dot-color} -- Color of dots. Options include -@code{black} and @code{white}. +@code{black} and @code{white}. Default @code{black}. @item @code{dot-label-font-mag} -- Magnification for font used to label fret dots. Default value 1. @item -@code{dot-radius} -- Radius of dots. +@code{dot-radius} -- Radius of dots, in terms of fret spaces. +Default value 0.425 for labeled dots, 0.25 for unlabeled dots. @item @code{finger-code} -- Code for the type of fingering indication used. Options include @code{none}, @code{in-dot}, and -@code{below-string}. +@code{below-string}. Default @code{none} for markup fret diagrams, +@code{below-string} for @code{FretBoards} fret diagrams. @item -@code{fret-count} -- The number of frets. +@code{fret-count} -- The number of frets. Default 4. @item @code{fret-label-font-mag} -- The magnification of the font used to label the lowest fret number. Default 0.5 @@ -270,21 +273,25 @@ from the fret. Default -0.2 @code{label-dir} -- Side to which the fret label is attached. @code{-1}, @code{#LEFT}, or @code{#DOWN} for left or down; @code{1}, @code{#RIGHT}, or @code{#UP} for right or up. +Default @code{#RIGHT}. @item -@code{mute-string} -- Character string to be used to indicate muted string. +@code{mute-string} -- Character string to be used to indicate muted +string. Default @qq{x}. @item @code{number-type} -- Type of numbers to use in fret label. Choices -include @code{roman-lower}, @code{roman-upper}, and @code{arabic}. +include @code{roman-lower}, @code{roman-upper}, and @code{arabic}. Default +@code{roman-lower}. @item -@code{open-string} -- Character string to be used to indicate open string. +@code{open-string} -- Character string to be used to indicate open +string. Default @qq{o}. @item @code{orientation} -- Orientation of fret-diagram. Options include -@code{normal} and @code{landscape} +@code{normal} and @code{landscape}. Default @code{normal}. @item -@code{string-count} -- The number of strings. +@code{string-count} -- The number of strings. Default 6. @item -@code{string-label-font-mag} -- The magnification of the font used to label fingerings -at the string, rather than in the dot. Default value 0.6. +@code{string-label-font-mag} -- The magnification of the font used to label +fingerings at the string, rather than in the dot. Default value 0.6. @item @code{top-fret-thickness} -- The thickness of the top fret line, as a multiple of the standard thickness. Default value 3. @@ -292,8 +299,8 @@ of the standard thickness. Default value 3. @code{xo-font-magnification} -- Magnification used for mute and open string indicators. Default value 0.5. @item -@code{xo-padding} -- Padding for open and mute indicators from top fret. Default -value 0.25. +@code{xo-padding} -- Padding for open and mute indicators from top fret. +Default value 0.25. @end itemize") ;" diff --git a/scm/fret-diagrams.scm b/scm/fret-diagrams.scm index 84d9453828..fb986f91b9 100644 --- a/scm/fret-diagrams.scm +++ b/scm/fret-diagrams.scm @@ -548,11 +548,14 @@ indications per string. (xo-list (cdr (assoc 'xo-list parameters))) (fret-range (cdr (assoc 'fret-range parameters))) (barre-list (cdr (assoc 'barre-list parameters))) + (barre-type + (assoc-get 'barre-type details 'curved)) (fret-diagram-stencil (ly:stencil-add (draw-strings string-count fret-range th size orientation) (draw-frets fret-range string-count th size orientation)))) - (if (not (null? barre-list)) + (if (and (not (null? barre-list)) + (not (eq? 'none barre-type))) (set! fret-diagram-stencil (ly:stencil-add (draw-barre layout props string-count fret-range size -- 2.39.5