[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help scheme TAB strings music-function
From: |
Robby R |
Subject: |
Re: help scheme TAB strings music-function |
Date: |
Tue, 19 Jun 2012 08:30:46 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Hello,
I've simplified my original code a little, changed (list?) to (markup-list?) and
can maybe ask some slightly more intelligent questions. My goal is a function
to print string names next to TAB and eventually set a string tuning, something
along the lines of :
\setStrTuningCLEF #'("Banjo" ( D B G D g ))
or
\setStrTuningCLEF #'("Fiddle" ( D A D D ))
except I probably have the method of entering 'args' all wrong. Here's the code
(questions follow):
\version "2.14.1"
setStrTuningCLEF = #(define-music-function (parser location tuning)
(markup-list?)
#{
\set Staff.instrumentName = #( markup make-center-column-markup
$tuning ) )
#}
)
\score { % WORKS
\new TabVoice {
\set Staff.instrumentName = \markup { \center-column { 1 2 3 4
5 } } % ****
{ g }
}
}
\score { % DOES NOT WORK
\new TabVoice {
\setStrTuningCLEF #'( D B G D g ) % ********
{ g }
}
}
\layout {
\context {
\TabStaff
tablatureFormat = #fret-number-tablature-format-banjo
stringTunings = #banjo-open-g-tuning
}
}
% %%%% END %%%%
The above gets the following compile error:
ly:40:24: wrong type for argument 1. Expecting markup list, found (D B G D g)
\setStrTuningCLEF #'( D B G D g )
My questions are:
1) Is this the proper way to get an arg into the markup inside
define-music-function:
\set Staff.instrumentName = #( markup make-center-column-markup $tuning ) )
Seems like the "Known issues and warnings" at the bottom of
http://lilypond.org/doc/v2.14/Documentation/extending/markup-construction-in-scheme
would apply.
2) Is (markup-list?) the appropriate predicate?
3) Would this be the proper call of the function:
\setStrTuningCLEF #'( D B G D g )
4) Am I even on the right track here?
Thank you so much, Robby