As Lukas has pointed out you can even do something like this
toDyn =
#(define-music-function (music1 music2 context cname) (ly:music? ly:music?
markup? string?)
#{
<< #music1 \new #"Container" \new Notes { \change #cname = #context
#music2 } >>
#})So you can actually specify the name of the Context. This kindof makes my Tab example obsolete, as you can simply do that. Valentin
\version "2.20"
\language "deutsch"
music =
#(define-music-function (Voice) (string?)
#{
\relative c'' {
c4 h8 a h4 a8 g
<<
{ \voiceOne a4 g8 f g2 a8 c e g a2 }
\new #Voice { \voiceTwo f,2 h,2 c4 h a2 }
>>
}
#})
\score {
<<
\new Staff \music #"Voice"
\new TabStaff \music #"TabVoice"
>>
\layout { }
}
signature.asc
Description: This is a digitally signed message part.
