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

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

Re: Barre de reprise avec deux traits en haut et en bas


From: NOreply
Subject: Re: Barre de reprise avec deux traits en haut et en bas
Date: Tue, 6 Feb 2018 20:13:01 -0700 (MST)

Voici la 1° ligne de ta partition:
http://lilybin.com/u9ja19/1

%%%%%%%%%%%% le code:
\version "2.18.2"

\header {
  title = "Marche des accordéonistes lyonnais"
  instrument = "Accordéon"
  composer = "V. Marceau"
 
}
%%%%%%
"2slash" =  \markup {                        
                  \center-align
                  \vcenter \combine
                  \beam #2.0 #0.5 #0.48
                  \raise #0.7 \beam #2.0 #0.5 #0.48
                }
%%%%%  
 \markup { \vspace  #4 }

%{
>>>>>>  UTILISATION:
\slashHaut #"["  #n
#"[" =  doubleslash dirigé vers la droite
#"]" =  doubleslash dirigé vers la gauche
n = distance entre le double slash et la portée

%}

slashHaut =
#(define-music-function
  (parser location repeat-bar-type  repeat-bar-translate )
  (string? number? )
  (cond
   ((string=? repeat-bar-type "[")  
    #{    
      \once \override Staff.BarLine.stencil =
      #(lambda (grob)
         (ly:stencil-combine-at-edge
          (ly:bar-line::print grob)
          X RIGHT
          (grob-interpret-markup grob
            #{
              \markup
              \translate #(cons 0 repeat-bar-translate)
                \"2slash"              
            #})))
    #})
      ((string=? repeat-bar-type "]")  
    #{    
      \once \override Staff.BarLine.stencil =
      #(lambda (grob)
         (ly:stencil-combine-at-edge
          (ly:bar-line::print grob)
          X LEFT
          (grob-interpret-markup grob
            #{
              \markup
              \translate #(cons 0 repeat-bar-translate)
               \scale #'(-1 . 1 )  
               \"2slash"              
            #})))
    #})
   (else
    #{
      \once \override Staff.BarLine.stencil = #ly:bar-line::print
    #})))

%%%%%%%%%%%%%%%%%
slashBas =
#(define-music-function
  (parser location repeat-bar-type  repeat-bar-translate  )
  (string? number? )
  (cond
   ((string=? repeat-bar-type "]")  
    #{
      \once \override Staff.BarLine.stencil =
      #(lambda (grob)
         (ly:stencil-combine-at-edge
          (ly:bar-line::print grob)
          X LEFT
          (grob-interpret-markup grob
            #{
              \markup
              \translate #(cons 0 repeat-bar-translate)              
               \"2slash"              
            #})))
    #})
      ((string=? repeat-bar-type "[")  
    #{
      \once \override Staff.BarLine.stencil =
      #(lambda (grob)
         (ly:stencil-combine-at-edge
          (ly:bar-line::print grob)
          X RIGHT
          (grob-interpret-markup grob
            #{
              \markup
              \translate #(cons 0 repeat-bar-translate)              
               \scale #'(1 . -1 )  
               \"2slash"              
            #})))
    #})
    (else
    #{
      \once \override Staff.BarLine.stencil = #ly:bar-line::print
    #})))
%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
global = {
  \key f \major
  \time 2/4 \tempo 4 = 132
  \tupletUp
}

right = \relative c'' {
  \global
  \stemDown
 c8 e16\( d c b a g 
 f8\)\mf r8 r4
 R2
 \bar ".|:"
 \slashHaut #"["  #5 
 \acciaccatura *8  8 <gis b>  8 r
 \acciaccatura *8  8 <gis b>  8 r
 \acciaccatura *8   8 <gis b>  8  
 
}

left = \relative c { \clef bass
  \global
  <c e g b>8 r q r
  \repeat unfold 2 { f8   c, <a' c> }
  \bar ".|:"
 \slashBas #"[" #-5 
\acciaccatura s8  \repeat unfold 3 { f8[   c, <a' c>] }
}

\score {
  \new PianoStaff
  <<
    \new Staff = "right" \with {
      midiInstrument = "accordion"
    } \right
    \new Staff = "left" \with {
      midiInstrument = "accordion"
    } { \clef bass \left }
  >>
  \layout { }
  \midi {
    \tempo 4=100
  }
} 

% ; = )



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



reply via email to

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