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: Mats Bengtsson
Subject: Re: need to move a single rest just a bit to the left
Date: Wed, 11 Aug 2004 14:12:55 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

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

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
        Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================




reply via email to

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