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

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

Re: Grilles harmoniques, nouvelle version


From: Jean Abou Samra
Subject: Re: Grilles harmoniques, nouvelle version
Date: Fri, 10 Jun 2022 22:56:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1



Le 10/06/2022 à 09:59, Vincent Gay a écrit :
On peut faire des trucs avec 😁



\version "2.23.10"
#(set-global-staff-size 18)
\include "jazzchords.ily"
\include "lilyjazz.ily"

\paper {
  indent = 0
  ragged-right = ##f
    system-system-spacing = #'((basic-distance . 0)
                             (minimum-distance . 0)
                             (padding . 0))
}


accords = \chordmode {
c1 g
\once \override Score.RehearsalMark.extra-offset = #'(0 . -30)
 \mark \markup \concat { \fontsize #4 "⭯ " \raise #0.5  "Quartes - Quintes" \fontsize #4 " ⭮" }
d a \break
f \stopStaff s s \startStaff e \break
bes \stopStaff s s \startStaff b \break
es as des2 cis fis1
\once \override Score.RehearsalMark #'direction = #DOWN

}

\defineBarLine "|-|" #'("|" "|" "|")

\new ChordGridScore \with {
  measureBarType = "|-|"
  \remove System_start_delimiter_engraver
}
<< \new ChordGrid { \bar "|-|" \accords } >>



Pas mal, bravo ! Je n'y aurais jamais pensé. Après, c'est un choix de
le présenter comme carré ou bien c'était juste pratique ? Car
on peut aussi le présenter en cercle, peut-être plus logique :

\version "2.22.2"

#(use-modules (ice-9 match))
#(define-markup-command (in-circle layout props small-radius large-radius mkups)
   (number? number? markup-list?)
   #:properties ((thickness 0.1)
                 (start 0)
                 (towards-outer-factor 1/2))
   (apply ly:stencil-add
          (make-circle-stencil small-radius thickness #f)
          (make-circle-stencil large-radius thickness #f)
          (let* ((n (length mkups))
                 (increment (/ 360 n)))
            (map
             (lambda (i txt)
                (match-let*
                      ((ang (+ start (* -1 i increment)))
                      ((x-start . y-start) (ly:directed ang small-radius))
                      ((x-end . y-end) (ly:directed ang large-radius)))
               (ly:stencil-add
                (make-line-stencil thickness x-start y-start x-end y-end)
                (ly:stencil-translate
                 (centered-stencil
                   (interpret-markup layout props txt))
                  (ly:directed (+ ang (* 1/2 increment))
                               (interval-index (cons small-radius large-radius)                                                (1- (* 2 towards-outer-factor))))))))
             (iota n)
             mkups))))

\markup \general-align #X #LEFT \overlay {
  % Facultatif
  \override #'((thickness . 0.2)
               (start . 75)
               (towards-outer-factor . 0.55))
  \in-circle #10 #20 {
    C
    G
    D
    A
    E
    B
    \concat { F \sharp }
    \concat { D \flat / C \sharp }
    \concat { A \flat }
    \concat { E \flat }
    \concat { B \flat }
    F
  }
  \general-align #X #CENTER
  \general-align #Y #CENTER
  \override #'(baseline-skip . 5)
  \column {
    \line { \fontsize #4 "⭯" \raise #0.5  "Quartes" }
    \line { \fontsize #4 "⭮" Quintes }
  }
}





reply via email to

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