Am Sa., 8. Feb. 2020 um 14:18 Uhr schrieb <sir.teddy.the.fi...@gmail.com>: > > If I've understood everything you said correctly, I should have now made all > the necessary changes:
Well, not all changes were _necessary_, p.e. using 'parser location' in music-functions still works. Superfluous, though. > > %%%%%%%%%%%%%%%%%%%%%%%%% > \version "2.19.83" > > quoteChord = #(define-music-function > (staffName music) > (string? ly:music?) > > #{ > \context ChordNames = #(string-append staffName "-chords") > \quoteDuring "chrds" { > \context Staff = $staffName { $music } > } > #} > ) You could do quoteChordSecond = \quoteChord "second" \etc > > chordTrack = \chordmode { > \repeat unfold 2 { > c1 d e f | > } > } > > %% make 'chordTrack' quotable > \addQuote "chrds" { \chordTrack } > > notes = \relative c' { > \repeat unfold 8 { > c4 d e f | > } > } > > otherNotes = \relative c' { Then here: c1 d e f g a \quoteChordSecond { b } c > c1 d e f g a \quoteChord "second" { b } c > } > > \score { > << > \new ChordNames \chordTrack > \new Staff \notes > %% initiate a ChordNames-context which may be filled form 'otherNotes' > \new ChordNames = "second-chords" { #(skip-of-length otherNotes) } > \new Staff = "second" \otherNotes > >> > } > %%%%%%%%%%%%%%%%%%%%%%%%% > > Now I should not encounter any problems as long as I always name the > ChordNames corresponding the staff, "(name-of-the-staff)-chords". > Is there a way to store ' \quoteChord "second" ' in a variable so I only have > to define it once per staff? > That would shorten it even further. Cheers, Harm