Re: Wildly different horizontal spacing in two similar scores.

2022-03-19 Thread Paul Hodges
I don't use that - I specify the exact number of systems I want, and on how 
many pages, using:
\paper {
  system-count = xx
  page-count = yy
}


This forces the length to be stretched to the extent I require; then detailed 
adjustments can be made with \break and \pageBreak.


Paul



 From:   Richard Shann  

I've tried adding 
 \paper { 
    systems-per-page = 20 
   } 

 
 


Re: Wildly different horizontal spacing in two similar scores.

2022-03-19 Thread Richard Shann
On Sat, 2022-03-19 at 12:49 +, Paul Hodges wrote:
> I don't use that - I specify the exact number of systems I want, and
> on how many pages, using:
> \paper {
>   system-count = xx
>   page-count = yy
> }
> 
> This forces the length to be stretched to the extent I require; then
> detailed adjustments can be made with \break and \pageBreak.

Thanks for this, it works well, the only thing to watch is when you
specify too few systems the last one runs off the right hand side.

Richard


> 
> Paul
> 
> 
> From: Richard Shann 
> > 
> > I've tried adding
> >  \paper {
> >     systems-per-page = 20
> >    }
> > 
> > 
> > 





can someone point me to complete documentation for the partial command argument syntax?

2022-03-19 Thread Sam Roberts
I'm still baffled by it. After experimentation, I found this worked:

\time 3/4 \partial 1 c4 |

But "1"? 1 what? The pickup is a 2, and if I do this barcheck passes,
as I expect:

\time 3/4  c2 c4 |

So from the doc examples I'd expect "\partial 2" to indicate a
half/note pickup, but it fails.

https://music.stackexchange.com/questions/106875/how-to-write-a-pickup-measure-with-5-16-duration-in-lilypond
has some examples using the star operator, but I haven't found any ref
for how to specify rationals. I don't really understand what's on the
left and right of the "*", and I don't understand if the fractions are
true fractions, or note fractions. Not sure what the right term for
that, but in 3/4 time there are 3 1/4 notes in a whole bar, so the
pickup in above is 2/3 of a bar, but is two 1/4 notes, or one 1/2 note
(which takes 2/3 of the bar). I tried to use both approaches, no luck.

These fails the bar check, an attempt at saying 2 quarter notes:

\partial 2*1/4 c'4 |

This is syntax failure:

\partial 2/3 c'4 |

wrong type for argument 1.  Expecting duration, found (cons 2 3)

I've searched for docs on the duration syntax, but I'm not succeeding yet.

Can someone point me to docs, or perhaps explain the syntax?

https://lilypond.org/doc/v2.21/Documentation/learning/advanced-rhythmic-commands#partial-measure
as an example, just has a couple examples, but not a complete syntax.


Thank you,
Sam



Re: can someone point me to complete documentation for the partial command argument syntax?

2022-03-19 Thread Sam Roberts
I tried so hard to be accurate, but I missed something:

On Sat, Mar 19, 2022 at 12:38 PM Sam Roberts  wrote:
> After experimentation, I found this worked:
>
> \time 3/4 \partial 1 c4 |

It "works" in that pdf output looks ok, c4 is in the pickup bar, but
still warns about the bar checks, as it should.



Re: can someone point me to complete documentation for the partial command argument syntax?

2022-03-19 Thread David Kastrup
Sam Roberts  writes:

> I tried so hard to be accurate, but I missed something:
>
> On Sat, Mar 19, 2022 at 12:38 PM Sam Roberts  wrote:
>> After experimentation, I found this worked:
>>
>> \time 3/4 \partial 1 c4 |
>
> It "works" in that pdf output looks ok, c4 is in the pickup bar, but
> still warns about the bar checks, as it should.

Please don't just dump partial code that does not compile: this makes it
impossible to accurately see what you are doing.

You probably are using \partial wrong: its argument does not specify how
long it is _since_ a full bar but how long it is _to_ a full bar.

As such, you'd usually see

   ... \time 3/4 \partial 4 c4 | ...

in typical contexts.

-- 
David Kastrup



Re: can someone point me to complete documentation for the partial command argument syntax?

2022-03-19 Thread Sam Roberts
On Sat, Mar 19, 2022 at 1:01 PM David Kastrup  wrote:
> You probably are using \partial wrong: its argument does not specify how
> long it is _since_ a full bar but how long it is _to_ a full bar.

Thank you, that was definitely a problem, I hadn't understood that.

For my more general understanding, is there documentation anywhere for
the syntax of the argument to partial? Something that will explain the
* syntax shown on this page?

https://music.stackexchange.com/questions/106875/how-to-write-a-pickup-measure-with-5-16-duration-in-lilypond

Thanks,
Sam



Re: can someone point me to complete documentation for the partial command argument syntax?

2022-03-19 Thread Carl Sorensen
On Sat, Mar 19, 2022 at 2:41 PM Sam Roberts  wrote:

>
> For my more general understanding, is there documentation anywhere for
> the syntax of the argument to partial? Something that will explain the
> * syntax shown on this page?
>
>
> https://music.stackexchange.com/questions/106875/how-to-write-a-pickup-measure-with-5-16-duration-in-lilypond
>
> The argument to \partial is a duration.

The * syntax is described here:

https://lilypond.org/doc/v2.22/Documentation/notation/writing-rhythms#scaling-durations

The 16*5 means a duration of 1/16 multiplied by 5 which is 5/16, exactly
what you wanted.

Thanks,

Carl

>
>


Re: can someone point me to complete documentation for the partial command argument syntax?

2022-03-19 Thread Michael Gerdau

> For my more general understanding, is there documentation anywhere for
> the syntax of the argument to partial? Something that will explain the
> * syntax shown on this page?
That is simple. The argument to \partial is a duration.

> 
https://music.stackexchange.com/questions/106875/how-to-write-a-pickup-measure-with-5-16-duration-in-lilypond
All the examples on that page shown display different ways to provide 
the same duration.


HTH,
Michael
--
 Michael Gerdau   email: m...@qata.de
 GPG-keys available on request or at public keyserver



Re: can someone point me to complete documentation for the partial command argument syntax?

2022-03-19 Thread Sam Roberts
> The * syntax is described here:
>
> https://lilypond.org/doc/v2.22/Documentation/notation/writing-rhythms#scaling-durations

Thank you, that's perfect.

Sam



Should \partial accept music instead of duration?

2022-03-19 Thread Aaron Hill

Here would be a possible refactoring:


\version "2.22.0"

partial =
#(define-music-function (mus) (ly:music?)
  (_i "Make a partial measure.")
  (let* ((mom (ly:music-length mus))
 (dur (make-duration-of-length mom)))
(make-music 'SequentialMusic
  'elements
  (list (context-spec-music
  (make-music 'PartialSet
  'origin (*location*)
  'duration dur)
  'Timing)
mus


\fixed c' {
  \time 3/4
  \partial { g8 a4 }
  | g2. \bar "||"
  \partial { \grace { g16 } a8 b }
  | a2. \bar "||"
  \partial \tuplet 3/2 { g8 fis }
  | g2. \bar "|."
}


A convert-ly rule would probably not be possible given the limited power 
of regular expressions.  As such, \partial might need to support both 
duration and music arguments.  Initially I thought this might not be 
possible, given that a naked duration can be treated as music; but the 
following does seem to work:



\version "2.22.0"

#(define (duration-or-music? arg)
  (or (ly:duration? arg) (ly:music? arg)))

partial =
#(define-music-function (arg) (duration-or-music?)
  (_i "Make a partial measure.")
  (if (ly:duration? arg)
(context-spec-music
  (make-music 'PartialSet
  'origin (*location*)
  'duration arg)
  'Timing)
(let* ((mom (ly:music-length arg))
   (dur (make-duration-of-length mom)))
  (make-music 'SequentialMusic
'elements
(list (context-spec-music
(make-music 'PartialSet
'origin (*location*)
'duration dur)
'Timing)
  arg)


\fixed c' {
  \time 3/4
  \partial 4. g8 a4 %% Original syntax works.
  | g2. \bar "||"
  \partial { \grace { g16 } a8 b }
  | a2. \bar "||"
  \partial \tuplet 3/2 { g8 fis }
  | g2. \bar "|."
}



-- Aaron Hill

Re: Should \partial accept music instead of duration?

2022-03-19 Thread Thomas Morley
Am So., 20. März 2022 um 00:02 Uhr schrieb Aaron Hill
:
>
> Here would be a possible refactoring:
>
> 
> \version "2.22.0"
>
> partial =
> #(define-music-function (mus) (ly:music?)
>(_i "Make a partial measure.")
>(let* ((mom (ly:music-length mus))
>   (dur (make-duration-of-length mom)))
>  (make-music 'SequentialMusic
>'elements
>(list (context-spec-music
>(make-music 'PartialSet
>'origin (*location*)
>'duration dur)
>'Timing)
>  mus
>
>
> \fixed c' {
>\time 3/4
>\partial { g8 a4 }
>| g2. \bar "||"
>\partial { \grace { g16 } a8 b }
>| a2. \bar "||"
>\partial \tuplet 3/2 { g8 fis }
>| g2. \bar "|."
> }
> 
>
> A convert-ly rule would probably not be possible given the limited power
> of regular expressions.  As such, \partial might need to support both
> duration and music arguments.  Initially I thought this might not be
> possible, given that a naked duration can be treated as music; but the
> following does seem to work:
>
> 
> \version "2.22.0"
>
> #(define (duration-or-music? arg)
>(or (ly:duration? arg) (ly:music? arg)))
>
> partial =
> #(define-music-function (arg) (duration-or-music?)
>(_i "Make a partial measure.")
>(if (ly:duration? arg)
>  (context-spec-music
>(make-music 'PartialSet
>'origin (*location*)
>'duration arg)
>'Timing)
>  (let* ((mom (ly:music-length arg))
> (dur (make-duration-of-length mom)))
>(make-music 'SequentialMusic
>  'elements
>  (list (context-spec-music
>  (make-music 'PartialSet
>  'origin (*location*)
>  'duration dur)
>  'Timing)
>arg)
>
>
> \fixed c' {
>\time 3/4
>\partial 4. g8 a4 %% Original syntax works.
>| g2. \bar "||"
>\partial { \grace { g16 } a8 b }
>| a2. \bar "||"
>\partial \tuplet 3/2 { g8 fis }
>| g2. \bar "|."
> }
> 
>
>
> -- Aaron Hill

Hi Aaron,

I really like it! Always wondered why we need to specify a duration,
if it can be taken from the music.
I'd suggest to propose it on devel. Preferable the second coding,
because we could nicely deprecate the old syntax for some versions.

Thanks,
  Harm



Re: Should \partial accept music instead of duration?

2022-03-19 Thread Aaron Hill

On 2022-03-19 5:46 pm, Thomas Morley wrote:

Am So., 20. März 2022 um 00:02 Uhr schrieb Aaron Hill
:


Here would be a possible refactoring:


\version "2.22.0"

partial =
#(define-music-function (mus) (ly:music?)
   (_i "Make a partial measure.")
   (let* ((mom (ly:music-length mus))
  (dur (make-duration-of-length mom)))
 (make-music 'SequentialMusic
   'elements
   (list (context-spec-music
   (make-music 'PartialSet
   'origin (*location*)
   'duration dur)
   'Timing)
 mus


\fixed c' {
   \time 3/4
   \partial { g8 a4 }
   | g2. \bar "||"
   \partial { \grace { g16 } a8 b }
   | a2. \bar "||"
   \partial \tuplet 3/2 { g8 fis }
   | g2. \bar "|."
}


A convert-ly rule would probably not be possible given the limited 
power

of regular expressions.  As such, \partial might need to support both
duration and music arguments.  Initially I thought this might not be
possible, given that a naked duration can be treated as music; but the
following does seem to work:


\version "2.22.0"

#(define (duration-or-music? arg)
   (or (ly:duration? arg) (ly:music? arg)))

partial =
#(define-music-function (arg) (duration-or-music?)
   (_i "Make a partial measure.")
   (if (ly:duration? arg)
 (context-spec-music
   (make-music 'PartialSet
   'origin (*location*)
   'duration arg)
   'Timing)
 (let* ((mom (ly:music-length arg))
(dur (make-duration-of-length mom)))
   (make-music 'SequentialMusic
 'elements
 (list (context-spec-music
 (make-music 'PartialSet
 'origin (*location*)
 'duration dur)
 'Timing)
   arg)


\fixed c' {
   \time 3/4
   \partial 4. g8 a4 %% Original syntax works.
   | g2. \bar "||"
   \partial { \grace { g16 } a8 b }
   | a2. \bar "||"
   \partial \tuplet 3/2 { g8 fis }
   | g2. \bar "|."
}



-- Aaron Hill


Hi Aaron,

I really like it! Always wondered why we need to specify a duration,
if it can be taken from the music.
I'd suggest to propose it on devel. Preferable the second coding,
because we could nicely deprecate the old syntax for some versions.


*facepalm*  I thought I was sending to devel.  Well, folks on user might 
want to chime in too.



-- Aaron Hill



Re: Should \partial accept music instead of duration?

2022-03-19 Thread Kenneth Wolcott
Hi Aaron;

  I **LIKE** it.

Thanks,
Ken Wolcott

On Sat, Mar 19, 2022 at 5:54 PM Aaron Hill  wrote:
>
> On 2022-03-19 5:46 pm, Thomas Morley wrote:
> > Am So., 20. März 2022 um 00:02 Uhr schrieb Aaron Hill
> > :
> >>
> >> Here would be a possible refactoring:
> >>
> >> 
> >> \version "2.22.0"
> >>
> >> partial =
> >> #(define-music-function (mus) (ly:music?)
> >>(_i "Make a partial measure.")
> >>(let* ((mom (ly:music-length mus))
> >>   (dur (make-duration-of-length mom)))
> >>  (make-music 'SequentialMusic
> >>'elements
> >>(list (context-spec-music
> >>(make-music 'PartialSet
> >>'origin (*location*)
> >>'duration dur)
> >>'Timing)
> >>  mus
> >>
> >>
> >> \fixed c' {
> >>\time 3/4
> >>\partial { g8 a4 }
> >>| g2. \bar "||"
> >>\partial { \grace { g16 } a8 b }
> >>| a2. \bar "||"
> >>\partial \tuplet 3/2 { g8 fis }
> >>| g2. \bar "|."
> >> }
> >> 
> >>
> >> A convert-ly rule would probably not be possible given the limited
> >> power
> >> of regular expressions.  As such, \partial might need to support both
> >> duration and music arguments.  Initially I thought this might not be
> >> possible, given that a naked duration can be treated as music; but the
> >> following does seem to work:
> >>
> >> 
> >> \version "2.22.0"
> >>
> >> #(define (duration-or-music? arg)
> >>(or (ly:duration? arg) (ly:music? arg)))
> >>
> >> partial =
> >> #(define-music-function (arg) (duration-or-music?)
> >>(_i "Make a partial measure.")
> >>(if (ly:duration? arg)
> >>  (context-spec-music
> >>(make-music 'PartialSet
> >>'origin (*location*)
> >>'duration arg)
> >>'Timing)
> >>  (let* ((mom (ly:music-length arg))
> >> (dur (make-duration-of-length mom)))
> >>(make-music 'SequentialMusic
> >>  'elements
> >>  (list (context-spec-music
> >>  (make-music 'PartialSet
> >>  'origin (*location*)
> >>  'duration dur)
> >>  'Timing)
> >>arg)
> >>
> >>
> >> \fixed c' {
> >>\time 3/4
> >>\partial 4. g8 a4 %% Original syntax works.
> >>| g2. \bar "||"
> >>\partial { \grace { g16 } a8 b }
> >>| a2. \bar "||"
> >>\partial \tuplet 3/2 { g8 fis }
> >>| g2. \bar "|."
> >> }
> >> 
> >>
> >>
> >> -- Aaron Hill
> >
> > Hi Aaron,
> >
> > I really like it! Always wondered why we need to specify a duration,
> > if it can be taken from the music.
> > I'd suggest to propose it on devel. Preferable the second coding,
> > because we could nicely deprecate the old syntax for some versions.
>
> *facepalm*  I thought I was sending to devel.  Well, folks on user might
> want to chime in too.
>
>
> -- Aaron Hill
>



Re: Should \partial accept music instead of duration?

2022-03-19 Thread Dan Eble
On Mar 19, 2022, at 20:53, Aaron Hill  wrote:
...
>>> A convert-ly rule would probably not be possible given the limited power
>>> of regular expressions.  As such, \partial might need to support both
>>> duration and music arguments.  Initially I thought this might not be
>>> possible, given that a naked duration can be treated as music; but the
>>> following does seem to work:
...

I wouldn't want to have to explain to users why these turn out different.

\score {
  \fixed c' {
\partial 4. 4.
  }
}

\score {
  \fixed c' {
\partial c4. c4.
  }
}

— 
Dan




Re: Should \partial accept music instead of duration?

2022-03-19 Thread Aaron Hill

On 2022-03-19 7:53 pm, Dan Eble wrote:

On Mar 19, 2022, at 20:53, Aaron Hill  wrote:
...
A convert-ly rule would probably not be possible given the limited 
power
of regular expressions.  As such, \partial might need to support 
both

duration and music arguments.  Initially I thought this might not be
possible, given that a naked duration can be treated as music; but 
the

following does seem to work:

...

I wouldn't want to have to explain to users why these turn out 
different.


\score {
  \fixed c' {
\partial 4. 4.
  }
}

\score {
  \fixed c' {
\partial c4. c4.
  }
}



Fair point, though the intention here would be that backwards 
compatibility would only need to exist for a time.  A warning could be 
issued whenever a user applies the older syntax; this would inform the 
user of the impending breaking change while still allowing existing code 
to compile.  When it is convenient, a future release would only support 
music as the argument.



-- Aaron Hill