Accord inverser la position des notes proches (droite gauche)

Bonsoir
je cale ... dans un accord inverser la position des notes proches.
Comment mettre le do à gauche du si !
Cordialement ,

\version "2.24"

{ 
<c'' b'>4 
}

image

Il y a peut-être moyen de faire quelque chose avec ce snippet.

Hé ben voilà

{
  <c'' b'>
  s4
  <
  \tweak X-extent #'(0.85 . 0 )
  \tweak Accidental.X-offset -1.2 cis''
  \tweak X-extent #'(0 . 0) b'>4
  s4
}

image

Merci, pour ce snippet.
mais c'est un gros morceau pour juste une fois !

ça fonctionne bien aussi !

#(define ((shift offsets) grob)
"Defines how NoteHeads should be moved according to the given list of offsets."
 (let* (
 ;; NoteHeads
        ;; Get the NoteHeads of the NoteColumn
        (note-heads (ly:grob-array->list (ly:grob-object grob 'note-heads)))
        ;; Get their durations
        (nh-duration-log
          (map
            (lambda (note-head-grobs)
              (ly:grob-property note-head-grobs 'duration-log))
            note-heads))
        ;; Get their length in X-axis-direction
        (stencils-x-lengths
          (map
            (lambda (x)
                (let* ((grob-x-ext (ly:grob-extent x grob X)))
                  (if (interval-sane? grob-x-ext)
                      (interval-length grob-x-ext)
                      0)))
             note-heads))
 ;; Stem
        (stem (ly:grob-object grob 'stem))
        (stem-thick (ly:grob-property stem 'thickness 1.3))
        (stem-x-width (if (ly:grob? stem)
                          (let ((stem-x-ext (ly:grob-extent stem grob X)))
                            (if (interval-sane? stem-x-ext)
                                (interval-length stem-x-ext)
                                (/ stem-thick 10)))
                          ;; Fall back
                          ;; TODO is it ever used?
                          (/ stem-thick 10)))
        (stem-dir (ly:grob-property stem 'direction))
        ;; Calculate a value to compensate the stem-extension
        (stem-x-corr
          (map
            (lambda (q)
               ;; TODO better coding if (<= log 0)
               (cond ((and (= q 0) (= stem-dir 1))
                      (* -1 (+ 2  (* -4 stem-x-width))))
                     ((and (< q 0) (= stem-dir 1))
                      (* -1 (+ 2  (* -1 stem-x-width))))
                     ((< q 0)
                      (* 2 stem-x-width))
                     (else (/ stem-x-width 2))))
             nh-duration-log)))
 ;; Final Calculation for moving the NoteHeads
   (for-each
     (lambda (nh nh-x-length off x-corr)
         (if (= off 0)
           #f
           (ly:grob-translate-axis! nh (* off (- nh-x-length x-corr)) X)))
     note-heads stencils-x-lengths offsets stem-x-corr)))

displaceHeads =
#(define-music-function (offsets) (list?)
"
 Moves the NoteHeads, using (shift offsets)
"
 #{
   \once \override NoteColumn.before-line-breaking = #(shift offsets)
 #})
 
adjustStem =
#(define-music-function (val)(pair?)
"
 Adjust 'stem-attachment via 
 adding multiples of the stem-width to the x-default (car val)
 and multiplying the y-default with (cdr val).
"
#{
   \once \override NoteHead.before-line-breaking = 
   #(lambda (grob)
     (let* ((stem-at (ly:grob-property grob 'stem-attachment))
            (stem (ly:grob-object grob 'stem))
            (stem-x-width (interval-length (ly:grob-property stem 'X-extent))))
     (ly:grob-set-property! 
       grob
       'stem-attachment 
       (cons (+ (car stem-at) (* stem-x-width (car val))) (* (cdr val) (cdr stem-at))) 
       )))
#})

{ 

<c'' b'>
\displaceHeads #'(-0.8 1 1) 
<c'' b'>
}

image

mais ça ne marche pas bien avec mon accord à 5 notes
obligé de ruser

\version "2.24"
\language "english"

\relative c'{ 
    <<
    { 
      \set fingeringOrientations = #'(right)
      \stemDown
      \tweak Stem.stencil ##f
      
      <\tweak X-extent #'(1.2 . 0 )
      \tweak Accidental.X-offset -2 cs'
      \tweak X-extent #'(0 . 0) b \tweak X-offset 3 -3 >4
    }
    \\
    { \set fingeringOrientations = #'(right)
      \oneVoice
      <a, e' a'-4>4^"½II"  }
  >>
}

trop content mis en place

Mais LilyPond me cri dessus .. Il n'aime pas !

Question totalement inutile (!): pourquoi veux-tu inverser ces notes d'accord?

Bernard

parce que...
le doigté à droite pour le Si ce n'est pas clair.
mais je suis revenu comme par défaut.

Et pourquoi ne pas le mettre à gauche ? À cause de l'arpège ?

C'est vrai que le 3 fait référence au si, mais dans ce cas le 4 devrait être vis-à-vis du do# et pour le la aigu, ce serait le 5… Si je reprends les règles que j'ai apprises en gravure, en cas de collision, la plus grave doit (devrait…) se situer à gauche de la hampe, et l'aigüe à droite… Scott Ross dit la même chose…

Cordialement.

Bernard

PS: c'est une partition pour piano?

partition duo guitares les doigtés sont bons !
Je laisse ainsi doigté à droite Si à gauche.

Bonjour @MartialR,
J'ai trouvé ça et ça ne fait pas d'erreur:

\relative c'{ 
    <<
    { 
      \set fingeringOrientations = #'(right)
      \omit Stem
      \override NoteColumn.force-hshift = #0.3
       b'4\finger \markup \with-dimensions #'(0 . 0) #'(0 . 0) \translate #'(1. . -3.)"3"
    }
    \\
    { \set fingeringOrientations = #'(right)
      <a, e' cs' a'-4>4^"½II"  }
  >>
}

ha oui merci...
Mais ce n'est vraiment pas esthétique.
j'ai gardé la forme "officielle "

1 « J'aime »

Ha ! C'est vrai que c'est moche. Mieux comme ça, peut être:

\version "2.24.4"
\language "english"
\relative c'{ 
    <<
    { 
      \set fingeringOrientations = #'(right)
      \omit Stem
      \override NoteColumn.force-hshift = #0.9
       b'4\finger \markup \with-dimensions #'(0 . 0) #'(0 . 0) \translate #'(0.8 . -2.5)"3"
    }
    \\
    { \set fingeringOrientations = #'(right)
      \stemUp
      <a, e' cs' a'-4>4^"½II"  }
  >>
}

N'importe quel guitariste comprend que le doigté 3 concerne le si et pas le do# je pense. Donc la version officielle va bien en fait.

1 « J'aime »