Re: vertically center rests in polyphonic voices

2023-08-11 Thread Jin Choi
Thanks. This works if I match all the rests I want centered in both voices. 
William Rehwinkel’s suggestion of using a pitched rest also works, but is 
slightly more difficult to deal with in \relative mode as it may affect the 
notes following.

> On Aug 10, 2023, at 10:15 PM, David Wright  wrote:
> 
> On Thu 10 Aug 2023 at 20:27:39 (-0400), Jin Choi wrote:
>> I’m transcribing some piano music where it is helpful to use \voiceOne and 
>> \voiceTwo for some extended polyphonic sections. When I come across shared 
>> rests, I’ve been putting in rests in one voice and invisible rests in the 
>> other voice. But rests in voices are vertically offset from the center 
>> depending on which voice is in use:
>> 
>> \version "2.24.1"
>> 
>> upper = \relative c'' {
>>  \new Voice {
>>\voiceOne c4 r4 c4 r4
>>  }
>>  \new Voice {
>>\voiceTwo c4 r4 c4 r4
>>  }
>> }
>> \new Staff = "upper" \upper
>> 
>> 
>> I can fix that by exiting the voice context and going to \oneVoice for the 
>> rests, but is there an easier way just to have the rest vertically centered?
> 
> Take a look at:
> 
>  https://lilypond.org/doc/v2.25/Documentation/notation/merging-rests
> 
> which is something I haven't yet tried out. I assume this supercedes
> snippet 336 and corrected versions thereof.
> 
> Cheers,
> David.
> 




Re: vertically center rests in polyphonic voices

2023-08-10 Thread David Wright
On Thu 10 Aug 2023 at 20:27:39 (-0400), Jin Choi wrote:
> I’m transcribing some piano music where it is helpful to use \voiceOne and 
> \voiceTwo for some extended polyphonic sections. When I come across shared 
> rests, I’ve been putting in rests in one voice and invisible rests in the 
> other voice. But rests in voices are vertically offset from the center 
> depending on which voice is in use:
> 
> \version "2.24.1"
> 
> upper = \relative c'' {
>   \new Voice {
> \voiceOne c4 r4 c4 r4
>   }
>   \new Voice {
> \voiceTwo c4 r4 c4 r4
>   }
> }
> \new Staff = "upper" \upper
> 
> 
> I can fix that by exiting the voice context and going to \oneVoice for the 
> rests, but is there an easier way just to have the rest vertically centered?

Take a look at:

  https://lilypond.org/doc/v2.25/Documentation/notation/merging-rests

which is something I haven't yet tried out. I assume this supercedes
snippet 336 and corrected versions thereof.

Cheers,
David.



Re: vertically center rests in polyphonic voices

2023-08-10 Thread William Rehwinkel via LilyPond user discussion

Dear Jin,

You can write 4\rest instead of r4 to specify what "pitch" 
(vertical position) the rest should appear at. You should write the note 
that is the middle line of the staff for it to appear like a \oneVoice 
rest. So


\version "2.25.6"

upper = \relative c'' {
  \new Voice {
    \voiceOne c4 b4\rest c4 b4\rest
  }
  \new Voice {
    \voiceTwo c4 b4\rest c4 b4\rest
  }
}
\new Staff = "upper" \upper


Thanks,
-William

On 8/10/23 20:27, Jin Choi wrote:

\version "2.24.1"

upper = \relative c'' {
   \new Voice {
 \voiceOne c4 r4 c4 r4
   }
   \new Voice {
 \voiceTwo c4 r4 c4 r4
   }
}
\new Staff = "upper" \upper


--
+ --- +
|   William Rehwinkel - Oberlin College and   |
|  Conservatory '24   |
|will...@williamrehwinkel.net  |
| PGP key:|
|https://ftp.williamrehwinkel.net/pubkey.txt  |
+ --- +



OpenPGP_signature
Description: OpenPGP digital signature


vertically center rests in polyphonic voices

2023-08-10 Thread Jin Choi
I’m transcribing some piano music where it is helpful to use \voiceOne and 
\voiceTwo for some extended polyphonic sections. When I come across shared 
rests, I’ve been putting in rests in one voice and invisible rests in the other 
voice. But rests in voices are vertically offset from the center depending on 
which voice is in use:

\version "2.24.1"

upper = \relative c'' {
  \new Voice {
\voiceOne c4 r4 c4 r4
  }
  \new Voice {
\voiceTwo c4 r4 c4 r4
  }
}
\new Staff = "upper" \upper


I can fix that by exiting the voice context and going to \oneVoice for the 
rests, but is there an easier way just to have the rest vertically centered?