Re: Music generated by function confuses relative pitch

2024-02-23 Thread Morten Lemvigh
Hi Jean, Thank you so much for that clear and thorough explanation. I was so caught up in my functional transformations, that I didn't even stop to think if mutation could be at play. I sprinkled a handful of deep-copies over my functions and voila! - and thanks again! I really appreciate you tak

Re: Music generated by function confuses relative pitch

2024-02-22 Thread Jean Abou Samra
Hi Morten, Le jeudi 22 février 2024 à 23:00 +0100, Morten Lemvigh a écrit : > \version "2.24.1" > > double = > #(define-music-function (music)(ly:music?) >    (let ((notes (ly:music-property music 'elements))) >      (make-music 'SequentialMusic >                  'elements >                  (li

Music generated by function confuses relative pitch

2024-02-22 Thread Morten Lemvigh
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 smal