lilypond-user
[Top][All Lists]
Advanced

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

Re: Contemporary music


From: David Kastrup
Subject: Re: Contemporary music
Date: Sat, 18 Feb 2012 07:37:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

David Kastrup <address@hidden> writes:

> Nathan <address@hidden> writes:
>
>> \version "2.14.2"
>>
>> contempPath = #'((moveto 0.0 0.0)
>>                  (curveto -1.1 1.1 -0.5 1.5 0.5 0.5)
>>                  (lineto 1.1 1.1)
>>                  (closepath))
>>
>> #(define-markup-command (contempSignMarkup layout props) ()
>>    (interpret-markup layout props
>>      (markup #:override '(filled . #t) #:path 0.25 contempPath)))
>>
>> contempSign = \markup \contempSignMarkup
>>
>> \relative c'' {
>>   c16-.^\contempSign r8
>> }
>>
>> Feel free to adjust the points in \contempPath so the shape is more to
>> your liking.
>>
>> Note that you can't do c16\contempPath. You have to attach it using -,
>> ^, or _.
>
> Two notes: why don't you call the markup command just contempSign?
> Since markup commands have a different namespace, contempSignMarkup is
> quite redundant.
>
> And why don't you define
>
> contempSign = -\markup \contempSignMarkup
>
> if contempSign is supposed to be used as postevent anyway?  Then you
> _can_ do c16\contempSign [sic].

Two more notes: StudlyCaps are not the style used for markup commands,
you'd use contemp-sign for the markup.  And putting the path in a
separate variable to keep the markup macro from messing with it seems
awkward.

There is also no need for an option-less markup command.

And putting this together with some goodness from the current release
candidate for the next stable version (and assuming that the sign
belongs up by default as a postevent) we get

\version "2.15.30"


#(define-markup-command (contemp-sign layout props) ()
   (interpret-markup layout props
     #{ \markup \override #'(filled . #t) \path #'0.25
              #'((moveto 0.0 0.0)
                 (curveto -1.1 1.1 -0.5 1.5 0.5 0.5)
                 (lineto 1.1 1.1)
                 (closepath))
     #}))

contempSign = ^\markup \contemp-sign

\relative c'' {
  c16-.\contempSign r8
}


-- 
David Kastrup




reply via email to

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