]> git.donarmstrong.com Git - lilypond.git/commit
Make tab-note-heads and fretboards use common code.
authorCarl Sorensen <c_sorensen@byu.edu>
Sat, 16 Jan 2010 01:15:35 +0000 (18:15 -0700)
committerCarl Sorensen <c_sorensen@byu.edu>
Sat, 30 Jan 2010 23:35:09 +0000 (16:35 -0700)
commitceef4ace51077b6e9dedd09216e7f5551912e450
tree4a5d54a22c10256f3623d7a4fd5c9455c6250ec1
parent2b441b0ac0c9269314ce0730ca4e9c5dfe96716d
Make tab-note-heads and fretboards use common code.

This combines the string and fret assigning code of the
tab-note-heads engraver and the fret-boards engraver.  Both
will use scheme procedures defined in scm/translation-functions.scm
and specified by context properties initialized in ly/engraver-init.ly

 * Modify the calling sequence of noteToFretFunction so that it
   takes a context, a note-list, a string-list, and an optional
   grob.  If grob is included, noteToFretFunction will add the
   fretboard to the grob.  If grob is not included, noteToFretFunction
   will return a list of (string fret finger) tuples.

 * Refactor the code in scm/translation-functions.scm to support
   this separation of function.

 * predefinedDiagramTable is now a context property for TabStaff as
   well as for FretBoards.  This means that if a chord is present in
   TabStaff, and predefinedDiagramTable for that TabStaff is not #f,
   and a predefined diagram for the chord exists, the TabStaff will
   display the notes of the predefined diagram.

 * Change tab-note-heads-engraver so that it calls noteToFretFunction
   instead of having the fret calculation code inside the engraver.

 * Change the noteToFretFunction calling sequence in fretboard-engraver
   to match the new definition

 * Add an optional default argument to ly:context-property so we
   can set a default at call time
lily/context-scheme.cc
lily/fretboard-engraver.cc
lily/note-heads-engraver.cc
lily/tab-note-heads-engraver.cc
ly/engraver-init.ly
ly/property-init.ly
scm/define-context-properties.scm
scm/translation-functions.scm