lilypond-user
[Top][All Lists]
Advanced

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

accidental spacing (multiple signs): X-extent and ly:accidental-interfac


From: Torsten Anders
Subject: accidental spacing (multiple signs): X-extent and ly:accidental-interface::width
Date: Tue, 8 Sep 2009 22:21:35 +0100

Hello Lilyponders,

I am still looking for a way to avoid collisions of accidentals consisting of multiple signs. I searched various sources including the Internals Reference and finally came across the accidental slot/ property X-extent (the extent of accidentals in the X direction).

  http://lilypond.org/doc/v2.12/Documentation/user/lilypond-internals/Accidental

Firstly, I would like to know whether changing this slot/property is actually a good idea for avoiding collisions of accidentals.

Anyway, the documentation says it is hard coded, but I could actually change it: it indeed allows for an increased accidental spacing between accidentals and graphical objects such as bar lines.

I attached two examples that only differ in one line. In closeSpacing.ly X-extent is explicitly set to its default, and there is much collision of accidentals and other graphical objects.

    \override Accidental #'X-extent = #ly:accidental-interface::width

By contrast, widerSpacing.ly sets X-extent to the following value resulting in a much better though still not good result (instead of globally changing this value it should later be set for individual accidentals).

    \override Accidental #'X-extent = #'(0.5 . 3.0)

The improvement is that accidentals do not overlap each other in the chord anymore, and the space between the bar line and the chord is increased to give way for the accidentals (something that a simple horizontal shift of the accidental would not do). However, accidentals still overlap with the preceeding note.

I tried to understand X-extent and ly:accidental-interface::width, but I could not find any further documentation. I even tried searching the source, using the nice grep interface of gitweb. However, I had no success.

  
http://git.savannah.gnu.org/gitweb/?p=lilypond.git&a=search&h=HEAD&st=grep&s=accidental-interface

So, I have a few questions.

- What exactly does this pair of numbers mean? Why are there two values to specify the width of a graphical object?
  - What is the definition of ly:accidental-interface::width?

Also, I would appreciate suggestions how to avoid collisions between accidentals and preceding notes.

Thank you very much!

Best,
Torsten

--
Torsten Anders
Interdisciplinary Centre for Computer Music Research
University of Plymouth
Office: +44-1752-586219
Private: +44-1752-558917
http://strasheela.sourceforge.net
http://www.torsten-anders.de


Attachment: closeSpacing.ly
Description: Binary data

Attachment: closeSpacing.pdf
Description: Adobe PDF document

Attachment: widerSpacing.ly
Description: Binary data

Attachment: widerSpacing.pdf
Description: Adobe PDF document





reply via email to

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