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

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

chordmode : partie d'un accord entre parenthèse


From: Vincent Gay
Subject: chordmode : partie d'un accord entre parenthèse
Date: Fri, 13 May 2022 10:16:51 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0

Bonjour tout le monde,

soit l'accord suivant : des1:7/as
J'aimerai que la racine (et seulement elle) soit entre parenthèse -> D♭7(/A♭)
Est-ce possible ?

j'utilise
LilyJazz  qui modifie déjà le comportement standard (voir mon fichier inclus jazzchords.ily ci-dessous)

mon idée de départ est d'utiliser un accord "qui n'existe pas" (<c e g bes cis> par exemple -> C:8+) mais pour l'instant cela ne mène nulle part car je ne sais comment modifier
chordRootNamer

Merci pour vos lumières

%-----
-jazzchords.ily----------
\version "2.22.1"

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Creating jazz-style chords
% Borrowed from Jean-Pierre's good work at:
%               https://sites.google.com/site/jpgzic/home
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% modification of the procedure "chordRootNamer"
%---- Definition of chord alterations -------
#(define (JazzChordNames pitch majmin)    ;majmin is a required argument for "chordNamer", but not used here
  (let* ((alt (ly:pitch-alteration pitch)))
    (make-line-markup
      (list
    (make-simple-markup
      (vector-ref #("C" "D" "E" "F" "G" "A" "B")
        (ly:pitch-notename pitch)))
    (if (= alt 0)            ; alteration ?
      (markup "")        ; do nothing
      (if (= alt FLAT)    ; flat or sharp
        (markup ">")
        (markup "<")
      )
    )
      )
    )
  )
)

%----- markup commands to make it easier to write chords -----
%----- this section can be adapted as desired (I don't like "MI" and "MA", for example)
% for minor chords, use "acMin" to print a small "m"
#(define-markup-command (acMin layout props extension) (string?)
  (interpret-markup layout props
    (markup #:small "m" #:super extension)))

% for major chords, use "acMaj" to print a small "M"
#(define-markup-command (acMaj layout props extension) (string?)
  (interpret-markup layout props
    (markup #:super "^" #:super extension)))

% for chords with up to three alterations, stacked on top of each other
#(define-markup-command (acAlt layout props strA strB strC) (string? string? string?)
  (interpret-markup layout props
    (markup
      #:super strA
      #:fontsize 1.5 "["
      #:fontsize -4
      #:raise 2
      #:center-column (strB strC)
      #:fontsize 1.5 "]"
    )
  )
)

% modify the built-in "chordNameExceptions"
%----- change chord exceptions for jazz notation -----
%
%    degrés             markup                % écriture
JazzChordsList = {

% minor third chords - 3 notes
  <c es ges>1-\markup { \raise #0.7 "°" } % :dim
  <c es g>-\markup { \acMin #"" } % :m

% minor third chords - 4 notes
  <c es ges beses>-\markup { \raise #0.7 "°7" } % :dim7
  <c es gis>-\markup { \acMin #"aug" } % :m5+ (Ab/C)
  <c es g a>-\markup { \acMin #"6" } % :m6
  <c es g as>-\markup { \acMin #">6" } % :m6
  <c es ges bes>-\markup { @ } % :m7.5-
  <c es g bes>-\markup { \acMin #"7" } % :m7
  <c es gis bes>-\markup { \acMin #"7 <5" } % :m7.5+
  <c es g b>-\markup { \acMin #"^" } % :m7+
  <c es g d'>-\markup { \acMin #"add9" } % :m5.9

% minor third chords - 5+ notes
  <c es g a d'>-\markup { \acMin #"6/9" } % :m6.9
  <c es g bes des'>-\markup { \acMin #"7(>9)" } % :m7.9-
  <c es g bes d'>-\markup { \acMin #"9" } % :m9
  <c es ges bes d'>-\markup { \acMin #"9(>5)" } % :m9.5-
  <c es g b d'>-\markup { \acMin #"^9" } % :m9.7+
  <c es g bes dis'>-\markup { \acMin #"7(<9)" } % :m7.9+
  <c es g bes f'>-\markup { \acMin #"7(add 11)" } % :m7.11
  <c es ges bes f'>-\markup { @ \super #"(11)" } % :m7.11
  <c es g bes a'>-\markup { \acMin #"7(add 13)" } % :m7.13
  <c es g bes d' f'>-\markup { \acMin #"11" } % :m11
  <c es ges bes d' f'>-\markup { \acMin #"11(>5)" } % :m11.5-
  <c es g bes d' f' a'>-\markup { \acMin #"13" } % :m13

% major third chords - 3 notes
  <c e ges>-\markup { \super ">5" } % :5-
  <c e gis>-\markup { \super "aug" } % :aug

% major third chords - 4 notes
  <c e g a d'>-\markup {
      \super "6"
      \hspace #-0.5 \raise #0.7 \tiny "/"
      \hspace #-0.5 \tiny "9"
      }    % :6.9
% special chords
  <c> -\markup { \small \super "bass" } % :c:1
  <c g> -\markup { \small \super "power" } % :c:1.5
  <c e g bes c'>-\markup { \super "7alt" } % :c:8
%  <c e g b>-\markup { ^ } % :maj
  <c e g b>-\markup { \acMaj #""} % :maj
  <c e ges b>-\markup { \acMaj #">5" } % :maj.5-
  <c e gis b>-\markup { \acMaj #"<5" } % :maj.5+

  <c e ges bes>-\markup { \super "7(>5)" } % :7.5-
  <c e gis bes>-\markup { \super "7+" } % :7.5+
  <c e g d'>-\markup { \super "add9" } % :1.3.5.9

% major third chords - 5+ notes
  <c e g b d'>-\markup { \acMaj #"9" } % :maj9
 <c g d'>-\markup { \override #'(baseline-skip . 2) \smaller \acAlt #"" #"add 9" #"omit 3" } % :13.9-
  <c e g bes des'>-\markup { \super "7(>9)" } % :9-
  <c e g bes d' fis'>-\markup { \super "9(<11)" } % :9.11+
  <c e g bes dis'>-\markup { \super "7(<9)" } % :9+
  <c e g bes fis'>-\markup { \super "7(<11)" } % :7.11+
  <c e g b fis'>1-\markup { \acMaj "(<11)"}
  <c e g b d' fis'>1-\markup { \acMaj #"9" \super "(<11)"}
  <c e g bes aes'>-\markup { \super "7(>13)" } % :7.13-
  <c e g bes a'>-\markup { \super "7(add 13)" } % :7.13-
  <c e g b d' f'>-\markup { \acMaj #"11" } % :maj11
  <c e g b d' a' >-\markup { \acMaj #"13" } % :maj13
  <c e g bes d' a' >-\markup { \super "13" } % :13
  <c e g b d' aes' >-\markup { \acMaj #"9(>13)" } % :13
  <c e gis b fis' >-\markup { \override #'(baseline-skip . 2) \acAlt #"^" #"<5" #"<11" } % 5+7+11+
  <c e g bes des' a' >-\markup { \override #'(baseline-skip . 2) \acAlt #"7" #">9" #"13" } % :13.9-
  <c e g bes dis' aes'>-\markup { \override #'(baseline-skip . 2) \acAlt #"7" #"<9" #">13" } % :9+.13-
  <c e g bes d' fis' a'>-\markup { \override #'(baseline-skip . 2) \acAlt #"7" #"<11" #"13" } % :11+.13
  <c e g bes des' fis'>-\markup { \override #'(baseline-skip . 2) \acAlt #"7" #">9" #"<11" } % :9-11+

  %<c e ges bes des'>-\markup { \override #'(baseline-skip . 2) \acAlt #"7" #">5" #">9" } % :5-9-
  <c e ges bes d' a'>-\markup { \override #'(baseline-skip . 2) \acAlt #"7" #"13" #">5" } % :13.5-
  <c e g bes des' as'>-\markup { \override #'(baseline-skip . 2) \acAlt #"7" #">13" #">9" } % :9-13-


%   <c e ges bes des'>-\markup { \override #'(baseline-skip . 2) \acAlt #"7" #">9" #">5" } % :5-9-
%    <c e gis bes des'>-\markup { \override #'(baseline-skip . 2) \acAlt #"7" #">9" #"<5" } % :5+9-
%   <c e ges bes dis'>-\markup { \override #'(baseline-skip . 2) \acAlt #"7" #"<9" #">5" } % :5-9+
%    <c e gis bes dis'>-\markup { \override #'(baseline-skip . 2) \acAlt #"7" #"<9" #"<5" } % :5+9+

  <c e ges bes des'>-\markup { \override #'(baseline-skip . 2) \acAlt #"7" #">9" #">5" } % :9-5-
  <c e gis bes des'>-\markup { \override #'(baseline-skip . 2) \acAlt #"7" #">9" #"<5" } % :9-5+
  <c e ges bes dis'>-\markup { \override #'(baseline-skip . 2) \acAlt #"7" #"<9" #">5" } % :9+5-
  <c e gis bes dis'>-\markup { \override #'(baseline-skip . 2) \acAlt #"7" #"<9" #"(<5)" } % :9+5+
  <c e gis bes d'>-\markup { \super "9+" } % :5+9

% sustained chords
  <c d g>-\markup { \super "sus2" } % :sus2
  <c f g>-\markup { \super "sus" } % :sus4
  <c f g bes>-\markup { \super "7sus" }  % :sus4.7
  <c f g bes d'>-\markup { \super "9sus" }  % :sus4.7.9
  <c f g dis'>-\markup { \super "<9sus" }  % :sus4.9+
   <c f g bes d' a' >-\markup { \override #'(baseline-skip . 2) \acAlt #"" #"13" #"sus" } % :13sus4
% sans septième
   <c e g d'>-\markup { \super "add9" } % c1:3.5.9
  <c f g d'>-\markup { \override #'(baseline-skip . 2) \acAlt #"" #"sus" #"add9" } % c:3.5.9sus4
  <c e g d' aes' >-\markup { \override #'(baseline-skip . 2) \acAlt #"" #"add9" #">13" }
  %-\markup { \super "add9(>13)" } % c:3.5.9.13-
}

% variable needed to use chord exceptions
JazzChords = #(append (sequential-music-to-chord-exceptions JazzChordsList #t) ignatzekExceptions)

% modify the default ChordNames context
\layout {
  \context {
    \ChordNames
    chordRootNamer = #JazzChordNames    % update the chord names
    chordNameExceptions = #JazzChords    % update the chord exceptions
    \override ChordName.font-name = #"lilyjazz-chord"  % use the custom font for displaying the chords
  }
}

-- 
Vincent Gay
Envoyé depuis mon saxo-phone :)
https://myrealbook.vintherine.org/ - http://photos.vintherine.org/

reply via email to

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