lilypond-devel
[Top][All Lists]
Advanced

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

Re: a list of manually fine-tuned beaming exceptions?


From: address@hidden
Subject: Re: a list of manually fine-tuned beaming exceptions?
Date: Sat, 5 Mar 2011 11:24:36 -0500

On Mar 5, 2011, at 11:08 AM, Phil Holmes wrote:

> 
> 
> --
> Phil Holmes
> 
> 
> ----- Original Message ----- From: "Janek Warchoł" <address@hidden>
> To: <address@hidden>
> Sent: Saturday, March 05, 2011 12:05 PM
> Subject: a list of manually fine-tuned beaming exceptions?
> 
> 
>> Hi,
>> 
>> while i'd love to improve beaming algorithm itself so that it would
>> produce perfect beams on its own, it's a task way beyond my current
>> skills. Still some wrong beams bother me very much, for example this
>> one
>> \relative c'' { b8[ a16 g] }
>> it's really too high, and the secondary beam doesn't cover the
>> staffline despite being able to easily do so. Compare it to \relative
>> c'' { g8[ f16 e] } - this one is more difficult (more stafflines to
>> take care of), but executed better.
>> I'd like to improve this situation and here is my idea: add a list of
>> beaming "exceptions". Every time someone spots a beam done wrong,
>> (s)he can write how proper beaming should look like and add it to
>> source. When Lily would encounter a beam included in the list of
>> exceptions, it would use that information instead of calculating beam
>> on her own.
>> What do you think? Would it require much work? (i mean implementing a
>> way to add such exceptions, not filling this list)
> 
> Jan,
> 
> I'm not qualified to comment, and it seems it would be hard work, but you 
> might be interested in this snippet in the music I'm setting now.  To me, the 
> shorter beams look rather squashed, and I'm surprised they're not the same 
> height as the longer ones, since the notes are so similar:
> 
> {
> \key d\major
> fis'16 ( [ a'16 fis'16 a'16 d'16 a16 ) ] g'16 ( [ a'16 g'16 a'16 cis'16 a16 ) 
> ]
> } 
> 

I think this may come from line 931 of stem.cc

<snip>
  Real ideal_length
    = (scm_is_pair (lengths)
       ? (scm_to_double (robust_list_ref (beam_count - 1, lengths))
          * staff_space
          * length_fraction
          /*
            stem only extends to center of beam
          */
          - 0.5 * beam_thickness)
       : 0.0);
</snip>

There are a couple things to note.
First, in define-grobs.scm, there is an old beamed-minimum-free-lengths list 
that is commented out - this may get you the results you want.

Second, the calculation for ideal length takes beam_thickness into 
consideration but not beam_translation, which I think would be important in 
figuring out this length.

If you were looking for places in the code that could lead to a viable patch, 
these'd be the two places I'd mess around w/ first.

Cheers,
MS


reply via email to

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