Re: Distance of secondary beams

2017-01-18 Thread Paul

On 01/18/2017 03:13 AM, Andrew Bernard wrote:

I think it needs better expressing - how does one go about submitting 
documentation improvement requests?


If you wanted to go beyond a bug report with suggested rewording, you 
could submit a patch.  The doc strings for grob properties like this one 
are in scm/define-grob-properties.scm


Like so:

 (length-fraction ,number? "Multiplier for lengths.  Used for
determining ledger lines and stem lengths.")

The contributor's guide documents how to submit patches.

Cheers,
-Paul

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Distance of secondary beams

2017-01-18 Thread Urs Liska


Am 18.01.2017 um 09:13 schrieb Andrew Bernard:
> Hi Abraham,
>
> Beam.length-fraction - thanks for uncovering this information for us.
> I was never able to find this. It's really useful. So it seems like
> setting the fraction to 1 gives the 'normal' distance, setting to 0
> gives no distance, and setting to 0.5 gives half the normal distance,
> and so on. I have to say that even upon finding this in the doc, the
> brief explanation is not at all illuminating. I think it needs better
> expressing - how does one go about submitting documentation
> improvement requests?
>

If you can't update the documentation yourself please write to
bug-lilypond and include
- a description of the problem and ideally
- a suggestion how to better word the explanations

Urs

> Andrew
>
>
> On 18 January 2017 at 02:41, Abraham Lee  > wrote:
>
>
> I'm not sure why the calculation for this is so convoluted.
> Perhaps studying the source code more would enlighten me. Anyways,
> the property you are looking for is 'length-fraction.
>
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user

-- 
u...@openlilylib.org
https://openlilylib.org
http://lilypondblog.org

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Distance of secondary beams

2017-01-18 Thread Andrew Bernard
Hi Abraham,

Beam.length-fraction - thanks for uncovering this information for us. I was
never able to find this. It's really useful. So it seems like setting the
fraction to 1 gives the 'normal' distance, setting to 0 gives no distance,
and setting to 0.5 gives half the normal distance, and so on. I have to say
that even upon finding this in the doc, the brief explanation is not at all
illuminating. I think it needs better expressing - how does one go about
submitting documentation improvement requests?

Andrew


On 18 January 2017 at 02:41, Abraham Lee  wrote:

>
> I'm not sure why the calculation for this is so convoluted. Perhaps
> studying the source code more would enlighten me. Anyways, the property you
> are looking for is 'length-fraction.
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Distance of secondary beams

2017-01-17 Thread Noeck
> runtime of lilypond for 32768 notes

For completeness: 65'25" => ~ 8 notes / second

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Distance of secondary beams

2017-01-17 Thread Noeck
Thanks, Simon! That answers two questions of mine (the lilypond limit
and the shortest note in published music).

Mail mail lacked the runtime of lilypond for 32768 notes in the last
sentence. Not really relevant, but it is still running after an hour.

Cheers,
Joram

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Distance of secondary beams

2017-01-17 Thread Simon Albrecht

On 17.01.2017 22:23, Noeck wrote:

PS: While we are at it: LilyPond has flags until 1/128 (5 ‘flaglets’).
Shorter durations (1/256, 1/512, etc.) are actually understood and
typeset when they have beams. I gave up checking after 1/131072 =
1/2^17.


See my contribution to 
 
as well as the linked mailing list post :-)


Best, Simon

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Distance of secondary beams

2017-01-17 Thread Noeck
Hi Abraham,

Am 17.01.2017 um 17:30 schrieb Abraham Lee:
> 
> I'm not sure why the calculation for this is so convoluted.

I am not sure if this is the "why" you are looking for (if this is the
answer to what you were wondering about). But I think the equation can
be explained by the following snippet:

\version "2.19.50"

{
  %\override Beam.length-fraction = 0.4
  %\override Beam.beam-thickness = 0.2
  \repeat unfold 2 a8
  \repeat unfold 4 a16
  \repeat unfold 8 a32
  \repeat unfold 16 a64
  \repeat unfold 32 a128
  \repeat unfold 2 g8
  \repeat unfold 4 g16
  \repeat unfold 8 g32
  \repeat unfold 16 g64
  \repeat unfold 32 g128
}

General goals:
Beams look well aligned if they are top-, bottom- or center-aligned with
a staff line (at least cover staff lines instead of being placed
completely in the staff space). A beam distance where you put one beam
per staff line is too wide, two beams per staff line are too narrow. So
a compromise has to be found depending on the number of beams. (These
goals for beam placement are based on my aesthetics but I think
something similar lead to the existing traditional rules, lilypond
implements for beam spacing.)

For the number of beams this results in:
1 beam is easy: it is center-aligned.
2 beams: I cannot decide what looks best (see the example for LP's decision)
3 beams fill 2 staff spaces (i.e. bottom/center/top-aligned)
4 beams fill 3 staff spaces (the outer two are bottom/top-aligned, the
inner two at least cover the staff lines)
>4 beams use the same spacing as 4 of them are inside the staff and the
others do not interfere with staff lines.

This leads to the formulae. You need to take into account the staff
space, the staff line thickness and the beam width to correctly align
the beams.

However, what happens to the g128 looks strange to me. I don't see why
it shouldn't look just like the a128.

Also interesting:
http://blog.steinberg.net/2015/03/development-diary-part-10/

Cheers,
Joram


PS: While we are at it: LilyPond has flags until 1/128 (5 ‘flaglets’).
Shorter durations (1/256, 1/512, etc.) are actually understood and
typeset when they have beams. I gave up checking after 1/131072 =
1/2^17. It took to typeset 32768 such notes. The Frescobaldi
highlighting recognizes durations until 1/2048.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Distance of secondary beams

2017-01-17 Thread Urs Liska
Hi Abraham,

Am 17.01.2017 um 16:41 schrieb Abraham Lee:
> Hi, Urs!
>
> On Tue, Jan 17, 2017 at 8:26 AM, Malte Meyn  > wrote:
>
>
>
> Am 17.01.2017 um 11:43 schrieb Urs Liska:
> > I don't find the appropriate property to modify the distance between
> > secondary stems. Attached you'll find the result of \override
> > Beam.beam-thickness = 0.15, and I need to adjust the beams to be
> closer
> > together, e.g. to 0.5 staff spaces. I don't see any promising
> properties
> > in Beam and Beam Interface.
>
> It’s Beam.gap or Beam.beam-gap or something similar.
>
>
> I'm not sure why the calculation for this is so convoluted. Perhaps
> studying the source code more would enlighten me. Anyways, the
> property you are looking for is 'length-fraction. The relation to beam
> spacing depends on the number of beams, as described in the function
> get_beam_translation, line 114 of lily/beam.cc.
>
> The basic equation goes like this:
>
> if beam_count < 4:
>beam_dy
> = (2 * staff_space * fract + line * fract - beam_thickness) / 2.0
> else:
>   beam_dy =
> (3 * staff_space * fract + line * fract - beam_thickness) / 3.0
>
> As a reference, this means that the beam gap, IIUC, for a
> beam-thickness of 0.48 (the default) and length-fraction of 1.0, is
> about 1/3 of a staff-space for beam-count<4 (but I haven't taken any
> actual measurements to confirm this).

Thank you very much.
This is indeed one more example of LilyPond's problematic documentation
of properties. It is *not* mentioned on the Beam page, only for
beam-interface, and "Multiplier for lengths. Used for determining ledger
lines and stem lengths." is not really helpful and definitely doesn't
help me finding it's useful for my question ...

Best
Urs

>
> HTH,
> Abraham
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user

-- 
u...@openlilylib.org
https://openlilylib.org
http://lilypondblog.org

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Distance of secondary beams

2017-01-17 Thread Abraham Lee
Hi, Urs!

On Tue, Jan 17, 2017 at 8:26 AM, Malte Meyn  wrote:

>
>
> Am 17.01.2017 um 11:43 schrieb Urs Liska:
> > I don't find the appropriate property to modify the distance between
> > secondary stems. Attached you'll find the result of \override
> > Beam.beam-thickness = 0.15, and I need to adjust the beams to be closer
> > together, e.g. to 0.5 staff spaces. I don't see any promising properties
> > in Beam and Beam Interface.
>
> It’s Beam.gap or Beam.beam-gap or something similar.
>

I'm not sure why the calculation for this is so convoluted. Perhaps
studying the source code more would enlighten me. Anyways, the property you
are looking for is 'length-fraction. The relation to beam spacing depends
on the number of beams, as described in the function get_beam_translation,
line 114 of lily/beam.cc.

The basic equation goes like this:

if beam_count < 4:
   beam_dy = (2 * staff_space * fract + line * fract - beam_thickness) / 2.0
else:
  beam_dy = (3 * staff_space * fract + line * fract - beam_thickness) / 3.0

As a reference, this means that the beam gap, IIUC, for a beam-thickness of
0.48 (the default) and length-fraction of 1.0, is about 1/3 of a
staff-space for beam-count<4 (but I haven't taken any actual measurements
to confirm this).

HTH,
Abraham
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Distance of secondary beams

2017-01-17 Thread Malte Meyn


Am 17.01.2017 um 11:43 schrieb Urs Liska:
> I don't find the appropriate property to modify the distance between
> secondary stems. Attached you'll find the result of \override
> Beam.beam-thickness = 0.15, and I need to adjust the beams to be closer
> together, e.g. to 0.5 staff spaces. I don't see any promising properties
> in Beam and Beam Interface.

It’s Beam.gap or Beam.beam-gap or something similar.


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user