[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Chord Glissando Individual Voice right bound tweaking
From: |
Thomas Morley |
Subject: |
Re: Chord Glissando Individual Voice right bound tweaking |
Date: |
Mon, 21 Mar 2016 14:36:45 +0100 |
2016-03-21 13:36 GMT+01:00 Thomas Morley-2 <address@hidden>:
> Furthermore I noticed some bugs, ...
Because we're fighting some bugs I only have a manual solution, most
of the glissando-properties are reset for each of the broken
glissandi.
A major hassle and fragile like hell.
Also, they are not really parallel, fine-tuning is your turn.
\version "2.19.38"
%%%%%%%%%%%%%%%%%%%%%%
%% FUNCTIONS
%%%%%%%%%%%%%%%%%%%%%%
#(define (set-glissando-properties property-alist)
(lambda (grob)
(let ((gliss-count (ly:grob-property grob 'glissando-index)))
(for-each
(lambda (x)
(let ((gliss-nmbr (car x))
(property-value-alist (cdr x)))
(if (= gliss-nmbr gliss-count)
(for-each
(lambda (y)
(if (list? (car y))
(ly:grob-set-nested-property! grob (car y) (cdr y))
(ly:grob-set-property! grob (car y) (cdr y))))
property-value-alist)
#f)))
property-alist))))
#(define (set-broken-glissando-properties property-alist)
(lambda (grob)
(let* ((orig (ly:grob-original grob))
(siblings (if (ly:grob? orig)
(ly:spanner-broken-into orig)
'())))
(for-each
(lambda (g l) ((set-glissando-properties l) g))
siblings
property-alist))))
glissTweak =
#(define-music-function (parser location lst)(pair?)
#{
\once \override Glissando #'after-line-breaking =
#(set-broken-glissando-properties lst)
#})
%%%%%%%%%%%%%%%%%%%%%%
%% THE EXAMPLE
%%%%%%%%%%%%%%%%%%%%%%
\paper { line-width = 80 }
%% predifined settings
tweakOne = {
\glissTweak
#`(
;; line-end
((0 . (;(color . ,green)
((bound-details right-broken Y) . 16.5)))
(1 . (;(color . ,yellow)
((bound-details right-broken Y) . 17))))
;; line-begin
((0 . (;(color . ,green)
((bound-details right Y) . 13.8)
((bound-details right padding) . 2.5)
;; rotation? really? omg
(rotation . (-10 0 -1.1))))
(1 . (;(color . ,yellow)
((bound-details right padding) . 2.5)
((bound-details right Y) . 14.5)
;; rotation? really? omg
(rotation . (-7 0 -1.3)))))
)
\alterBroken #'normalized-endpoints #'((0 . 0.2) (0.8 . 1)) Glissando
\once \override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods
\once \override Glissando.minimum-length-after-break = 7
}
tweakTwo = {
\glissTweak
#`(
;; line-end
((0 . (;(color . ,red)
((bound-details right-broken Y) . 18.5)
))
(1 . (;(color . ,cyan)
((bound-details right-broken Y) . 19))))
;; line-begin
((0 . (;(color . ,red)
((bound-details right Y) . 15)
((bound-details right padding) . 1.4)
;; rotation? really? omg
(rotation . (-17 0 -1.3))))
(1 . (;(color . ,cyan)
((bound-details right padding) . 2.2)
((bound-details right Y) . 16))))
)
\alterBroken #'normalized-endpoints #'((0 . 0.2) (0.8 . 1)) Glissando
}
%% music variables
upperOne = \relative c'' {
\time 3/4
\change Staff = "lower"
\clef bass
g,,,8 r8 r4
\voiceTwo
\tweakOne
<g' b>32\glissando s8.. |
\break
\change Staff = "upper"
<b''' d>8 s8
}
upperTwo =
\relative c'' {
\time 3/4
s2
\change Staff = "lower"
\voiceOne
\tweakTwo
<d,, fis>32\glissando s8.. |
\break
\change Staff = "upper"
<fis''' a>8
}
lowerOne = \relative c' { s2.*2 }
%% the score
\score {
\new PianoStaff <<
\new Staff = "upper" << \upperOne \\ \upperTwo >>
\new Staff = "lower" { \clef bass \lowerOne }
>>
\layout {
\context {
\Voice
\override Glissando #'breakable = ##t
\override Glissando #'after-line-breaking = ##t
\override Flag.stencil = #modern-straight-flag
}
}
}
-Harm
atest-32.png
Description: PNG image
- Chord Glissando Individual Voice right bound tweaking, dtsmarin, 2016/03/20
- Re: Chord Glissando Individual Voice right bound tweaking, Thomas Morley-2, 2016/03/20
- Re: Chord Glissando Individual Voice right bound tweaking, dtsmarin, 2016/03/20
- Re: Chord Glissando Individual Voice right bound tweaking, Simon Albrecht, 2016/03/20
- Re: Chord Glissando Individual Voice right bound tweaking, dtsmarin, 2016/03/20
- Re: Chord Glissando Individual Voice right bound tweaking, Thomas Morley-2, 2016/03/20
- Re: Chord Glissando Individual Voice right bound tweaking, dtsmarin, 2016/03/20
- Re: Chord Glissando Individual Voice right bound tweaking, Thomas Morley-2, 2016/03/21
- Re: Chord Glissando Individual Voice right bound tweaking,
Thomas Morley <=