Re: Why the whole bar rests wider and can't I change the width?

2021-08-16 Thread takumi ikeda
Dear all,

Thank you for your useful advice.
I have not seen \newSpacingSection before, and it works very well.

> This is the most laborious method, giving detailed control, though.

I compose using a program, so it's easy to write the same thing a
hundred times. ;-)

Unfortunately, the method of overriding the duration was not good. It
reduced the readability of the non-MMR bars.

As a composer, I can tell you that a score is given to the performer.
No matter how well it is written, it is useless if it is difficult to
read or inconvenient for the performer.
Of course, my work must be strange, but when the number of pages
increases because of the many MMRs, the performer has to turn one more
page.
The MMR is an instruction to rest for the number of bars indicated,
and the width of the bars is not necessary information imho.
I don't think I need the feature to fix the width of the MMR depending
on the duration. However, others may need it. So I believe it is
important that the user can choose.

Sincerely,
Takumi



Re: Why the whole bar rests wider and can't I change the width?

2021-08-11 Thread lilypond
I’m not sure what you mean by too wide. Lilypond handles full bar rests like 
this: Each full measure rest attempts to have about the same width as the 
measures next to it. But if space is required, it will be compressed to what 
length you need. So the reason why Lilypond does not use smaller full bar 
rests in your example is because there is no need for it. If you force a 
tighter horizontal Spacing so that Lilypond can in fact fit two of your 
complicated measures on one staff you will see that the full bar rests will be 
compressed to make that possible.

That being said, if you want to force Lilypond to use tighter rests, you could 
use \newSpacingSection before and after the rest so that each of these parts 
handles spacing separately. This is probably not a very good idea in most 
cases. Another way to force the rest to take a different spacing would be 
adding hidden notes that force a different spacing.

E.g. in your case you could do

<< R4*5 \new Voice { \hideNotes r1 r4 } >>

To achieve the spacing you wanted. You could even assign

fbr = << R4*5 \new Voice { \hideNotes r1 r4 } >>

Then you only need to call \fbr, or if you want to span multiple measures you 
could do

mbr =
#(define-music-function (n) (number?)
   #{
 << R4*#(ly:make-moment (* 5 n))
  \new Voice { \hideNotes \repeat unfold $n { r1 r4 } } >>
   #})

To simply do \mbr 3 to get three full bar rests.

Of course this is a hack and limited, and only really useful when you want 
exact control over the width of the rest.

Cheers,
Valentin

signature.asc
Description: This is a digitally signed message part.


Re: Why the whole bar rests wider and can't I change the width?

2021-08-11 Thread ole



> Am 11.08.2021 um 12:13 schrieb Thomas Morley :
> 
> Am Mi., 11. Aug. 2021 um 07:51 Uhr schrieb takumi ikeda :
>> 
>> \version "2.22.1"
>> 
>> {
>>  \clef bass
>>  \time 5/4 r8 r16. g32 f32 a32 d32 a32 r8 r2 r4
>>  r1 r4
>>  r2 f32 d32 g32 a,32 a32 r16. r4 r4
>>  r1 r4
>> }
>> 
>> % The whole bar rests below are too wide.
>> {
>>  \clef bass
>>  \time 5/4 r8 r16. g32 f32 a32 d32 a32 r8 r2 r4
>>  R4*5
>>  r2 f32 d32 g32 a,32 a32 r16. r4 r4
>>  R4*5
>> }
>> 
> 
> The spacing is under control of the SpacingSpanner. In your example
> the shortest notes/rests are 1/32, the largest 4*5.
> Thus the common-shortest-duration is small and the spacing of the MMRs
> is calculated in multiples of the 1/32 spacing.
> (Disclaimer: this is a shortened explanation).
> 
> Whether the MMR-spacing is too wide is a matter of taste, imho.
> 
> Though, there are possibilities to change the behaviour.
> 
> (1) Manually change common-shortest-duration
> {
>  \override Score.SpacingSpanner.common-shortest-duration =
> #(ly:make-moment 1/20)
>  \clef bass
>  \time 5/4 r8 r16. g32 f32 a32 d32 a32 r8 r2 r4
>  R4*5
>  r2 f32 d32 g32 a,32 a32 r16. r4 r4
>  R4*5
> }
> Ofcourse 1/32-spacing is directly affected as well.
> 
> (2) use \newSpacingSection and adjust MultiMeasureRest.bound-padding
> \newSpacingSection will start a new SpacingSpanner. Thus
> common-shortest-duration will be recalculated.
> MultiMeasureRest.bound-padding could be used to adjust MMR-spacing to taste.
> {
>  \override MultiMeasureRest.bound-padding = 3
>  \clef bass
>  \time 5/4 r8 r16. g32 f32 a32 d32 a32 r8 r2 r4
>  \newSpacingSection
>  R4*5
>  \newSpacingSection
>  r2 f32 d32 g32 a,32 a32 r16. r4 r4
>  \newSpacingSection
>  R4*5
> }
> This is the most laborious method, giving detailed control, though.
> 
> HTH,
>  Harm
> 


You also can make usage of proportional notation if that maybe suits your needs.

\version "2.22.1"



{
 \clef bass
 \time 5/4 r8 r16. g32 f32 a32 d32 a32 r8 r2 r4
 r1 r4
 r2 f32 d32 g32 a,32 a32 r16. r4 r4
 r1 r4
}

% The whole bar rests below are too wide.
{
 \clef bass
 \time 5/4 r8 r16. g32 f32 a32 d32 a32 r8 r2 r4
 R4*5
 r2 f32 d32 g32 a,32 a32 r16. r4 r4
 R4*5
}


\layout {indent = 0\cm
\context { \Score

 proportionalNotationDuration = #(ly:make-moment 1/24)
}}


Re: Why the whole bar rests wider and can't I change the width?

2021-08-11 Thread Thomas Morley
Am Mi., 11. Aug. 2021 um 07:51 Uhr schrieb takumi ikeda :
>
> \version "2.22.1"
>
> {
>   \clef bass
>   \time 5/4 r8 r16. g32 f32 a32 d32 a32 r8 r2 r4
>   r1 r4
>   r2 f32 d32 g32 a,32 a32 r16. r4 r4
>   r1 r4
> }
>
> % The whole bar rests below are too wide.
> {
>   \clef bass
>   \time 5/4 r8 r16. g32 f32 a32 d32 a32 r8 r2 r4
>   R4*5
>   r2 f32 d32 g32 a,32 a32 r16. r4 r4
>   R4*5
> }
>

The spacing is under control of the SpacingSpanner. In your example
the shortest notes/rests are 1/32, the largest 4*5.
Thus the common-shortest-duration is small and the spacing of the MMRs
is calculated in multiples of the 1/32 spacing.
(Disclaimer: this is a shortened explanation).

Whether the MMR-spacing is too wide is a matter of taste, imho.

Though, there are possibilities to change the behaviour.

(1) Manually change common-shortest-duration
{
  \override Score.SpacingSpanner.common-shortest-duration =
#(ly:make-moment 1/20)
  \clef bass
  \time 5/4 r8 r16. g32 f32 a32 d32 a32 r8 r2 r4
  R4*5
  r2 f32 d32 g32 a,32 a32 r16. r4 r4
  R4*5
}
Ofcourse 1/32-spacing is directly affected as well.

(2) use \newSpacingSection and adjust MultiMeasureRest.bound-padding
\newSpacingSection will start a new SpacingSpanner. Thus
common-shortest-duration will be recalculated.
MultiMeasureRest.bound-padding could be used to adjust MMR-spacing to taste.
{
  \override MultiMeasureRest.bound-padding = 3
  \clef bass
  \time 5/4 r8 r16. g32 f32 a32 d32 a32 r8 r2 r4
  \newSpacingSection
  R4*5
  \newSpacingSection
  r2 f32 d32 g32 a,32 a32 r16. r4 r4
  \newSpacingSection
  R4*5
}
This is the most laborious method, giving detailed control, though.

HTH,
  Harm



Why the whole bar rests wider and can't I change the width?

2021-08-10 Thread takumi ikeda
\version "2.22.1"

{
  \clef bass
  \time 5/4 r8 r16. g32 f32 a32 d32 a32 r8 r2 r4
  r1 r4
  r2 f32 d32 g32 a,32 a32 r16. r4 r4
  r1 r4
}

% The whole bar rests below are too wide.
{
  \clef bass
  \time 5/4 r8 r16. g32 f32 a32 d32 a32 r8 r2 r4
  R4*5
  r2 f32 d32 g32 a,32 a32 r16. r4 r4
  R4*5
}