Repeat with upbeat and different durations in the alternatives

A volta repeat in a score with an upbeat may

  • end in a fraction of a measure
  • have different durations in the alternatives

This is done using \partial in the second alternative.

\version "2.24.0"

%% http://lsr.di.unimi.it/LSR/Item?id=490

{
 \repeat volta 2 {
   \partial 4
   e'4
   \set Timing.measureLength = #(ly:make-moment 5/4)
   c'2
 }
 \alternative {
   {
     f'4
   }
   {
     a'2 
   }
 }
 \unset Timing.measureLength
 c'1
}