[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Function for Chords in Header
From: |
Kale Good |
Subject: |
Function for Chords in Header |
Date: |
Fri, 20 Dec 2024 06:08:11 -0500 |
User-agent: |
Mozilla Thunderbird |
Hello List,
I'm trying to create multiple guitar lead
sheets with a "chord summary", including fretboards, in the
header.
The cleanest way I could think to do this
was to use a function.
I've created a function that creates what
I'm looking for outside of a markup block. Used inside of a markup
block, it fails.
I also need to be redundant with
\chordmode (wrapping my argument it it when I call the function
and inside the function). I assume this is due either to a)
lilypond interpreting and storing the "pitches" prior to passing
them to the function or b) my argument type is wrong (couldn't
find anything else that acted differently, though).
\include "predefined-guitar-fretboards.ly"
chordSummaryFunc =
#(define-void-function (music) (ly:music?)
(toplevel-score-handler
#{
\score {
<<
\new ChordNames \chordmode { $music }
\new FretBoards \chordmode { $music }
>>
}
#}))
\header {
title = "test"
subtitle = \markup { Chords \chordSummaryFunc \chordmode{ g b } }
}
\chordSummaryFunc \chordmode{ g b }
Thanks for any help.
Best,
Kale
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Function for Chords in Header,
Kale Good <=