lilypond-user
[Top][All Lists]
Advanced

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

Re: need to move a single rest just a bit to the left


From: Patrick Stanistreet
Subject: Re: need to move a single rest just a bit to the left
Date: Wed, 11 Aug 2004 20:30:03 -0700
User-agent: Mozilla Thunderbird 0.7 (X11/20040615)


Mats,

I just wanted to thank you for the advice, it was very
helpful.  Did not have a clue about the properties of
the various voices but am moving foward to utilize your
ideas.  I have been using lily 1.6 until recently as
my redhat8 system was behind the times but now with a
recent upgrade to fedora 2 which has alsa and many
other nice features there is a lot new to learn.

If you are ever going to be in the Los Angeles area let me
know via email. I would like to thank you and buy you a drink.

The \override Rest  allowed me to finish the Sor piece.
I looked around in the mailing list and the documentation
but couldn't seem to find that specific information,
actually the programming stuff boggles my mind.



Mats Bengtsson wrote:
Unfortunately, there is no automatic support for this at
the moment, but I found a comment in the implementation
that this is on the TODO list (in the file lily/rest-collision.cc).
So, for the moment, you have to insert a property setting to move
it manually:
\override Rest #'extra-offset = #'(-2 . 0)

However, I have some other comments on your code:

The <<{...} \\ {...} \\ ... >> feature that you use is a bit more
intelligent then you probably have realized. This construct is
equivalent to
<< \context Voice = 1 {\voiceOne ...}
 \context Voice = 2 {\voiceTwo ...}
 \context Voice = 3 {\voiceThree ...}
 \context Voice = 4 {\voiceFour ...} >>
Which means, first of all, that the different voices are put
in separate Voice contexts, each of which can have separate
properties. Secondly, the VoiceOne, ..., \VoiceFour provide the
following:

\VoiceOne: Direction upwards, keep horizontal position at collisions
\VoiceTwo: Direction downwards, keep horizontal position at collisions
\VoiceThree: Direction upwards, move horizontally at collisions
\VoiceThree: Direction downwards, move horizontally at collisions

(the direction is the direction of both slurs, ties, stems,
articulations and so on).

This means that you want the upper voice to have \voiceOne, the
lower one to have \voiceTwo and probably the middle one to have
\voiceFour. This means that you don't need to add any \stemUp or
\stemDown manually. If the middle voice had started with a note
instead of a rest, then it would also move automatically to the
left (unfortunately, the rests don't at the moment as described above).
Since you don't really have any voice with the settings of \voiceThree,
you could either do:
<<  {  e''2  e''4  }  \\
    {  c'2.  } \\
    {} \\
    {  g'4\rest  g'2  }
      >>          |     %  16
or
<<  {  e''2  e''4  }  \\
    {  c'2.  } \\
    {  \voiceFour g'4\rest  g'2  }
      >>          |     %  16

If I were you, I would probably divide the input by voices and not
primarily by measures. Also, I would use \relative mode:

guitarra  =
{
\global
<<\relative c'' {
   e2  e4  | %16
   d2  d4  | %17
   c2  c4  | %18
  }  \\
  \relative c' {
   c2. | % 16
   f2. | % 17
   e2. | % 18
  } \\
  \relative c''{
   \voiceFour
   g4\rest g'2  | %16
   \override Rest #'extra-offset = #'(-2 . 0)  g'4\rest  g'2 | %17
   g'4\rest  g'2 | % 18
   \revert Rest #'extra-offset  % Stop moving the rests!
  }
 >>

   /Mats


Patrick Stanistreet wrote:

Starting to score some short pieces for guitar by Sor
and using lilypond 2.3.11

The measures in question have 3 voices and the upper and
lower voices are too close together on the staff so the
rest overlaps the notes.  The original manuscript moves the
center rest slightly to the left and in the clear.

In measure 17 the rest in the middle voice is positioned
in between the upper and lower voices so now I just need
to move the rest a bit to the left.  The next measure
moves the rest below the staff which I suppose is the
default.


***************************

\version "2.3.10"

global  =
{
\time  3/4
\clef  "treble"
\key c \major
\transposition c
\set Staff.midiInstrument = #"acoustic guitar (nylon)"
}

guitarra  =
{
\global

<<  {  e''2  e''4  }  \\
    {  g'4\rest  g'2  }  \\
    {  \stemDown  c'2.  }  >>          |     %  16
%   17
<<  {  \stemUp  d''2  d''4  }  \\
%    {  r4  g'2  }  \\
    {   g'4\rest  g'2  }  \\
    {  \stemDown  f'2.  }  >>          |     %  17

<<  {  c''2  c''4  }  \\
    {  r4  g'2  }  \\
%    {  g'4\rest  g'2  }  \\
    {  \stemDown  e'2.  }  >>          |     %  18
}

\score {
  \context Staff = guitar  <<
    \set Staff.instrument =
    \markup  {  \bold \huge  " 3"  }
    \guitarra
 >>
\paper{ #(set-paper-size "letter")
}
\midi { \tempo 4 = 120 }
}

***************************



_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user






reply via email to

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