Am 18.06.2016 um 21:00 schrieb Richard Shann:
With this code I get an error and the lowest (re-entrant) string is not used
\version "2.18.0"
\include "predefined-ukulele-fretboards.ly"
%\storePredefinedDiagram #default-fret-table <g' c' e' c''> #ukulele-tuning
#"o;o;o;3;"
\score
{
\new FretBoards {
\set Staff.stringTunings = #ukulele-tuning
<g' c' e' c''>
}
}
You can specify the string number for the g' string:
<g'\4 c' e' c''>
You won’t need the \include and the \storePredefinedDiagram then.
If you have many chords this can be automated so you just have to type
<g' c' e' c''>
or (with a variant shown in the comments below) even
<g c e c'>
by using the following music function. This relies on the pitch order:
The first is always assigned to the fourth string (g').
%%%%%%%%%%%
\version "2.18.2"
prepareChordsForUkulele =
#(define-music-function (parser location music) (ly:music?)
(music-map
(lambda (m)
(if (music-is-of-type? m 'event-chord)
(begin
(ly:music-set-property!
(car (ly:music-property m 'elements))
'articulations
(list (make-music
'StringNumberEvent
'string-number
4)))
m)
m))
music))
% you can save many ' if you replace the last line
% of the music function above by
% (ly:music-transpose music (ly:make-pitch 1 0 0))))
\new FretBoards \with {
stringTunings = #ukulele-tuning
} \prepareChordsForUkulele {
<g' c' e' c''>
<a' d' fis' d''>
<g' d' g' b'>
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user