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

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

Re: encore le "keySignature"


From: NOreply
Subject: Re: encore le "keySignature"
Date: Thu, 8 Mar 2018 22:08:32 -0700 (MST)

Je reviens sur ce sujet ou il est question de savoir s'il est possible
d'écrire les symbole lilypond en gras.
Comme on le vois dans la page 8 de l' "essai sur la gravure automatisé" ( 
Cliquez ici <http://lilypond.org/doc/v2.19/Documentation/essay.fr.pdf>   ),
Lilypond utilise 2 graisses différentes en fonction de la taille de la
portée.
Donc nous avons 2 graisse à notre disposition. 
Vous comprendrez avec l'exemple ci-dessous:
http://lilybin.com/rqk4i8/1

Désolé, mais j'utilise dans cette exemple des petits raccourcis perso. Vous
trouverez facilement l'utilisation. Je n'ai pas le temps de traduire en pure
langage lilypond.

Voici le code du Lilybin (sans aucune importance, c'est le principe qui
compte):

%%%%%%%%%%%%%
\version "2.18.2"
%%%%%%   VOIR PLUS BAS ET NE RIEN ÉCRIRE CI-DESSOUS.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
%*************************************************************************************************************************************************************************************************************************************************************************************************************
%{      %%%%%%%%%%%%                                                            
             
%}                                                                              
                                                                                
       
HIDE =  #(define-music-function (  parser location symb1 symb2 )  ( symbol? 
symbol? ) #{ \stopStaff  \override $symb1 . $symb2 . transparent = ##t 
\startStaff #})  SUP = #(define-music-function (  parser location symb1
symb2 ) ( symbol? symbol? ) #{ \stopStaff \override $symb1 . $symb2 stencil
= ##f \startStaff #}) sup = #(define-music-function (  parser location symb1 
) ( symbol?  ) #{ { \override $symb1 stencil = ##f   } #})  COLOR =
#(define-music-function (  parser location symb1 symb2 col ) ( symbol?
symbol? color? ) #{ { \stopStaff \override $symb1 . $symb2 color = $col 
\startStaff } #}) color = #(define-music-function (  parser location symb1 
col ) ( symbol?  color? ) #{ { \override $symb1 color = $col } #}) xy =
#(define-event-function (parser location x y m) (number? number? ly:music?)
#{  \tweak #'extra-offset #(cons x y) #m #})  XY =  #(define-music-function
(  parser location symb1 symb2 x y ) ( symbol? symbol? number? number? ) #{ 
\stopStaff \override $symb1 . $symb2 #'extra-offset = #(cons x y)
\startStaff #}) positions = #(define-music-function (  parser location symb1
y1 y2 ) ( symbol? number? number? ) #{ {  \override $symb1 .positions =
#(cons y1 y2)   } #}) ROTATION = #(define-music-function (  parser location
symb1 symb2 x y z ) ( symbol? symbol? number? number? number?) #{ \stopStaff 
\override $symb1 . $symb2 #'rotation = #(list x y z ) \startStaff #}) SPACE
=  #(define-music-function (  parser location symb1 symb2 x y ) ( symbol?
symbol? number? number? ) #{ \stopStaff  \override $symb1 . $symb2
#'extra-spacing-width = #(cons x y) \startStaff #}) space = 
#(define-music-function (  parser location symb1  x y ) ( symbol? number?
number? ) #{   \override $symb1 #'extra-spacing-width = #(cons x y) #}) 
thickness =  #(define-music-function (  parser location symb1  x  ) (
symbol? number?  ) #{  \override $symb1 thickness =  #x #}) THICKNESS = 
#(define-music-function (  parser location symb1 symb2 x  ) ( symbol?
symbol? number?  ) #{ \stopStaff \override $symb1 . $symb2 thickness =  #x
\startStaff #}) length =  #(define-music-function (  parser location  x  ) ( 
number?  ) #{  \override Stem length =  #x #}) barLength = 
#(define-music-function (parser location x y ) (number? number?) #{ 
\override Staff.BarLine.bar-extent =  #(cons x y) #}) FONT-SIZE = 
#(define-music-function (  parser location symb1 symb2 x  ) ( symbol?
symbol?  number? ) #{ \stopStaff \override $symb1 . $symb2 font-size = #x
\startStaff #}) font-size =  #(define-music-function (  parser location
symb1  x  ) ( symbol?  number? ) #{  \override $symb1 font-size = #x  #})
font-staff-size =  #(define-music-function (  parser location  x y ) (
number? number? ) #{ \stopStaff \set fontSize = #x \override
Staff.StaffSymbol.staff-space = #( magstep y )    \startStaff #})
staffLineNumber =  #(define-music-function (  parser location  x  ) ( 
number? ) #{ \stopStaff \override Staff.StaffSymbol #'line-count = #x
\startStaff  #}) "t" = #(define-music-function (parser location m1 m2 m3)
(ly:music? ly:music? ly:music?)#{ \tuplet 3/2 { $m1 $m2 $m3 } #}) "pip" =
\bar ":|.|:" "i" = \bar "|"  " " = \bar " "  "ii" = \bar "||"  "iI" = \bar
"|."  "ii" = \bar "||" "ip" = \bar ".|:" "pi" = \bar ":|." voltaun = \markup
{1} "1°" =  { \set Score.repeatCommands = #(list(list 'volta voltaun))} 
"2°" = { { \set Score.repeatCommands = #'((volta "f")) \bar ":|." }  { \set
Score.repeatCommands = #'((volta "2"))} } "2°/" = { \set
Score.repeatCommands = #'((volta #f ))} staffLinePositions =
#(define-music-function (parser location  str mus ) (  list? ly:music? ) #{
\stopStaff \override Staff.StaffSymbol.line-positions = #str \startStaff
$mus #}) ledgerLinePosition = #(define-music-function (parser location  str
mus ) (  list? ly:music? ) #{ \stopStaff \override
Staff.StaffSymbol.ledger-positions = #str \startStaff $mus #})
%{        %%%%%%%%                                                              
             
%}                                                                              
                                                                                
    
structure = #(define-music-function (parser location  str mus ) (  list?
ly:music? ) #{ \set Timing.beamExceptions = #'() \set beatStructure = #str  
$mus #}) base = #(define-music-function (parser location  x y  ) ( number?
number? ) #{  \set baseMoment = #(ly:make-moment  x y  )  #}) sub = \set
subdivideBeams = ##t nosub = \set subdivideBeams = ##f  T =
#(define-music-function (parser location x ) (fraction? ) #{  \time #x #})
#(define-public (format-time-sig-note grob) (let* ((frac (ly:grob-property
grob 'fraction)) (num (if (pair? frac) (car frac) 4))  (den (if (pair? frac)
(cdr frac) 4)) (m (markup #:override '(baseline-skip . 0.5)  #:center-column
(#:number (number->string num)  #:override '(style . default)  #:note
(number->string den) DOWN)))) (grob-interpret-markup grob m)))  Tnote =
#(define-music-function (parser location x ) (fraction?)  #{  \once
\override Staff.TimeSignature.stencil = #format-time-sig-note \time #x #}) 
"fa" = { \clef bass } "sol" = { \clef treble } "sol1" = { \clef french }
"perc" = { \sol \set Staff.clefGlyph = #"clefs.percussion" \set
Staff.clefPosition = #0  } "ut1" = { \clef soprano } "ut2" = { \clef
mezzosoprano } "ut3" = { \clef alto } "ut4" = { \clef tenor } "ut5" = {
\clef baritone } "fa3" = { \clef varbaritone } "fa5" = { \clef subbass }  
"r" = #(define-music-function (parser location expr1 expr2) (number?
ly:music?) #{ \repeat unfold $expr1 $expr2 #}) "%" = #(define-music-function
(parser location expr1 expr2) (number? ly:music?) #{ \repeat percent $expr1
$expr2 #}) "\/" = \break "\_" = \pageBreak "\-" = { \noBreak } "\^" = {
\noPageBreak }  "\\~" = \set Staff.pedalSustainStyle = #'bracket "\\," = 
\sustainOn "\\'" = \sustainOff \sustainOn "\\;" = \sustainOff  compress =
\compressFullBarRests "$" = { \mark \markup { \fontsize #-2 \musicglyph
#"scripts.segno" } } "+" = { \mark \markup { \musicglyph #"scripts.coda" } }
"-+" = ^\markup {\halign#-1 \fontsize #2 \musicglyph #"scripts.coda" } "-$"
= ^\markup { \halign#-1 \musicglyph #"scripts.segno" }  x = \override
Voice.NoteHead #'style = #'cross "xo" = \override NoteHead #'style =
#'xcircle "w" = \override Voice.NoteHead #'style = #'triangle "v" =
\override Voice.NoteHead #'style = #'harmonic-mixed "o" = \override
Voice.NoteHead #'style = #'default P = #(define-music-function  (parser
location num nom nomcourt taille son  mus) (markup? markup? markup? number?
markup?  ly:music?)  #{  { \new Staff = #num   \with {  instrumentName =
#nom shortInstrumentName = #nomcourt fontSize = # taille \override
StaffSymbol.staff-space = #(magstep taille )} << \compressFullBarRests \set
Staff.midiInstrument = #son  $mus  >>  } #}) PIANO = #(define-music-function
(parser location   nom nomcourt taille   mus1 mus2 ) (markup? markup?
number?  ly:music? ly:music? ) #{  { \new PianoStaff \with { instrumentName
= #nom shortInstrumentName = #nomcourt fontSize = # taille \override
StaffSymbol.staff-space = #(magstep taille ) } << $mus1 $mus2 >>   }#}) 
"\\." = \startTrillSpan "\\:" = \stopTrillSpan "tr" = \trill 
%{         %%%%%                                                                
             
%}                                                                              
                                                                                
       
P = #(define-music-function  (parser location num nom nomcourt taille son 
mus) (markup? markup? markup? number? markup?  ly:music?)  #{  { \new Staff
= #num   \with {  instrumentName = #nom shortInstrumentName = #nomcourt
fontSize = # taille \override StaffSymbol.staff-space = #(magstep taille )} 
{  \compressFullBarRests \set Staff.midiInstrument = #son  $mus  }  } #}) 
PIANO = #(define-music-function (parser location   nom nomcourt taille  
mus1 mus2 ) (markup? markup? number?  ly:music? ly:music? ) #{  { \new
PianoStaff \with { instrumentName = #nom shortInstrumentName = #nomcourt
fontSize = # taille \override StaffSymbol.staff-space = #(magstep taille ) }
<< $mus1 $mus2 >>   }#})  "I" = #(define-music-function  (parser location  
mus  ) ( ly:music? )  #{   \new StaffGroup $mus  #}) "\\{" =
#(define-music-function  (parser location   mus  )  ( ly:music? )  #{   \new
GrandStaff $mus #}) "Ivoc" = #(define-music-function  (parser location   mus 
) ( ly:music? )  #{   \new ChoirStaff $mus  #})   #(define-markup-command
(MdsT layout props mus) (ly:music?) #:properties ((size 0))
(interpret-markup layout props #{ \markup { \raise #.8 \score { $mus \layout
{ indent = 0 }}}  #})) #(define-markup-command (MdsTpiano layout props mus)
(ly:music?) #:properties ((size 0)) (interpret-markup layout props #{
\markup { \raise #-4 \score { $mus \layout { indent = 0 }}}  #})) replace =
#(define-music-function (  parser location  symb txt ) ( symbol?  markup? )
#{ { \override $symb .stencil = #ly:text-interface::print \override $symb
.text =  $txt } #}) REPLACE = #(define-music-function (  parser location 
symb1 symb2 txt ) ( symbol? symbol? markup? ) #{ \stopStaff \override $symb1
. $symb2 .stencil = #ly:text-interface::print \override $symb1 . $symb2
.text =  $txt \startStaff #}) lineThickness =  #(define-music-function ( 
parser location  a b c x  ) (  number? number? number? number?   ) #{
\stopStaff \override Staff.StaffSymbol thickness =  #a \override Stem
thickness = #b \override  Staff.BarLine #'hair-thickness =  #c \override
Staff.StaffSymbol.ledger-line-thickness = #(cons  x  0 ) \startStaff #}) 
"d" = \stemUp "q" = \stemDown dq = \stemNeutral  qd = \stemNeutral   tt =
\autoBeamOff  TT =  \autoBeamOn  q-d = #(define-music-function (parser
location y) (number?) #{  \override Beam.auto-knee-gap = #y #}) AZ = { \set
Score.markFormatter = #format-mark-box-alphabet  \mark \default } "N°" = {
\set Score.markFormatter = #format-mark-box-numbers  \mark \default } 
%{           %                                                                  
             
%}                                                                              
                                                                                
      
"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 } } #})
"tMtPIANO" = #(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 { \raise #4 $t1   \score { $m1 \layout { indent = 0 }} \raise #4
$t2 } } #}) Ttx = #(define-music-function (  parser location  txt ) (
markup? ) #{ { \override NoteHead.stencil = #ly:text-interface::print
\override NoteHead.text =  $txt } #}) Btx = #(define-music-function ( 
parser location  txt ) ( markup? ) #{ { \override Staff.BarLine.stencil =
#ly:text-interface::print \override Staff.BarLine.text =  $txt } #}) Ctx =
#(define-music-function (  parser location  txt ) ( markup? ) #{ { \override
Staff.Clef.stencil = #ly:text-interface::print \override Staff.Clef.text = 
$txt } #}) CHtx = #(define-music-function (  parser location  txt ) (
markup? ) #{ { \override Staff.TimeSignature.stencil =
#ly:text-interface::print \override Staff.TimeSignature.text =  $txt } #})
Htx = #(define-music-function (  parser location  txt ) ( markup? ) #{ {
\override Stem.stencil = #ly:text-interface::print \override Stem.text = 
$txt } #})
%*************************************************************************************

\header {
  title = "écrire en gras"
}
\markup { \vspace #2 }

global = {  \T 3/4  }


musInstr = { \stopStaff
\omit Staff.TimeSignature
s4 }

musDeux = { 
\stopStaff
\omit Staff.TimeSignature
s4 }

musTrois = { \global
\stopStaff
\omit Staff.Clef
s4 }

musQuatre = { \global
\stopStaff
\omit Staff.Clef
s4 }

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

InstrUn = \P "" "" "" 0 "" \musInstr
InstrDeux = \P "" "" "" -6 "" \musDeux
InstrTrois = \P "" "" "" 0 "" \musTrois
InstrQuatre = \P "" "" "" -6 "" \musQuatre

\markup { A droite les symboles sont écrits en gras: }
\markup 
{ 
\MdsT ##{ \InstrUn #} ""
\scale #'( 2 . 2 ) { \MdsT ##{ \InstrDeux #} "" }
}
%%%
"2/4 gras" = \markup 
{ 
\MdsT ##{ \InstrTrois #} ""
\raise #-1
\scale #'( 2 . 2 ) { \MdsT ##{ \InstrQuatre #} "" }
}
\"2/4 gras"
%%%
\markup { \vspace #2 }
\markup {On peut insérer ce symbole en gras dans une partition. }
\markup { ci-dessous, le chiffrage à froite et légèrement plus gras:}
musExemple =
{ \global
c'2.
\REPLACE Staff Clef \"2/4 gras"
\T 3/4
c'2.
}
Exemple = \P "" "" "" 6 "" \musExemple

{ \Exemple }





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



reply via email to

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