lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tiny function


From: Jeffery Shivers
Subject: Re: tiny function
Date: Thu, 30 Jun 2016 16:59:39 -0400

Hi Gabriel-Marie,

Could you describe in context what you are trying to achieve? Are you meaning to apply *stanza* number, rather than instrument names? Have a look at:

http://lilypond.org/doc/v2.19/Documentation/notation/stanzas

HTH,
Jeffery

On Thu, Jun 30, 2016 at 4:37 PM, Br. Gabriel-Marie | SSPX <address@hidden> wrote:
In my music script I want to use this:

\new Lyrics \with { instrumentName = "1." shortInstrumentName = "1." }

However, I would like to make a function out of it.  I'm looking at this page:
http://lilypond.org/doc/v2.18/Documentation/learning/saving-typing-with-variables-and-functions

and this is what I have come up with, but I know this isn't right.  Can someone correct this for me?
Basically, I want to do this:
\new Lyrics \verseNumber #1

and have it create this: 
\new Lyrics \with { instrumentName = "1." shortInstrumentName = "1." }

verseNumber = #(define-music-function(parser location whatnumber)( number?) #{  \with { instrumentName = #whatnumber "." shortInstrumentName = #whatnumber "." } #}


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user



reply via email to

[Prev in Thread] Current Thread [Next in Thread]