Re: [GSoC] Proposal: Modular LilyPond Parser (C++)

Simon Albrecht <[email protected]> Tue, 17 Mar 2026 15:36:25 +0100
Newsgroups gmane.comp.gnu.lilypond.devel
Message-ID <[email protected]>
On 17/03/2026 14:37, C. Stroppel wrote:
> I tried this:
>
> #(define-music-function (clef name) (string?)
>    #{
>      \original-clef #name
>      c'1 d'
>    #}) 

That’s not how defining music functions works. (Also, I don’t know what 
\original-clef is supposed to be…)

Try the example below.

Best, Simon

\version "2.25.34"

schluessel = #(define-music-function (name) (string?)
    (clef name))
schluesseli = \clef \etc

\score {
   \new Staff {
     \schluessel "alto"
     g'1
     \schluesseli "tenor"
     1
   }
}