\version "2.11.39" IChorSettings = \notemode { \time 3/4 } IChorPieceName = "Nr. 1 TEST" IChorPieceNameTacet = "Nr. 1 tacet" IChorFlI = \relative c' { 4 r2 g' a8 r8 r4\bar"|." } clefFl = \clef "tenor" IChorKey = \notemode { \key g \major } IChorFlIStaff = \context Staff = IChorFlISt << \clefFl \context Voice = IChorFlIVoice { \IChorSettings\IChorKey\IChorFlI } \set Staff.instrumentName = "Flauto I" \set Staff.shortInstrumentName = "Fl. I" >> IChorFlIScore = \score { << \IChorFlIStaff >> \header { piece = \IChorPieceName } } % This is the lilypond code, which I want to generate in scheme: \score { << \IChorFlIStaff >> \header { piece = \IChorPieceName } } % My attempts of a scheme function to generate the score: scr = #(define-music-function (parser location piece instr) (string string) #{ \score { << #(eval (string->symbol (string-append piece instr #"Staff"))) >> \header { piece = #(eval (string->symbol (string-append piece #"PieceName"))) } } #} ) % Call to that function: \scr #"IChor" #"FlI"