\version "2.19.83" \header { title = \markup {\column {"Modèle Tablature Corgeron"}} arranger = "Tablature diato C/G" piece = "Le tiré est en cerclé rouge" } %--- espacement entre portée \paper { system-system-spacing.basic-distance = 25 } % fonctions tiré/poussé (Valentin Villenave t= \override FiguredBass.BassFigure.color = #darkred p= \override FiguredBass.BassFigure.color = #darkblue "g" = \override FiguredBass.BassFigureAlignment.padding = #2 "c" = \override FiguredBass.BassFigureAlignment.padding = #-2 %---Corgeron \pg poussé rang G, \tg tiré rang G, \pc poussé rang C, \tc tiré rang , tg={\t\g} pg={\p\g} tc={\t\c} pc={\p\c} %---- applique le rythme (Valentin Villenave) appliquerRythme = #(define-music-function (sequence cible) (ly:music? ly:music?) (define (flatten-music music) (let ((musiclist '())) (let loop ((music music)) (let ((elt (ly:music-property music 'element)) (elts (ly:music-property music 'elements))) (if (null? elt) (if (null? elts) (set! musiclist (append musiclist (list music))) (map! loop elts)) (map! loop (list elt))))) (make-sequential-music musiclist))) (define (extract-durations music) (map (lambda (elem) (ly:music-property elem 'duration)) (filter (music-type-predicate '(note-event)) (ly:music-property music 'elements)))) (define (apply-duration element duration) (let ((subelements (ly:music-property element 'elements))) (if (null? subelements) (set! (ly:music-property element 'duration) duration)) (map (lambda (subelement) (set! (ly:music-property subelement 'duration) duration)) subelements))) (define (apply-durations durations music) (for-each apply-duration (filter (music-type-predicate '(rhythmic-event)) (ly:music-property music 'elements)) (apply circular-list durations)) music) (music-map (let ((i -1) (ls (extract-durations (flatten-music sequence)))) (lambda (n) (or (null? (ly:music-property n 'duration)) (begin (set! i (1+ i)) (ly:music-set-property! n 'duration (list-ref ls i)))) n)) cible)) %-------- met l'accord sur la portée ac = #(define-music-function (parser location button) (string?) (make-music 'TextScriptEvent 'direction 0 'text ( markup #:bold #:fontsize 1 button) )) %----à saisir avant TablatureDroite puisque cette dernière se cale dessus LaVoix= \relative c' { \clef treble \time 2/4 \key g \major \repeat volta 2{ d4^\ac"G" e8 fis8 g2 a8.^\ac"Am" b16 c8 b8 a8 g8 fis8 e8 d2^\ac"G" } } % --------------------------- % \pg = poussé SOL, \pc = poussé DO, tg = tiré SOL, \tc = tiré DO TablatureDroite= \figuremode { \pg <5> \tg <5> \tg <6> \pg <6> \tg <7> \tc <6> \g <8> \tc <6> \tg <7> \pg <6> \t <6> <5> \pg <5> } %------------------------------- % la note = basse, r symbolise l'accord (une valse se noterait g4 r r d4 r r..) TablatureGauche = \chordmode { g4 r g r a r a r g2 } %--------------------------------------- % \score fourni par Valentin Villenave % %--------------------------------------- \score { \new StaffGroup << \new Staff << \context Voice = "melodie" { \LaVoix} >> \new FiguredBass \with { instrumentName = \markup{\column{\vspace #9 C G}} } \appliquerRythme \LaVoix \TablatureDroite \new ChordNames \with { instrumentName = \markup{\column{MG " "}} } \TablatureGauche >> \layout { \context { \FiguredBass \consists Instrument_name_engraver \consists Staff_symbol_engraver \consists Bar_engraver \override StaffSymbol.line-count = 1 \override StaffSymbol.line-positions =#'(-3) figuredBassFormatter = #(lambda (n ev ctx) (if (number? n) (number->string n) n)) \override BassFigure.stencil = #(lambda (grob) (define (lists-equal a b) (let lp ((a a) (b b)) (cond ((null? a) (null? b)) ((null? b) #f) (else (and (= (car a) (car b)) (lp (cdr a) (cdr b))))))) (let* ((text (ly:grob-property grob 'text)) (stencil (grob-interpret-markup grob (make-sans-markup text))) (color (ly:grob-property grob 'color)) (circled-stencil (circle-stencil stencil .1 .5))) (if (lists-equal color darkred) circled-stencil (ly:stencil-outline (ly:stencil-scale stencil 1.1 1.1) circled-stencil)))) } \context { \ChordNames \consists Instrument_name_engraver \consists Staff_symbol_engraver \consists Bar_engraver \override StaffSymbol.line-count = 1 \override StaffSymbol.line-positions =#'(2) noChordSymbol = \markup \bold "/" \override ChordName.stencil = #(lambda (grob) (let* ((cause (ly:grob-property grob 'cause)) (props (ly:prob-immutable-properties cause)) (rest? (memq 'rest-event (assoc-get 'class props))) (stencil (ly:text-interface::print grob)) (th .25)) (if rest? stencil (ly:stencil-translate-axis (ly:stencil-scale (circle-stencil (stencil-whiteout-box stencil 1 360) th (- th)) (- 1 th) (- 1 th)) (/ th 2) Y)))) } \context { \StaffGroup \override StaffGrouper.staff-staff-spacing = #'((basic-distance . 3) (minimum-distance . 0) (padding . 0)) } } \midi {} }