[Top][All Lists]

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

Piano pedalling patch

From: Han-Wen Nienhuys
Subject: Piano pedalling patch
Date: Tue, 12 Mar 2002 12:52:21 +0100

address@hidden writes:
> I've been hacking around with piano pedalling, to try to implement
> bracketed pedals, and my patch is now ready to be tested.  

> the dynamic engraver.  The actual dimensions of the brackets are set
> using a new function in Please let me know how much I
> have coded things in the proper lilypond way! 

Ok, let me start off by saying that this is quite impressive. I'm not
sure who wrote the last incarnation of the dynamic-engraver, but I do
remember that it was much more hairy than I would like. (In fact, if
you have some documentation for the engraver, i'd be happy to include
it as a comment :)

Now for what needs to be done to the patch:

I disagree with

> void 
>Text_spanner::setup_sustain_pedal(Spanner *s)
>s->set_grob_property ("direction", gh_int2scm(-1));
>+  s->set_grob_property ("width-correct", gh_double2scm(0));
>+  s->set_grob_property ("type", ly_symbol2scm ("line"));
>+  s->set_grob_property ("outer", gh_bool2scm (true));

This is something that should be done via
scm/grob-description.scm. Perhaps you can put these settings in a grob
callled SustainPedalBracket, and switch between TextSpanner (or
whichever is the other alternative) and SustainPedalBracket using some
other property.

>if ( gh_scm2bool (s->get_grob_property ("text-start")) )

Please use to_boolean() for this.  Scheme booleans and lilypond
booleans have slightly different semantics: in lilypond everything but
#t is false. In GUILE, everything but #f is true.

In general all grob functions should be foolproofed for the case that
any of the grob properties are undefined.

I haven't put in this patch. Can you try to incorporate these comments
into your lilypond and submit a new patch, either to plain .38 or

Han-Wen Nienhuys   |   address@hidden    |

reply via email to

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