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

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

Re: difficulté pour placer les accords


From: Christian LE BARS
Subject: Re: difficulté pour placer les accords
Date: Fri, 8 Jan 2021 18:24:11 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Bonsoir a tous.

Merci Jean de m' avoir répondu.

dans mon précédent envoi j'avais laissé les formulations Jazz.

Notamment , la vignette "swing" que l'on met souvent en début de partition.


Aussi, ci-dessous la partition version musique européenne, avec le minimum de code,

ou j'aimerai que les noms des accords soit juste au-dessus de la portée,

et au dessus l'on trouve: la formulation triolet, le repère A et le segno.


J'ai conscience que je n'ai pas été clair dans mon 1er message, qu'il était mal formulé.

Désolé, de vous avoir fait perdre votre temps!

Cordialement

Christian

\version "2.19.60"

%-------------------------------------------------
\header
{
 title ="When Sunny Gets Blue"
 composer ="Fisher / Segal"
}
%----------------------------------------------
Global=
{
 \time 4/4
 \partial 8
 \key f\major
}
%----------------------------------------------
LesAccords =
\new ChordNames
 {
  \chordmode
   {
    s8 g2:m7 c:sus4.7
   }
 }
%---------------------------------------------------
LaMélodie =
\relative c'
 {
  \clef treble
  \Global
  c8
  \mark \markup { \box A }
  \repeat volta 2
   {
    \tuplet3/2{a'4\segno g a}c,4. c8
   }
}
%--------------------------------------
\score
{
 <<
   \LesAccords
   \new Staff \LaMélodie
 >>
\layout  {}
}

Le 07/01/2021 à 23:10, Jean Abou Samra a écrit :

Le 07/01/2021 à 15:07, Christian LE BARS a écrit :
Bonjour a tous.

Bonne Lilyannée.

Voila j'aimerai que mes accords  s'inscrivent en dessous de la marque swing, du repère A, de  la marque triolet.

Ci dessous un extrait de mon code:

\version "2.19.60"
#(set-global-staff-size 20) %taille des portées
\include "lilyjazz.ily"
%-------------------------------------------------
\header
{
 title = \markup { \override #'(font-name . "Lilyjazz-text")\fontsize #1 \bold\italic "When Sunny Gets Blue" }  composer =\markup { \override #'(font-name . "Lilyjazz-text")\italic "Fisher / Segal" }
}
%----------------------------------------------
\paper
 {
  oddFooterMarkup = \markup {\override #'(font-name . "Lilyjazz-text")\fontsize #3 \fill-line { \fromproperty #'header:title  } }
  print-page-number = ##t
  top-margin = 5\mm
 }
%------------------------------------------
rhythmMarkStaffReduce = #-3
rhythmMarkLabelFontSize = #-2
%---------------------------------
rhythmMark = #(define-music-function (parser location label musicI musicII ) (string? ly:music? ly:music?)
   #{
      \mark \markup {
        \line \general-align #Y #DOWN {
          \combine
            \italic \fontsize #rhythmMarkLabelFontSize $label
            \transparent \italic \fontsize #rhythmMarkLabelFontSize f
          \score
          {
            \new Staff
            \with
            {
              fontSize = #rhythmMarkStaffReduce
              \override StaffSymbol.staff-space = #(magstep rhythmMarkStaffReduce)
              \override StaffSymbol.line-count = #0
              \override VerticalAxisGroup.Y-extent = #'(-0.85 . 4)
            }
            {
              \relative c' { \stemUp $musicI }
              \once \override Score.TextScript.Y-offset = #-0.4
              s4.^\markup{ \halign #-1 \italic "=" }
              \relative c' { \stemUp $musicII }
            }
 %-----------------------------------
            \layout
            {
              ragged-right= ##t
              indent = 0
              \context
              {
                \Staff
                \remove "Clef_engraver"
                \remove "Time_signature_engraver"
              }
            } % layout end
          } % Score end
        } % line end
      } % markup end
   #})
%------------------------------------
rhyMarkIIEighths =
 {
  \override Score.SpacingSpanner.common-shortest-duration = #(ly:make-moment 3/16) % even
  b'8[ b8]
}
%-----------------------------------------
rhyMarkTriplets =
{
  \override Score.SpacingSpanner.common-shortest-duration = #(ly:make-moment 3/16) % even
  \tuplet 3/2 { b'4 b8 }
}
%----------------------------------------------
Global=
{
 \numericTimeSignature
 \set Score.markFormatter = #format-mark-box-alphabet
 \time 4/4
 \partial 8
 \key f\major
}
%----------------------------------------------
LesAccords =
\new ChordNames
  {
   \override ChordNames.ChordName.font-name =  "Lilyjazz-text"
  \override ChordNames . ChordName #'font-size = #2
  \set chordChanges = ##t
  \set Score.majorSevenSymbol = \markup {Maj7}
  \set chordNameSeparator = \markup { "/" }
  \set minorChordModifier = \markup{"-"}
 \chordmode
   {
    s8 g2:m7 c:sus4.7
   }
 }
%---------------------------------------------------
LaMélodie =
\relative c'
 {
  \clef treble
  \Global
  \rhythmMark #"Ballade" \rhyMarkIIEighths \rhyMarkTriplets
  c8
  \mark \markup { \box A }
  \repeat volta 2
   {
    \tuplet3/2{a'4\segno g a}c,4. c8
   }
}
%--------------------------------------
\score
{
 <<
   \LesAccords
   \new Staff \LaMélodie
 >>
\layout  {}
}

Par avance merci

Christian



Bonjour,

Notez que n'ayant pas LilyJAZZ, je n'ai pas pu tester avec cette police, et avec celle par défaut, le résultat sur votre exemple est assez différent.

Je ne suis pas sûr de comprendre la question. Dans une situation aussi alambiquée, j'adopterais peut-être l'espacement que voici :

\version "2.21.80"

\layout {
  \context {
    \Score
    \numericTimeSignature
    markFormatter = #format-mark-box-alphabet
    \key f\major
    majorSevenSymbol = "Maj7"
  }
  \context {
    \ChordNames
    \override ChordName.font-size = 2
    chordChanges = ##t
    chordNameSeparator = "/"
    minorChordModifier = "-"
  }
}


\paper {
  oddFooterMarkup = \markup
      \fontsize #3
      \fill-line {
        \fromproperty #'header:title
      }
  print-page-number = ##t
  top-margin = 5\mm
}


rhythmMarkupStaffReduce = -3
rhythmMarkupLabelFontSize = -2
rhythmMarkupStretching = 1

fragmentLayout =
\layout {
  ragged-right= ##t
  indent = 0
  \context {
    \Score
    \override SpacingSpanner.spacing-increment = #rhythmMarkupStretching
  }
  \context {
    \Staff
    \magnifyStaff #(magstep rhythmMarkupStaffReduce)
    \override StaffSymbol.line-count = 0
    \override VerticalAxisGroup.Y-extent = #'(-0.85 . 4)
    \remove Clef_engraver
    \remove Time_signature_engraver
  }
  \context {
    \Voice
    \stemUp
    \override NoteHead.staff-position = 0
  }
}

#(define-markup-command (rhythm layout props label musicI musicII)
                        (markup? ly:music? ly:music?)
   (interpret-markup layout props #{
     \markup %\general-align #Y #DOWN
     {
       \italic \fontsize #rhythmMarkupLabelFontSize #label
       \score { #musicI \fragmentLayout }
       "="
       \score { #musicII \fragmentLayout }
     }
   #}))

rhyMarkIIEighths = { c''8[ 8] }
rhyMarkTriplets = \tuplet 3/2 { c''4 8 }

\header
{
  title = \markup { \fontsize #1 \bold \italic "When Sunny Gets Blue" }
  composer = \markup { \italic "Fisher / Segal" }
%  piece = \markup { \rhythm Ballade \rhyMarkIIEighths \rhyMarkTriplets }
}


LesAccords =
\chords {
  s8
  g2:m7
  c:sus4.7
}

LaMélodie =
\relative c' {
  \tweak self-alignment-X 0.5
  \tweak padding 2.8
  \tempo \markup { \rhythm Ballade \rhyMarkIIEighths \rhyMarkTriplets }
  \partial 8
  c8
  \tweak Y-offset -4
  \mark \default
  \repeat volta 2 {
    \tweak direction #DOWN
    \tuplet 3/2 { a'4\tweak self-alignment-X -1 \segno g a } c,4. c8
  }
}

<<
  \LesAccords
  \new Staff \LaMélodie
>>


(J'en ai profité pour nettoyer votre code. Est-ce que la fonction pour l'indication de tempo venait du LSR ?)

Cela répond-il à la question ?

Cordialement,
Jean




reply via email to

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