lilypond-devel
[Top][All Lists]
Advanced

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

Re: parentheses for dynamics


From: Han-Wen Nienhuys
Subject: Re: parentheses for dynamics
Date: Mon, 23 Aug 2004 22:07:47 +0200

address@hidden writes:
> 
> I have a few questions:
> 
> 1) Why, with \parenthesizeA which uses an \applyoutput, only the first
>    "d" note is parenthesized, and not the second?

\applyoutput is a single shot command. 

> 2) If I remove the first "c" note, a warning occurs and the first
>    \parenthesizeA has no effect.

probably because  there is no Voice context yet.

> 3) In [1], I would like to test if the current grob has the given
>    type. It seems that the idiomatic way to conditionaly apply an
>    output function on a specific grob type is to test if
>    MY-GROB-TYPE-interface is a member of
>    (ly:grob-property grob 'interfaces). Is there a way get
>    'note-head-interface from 'NoteHead, for instance? I guess that a
>    specialized NoteHead, with an other name metafield, would not
>    satisfy test [1]...

Correct, but then again, if the function should apply to
note-head-interface, the call should be  like

  \parenthesizeC #'note-head-interface


> 4) In [2], I would like to get the 'print-function of a grob of the
>    given type. Something like:
>      (ly:grob-property (make-grob grob-type) 'print-function)
>    or:
>      (default-grob-property grob-type 'print-function)
>    Is there a better/prefered way to do this?

try this (subversion is down, so I can't commit)

LY_DEFINE (ly_context_grob_definition, "ly:context-grob-definition",
           1, 0, 0, (SCM context, SCM name),
           "Return the definition of @var{name} (a symbol) within @var{context} 
"
           "as an alist")
{
  Context *tr = unsmob_context (context);
  SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
  SCM_ASSERT_TYPE (name, ly_c_symbol_p (name), SCM_ARG2, __FUNCTION__, 
"symbol");

  return updated_grob_properties (tr, name);
}



> 5) Which one, between \parenthesizeA, using \applyoutput, or
>    \parenthesizeB, with \override of print-function, would be better?

I prefer B

> 6) If one try:
> 
>  \parenthesizeB #'DynamicText { c\p }
> 
> one get the following warning:
>   programming error: Stencil::moved_to_edge: adding empty stencil.
> twice. I'm not sure I understand the internals of the
> parenthesize-print-function procedure.

I suspect that you forgot to set font-encoding = fetaMusic before
selecting the parentheses from the font.

-- 

 Han-Wen Nienhuys   |   address@hidden   |   http://www.xs4all.nl/~hanwen 





reply via email to

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