[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
le mot CODA se situe au début et problème de gissando
From: |
gegeours |
Subject: |
le mot CODA se situe au début et problème de gissando |
Date: |
Sat, 25 Apr 2020 08:15:40 -0700 (MST) |
Bonjour à tous,
J'ai essayé de faire une partition avec la coda à la suite de la portée en
fonction des éléments apportés par Valentin.
Je n'arrive pas à déplacer le mot CODAqui se situe au début de la partition
?
Voici le code de ma partition :
\version "2.20"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Functions copied from
%% https://lists.gnu.org/archive/html/lilypond-user/2013-12/msg01027.html
rochadeAlpha = {
\override Score.BreakAlignment.break-align-orders =
#(make-vector 3
'(left-edge
ambitus
breathing-sign
staff-bar
clef
key-cancellation
key-signature
time-signature
custos))
\once \override Score.TimeSignature.space-alist =
#'(
(first-note fixed-space . 2.0)
(right-edge extra-space . 0.5)
(staff-bar minimum-space . 2.5))
\once \override Score.KeySignature.space-alist =
#'(
(time-signature extra-space . 1.15)
(first-note fixed-space . 1.0)
(right-edge extra-space . 0.5)
(staff-bar minimum-space . 2.5))
}
onceTextLengthOn = {
\once\override TextScript.extra-spacing-width = #'(0 . 0)
\once\override TextScript.extra-spacing-height = #'(-inf.0 . +inf.0)
}
staffStop = {
\onceTextLengthOn
\stopStaff
\cadenzaOn
}
staffStart = {
\once\override Score.BarNumber.break-visibility = #'#(#f #t #t)
\startStaff
\cadenzaOff
\set Staff.forceClef = ##t
}
#(define-markup-command (bar-line layout props strg)(string?)
#:properties ((font-size 0)
(thin-thickness #f)
(thick-thickness #f)
(kern #f)
(add-height 0))
"
Please note: @code{bar-line} isn't finished. There are some weird
codings in
it. I wouldn't be surprised, if it crashes soon.
"
(define (string->string-list str)
"Convert a string into a list of strings with length 1.
@code{"aBc"} will be converted to @code{("a" "B" "c")}.
An empty string will be converted to a list containing @code{""}."
(if (and (string? str)
(not (zero? (string-length str))))
(map (lambda (s)
(string s))
(string->list str))
(list "")))
(define (make-bar-line thickness height font-size blot-diameter)
"Draw a simple bar line."
(ly:round-filled-box
(cons 0 (* (magstep font-size) thickness))
(interval-widen (cons 0 (+ add-height height)) (magstep font-size))
blot-diameter))
(define (make-colon-bar-line height font-size)
(let* ((font
(ly:paper-get-font layout
(cons '((font-encoding . fetaMusic)) props)))
(dot (ly:font-get-glyph font "dots.dot")))
(ly:stencil-add
dot
(ly:stencil-translate-axis
dot
(magstep (+ (/ add-height 2) font-size))
Y))))
(define (make-bracket-bar-line height font-size dir thick-bar )
"Draw a bracket-style bar line. If @var{dir} is set to @code{LEFT}, the
opening bracket will be drawn, for @code{RIGHT} we get the
closing bracket."
(let* ((font
(ly:paper-get-font layout
(cons '((font-encoding . fetaMusic)) props)))
(brackettips-up (ly:font-get-glyph font "brackettips.up"))
(brackettips-down (ly:font-get-glyph font "brackettips.down"))
;; the x-extent of the brackettips must not be taken into account
;; for bar line constructs like "[|:", so we set new bounds:
(tip-up-stil
(ly:make-stencil
(ly:stencil-expr brackettips-up)
(cons 0 0)
(ly:stencil-extent brackettips-up Y)))
(tip-down-stil
(ly:make-stencil
(ly:stencil-expr brackettips-down)
(cons 0 0)
(ly:stencil-extent brackettips-down Y)))
(stencil
(ly:stencil-add
thick-bar
(ly:stencil-translate-axis
tip-up-stil
(+ (/ (+ add-height height) 2) (magstep font-size))
Y)
(ly:stencil-translate-axis
tip-down-stil
(* -1 (+ (/ (+ add-height height) 2) (magstep font-size)))
Y))))
(if (eq? dir LEFT)
stencil
(ly:stencil-scale stencil -1 1))))
;; TODO: changing global-staff-size will ruin the output for the braces
;; manual readjustment needed
(define (make-brace-bar-line height font-size)
(let* ((pt (ly:output-def-lookup layout 'pt))
(new-height (/ (+ height add-height) pt))
(line-thickness (ly:output-def-lookup layout 'line-thickness))
(font
(ly:paper-get-font layout
(cons '((font-encoding . fetaBraces)
(font-name . #f))
props)))
(glyph-count (1- (ly:otf-glyph-count font)))
(scale (ly:output-def-lookup layout 'output-scale))
;; Why `+ 2´ ?
(scaled-size (+ 2 (/ (ly:pt new-height) scale)))
;; TODO How about font-size?
;; (scaled-size
;; (+ 2 (magstep font-size) (/ (ly:pt new-height) scale)))
(glyph
(lambda (n)
(ly:font-get-glyph
font
(string-append "brace" (number->string n)))))
(get-y-from-brace
(lambda (brace)
(interval-length
(ly:stencil-extent (glyph brace) Y))))
(find-brace
(binary-search 0 glyph-count get-y-from-brace scaled-size))
(glyph-found (glyph find-brace)))
(if (or (null? (ly:stencil-expr glyph-found))
(< scaled-size
(interval-length (ly:stencil-extent (glyph 0) Y)))
(> scaled-size
(interval-length (ly:stencil-extent (glyph glyph-count) Y))))
(begin
(ly:warning (_ "no brace found for point size ~S ") new-height)
(ly:warning (_ "defaulting to ~S pt")
(/ (* scale (interval-length (ly:stencil-extent glyph-found Y)))
(ly:pt 10)))))
glyph-found))
(let* ((line-thickness (ly:output-def-lookup layout 'line-thickness))
(size (ly:output-def-lookup layout 'text-font-size 12))
;; Numerical values taken from the IR
;; making them overrideable
(kern (or kern (* line-thickness 3.0)))
(thin-thickness (or thin-thickness (* line-thickness 1.9)))
(thick-thickness (or thick-thickness (* line-thickness 6.0)))
(blot (ly:output-def-lookup layout 'blot-diameter))
;; Not sure about the numerical value, found it by try and error.
(thin-bar-line
(ly:stencil-aligned-to
(make-bar-line thin-thickness (/ size 9) font-size blot)
Y CENTER))
(thick-bar-line
(ly:stencil-aligned-to
(make-bar-line thick-thickness (/ size 9) font-size blot)
Y CENTER))
(colon-bar-line
(ly:stencil-aligned-to
(make-colon-bar-line (/ size 9) font-size)
Y CENTER))
(bracket-left-bar-line
(ly:stencil-aligned-to
(make-bracket-bar-line (/ size 9) font-size -1
thick-bar-line)
Y CENTER))
(bracket-right-bar-line
(ly:stencil-aligned-to
(make-bracket-bar-line (/ size 9) font-size 1 thick-bar-line)
Y CENTER))
(brace-left-bar-line
(ly:stencil-aligned-to
(make-brace-bar-line (/ size 9) font-size)
Y CENTER))
(strg-list (string->string-list strg))
(find-bar-line-proc
(lambda (x) (cond ((string=? ":" x) colon-bar-line)
((string=? "|" x) thin-bar-line)
((string=? "." x) thick-bar-line)
((string=? "[" x) bracket-left-bar-line)
((string=? "]" x) bracket-right-bar-line)
((string=? "{" x) brace-left-bar-line)
(else empty-stencil))))
(bar-line-stils
(remove ly:stencil-empty? (map find-bar-line-proc strg-list)))
(stil
(stack-stencils X
RIGHT
(* (magstep font-size) kern)
bar-line-stils))
(stil-y-length (interval-length (ly:stencil-extent stil Y))))
;; Hm, should the stencil-translate be hard-coded?
(ly:stencil-translate-axis
stil
0;(/ stil-y-length 4)
Y)))
%% The BarLine to add is defined using the markup-command \bar-line,
%% It depends of 'start-bar-length' (y-length)
%% 'kern' (kerning)
%% 'start-bar-type (type)
%% 'thick-thickness (harcoded thick-thickness)
#(define (start-bar-markup kern start-bar-length thick-thickness
start-bar-type)
#{
\markup
\with-dimensions #(cons kern kern) #'(0 . 0)
\override #`(add-height . ,start-bar-length)
\override #`(thick-thickness . 0.5)
\bar-line #start-bar-type
#})
%% The 'markup' is turned into a stencil and moved in
%% Y-direction to fit.
#(define ((new-start-bar start-bar-length markup) grob)
(let* ((layout (ly:grob-layout grob))
(staff-space (ly:output-def-lookup layout 'staff-space))
(size (ly:output-def-lookup layout 'text-font-size 12))
(line-thickness (ly:output-def-lookup layout 'line-thickness))
(new-start-bar-stil (grob-interpret-markup grob markup))
(new-stencil
(ly:stencil-combine-at-edge
(ly:bar-line::print grob)
X
LEFT
(ly:stencil-translate-axis
new-start-bar-stil
(+ staff-space
(/ line-thickness 2)
(/ (+ start-bar-length (/ size 9)) -2))
Y)
0)))
new-stencil))
addBar =
#(define-music-function (kern start-bar-type start-bar-length)
(number? string? number?)
"
Adds a custom-bar-line to @code{\\bar "|"}.
@var{kern} is for kerning
@var{start-bar-type} determines the type
@var{start-bar-length} determines the Y-length
Also, other settings are used to fake the appearence of a starting system.
Using custom-staff-sizes or other global-staff-size will result in the need
to readjust the value for @var{start-bar-length}
"
#{
\once \override Staff.BarLine.stencil =
#(new-start-bar
start-bar-length
(start-bar-markup kern start-bar-length 0.5 start-bar-type))
\once\override Score.BarLine.hair-thickness = #1.6
\once\override Score.SpanBar.hair-thickness = #1.6
\once\override Score.BarLine.Y-extent = #'(0 . 0)
\bar "|"
\rochadeAlpha
\once\override Score.RehearsalMark.self-alignment-X = #LEFT
#})
space =
#(define-music-function (width) (number?)
"
Adding a gap of width @var{width} into a StaffSymbol.
Only works in the middle of a Staff.
SpanBars are forced. Ofcourse this will only work, if the
Span_bar_engraver is
present.
"
#{
\noBreak
\staffStop
\onceTextLengthOn
s1*1/1000000-\markup \with-dimensions #(cons 0 width) #'(0 . 0) \null
\once \override Staff.BarLine.allow-span-bar = ##t
\once \override Score.Clef.font-size = #'2
\staffStart
\noBreak
#})
noSpan = \with {
\override BarLine.allow-span-bar = ##f
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Début de la partition de Gérard
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\header {
title = "Direct Paris Milan"
instrument = "Accordéon"
composer = "Attilio Manghenzani"
tagline = \markup {
Gravé avec LilyPond, un logiciel gratuit et libre
\concat { ( \with-url #"http://lilypond.org" http://lilypond.org ) }
}
}
\paper {
system-system-spacing.padding = #0
oddFooterMarkup = \markup \fill-line {
\center-column {
\line { \fontsize #-4 \fromproperty #'header:title }
\on-the-fly #last-page \line { \fontsize #-1 \fromproperty
#'header:tagline }
\italic \line {
\fontsize #-1 {
GR le #(strftime "%d %b %Y" (localtime (current-time)))
}
}
}
}
}
\layout {
\context {
\Score
\consists "Span_bar_engraver"
}
\context {
\ChordNames
%% pour imprimer le signe "coda" -vv
\consists "Text_engraver"
%% noms des accords en français
\frenchChords
\override ChordName.font-family = #'serif
\override ChordName.extra-offset = #'(-1 . 0)
}
\override Score.BarNumber.color = #red
\override Score.BarNumber.font-shape = #'italic
\override Score.BarNumber.font-size = #0.2
ragged-last = ##t
}
logo= \markup {
\with-dimensions #'(0 . 0) #'(0 . 0) {
\translate #'(2 . -1)
%% Vérifier le chemin, puis décommenter (-vv)
""%\epsfile #X #15 #"../accordéon.eps"
}}
codaBreak = {
\stopStaff \cadenzaOn s1
\once \override BreathingSign.X-extent = #'(0 . 12)
\once \override BreathingSign.transparent = ##t
\breathe s \cadenzaOff \startStaff
\set Staff.forceClef = ##t
\once \override Staff.Clef.full-size-change = ##t
}
%%% extension du LaissezVibrer
xLV = #(define-music-function
(parser location further) (number?) #{
\once \override LaissezVibrerTie.X-extent = #'(0 . 0)
\once \override LaissezVibrerTie.details.note-head-gap =
#(/ further -2)
\once \override LaissezVibrerTie.extra-offset =
#(cons (/ further 2) 0)
#})
global = {
\key f \major
\time 4/4
\tupletUp
\defineBarLine ";;" #'(";;" "" ";;")
}
right = \relative c' {
\global
<e g bes c>8 [ q q q] q [ q q q]
<eis gis b cis> [ q q q] q [ q q q]
<e g bes c>8 [ q q q] q [ q q q]
<eis gis b cis> [ q q q] q [ q q q]
<e g bes c>4 r r2
\acciaccatura c8 <e g bes d>2 r2
\acciaccatura c8 <e g bes des>2 r2
\acciaccatura c8 <e g bes c>2 \acciaccatura c8 <e g bes c>2 \bar "||"
\time 2/2
c8 <f a c> d2 c8 <f a c>
d2 c8 <f a c> d4
c <e g bes d> q q
q1
c8 <e bes' d> d2 c8 <e bes' d>
d2 c8 <e bes' d> d4
c4 <f a c> q q
q1
c8 <f a c> d2 c8 <f a c>
d2 c8 <f a c> d4
c <e g bes d> q q
q1
c8 <e bes' d> d2 c8 <e bes' d>8
d2 c8 <e bes' d> d4
<f a c>4 r r q
q r q r
c8 <f a c> d2 c8 <e a c>
d2 c8 <f a c> d4
c4 <e g bes d> q q
q1
c8 <e bes' d> d2 c8 <e bes' d>
d2 c8 <e bes' d> d4
c4 <f a c> q q
q1
\acciaccatura f8 2 \acciaccatura f8 2
\acciaccatura f8 2\acciaccatura f8 2
\acciaccatura f8 <bes d>2\acciaccatura f8 <bes d>2
<ges bes des>1
<f a c>1
<c e g bes>4 <bes c e g>2 r4
4 r q q
r q q2 \bar "||" \time 4/4
<e' g bes c>8 [ q q q] q [ q q q]
<eis gis b cis> [ q q q] q [ q q q]
<e g bes c> [ q q q] q [ q q q]
<eis gis b cis> [ q q q] q [ q q q]
<e g bes c>8 r r q8 q r r q
<eis gis b cis> r r q q r r q
<e g bes c> r r q q r r q
q r q r q r q r \bar "||" \time 2/2
a'8 [ g f e] d [ c b c]
d [ c b c] d [ c b c]
a'8 [ g f e] d [ c b c]
d [ c b c] d [ c b c]
bes'[ g e c] d [ e d c]
d [ c b c] d [ c b c]
bes' [ g e c] d [ e d c]
d [ c b c] d [ c b c]
a'8 [ g f e] d [ c b c]
d [ c b c] d [ c b c]
a'8 [ g f e] d [ c b c]
d [ c b c] d [ c b c]
bes' [ g e c] d [ e d c]
d [ c b c] d [ c b c]
bes' g e c bes g e c
f4 r <a, c d f> \mark \markup \musicglyph #"scripts.coda" r
\bar "||" \key bes\major
<d' f bes>4 r q q
r q q q
<des es bes'> q q q
q q q q
<d f bes> r q q
r q q q
<des es bes'>4 q q q
q q q q
<g bes es>4 r q q
r q q q
q q q
q q q q
<g bes es>4 r q q
r4 q q q
q q q
q q q q
<d, f bes> r q q
r q q q
<des e bes'> q q q
q q q q
<d f bes> r q q
r q q q
<des e bes'> q q q
q q q q
4 r q q r q q q
<gis b d f> q <gis b d es> q
<es g bes d> q <es g bes des> q \bar "||"
}
left = \relative c' {
\global \clef F
c,4 r r c
cis r r cis
c r r c
cis r r cis
c8 [c8 c8 c8] c8 [c8 c8 c8]
c8 [c8 c8 c8] c8 [c8 c8 c8]
c8 [c8 c8 c8] c8 [c8 c8 c8]
c8 [c8 c8 c8] c8 [c8 c8 c8]
f,4 f' d, c
f f' d, f'
c, c'' e,, g
c, c'' e,, g
c, c'' e,, g
c, c'' e,, g
f f' d, c
f f' d, c
f f' d, c
f f' d, f'
c, c'' e,, g
c, c'' e,, g
c, c'' e,, g
c, c'' e,, c''
r <f,, a d> q r
r q r q
f f' d, c
f f' d, f'
c, c'' e,, g
c, c'' e,, g
c, c'' e,, g
c, c'' e,, c''
f,, f' d, c
f f' d, c
f'4 e es d
bes c b c
bes' a aes g
ges, ges' des, ges'
f, f' c, f'
g, c' c,, c''
f,, r c f
r4 c f2
c'4 r r c
cis r r cis
c r r c
cis r r cis
r8 c c r r c c r
r cis cis r r cis cis r
r c c r r c c r
r c r c r c r c
f,4 f' c, f'
f, f' c, f'
f, f' c, f'
f, f' c, f'
g, c' c,, c''
g, c' c,, c''
g, c' c,, c''
g, c' c,, c''
f,, f' c, f'
f, f' c, f'
f, f' c, f'
f, f' c, f'
g, c' c, c'
g, c' c, c'
g, c' c, c'
f, r <f f'> r
\key bes\major
bes, bes' f, bes
bes bes' f, bes'
<<
{bes4 r r bes r2 bes4 r}
\\
{des,,1 ~ des1}
>>
bes'4 bes' f, bes'
bes, bes' f, bes'
<<
{des4 r r des r2 des4 r}
\\
{des,,1 ~ des1}
>>
es4 es' bes es
es,4 es' bes es
<<
{ges4 r r ges r2 ges4 r4}
\\
{ges,1 ~ ges1}
>>
es4 es' bes es
es,4 es' bes es
<<
{ges4 r r ges r2 ges4 r4}
\\
{ges,1 ~ ges1}
>>
bes4 bes' f, bes'
bes,4 bes' f, bes'
<<
{des4 r r des r2 des4 r}
\\
{des,,1 ~ des1}
>>
bes'4 bes' f, bes'
bes, bes' f, bes'
<<
{des4 r r des r2 des4 r}
\\
{des,,1 ~ des1}
>>
f4 r f f
r f f f
f r r2
R1 *2/2
}
accords = \chordmode {
}
codaAccords = \chordmode {
}
codaRight= \relative c' {
\clef G
\key f\major \time 4/4
R1
\acciaccatura c'8 <e g bes d>4 r r2
<c e bes' c>4 r r2
\acciaccatura c8 <e g bes d>4 r r2
<a, c f>2 \acciaccatura <bes des>8 2
\acciaccatura <bes des>8 4 \acciaccatura <bes des>8 4
\acciaccatura <bes des>8 2
\acciaccatura <bes des>8 2 \acciaccatura <bes des>8 2
<bes des f>8 [ ] <bes des f>8 [ ] <bes des f>8 [ ] <bes d es f>\fermata
\fermata
}
codaLeft = \relative c {
\clef F
\key f\major
c8 [ c8 c8 c8] c8 [ c8 c8 c8]
c8 [ c8 c8 c8] c8 [ c8 c8 c8]
c8 [ c8 c8 c8] c8 [ c8 c8 c8]
c8 [ c8 c8 c8] c8 [ c8 c8 c8]
f,8 [ f f f] f [ f f f]
f [ f f f] f [ f f f ]
f [ f f f] f [ f f f]
f [ f f f] f f a \fermata[ f\fermata]
\bar "|."
}
%% Image de logo.
\markup {
\with-dimensions #'(0 . -0) #'(0 . 1)
\translate #'(-3 . -1)
\epsfile #X #15 #"/home/gerard/Documents/Mespartitions/accordéon.eps"
}
\score {
\new PianoStaff \with {
midiInstrument = "accordion"
} <<
\new Staff {
\right \codaBreak
\addBar #0.3 "{" #13.25
\codaRight
}
\new ChordNames \with {
midiInstrument = "music box"
midiMaximumVolume = #80
} {
\accords s1^\markup \center-column {
\hspace #1
"CODA" \musicglyph #"scripts.coda"
} s
\codaAccords }
\new Staff { \left \codaBreak \codaLeft }
>>
\layout { }
\midi {
\tempo 4=100
}
}
%%%%
Comment fait-on pour arranger la CODA au bon endroit.
Par ailleurs, j'ai un glissando qui se place avant l'accord comme l'indique
l'image ci-dessous :
<http://lilypond-french-users.1298960.n2.nabble.com/file/t395625/glissando.jpeg>
Avec \override Glissando.style = #'zigzag et \glissando tout se place après
l'accord. Comment dois-je m'y prendre.
Merci d'avance pour votre aide.
--
Sent from: http://lilypond-french-users.1298960.n2.nabble.com/
- le mot CODA se situe au début et problème de gissando,
gegeours <=
- Re: le mot CODA se situe au début et problème de gissando, Valentin Villenave, 2020/04/25
- Message not available
- Re: Coquilles dans la doc, Jean-Charles Malahieude, 2020/04/26
- Re: Coquilles dans la doc, address@hidden, 2020/04/26
- Re: Coquilles dans la doc, Valentin Villenave, 2020/04/26
- Re: Coquilles dans la doc, address@hidden, 2020/04/26
- Re: Coquilles dans la doc, gerardk, 2020/04/26
- Re: Coquilles dans la doc, address@hidden, 2020/04/27
- Re: Coquilles dans la doc, gegeours, 2020/04/27
- Re: Coquilles dans la doc, Pierre Perol-Schneider, 2020/04/27
Message not available