On Fri, 2004-11-19 at 07:38, Han-Wen Nienhuys wrote: > * I suppose that this is still too difficult for "normal" users, and > that we should also have an option > > a. to override fret diagrams for once, eg. > > \chordmode { d:add9 \frets "abc9312" } > > b. to override a fret diagram from now on > > \chordmode { > \set rememberFretOverride = ##t > d:add9 \frets "abc9312" d:add9 > } > > would print the 2nd chord with the same fret diagram > > Of course, we need to make sure that these once-exceptions print a > warning when a transpose is attempted. > > > * The \frets keyword would have to be added to parser.yy and > lily-lexer.cc > > * The \frets command would be translated to a FretDefinition music > object (see define-music-types.scm), which includes a > fret-diagram-definition music interface symbol. The > Fret_diagram_engraver will try to catch music objects that have > fret-diagram-definition.
As I've been reviewing the parser and trying to implement this, it seems to me that the \frets (I'd prefer to use \diagram, and use \Frets like \Chords is used now, i.e. equivalent to \chordmode + \new FretDiagrams) should create a FretDefinition, but that FretDefinition ought to be a property of a Chord music object, rather than a separate music object. I say this, because the Fret-diagram-engraver hunts for Chords, and uses them to look up fret-diagrams in a table. Only when we want to override the default fret-diagram is the \frets keyword brought into place. OTOH, I suppose that you could be recommending that the parser create a FretDefinition music object for every chord found in \chordmode, and the Chord-name engraver would ignore FretDefinition objects, and the Fret-diagram engraver would ignore Chord-name objects. In this circumstance, I would imagine that the FretDefinition would need a duration, but the duration comes from the chord, so again, it seems that the FretDefinition is tied to the chord, and probably shouldn't be a separate music object. I view the \diagram as a modifier to the chord, not as a stand-alone object. Can you help clarify my thinking on this? Thanks, Carl _______________________________________________ lilypond-devel mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-devel