Re: [tablatures] Re: dampened symbol in tablature when using fonts other than Feta

[ Thread Index | Date Index | More lilynet.net/tablatures Archives ]




On 4/13/11 12:32 PM, "Federico Bruni" <fedelogy@xxxxxxxxx> wrote:

> Il giorno mar, 12/04/2011 alle 17.11 -0600, Carl Sorensen ha scritto:
>>> ... maybe I've overwritten the command instead of just adding the
>>> override?
>> 
>> That's right.
>> 
>> Look in ly/property-init.ly for the definition of \deadNote, and
>> duplicate
>> it, but with the override added.
> 
> Thanks for the hint but I can't make it work.
> What's wrong in the following examples?
> 
> deadNote = {
>   \once \override TabNoteHead #'font-name = #"Feta"
>   #(define-music-function (parser location note) (ly:music?)
>    (_i "Print @var{note} with a cross-shaped note head.")
>    (style-note-heads '(TabNoteHead NoteHead) 'cross note))
> }
> 

In this case, deadNote is a music function, and the \override needs to
become part of the function.

You might try

deadNote = #(define-music-function (parser location note) (ly:music?)
     #{
         \once \override TabNoteHead #'font-name = #"Feta"
         #(style-note-heads '(TabNoteHead NoteHead) 'cross $note)
     #})


or

deadNote = #(define-music-function (parser location note) (ly:music?)
  #{
      \once \override TabNoteHead #'font-name = #"Feta"
      \xNote $note
  #})
  

I think the second case is the more likely to work.

> or
> 
> deadNote = \once \override TabNoteHead #'font-name = #"Feta" #xNote

This doesn't work because it doesn't call the music function; it just puts
the music function in the music stream.



> 
> 
> PS
> In ly/property-init.ly I see:
> 
> % Define aliases of cross-head notes for specific purposes
> deadNotesOn  = \xNotesOn
> deadNotesOff = \xNotesOff
> deadNote     = #xNote
> 
> why #xNote?
> I would expect to see \xNote

#xNote is referring to a Scheme function, rather than a LilyPond variable.

\xNote calls the Scheme function with an argument of the music expression
following \xNote.

This is fairly high-level Scheme magic.

Probably the right way to fix this is to have \deadNotesOn set the font to
Feta, and \deadNotesOff set the font to a saved font.  But we don't have
that capability currently implemented.

We also ought to have \deadNote (or better yet, xNote) use a tweak, instead
of an override, to set the Feta font.  The \once \override construct will
set *all* the noteheads at that timestep to use the Feta font.

I'd love to fix this for you, but right now I just don't have time.

If you'll post a report on bug-lilypond, I'll try to get to it as soon as I
can.

HTH,

Carl



> 




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/