Hi,

I am trying to create a set of functions to help me set up songs with
divisi lyrics. When I generate a midi file with the unfolded music, I would
like it to have the different rhythms in the different voltas. I get some
unexpected results with regards to pitches.

I have tried to create a small example, the exhibits some of the same
challenges as what I am facing with my divisi helpers:

\version "2.24.1"

double =
#(define-music-function (music)(ly:music?)
   (let ((notes (ly:music-property music 'elements)))
     (make-music 'SequentialMusic
                 'elements
                 (list
                  (make-music 'SequentialMusic
                              'elements notes)
                  (make-music 'SequentialMusic
                              'elements notes)))))

\relative c' {
  \double {e4 e}
}

There are several things that confuses me with the output of this:

   1. The first note is an octave higher than I would expect (it is e'')
   2. The second note is an octave higher than the first. The third and
   fourth are the same as the first and second.
   3. If I remove one of the "make-music" from the list, both remaining
   notes get the same pitch at the expected e'.
   4. If I change the music expression by lowering the last note an octave:
   \double {e4 e,}
   Then I will get all four notes on the same pitch (e').

It seems the musical construct I generate is confusing the relative
function. There are clearly some fundamentals regarding generating music
from functions that I have missed.

If someone could help shed some light on why I get the output I do, it
would be highly appreciated.

Best regards,
Morten

Reply via email to