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

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

Re: Accords majeurs et mineurs


From: Éric Bouvéron
Subject: Re: Accords majeurs et mineurs
Date: Sat, 6 Feb 2010 00:30:25 +0800

Bonjour,
En cherchant dans la doc de Lilypond, j'ai trouvé ce passage.
Est-ce possible de le modifier pour parvenir à aligner mes accords majeurs, sur le niveau du nom de l'accord?
Éric

The property chordNameExceptions can be used to store a list of special notations for specific chords.

% modify maj9 and 6(add9)
% Exception music is chords with markups
chExceptionMusic = {
<c e g b d'>1-\markup { \super "maj9" }
<c e g a d'>1-\markup { \super "6(add9)" }
}

% Convert music to list and prepend to existing exceptions.
chExceptions = #( append
( sequential-music-to-chord-exceptions chExceptionMusic #t)
ignatzekExceptions)

theMusic = \chordmode {
g1:maj9 g1:6.9
\set chordNameExceptions = #chExceptions
g1:maj9 g1:6.9
}

\layout {
ragged-right = ##t
}

<< \context ChordNames \theMusic
\context Voice \theMusic
>>








Le 4 février 2010 15:55, Éric Bouvéron <address@hidden> a écrit :

Bonjour,
Lorsque j'écris un accord majeur au dessus de la portée, j'obtiens la lettre correspondant à l'accord et un triangle, légèrement au-dessus de la lettre

            Δ)

(Ex: C    )
.

Lorsque j'écris un accord minur au dessus de la portée, j'obtiens la lettre correspondant à l'accord et un "m", au niveau de la lettre de l'acord (Ex: Cm).

Est-t-l possible d'avoir un alignement, pour le majeur comme pour le mineur, au niveau de la lettre? (Ex: CΔ, Cm) tout en gardant les septièmes et autres altérations au dessus de ces symboles?

Ci-joint un fichier exemple. On voit que les mineurs sont au bon endroit, et les majeurs décalés.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.12.3"
\include "italiano.ly"
- Masquer le texte des messages précédents -

#(define (conditional-kern-before markup bool amount)
 "Add AMOUNT of space before MARKUP if BOOL is true."
 (if bool
     (make-line-markup
      (list (make-hspace-markup amount)
           markup))
     markup))

#(define-public (alteration->text-accidental-markup alteration)
 (make-smaller-markup
  (make-raise-markup
   (if (= alteration FLAT)
       1.7
       2)
   (make-musicglyph-markup
    (assoc-get alteration standard-alteration-glyph-name-alist "")))))

#(define (accidental->markup alteration)
 "Return accidental markup for ALTERATION."
 (if (= alteration 0)
     (make-line-markup (list empty-markup))
     (conditional-kern-before
      (alteration->text-accidental-markup alteration)
      (= alteration FLAT) 0.2)))

#(define-public (special-note-name->markup pitch)
 "Return pitch markup for PITCH."
 (make-line-markup
  (list
   (make-simple-markup
    (vector-ref #("C" "D" "E" "F" "G" "A" "B") (ly:pitch-notename pitch)))
    (accidental->markup (ly:pitch-alteration pitch)))))

\layout {
 \context {
   \Score
   chordRootNamer = #special-note-name->markup
 }
}

\chords {
 do1:maj do1:min do1:maj7 do1:min7 dob1:dim7 dod1:aug7
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Je voudrais que seuls les 7èmes, les diminués, soient au dessus des lettres d'accords, les triangles et les m restant au même niveau.

Merci ,

Éric
--
Éric Bouvéron


Hong Kong S.A.R.



reply via email to

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