Ah!!! Sorry, I made many tests and I copied the wrong code. My apologies. g.
On Sat, 24 Apr 2021 at 08:11, David Kastrup <d...@gnu.org> wrote: > Gianmaria Lari <gianmarial...@gmail.com> writes: > > > Thank you Aaron and Jean, your code works! > > > > But I have some trivial questions. > > If I write: > > > > \displayLilyMusic \chordmode {c} > > > > > > I get: > > > > { < c' e' g' >4 } > > > > > > It looks a good "compound music expression". > > But Aaron code and Jean code behave differently. Have a look here > > This does not work. > > > > \version "2.23.2" > > #(define (extract music) > > (first (ly:music-property music 'elements))) > > > > { #(first-element #{ \chordmode {c} #}) } > > You define a function called "extract" but call a function called > "first-element". > > -- > David Kastrup >