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

2015-10-30 Thread pls
Thomas Morley  writes:

> 2015-10-29 23:53 GMT+01:00 pls :
>
>>
>> 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?
>
>
> Well, I think it's not impossible, more depending on how much work one
> wants to put on it.

This isn't a feature request!  I know that it's not impossible for you.
I obviously misunderstood the information given in the
fret-diagram-interface.  I was convinced that I could simply override
the dot-placement-list just like any other *user settable property*
listed there.

> Maybe I can have a deeper look sunday ...

Don't spend too much of your precious time on this (unless you really
want to).  I might as well be able to transform the whole library with some
clever RegExps/Emacs-Macros.  I have to give it some thought.

Thanks again!

Cheers,
Patrick

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


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

2015-10-29 Thread Thomas Morley
2015-10-29 23:53 GMT+01:00 pls :

>
> 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?


Well, I think it's not impossible, more depending on how much work one
wants to put on it.

Maybe I can have a deeper look sunday ...


Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


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

2015-10-29 Thread pls
Thomas Morley  writes:

> 2015-10-29 19:24 GMT+01:00 pls :
>> 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

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


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

2015-10-29 Thread Thomas Morley
2015-10-29 19:24 GMT+01:00 pls :
> 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

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user