Kieren MacMillan <kieren_macmil...@sympatico.ca> writes: > Hi David, > >> Of course you can also do >> #(display (let ((res (map ly:pitch-semitones (music-pitches some-music)))) >> (map - (cdr res) res))) >> >> Namely first convert to semitones and then do the difference. > > Ah! Perhaps I was on the right path with the first part of what I gave > to Mike (which used the ly:pitch-semitones function). > >> #(display (let ((res (map ly:pitch-semitones (music-pitches some-music)))) >> (map - (cdr res) res))) >> >> #(define-markup-list-command (buzz layout props mus) (ly:music?) >> (interpret-markup-list layout props >> (map number->string >> (let ((res (map ly:pitch-semitones (music-pitches mus)))) >> (map - (cdr res) res))))) >> >> \markup \right-column \with-color #red { \buzz \some-music \vspace #3 } >> \markup \right-column \with-color #red { \buzz { c' d' e' c' } } > > I get errors when I try to compile that: > > error: syntax error, unexpected MUSIC_IDENTIFIER > \markup \right-column \with-color #red { \buzz > \some-music \vspace #3 } > … > > Am I missing something? I cut-and-paste your code [from email into > Frescobaldi] several times…
The line below it is a 2.21.0 feature that cannot be used from a LilyPond for which we have an installer. I wasn't aware that the line above is problematic but I see how it could. Maybe write #some-music instead. -- David Kastrup