Hi,

how is it possible to write music functions which use symbols as
parameters which get interpreted as pitch entities by the function?

I made three examples below to illustrate the problem. The third works
but is less than ideal in the lilypond source as the main purpose of
the definition is to get rid of the \parenthesize and the enclosing
chord brackets.

--
Orm

P.S.: Can anybody point me to reference on how to enlarge the
parenthesis or how to turn them into square brackets? I'm quite
comfortable writing scheme code and don't mind to delve into the
depths of lilypond as long as I get a hint on where to start and what
to change where.

------------------------------------------------------------------
The following two code segments *don't* work:

bracket = #(define-music-function (parser location note )
       (symbol? )
#{
            \set fontSize = #-4
            \once \override Stem #'transparent = ##t <\parenthesize $note>4
            \set fontSize = #1
#})

\relative c' {
     \bracket #'f
}

bracket = #(define-music-function (parser location note )
       (ly:music? )
#{
            \set fontSize = #-4
            \once \override Stem #'transparent = ##t <\parenthesize $note>4
            \set fontSize = #1
#})

\relative c' {
     \bracket f
}

------------------------------------------------------------------
This works:

bracket = #(define-music-function (parser location note )
       (ly:music? )
#{
            \set fontSize = #-4
            \once \override Stem #'transparent = ##t $note
            \set fontSize = #1
#})

\relative c' {
     \bracket <\parenthesize f>4
}



_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to