lilypond-user-fr
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fonction substitution Scheme


From: joel brassart
Subject: Fonction substitution Scheme
Date: Mon, 27 Sep 2021 14:36:16 +0200

Bonjour à tous,
Je commence à chipoter avec Scheme et voudrais me doter de quelques outils pour me simplifier la vie.
Je voudrais créer une fonction de substitution pour un Header, mais le code qui suit me retourne l'erreur suivante :

Erreur : La fonction music ne peut retourner ##<module 7fb7290743e0>


pour la ligne '\hh " titre gras"' alors que si j'insère directement l'instruction Lilypond 'Header ...', cela fonctionne ...
alors que


code :


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\version "2.20.0"
\language "italiano"

hh =
#(define-music-function
     ( text )
     ( string? )    
   #{
    \header { piece = \markup {  \fontsize #2 \bold #text }  }
   #})

\hh " titre gras" % <--- erreur
%\header { piece = \markup {  \fontsize #2 \bold "titre gras" }  } %<--- OK

\relative do' {
  do re mi }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Qu'ai-je mal fait ?


D'avance merci,


Joël Brassart

Lilypond 2.20

Linux Ubuntu 20.4



reply via email to

[Prev in Thread] Current Thread [Next in Thread]