lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to override dot-placement-list (fret diagrams)


From: pls
Subject: Re: how to override dot-placement-list (fret diagrams)
Date: Thu, 29 Oct 2015 23:53:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Thomas Morley <address@hidden> writes:

> 2015-10-29 19:24 GMT+01:00 pls <address@hidden>:
>> Hey all,
>>
>> I would like to override some fingering information of predefined fret
>> diagrams.  The relevant information should be in the
>> /dot-placement-list/ of the fret-diagram-interface (see
>> http://lilypond.org/doc/v2.19/Documentation/internals-big-page#fret_002ddiagram_002dinterface).
>>
>> But I couldn't find any example of an override of this information
>> neither in the Notation Reference nor in the Snippet Repository.
>>
>> As a first step I tried to override the fingering of the fret diagram
>> for /c/ (predefined-guitar-fretboards.ly).  My goal was to change the
>> finger on the third fret of the fifth string from 3 to 4.  The following
>> override does not work.  Am I missing something?
>>
>> \version "2.19.31"
>> \include "predefined-guitar-fretboards.ly"
>> <<
>>   \new ChordNames \chordmode { c1 | } %1
>>   \new FretBoards \chordmode {
>>     % overrides
>>     %\override FretBoard.size = #'2.2
>>     %\override FretBoard.fret-diagram-details.finger-code = #'in-dot
>>     \once \override FretBoards.FretBoard.dot-placement-list = #'(
>>       (place-fret 5 3 4)
>>     )
>>
>>     % fretboards
>>     c1 |%1
>>   }
>>   \new Voice {
>>     c'1 |%1
>>   }
>>>>
>>
>> Thanks for any hint!
>> Patrick
>
>
>
> Hi Patrick,
>
> if you use "predefined-guitar-fretboards.ly" the documented method is
> to insert a new entry in it via `storePredefinedDiagram'
> http://www.lilypond.org/doc/v2.19/Documentation/notation/common-notation-for-fretted-strings#predefined-fret-diagrams
>
> Also possible is to use the `dot-placement-list'-property, with the
> need to set it before-line-breaking.
>
> Below examples for both:
>
> \version "2.19.29"
>
> \include "predefined-guitar-fretboards.ly"
>
> \storePredefinedDiagram #default-fret-table
>                         \chordmode { c'' }
>                         #guitar-tuning
>                         #'((place-fret 5 3 4))
>
> <<
>   \new ChordNames \chordmode { c1 c c'' }
>   \new FretBoards \chordmode {
>     \once \override FretBoards.FretBoard.before-line-breaking =
>       #(lambda (grob)
>          ;(newline)
>          ;(display-scheme-music (ly:grob-property grob 'dot-placement-list))
>          (ly:grob-set-property! grob 'dot-placement-list
>                                      '((place-fret 5 3 4)))
>          )
>     c1 c c''
>   }
>   \new Voice {
>     \textLengthOn
>     c'1_"override"
>     c'_"predefined default"
>     c'_"predefined extended"
>   }
>>>
>
> HTH,
>   Harm

Thanks, Harm!

In my example I actually just wanted to override the fingering on the
5th string and not change the fret numbers and finger numbers on the
other strings of the predefined chord "c" in
predefined-guitar-fretboards.ly. I thought that it was possible because
so many other details can be overridden. 

My use case: I have created a huge library of predefined fret
diagrams (https://github.com/Philomelos/lilypond-predefined-fretboards)
and I would love to be able to e.g. display those diagrams with chord steps, 
note names or even
solfege pitchnames *instead* of finger numbers without actually having to define
them completely from scratch.

Am I right that I basically would have to redefine all those fret diagrams and 
there is no way to
"tweak" only the finger numbers of a diagram that has already been
predefined?

TIA
Patrick



reply via email to

[Prev in Thread] Current Thread [Next in Thread]