Re: Chord Glissando Individual Voice right bound tweaking

2016-03-21 Thread Thomas Morley
2016-03-21 13:36 GMT+01:00 Thomas Morley-2 :
> 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
  32\glissando s8.. |
  \break
  \change Staff = "upper"
  8 s8
}

upperTwo =
\relative c'' {
  \time 3/4
  s2
  \change Staff = "lower"
  \voiceOne
  \tweakTwo
  32\glissando s8.. |
  \break
  \change Staff = "upper"
  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
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Chord Glissando Individual Voice right bound tweaking

2016-03-21 Thread Thomas Morley-2
dtsmarin wrote
> Thank you but the gliss. goes downwards whereas it should go upwards.

The code of my recent post wasn't meant to fix anything.
It is supposed to demonstrate the problem with a small (not even tiny)
code-example.

Though you may have noticed:
(1) Some aspects of the weird output are gone, because I deleted your
fix-attempts.
It would have been nice you inserted a comment like
"I tried

but to no avail"
(2)
It doesn't makes any sense to write
\override NoteColumn.glissando-skip = ##t \hideNotes r \unHideNotes
if you want to skip a column with the glissando.
Just use spacer, they don't cause a NoteColumn.

Furthermore I noticed some bugs, while continuing today on my small example:
https://sourceforge.net/p/testlilyissues/issues/4806/
<https://sourceforge.net/p/testlilyissues/issues/4806/>  
https://sourceforge.net/p/testlilyissues/issues/4807/
<https://sourceforge.net/p/testlilyissues/issues/4807/>  

You could have spotted them yourself, at least with a small/tiny example.
Some work or at least research on them already started.

Without bug-report no fix.

-Harm






--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Chord-Glissando-Individual-Voice-right-bound-tweaking-tp188718p188756.html
Sent from the User mailing list archive at Nabble.com.

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


Re: Chord Glissando Individual Voice right bound tweaking

2016-03-20 Thread Thomas Morley-2
dtsmarin wrote
> The codefile is HUGE and I can't post it due to copyright reasons, so here
> is a part of the code.
> I want each gliss. line to be parallel with the other ones and after the
> break they should continue their normal angle.


dtsmarin wrote
> Ok I was in a real rush next time I'll be more brief. I selected the
> minimum elements so that the code works, do you want only the spot that
> has the problem even if it doesn't work in Lilypond? Sorry for the
> inconvenience.  

Please read the link I posted earlier again.
It's about compilable and minimal code and demonstrating the problem and
only the problem.
Yes this means some additional work and time for you.

Because I'm such nice guy I made your homework for you:

\version "2.19.38"

\layout {
  \context {
\Voice
\override Glissando.breakable = ##t
\override Glissando.after-line-breaking = ##t
  }
}

upper = 
\relative c'' { 
  \time 3/4 
  s2 
  \change Staff = "lower"
  4\glissando 
  \break
  \change Staff = "upper" 
  4
}

\new PianoStaff <<
  \new Staff = "upper" \upper
  \new Staff = "lower" { \clef bass s2. s4 }
>>

Took me 40 min.
In this time I could have worked on your problem.
I suggest you now do the work on my snippet above, I as a volunteer, don't
have time for it anymore.
Kitchen is calling.

-Harm




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Chord-Glissando-Individual-Voice-right-bound-tweaking-tp188718p188732.html
Sent from the User mailing list archive at Nabble.com.

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


Re: Chord Glissando Individual Voice right bound tweaking

2016-03-20 Thread dtsmarin
Ok I was in a real rush next time I'll be more brief. 
-D. 



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Chord-Glissando-Individual-Voice-right-bound-tweaking-tp188718p188728.html
Sent from the User mailing list archive at Nabble.com.

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


Re: Chord Glissando Individual Voice right bound tweaking

2016-03-20 Thread dtsmarin
The codefile is HUGE and I can't post it due to copyright reasons, so here is
a part of the code.
I want each gliss. line to be parallel with the other ones and after the
break they should continue their normal angle. 

\version "2.19.38"

glissandoSkipOn = {
  \override NoteColumn.glissando-skip = ##t
  \hide NoteHead
  \override NoteHead.no-ledgers = ##t
}
glissandoSkipOff = {
  \revert NoteColumn.glissando-skip
  \undo \hide NoteHead
  \revert NoteHead.no-ledgers
}
%%%
upperOne = \relative c'' { \oneVoice
\time 3/4
\change Staff = "lower"
\once\override Score.BarNumber.whiteout = #1.8
\once\override Score.BarNumber.whiteout-style = #'outline
\once\override Staff.Clef #'layer = #-1
\once\override Score.StaffSymbol #'layer = #2
\once\override Staff.Clef.whiteout-style = #'outline
\once\override Staff.Clef.whiteout = #2
\clef bass \glissandoSkipOff
\once\override DynamicText.extra-offset = #'(0.2 . 1 )
g,,,8^\p r8 r4 \once\stemDown \set stemLeftBeamCount = #0
\once\override Beam.positions = #'(-5.5 . -5.1)
\override Glissando.breakable = ##t
\override Glissando.after-line-breaking = ##t
\once \override Glissando.bound-details.right.Y = #6
\override Glissando.after-line-breaking =
#(lambda (grob)
   (ly:grob-set-nested-property! grob '(bound-details right Y) 9))
32[]\glissando \glissandoSkipOn \hideNotes r8.. | \break \change Staff
= "upper" \unHideNotes
\stemDown  \override Glissando.after-line-breaking = ##f
\glissandoSkipOff 8\! r8
}
upperTwo = \relative c'' { \oneVoice \time 3/4 s2 \change Staff = "lower"
 \once\stemUp \set stemLeftBeamCount = #0
 \once\override Beam.positions = #'(4 . 4.5)
  \override Glissando.after-line-breaking = ##t
 \override Glissando.breakable = ##t
 \once \override Glissando.bound-details.right.Y = #7
 \set glissandoMap = #'((0 . 1) (1 . 0))
 \once \override Voice.Glissando.extra-offset =
#(lambda (grob)
   (if (= 1 (ly:grob-property grob 'glissando-index)) '(0 . -0.1)
'(0 . 0.2)))
\override Glissando.after-line-breaking =
#(lambda (grob)
   (ly:grob-set-nested-property! grob '(bound-details right Y) 10))
  32[]\glissando \glissandoSkipOn s8.. | \break
  \change Staff = "upper" \glissandoSkipOff \stemUp 8\!\sfz 
}

lowerOne = \relative c' { s2.*3 }

lowerTwo = \relative c' {}

\score {
  \new PianoStaff <<
\new Staff = "upper" << \upperOne \\ \upperTwo >>
\new Staff = "lower" { \clef bass << \lowerOne \\ \lowerTwo >> }
  >>
  \layout { }
}


Hope the code helps



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Chord-Glissando-Individual-Voice-right-bound-tweaking-tp188718p188725.html
Sent from the User mailing list archive at Nabble.com.

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


Re: Chord Glissando Individual Voice right bound tweaking

2016-03-20 Thread Simon Albrecht

On 20.03.2016 15:59, dtsmarin wrote:

The codefile is HUGE and I can't post it due to copyright reasons, so here is
a part of the code.


That’s what the explanation on our site is about: that you should create 
a _tiny_ example which shows the _exact_ problem, omitting all unrelated 
stuff. The example you gave is all but tiny, with many lines of code 
that have nothing to do with glissandos.


Yours, Simon

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


Re: Chord Glissando Individual Voice right bound tweaking

2016-03-20 Thread Thomas Morley-2
please:
http://www.lilypond.org/website/tiny-examples.html

-Harm



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Chord-Glissando-Individual-Voice-right-bound-tweaking-tp188718p188721.html
Sent from the User mailing list archive at Nabble.com.

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


Chord Glissando Individual Voice right bound tweaking

2016-03-19 Thread dtsmarin
Hi everyone,
Is there any way of tweaking the right bound offset of each glissando line?
Also how can I fix the weird glitch after the break ?? 
Thank you,
Dimitris  
<http://lilypond.1069038.n5.nabble.com/file/n188718/examplegliss.png> 



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Chord-Glissando-Individual-Voice-right-bound-tweaking-tp188718.html
Sent from the User mailing list archive at Nabble.com.

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