Arpeggios in polyphonic music

If you need to attach an arpeggio a chord that is notated as separate voices in polyphonic music, you can create single-node chords and set connectArpeggios = ##t.

N.B. This only works inside a GrandStaff or a PianoStaff.

\version "2.24.0"

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

\new PianoStaff 
<<
  \set PianoStaff.connectArpeggios = ##t

  \new Staff
  { 
    << { <g'>2 \arpeggio } \\ {  c'2 } \\ { e'2 } >>
    << { <g'>2 \arpeggio } \\ { <c'>2 \arpeggio } \\ { e'2 } >>
  }

  \new Staff
  { 
    \clef bass 
    << { g1 } \\ { <c>1 \arpeggio } \\ { e1 } >>
  }
>>