Hi Valentin, Any thoughts on why this snippet throws an error?
%%% \version "2.20" \layout { \context { \name "Notes" \type "Engraver_group" } \context { \Voice \accepts "Notes" } \context { \name "Container" \type "Engraver_group" \accepts "Notes" \accepts "Voice" } \context { \Staff \accepts "Container" } \context { \Dynamics \accepts "Container" } } send = #(define-music-function (cname context music1 music2) (string? string? ly:music? ly:music?) #{ << #music1 \new Container \new Notes { \change #cname = #context #music2 } >> #}) pfdyn = \send Container "piano_dynamics" \etc piano_upper = { c'4\p d' e' f' \pfdyn g'1 <>\mp g'4\f f' e' d' \pfdyn g'4 <>\f f' e' d' c'1 } piano_lower = { \clef bass c1 g,1 g,1 c1 } \score { << \new PianoStaff << \new Staff \piano_upper \new Dynamics \new Container = "piano_dynamics" s1 \new Staff \piano_lower >> >> %%% layout mod to show the centred dynamics \layout { \context { \PianoStaff \override VerticalAxisGroup.staff-staff-spacing.padding = #10 } } } %%% Thanks, Kieren. ________________________________ Kieren MacMillan, composer (he/him/his) ‣ website: www.kierenmacmillan.info ‣ email: kie...@kierenmacmillan.info