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

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

Fonction pour une partition dans du texte


From: NOreply
Subject: Fonction pour une partition dans du texte
Date: Thu, 8 Feb 2018 01:57:42 -0700 (MST)

Voir ici:
http://lilybin.com/z75otd/1

 Utilisation de la fonction:
 \tMt  "texte" { c' } "texte"

C'est de la grosse bidouille mais j'y trouve un certain intérêt.

%%%%% le code:
\version "2.18.2"
\header {
title = "Extraits de partition dans un texte"
}
% décommenter la ligne ci-dessous pour réduire l'espace entre les lignes
%\paper { score-system-spacing #'basic-distance = #0 }

% Code par défaut:
\markup { texte
  \raise #.8 
  \score { {c'} \layout { indent = 0 }} 
  texte }

% Utilisation de la fonction
% \tMt  "texte" { c' } "texte"

% la fonction:
"tMt" = #(define-music-function (  parser location t1 m1 t2 ) (markup?
ly:music? markup? )
           #{ 
             { \stopStaff 
               \override Staff.Clef stencil = ##f 
               \override Staff.TimeSignature stencil = ##f
               \override
Score.VerticalAxisGroup.default-staffgroup-staffgroup-spacing.basic-distance
= #-10
               \once \override  TextScript.extra-offset = #'( 0 . -5.8 )  
               s1  ^\markup { $t1 
                              \raise #.8 
                              \score { $m1 \layout { indent = 0 }} $t2 } }
         
           #})

% exemples:

 \tMt "ici, texte-partition-texte" { d'} "<= une partition." 
 \tMt"" { d'} "ici, pas de texte avant la partition."
 \tMt"ici, pas de texte après la partition." { d'} ""
 \tMt"Voici 2 partitions:" { e' \tMt "   " { d'} "jhjh"} "et puis j'écris du
texte."    
 \tMt"Ici, texte-partition-texte-partition" { e' \tMt"fdfdfd" { d'} "jhjh"}
"jhjh"
 \tMt \markup { \bold "Texte en gras" \underline "ou souligné..."
\with-color #red "en couleur" } { d'} ""  

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tMt  \markup { \raise #4  "Voici une partition de piano:" }  
\new PianoStaff <<
  \new Staff  { c' }
  \new Staff  { \clef "bass"
                c }
>>  " "

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





--
Sent from: http://lilypond-french-users.1298960.n2.nabble.com/



reply via email to

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