Am 11/9/11 4:49 PM, schrieb Tim McNamara:
On Nov 9, 2011, at 8:45 AM, Robert Schmaus wrote:
Hi Jim& everyone,
I'm currently preparing a macro file "jazz-chords.ily" which contains (my
version of) common jazz chord notation. I will share that file as soon as it is in a
usable state.
However, right now, I just worked out how to define the markups of each chord
by defining the markup explicitly. I would like to do that more elegantly by
defining markup commands.
If, e.g., I would like to create a command \jcRaise such that the expression
\markup{ \raise #1.5 {\tiny "Maj9"} }
would just become
\jcRaise{ "Maj9" }
or possibly
\markup\jcRaise{ "Maj9" }
how do I define the markup command for this? I checked the manual here
http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Markup-construction-in-Scheme#Markup-construction-in-Scheme
and tried to build such a function accordingly, but didn't really get anywhere.
I guess I would need to start somewhere more basic.
Would the #(define-music-function work for this?
I am assuming that you have seen the pop-chord.ly file already and don't want
to use that approach.
Hi Tim,
actually, I'm using the same approach as pop-chords. I've just
modified/added loads of chord alterations and formatted them s.t. they
look more like the usual jazz chords.
However, right now, I defined the markup command for each individual
chord explicitly - with the effect, that I would also need to change
each chord definition explicitly if I would, say, like to change the
size in which the of the tensions are printed.
Therefore I was trying to switch to a music-function approach. But I
don't yet know how to do it.
In the documentation, there is a description of how functions are
defined, but I don't understand a lot of what's written there.
E.g. in
http://lilypond.org/doc/v2.12/Documentation/user/lilypond/New-markup-command-definition#New-markup-command-definition
halfway down, it reads
---
(cons (list '(font-shape . caps) ) props)
The variable props is a list of alists, and we prepend to it by cons’ing
a list with the extra setting.
---
now it seems to me that I should know what what "cons'ing" *is* - but I
don't, and I haven't found it explained anywhere in section 6 so far.
hence my remark that I probably need to start way more back at the
basics before I can define musical functions ...
I've seen that Carl and David sent me a suggestion of how the function
should work - so hopefully I will soon enough see where I went wrong (my
trials looked similar, but didn't work ...)
Thanks for all your responses - I'll let you know how it works
(preferably by producing the jazz-chords file ...)
Cheers,
Robert
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user