Re: re: problem with textspan for controlled aleatorism

2010-02-28 Thread -Eluze


kontrapunktstefan wrote:
> 
> Dear community,
> I think the snippet of my last example was too large, so probably nobody
> could see the basic problem that is:
> How can I have a textspanner that ends with an arrow over a line break?
> 
your example already shows an arrow at the break!

you can toggle the behavior of the text spanner at breaks with

  \override TextSpanner #'(bound-details right-broken arrow) = ##f

i would recommend to always use the same syntactic pattern (which you did
for the other items)!


-- 
View this message in context: 
http://old.nabble.com/problem-with-textspan-for-controlled-aleatorism-tp27726210p27734216.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: problem with textspan for controlled aleatorism

2010-02-28 Thread Nick Payne
When built with 2.13.13 your example does put an arrow on the 
TextSpanner at the line break...


Nick

On 28/02/10 19:55, Stefan Thomas wrote:

Dear community,
I think the snippet of my last example was too large, so probably 
nobody could see the basic problem that is:

How can I have a textspanner that ends with an arrow over a line break?
Here is a much shorter snipper to illustrate my problem:
\version "2.12.2"
\relative c'' {
  \override TextSpanner #'bound-padding = #1.0
  \override TextSpanner #'style = #'line
  \override TextSpanner #'(bound-details right arrow) = ##t
  \override TextSpanner #'bound-details #'left-broken #'text = ##f
  \override TextSpanner #'bound-details #'right-broken #'text = ##f
  \override TextSpanner #'(bound-details left text) = #"fof"
  \override TextSpanner #'(bound-details right text) = #"gag"
  \override TextSpanner #'(bound-details right padding) = #0.6
  \override TextSpanner #'(bound-details right stencil-align-dir-y) = 
#CENTER
  \override TextSpanner #'(bound-details left stencil-align-dir-y) = 
#CENTER


  a8\startTextSpan gis a4 b  b, \break
  g'4 c\stopTextSpan c2
}


<>___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


re: problem with textspan for controlled aleatorism

2010-02-28 Thread Stefan Thomas
Dear community,
I think the snippet of my last example was too large, so probably nobody
could see the basic problem that is:
How can I have a textspanner that ends with an arrow over a line break?
Here is a much shorter snipper to illustrate my problem:
\version "2.12.2"
\relative c'' {
  \override TextSpanner #'bound-padding = #1.0
  \override TextSpanner #'style = #'line
  \override TextSpanner #'(bound-details right arrow) = ##t
  \override TextSpanner #'bound-details #'left-broken #'text = ##f
  \override TextSpanner #'bound-details #'right-broken #'text = ##f
  \override TextSpanner #'(bound-details left text) = #"fof"
  \override TextSpanner #'(bound-details right text) = #"gag"
  \override TextSpanner #'(bound-details right padding) = #0.6
  \override TextSpanner #'(bound-details right stencil-align-dir-y) =
#CENTER
  \override TextSpanner #'(bound-details left stencil-align-dir-y) = #CENTER

  a8\startTextSpan gis a4 b  b, \break
  g'4 c\stopTextSpan c2
}
**
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


problem with textspan for controlled aleatorism

2010-02-26 Thread Stefan Thomas
Dear community,
I have to typeset a piece, that makes use of controlled aleatorism, in the
way like composers as Lutoslaswki have done it.
I have the problem, that the arrow at the end of the textspanner occurs two
times, at the end of the first and at the beginning of the next line.
How can I solve this problem?
Here is the snippet:
 begin %%
\version "2.12.2"
#(define (repOn-callback callback)
  (define (repOn-stencil grob)
   (let* ((dot (ly:font-get-glyph (ly:grob-default-font grob) "dots.dot"))
  (s (callback grob))
  (sx (cons 0 0))
  (sy (cons 0 0))
  (dotx (ly:stencil-extent dot 0))
  (doty (ly:stencil-extent dot 1))
  (yadj (/ (interval-length doty) 2))
  (xadj (/ (interval-length dotx) 2)))
(set! s (ly:stencil-add
 (ly:stencil-translate dot (cons  (- 0 xadj) 0.5))
 (ly:stencil-translate dot (cons  (- 0 xadj) -0.5))
 (ly:make-stencil (list 'draw-line 0.12 -0.5 2 -0.5 -2)  '(-0.55
.
0.45) '(2 . -2))
 (ly:make-stencil (list 'draw-line 0.12 -0.5 2 0 3)  '(-0.55 .
0.45) '(2 . -2))
 (ly:make-stencil (list 'draw-line 0.12 -0.5 -2 0 -3)  '(-0.55 .
0.45) '(2 . -2))
 (ly:make-stencil (list 'draw-line 0.24 -0.88 2 -0.38 3)
'(-0.55 .
0.45) '(2 . -2))
 (ly:make-stencil (list 'draw-line 0.24 -0.88 -2 -0.38 -3)
'(-0.55
. 0.45) '(2 . -2))
 (ly:make-stencil (list 'round-filled-box 1 -0.76 2 2 0)  '(-1 .
-1.1) '(2 . -2))
   ))
(ly:make-stencil (ly:stencil-expr (ly:stencil-translate s (cons 1 0)) )
sx
sy)
  ))
  repOn-stencil)

#(define (repOff-callback callback)
  (define (repOff-stencil grob)
   (let* ((dot (ly:font-get-glyph (ly:grob-default-font grob) "dots.dot"))
  (s (callback grob))
  (sx (cons 0 0))
  (sy (cons 0 0))
  (dotx (ly:stencil-extent dot 0))
  (doty (ly:stencil-extent dot 1))
  (yadj (/ (interval-length doty) 2))
  (xadj (/ (interval-length dotx) 2)))
(set! s (ly:stencil-add
 (ly:stencil-translate dot (cons (- 0 xadj) 0.5))
 (ly:stencil-translate dot (cons (- 0 xadj) -0.5))
 (ly:make-stencil (list 'draw-line 0.12 0.5 2 0.5 -2)  '(-0.55 .
0.45) '(2 . -2))
 (ly:make-stencil (list 'draw-line 0.12 0.5 2 0 3)  '(-0.55 .
0.45)
'(2 . -2))
 (ly:make-stencil (list 'draw-line 0.12 0.5 -2 0 -3)  '(-0.55 .
0.45) '(2 . -2))
 (ly:make-stencil (list 'draw-line 0.24 0.88 2 0.38 3)  '(-0.55
.
0.45) '(2 . -2))
 (ly:make-stencil (list 'draw-line 0.24 0.88 -2 0.38 -3)
'(-0.55 .
0.45) '(2 . -2))
 (ly:make-stencil (list 'round-filled-box -1 0.76 2 2 0)  '(-1 .
-1.1) '(2 . -2))
   ))
(ly:make-stencil (ly:stencil-expr (ly:stencil-translate s (cons -1 0)) )
sx
sy)
  ))
  repOff-stencil)


 aleatorisch = #(define-music-function (parser location x y z )
(ly:music? ly:music? number? )
 #{
 \override Voice.TextSpanner #'bound-details #'right-broken
#'text = ##t
  \override Voice.TextSpanner #'outside-staff-priority = ##f
  \override Voice. TextSpanner #'Y-offset = #0
  \override Voice.TextSpanner #'bound-padding = #2
  \override Voice.TextSpanner #'style = #'line
   \override Voice.TextSpanner #'thickness = #3 %dickere Linien
  \override Voice.TextSpanner #'(bound-details right arrow) = ##t
  \override Voice.TextSpanner #'(bound-details right padding) = $z %this
number defines the distance between the arrow and the following note or rest
  \override Voice.TextSpanner #'(bound-details right stencil-align-dir-y) =
#CENTER
  \override Voice.TextSpanner #'(bound-details left stencil-align-dir-y) =
#CENTER
\once \override Voice.Rest #'stencil =  #(repOn-callback ly:rest::print)
r16
$x %the pattern, that has to repeated
\once \override Voice.NoteColumn #'X-offset = #1.0
\stopStaff
  \once \override Voice.Rest #'stencil =  #(repOff-callback
ly:rest::print)   r16 \startTextSpan
  \hideNotes $y %this are the invisible notes, that should follow the
pattern
\unHideNotes s1*0
\revert Voice.TextSpanner #'bound-padding
  \revert Voice.TextSpanner #'style
  \revert Voice.TextSpanner #'(bound-details right arrow)
  \revert Voice.TextSpanner #'(bound-details right padding)
   \revert Voice.TextSpanner #'thickness
  \revert Voice.TextSpanner #'(bound-details right stencil-align-dir-y)
  \revert Voice.TextSpanner #'(bound-details left stencil-align-dir-y)
  \revert Voice.TextSpanner #'outside-staff-priority
  \revert Voice.TextSpanner #'Y-offset
   \revert Voice.TextSpanner #'bound-details #'right-broken
\startStaff
 #})

 \new Staff {
   \cadenzaOn \aleatorisch { r8 cis''-.\p\< fis''-. g''-. e''-.
f''-. fis''-.\mf\> e''-. f''-. c''-.\! }
   { c''8^"repeat the pattern two times, then go on" \repeat
"unfold" 7 { c'' 8}} #1.7
   \cadenzaOff \bar""\break
   s8 fis'' 8 \stopTextSpa