Rests vertical position problem

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Rests vertical position problem

Jacques Menu Muzhic
Hello folks,

In the attached example, the \voiceOne and \voiceTwo commands used for the first score lead to the eigth rests in measure 2 to appear too high.

Removing them as in the second score makes the look more satisfying in this regard, but then measure 1 gets awful.

Is there a way to use some equivalent of \voiceOne and \voiceTwo measure-wise in such a case, using it only in measures that have more than one voice playing?

Thanks for your help!

JM





PastedGraphic-2.tiff (31K) Download Attachment
RestsVerticalPositionProblemSubmittedToList.ly (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Rests vertical position problem

Jacques Menu Muzhic
I know I could use \rest to control the placement of rests manually, but this code is created from MusicXML automatically.
musicxml2ly exhibits the same behaviour as the first score shown, BTW.

JM

> Le 19 mai 2020 à 09:25, Jacques Menu <[hidden email]> a écrit :
>
> Hello folks,
>
> In the attached example, the \voiceOne and \voiceTwo commands used for the first score lead to the eigth rests in measure 2 to appear too high.
>
> Removing them as in the second score makes the look more satisfying in this regard, but then measure 1 gets awful.
>
> Is there a way to use some equivalent of \voiceOne and \voiceTwo measure-wise in such a case, using it only in measures that have more than one voice playing?
>
> Thanks for your help!
>
> JM
>
> <PastedGraphic-2.tiff>
>
> <RestsVerticalPositionProblemSubmittedToList.ly>


Reply | Threaded
Open this post in threaded view
|

Re: Rests vertical position problem

Valentin Villenave-3
In reply to this post by Jacques Menu Muzhic
On 5/19/20, Jacques Menu <[hidden email]> wrote:
> In the attached example, the \voiceOne and \voiceTwo commands used for the
> first score lead to the eigth rests in measure 2 to appear too high.

Well, it’s merely printed the way the source code’s requesting it.
\voiceOne rests are consistently placed at the top of the staff.

> Is there a way to use some equivalent of \voiceOne and \voiceTwo
> measure-wise in such a case, using it only in measures that have more than
> one voice playing?

I *think* your best bet would be to take a look at the
#Merge_rests_engravers (in scm/scheme-engravers.scm), which should be
able to handle that sort of case (I just checked; it currently
doesn’t). You could then \consist it into all your Staff contexts by
default.

By the way, why is xml2ly \tempo markup so convoluted when you could have simply

    \tempo "" 4 = 110

(plus, it would remove the need for \markup \note, whose syntax has
recently changed.)

Cheers,
V.

Reply | Threaded
Open this post in threaded view
|

Re: Rests vertical position problem

Robin Bannister-2
In reply to this post by Jacques Menu Muzhic
On 19.05.2020 09:25, Jacques Menu wrote:

> Is there a way to use some equivalent of \voiceOne and \voiceTwo measure-wise in such a case, using it only in measures that have more than one voice playing?
>

The rests in measure 1 occurs while another voice is playing.  The rests
in measure 2 occur while no voice is playing.  There will also be
measures which have both sorts of rest occurrances.

One approach is to provide a third voice, using \oneVoice, just for
those rests which occur while no voice is playing.  And ensure that
those non-playing voices then use skips.

Another approach is given at
http://lilypond.org/doc/v2.20/Documentation/notation/multiple-voices.html#merging-rests


Cheers,
Robin

Reply | Threaded
Open this post in threaded view
|

Re: Rests vertical position problem

Jacques Menu Muzhic
In reply to this post by Valentin Villenave-3
Hello Valentin,

> Le 19 mai 2020 à 10:02, Valentin Villenave <[hidden email]> a écrit :
>
> On 5/19/20, Jacques Menu <[hidden email]> wrote:
>> In the attached example, the \voiceOne and \voiceTwo commands used for the
>> first score lead to the eigth rests in measure 2 to appear too high.
>
> Well, it’s merely printed the way the source code’s requesting it.
> \voiceOne rests are consistently placed at the top of the staff.
>
>> Is there a way to use some equivalent of \voiceOne and \voiceTwo
>> measure-wise in such a case, using it only in measures that have more than
>> one voice playing?
>
> I *think* your best bet would be to take a look at the
> #Merge_rests_engravers (in scm/scheme-engravers.scm), which should be
> able to handle that sort of case (I just checked; it currently
> doesn’t). You could then \consist it into all your Staff contexts by
> default.

I’ll have a look at the Merge_rests_engravers, thanks.

> By the way, why is xml2ly \tempo markup so convoluted when you could have simply
>
>    \tempo "" 4 = 110
>
> (plus, it would remove the need for \markup \note, whose syntax has
> recently changed.)

This dates back to four years ago, when I started working on xml2ly... Thanks for pointing this enhancement out!

JM


Reply | Threaded
Open this post in threaded view
|

Re: Rests vertical position problem

Jacques Menu Muzhic
I tried:

      \new Staff = "Part_POne_Staff_One"
      \with {
        \consists "Merge_rests_engraver"
      }

This doesn’t change the position of the rests in measure 2, since there’s a single voice playing then.

JM


Le 19 mai 2020 à 10:14, Jacques Menu <[hidden email]> a écrit :

Hello Valentin,

Le 19 mai 2020 à 10:02, Valentin Villenave <[hidden email]> a écrit :

On 5/19/20, Jacques Menu <[hidden email]> wrote:
In the attached example, the \voiceOne and \voiceTwo commands used for the
first score lead to the eigth rests in measure 2 to appear too high.

Well, it’s merely printed the way the source code’s requesting it.
\voiceOne rests are consistently placed at the top of the staff.

Is there a way to use some equivalent of \voiceOne and \voiceTwo
measure-wise in such a case, using it only in measures that have more than
one voice playing?

I *think* your best bet would be to take a look at the
#Merge_rests_engravers (in scm/scheme-engravers.scm), which should be
able to handle that sort of case (I just checked; it currently
doesn’t). You could then \consist it into all your Staff contexts by
default.

I’ll have a look at the Merge_rests_engravers, thanks.

By the way, why is xml2ly \tempo markup so convoluted when you could have simply

  \tempo "" 4 = 110

(plus, it would remove the need for \markup \note, whose syntax has
recently changed.)

This dates back to four years ago, when I started working on xml2ly... Thanks for pointing this enhancement out!

JM

Reply | Threaded
Open this post in threaded view
|

Re: Rests vertical position problem

Valentin Villenave-3
In reply to this post by Jacques Menu Muzhic
On 5/19/20, Jacques Menu <[hidden email]> wrote:
> This doesn’t change the position of the rests in measure 2, since there’s a
> single voice playing then.

Well, yes: as I said, it doesn’t work yet.  (And the way it’s
currently written, I suspect it would require some fairly substantial
changes.  Or perhaps a whole new Scheme engraver; I’m tempted to look
into it because it would certainly be quite useful.)

On 5/19/20, Jacques Menu <[hidden email]> wrote:
> This dates back to four years ago, when I started working on xml2ly...
> Thanks for pointing this enhancement out!

Huh, the
    \tempo "text" dur = bpm
actually dates back to 2008 (it was implemented by Reinhold precisely
for musicxml2ly, and then I added a few additional features a couple
years later).  It’s been available since 2.12.

Cheers,
-- V.

Reply | Threaded
Open this post in threaded view
|

RE: Rests vertical position problem

Mark Stephen Mrotek
In reply to this post by Jacques Menu Muzhic
Jacques,

Look at
http://lsr.di.unimi.it/LSR/Search?q=merge+rests

Mark

-----Original Message-----
From: lilypond-user [mailto:lilypond-user-bounces+carsonmark=[hidden email]] On Behalf Of Jacques Menu
Sent: Tuesday, May 19, 2020 12:32 AM
To: lilypond-user <[hidden email]>
Subject: Re: Rests vertical position problem

I know I could use \rest to control the placement of rests manually, but this code is created from MusicXML automatically.
musicxml2ly exhibits the same behaviour as the first score shown, BTW.

JM

> Le 19 mai 2020 à 09:25, Jacques Menu <[hidden email]> a écrit :
>
> Hello folks,
>
> In the attached example, the \voiceOne and \voiceTwo commands used for the first score lead to the eigth rests in measure 2 to appear too high.
>
> Removing them as in the second score makes the look more satisfying in this regard, but then measure 1 gets awful.
>
> Is there a way to use some equivalent of \voiceOne and \voiceTwo measure-wise in such a case, using it only in measures that have more than one voice playing?
>
> Thanks for your help!
>
> JM
>
> <PastedGraphic-2.tiff>
>
> <RestsVerticalPositionProblemSubmittedToList.ly>



Reply | Threaded
Open this post in threaded view
|

Re: Rests vertical position problem

Jacques Menu Muzhic
In reply to this post by Valentin Villenave-3


> Le 19 mai 2020 à 16:42, Valentin Villenave <[hidden email]> a écrit :
>
> On 5/19/20, Jacques Menu <[hidden email]> wrote:
>> This doesn’t change the position of the rests in measure 2, since there’s a
>> single voice playing then.
>
> Well, yes: as I said, it doesn’t work yet.  (And the way it’s
> currently written, I suspect it would require some fairly substantial
> changes.  Or perhaps a whole new Scheme engraver; I’m tempted to look
> into it because it would certainly be quite useful.)
>
> On 5/19/20, Jacques Menu <[hidden email]> wrote:
>> This dates back to four years ago, when I started working on xml2ly...
>> Thanks for pointing this enhancement out!
>
> Huh, the
>    \tempo "text" dur = bpm
> actually dates back to 2008 (it was implemented by Reinhold precisely
> for musicxml2ly, and then I added a few additional features a couple
> years later).  It’s been available since 2.12.
>

Actually my code handles more complex tempo marks, and this simple case pays the price for that.
Will fix that, thanks!

JM


Reply | Threaded
Open this post in threaded view
|

Re: Rests vertical position problem

Jacques Menu Muzhic
In reply to this post by Mark Stephen Mrotek
Hello Mark,

Thanks a lot, I looked at the snippets doc and missed that…

Will make good use of it!

JM

> Le 19 mai 2020 à 16:45, Mark Stephen Mrotek <[hidden email]> a écrit :
>
> Jacques,
>
> Look at
> http://lsr.di.unimi.it/LSR/Search?q=merge+rests
>
> Mark
>
> -----Original Message-----
> From: lilypond-user [mailto:lilypond-user-bounces+carsonmark=[hidden email]] On Behalf Of Jacques Menu
> Sent: Tuesday, May 19, 2020 12:32 AM
> To: lilypond-user <[hidden email]>
> Subject: Re: Rests vertical position problem
>
> I know I could use \rest to control the placement of rests manually, but this code is created from MusicXML automatically.
> musicxml2ly exhibits the same behaviour as the first score shown, BTW.
>
> JM
>
>> Le 19 mai 2020 à 09:25, Jacques Menu <[hidden email]> a écrit :
>>
>> Hello folks,
>>
>> In the attached example, the \voiceOne and \voiceTwo commands used for the first score lead to the eigth rests in measure 2 to appear too high.
>>
>> Removing them as in the second score makes the look more satisfying in this regard, but then measure 1 gets awful.
>>
>> Is there a way to use some equivalent of \voiceOne and \voiceTwo measure-wise in such a case, using it only in measures that have more than one voice playing?
>>
>> Thanks for your help!
>>
>> JM
>>
>> <PastedGraphic-2.tiff>
>>
>> <RestsVerticalPositionProblemSubmittedToList.ly>
>
>


Reply | Threaded
Open this post in threaded view
|

RE: Rests vertical position problem

Mark Stephen Mrotek
Jacques,

Most welcome.

Mark

-----Original Message-----
From: Jacques Menu [mailto:[hidden email]]
Sent: Tuesday, May 19, 2020 8:00 AM
To: Mark Stephen Mrotek <[hidden email]>
Cc: Jacques Menu <[hidden email]>; lilypond-user <[hidden email]>
Subject: Re: Rests vertical position problem

Hello Mark,

Thanks a lot, I looked at the snippets doc and missed that…

Will make good use of it!

JM

> Le 19 mai 2020 à 16:45, Mark Stephen Mrotek <[hidden email]> a écrit :
>
> Jacques,
>
> Look at
> http://lsr.di.unimi.it/LSR/Search?q=merge+rests
>
> Mark
>
> -----Original Message-----
> From: lilypond-user [mailto:lilypond-user-bounces+carsonmark=[hidden email]] On Behalf Of Jacques Menu
> Sent: Tuesday, May 19, 2020 12:32 AM
> To: lilypond-user <[hidden email]>
> Subject: Re: Rests vertical position problem
>
> I know I could use \rest to control the placement of rests manually, but this code is created from MusicXML automatically.
> musicxml2ly exhibits the same behaviour as the first score shown, BTW.
>
> JM
>
>> Le 19 mai 2020 à 09:25, Jacques Menu <[hidden email]> a écrit :
>>
>> Hello folks,
>>
>> In the attached example, the \voiceOne and \voiceTwo commands used for the first score lead to the eigth rests in measure 2 to appear too high.
>>
>> Removing them as in the second score makes the look more satisfying in this regard, but then measure 1 gets awful.
>>
>> Is there a way to use some equivalent of \voiceOne and \voiceTwo measure-wise in such a case, using it only in measures that have more than one voice playing?
>>
>> Thanks for your help!
>>
>> JM
>>
>> <PastedGraphic-2.tiff>
>>
>> <RestsVerticalPositionProblemSubmittedToList.ly>
>
>