[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
placement of dot after whole rest
From: |
Kim Shrier |
Subject: |
placement of dot after whole rest |
Date: |
Sun, 13 Oct 2002 18:49:13 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.0) Gecko/20020911 |
I have come up with a patch to fix the problem of the dot after a whole rest
being set one staff space too high. I have included a test program that
shows
the problem. Before applying the patch, the dots in measures 6 and 8
are set
too high. After the patch, it sets them next to the rest symbol. The
patch is
somewhat of a kludge since it looks for a dotted whole rest and moves
the dot
down. I patterned it after the correction that was applied to rests of
1/8 and
shorter.
In order to be thorough in testing this patch, I also tested out having
2 voices
on one staff The test file is rest_test2.ly. As you can see, the dot
placement
on the lower voice is only right for whole rests, 32'nd rests, and 64'th
rests.
Dot placement for the upper voice looks correct. I don't have time to
look into
this any more right now but I would like to understand the logic behind
placing
dots for rests. Any hints you could give me would be appreciated.
Kim
--
Kim Shrier - principal, Shrier and Deihl - mailto:address@hidden
Remote Unix Network Admin, Security, Internet Software Development
Tinker Internet Services - Superior FreeBSD-based Web Hosting
http://www.tinker.com/
--- lily/rest.cc.orig Fri Sep 20 04:21:07 2002
+++ lily/rest.cc Sun Oct 13 17:31:13 2002
@@ -41,6 +41,11 @@
d->set_grob_property ("staff-position",
gh_int2scm ((bt == 7) ? 4 : 3));
}
+ if (d && bt == 0) // UGH again.
+ {
+ d->set_grob_property ("staff-position",
+ gh_int2scm (-1));
+ }
return SCM_UNSPECIFIED;
}
\include "paper16.ly"
\paper {
}
\score {
\notes \relative c'' {
\time 6/1
r\longa r\breve |
r\longa. |
r\breve. r |
\time 3/1
r\breve r1 |
r\breve. |
r1. r |
\time 3/2
r1 r2 |
r1. |
r2. r |
\break
\time 3/4
r2 r4 |
r2. |
r4. r |
\time 3/8
r4 r8 |
r4. |
r8. r |
\time 3/16
r8 r16 |
r8. |
r16. r |
\break
\time 3/32
r16 r32 |
r16. |
r32. r |
\time 3/64
r32 r64 |
r32. |
r64. r |
\time 3/128
r64 r128 |
r64. |
r128. r |
}
}
\include "paper16.ly"
\paper {
}
\score {
\context Staff = up <
\notes \relative c'' \context Voice = upper {
\voiceOne
\time 6/1
r\longa r\breve |
r\longa. |
r\breve. r |
\time 3/1
r\breve r1 |
r\breve. |
r1. r |
\time 3/2
r1 r2 |
r1. |
r2. r |
\break
\time 3/4
r2 r4 |
r2. |
r4. r |
\time 3/8
r4 r8 |
r4. |
r8. r |
\time 3/16
r8 r16 |
r8. |
r16. r |
\break
\time 3/32
r16 r32 |
r16. |
r32. r |
\time 3/64
r32 r64 |
r32. |
r64. r |
\time 3/128
r64 r128 |
r64. |
r128. r |
}
\notes \relative c'' \context Voice = lower {
\voiceTwo
\time 6/1
r\longa r\breve |
r\longa. |
r\breve. r |
\time 3/1
r\breve r1 |
r\breve. |
r1. r |
\time 3/2
r1 r2 |
r1. |
r2. r |
\break
\time 3/4
r2 r4 |
r2. |
r4. r |
\time 3/8
r4 r8 |
r4. |
r8. r |
\time 3/16
r8 r16 |
r8. |
r16. r |
\break
\time 3/32
r16 r32 |
r16. |
r32. r |
\time 3/64
r32 r64 |
r32. |
r64. r |
\time 3/128
r64 r128 |
r64. |
r128. r |
}
>
}
- placement of dot after whole rest,
Kim Shrier <=