Re: Creating cut-away or scrapbook scores in LilyPond

2015-06-04 Thread Klaus Blum
Hi Stephen, 

thanks for publishing your source code. You gave me the solution I didn't
find: markup attached to empty chords. 

Here is my suggestion:
Scrapbook_challenge.ly
http://lilypond.1069038.n5.nabble.com/file/n177487/Scrapbook_challenge.ly  
No more invisible rests that consume space, and no more need of balloon
annotations.

Cheers, 
Klaus




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Creating-cut-away-or-scrapbook-scores-in-LilyPond-tp177473p177487.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: override stencil question

2015-06-04 Thread Nathan Ho
On Thu, Jun 4, 2015 at 2:41 PM, priosfilho pauloriosfi...@gmail.com wrote:

 Sorry, Nathan. I will try to make my point clearer.

 *Firstly*, I got the code developed earlier in this thread and altered the
 numbers of handles of path-gliss to four -- the original version came with
 the values (list 'curveto 0 0 (first handle) (second handle)).


Thanks, this is what I was asking for.

It seems that part of the problem is the mailing list wrapping long lines,
so I'll attach the code.

Regards,
Nathan
\version 2.18.2

glissWidth = #0.175 % global variable for glissando width

#(define (radians-degrees theta)
   (* theta (/ 180 PI)))

#(define (path-gliss handle)
  (lambda (grob)
(if (ly:stencil? (ly:line-spanner::print grob))
(let* ((stencil (ly:line-spanner::print grob))
  (X-ext (ly:stencil-extent stencil X))
  (Y-ext (ly:stencil-extent stencil Y))
  (width (interval-length X-ext))
  (height (interval-length Y-ext))
  (lefty (cdr (assoc 'Y (ly:grob-property grob 'left-bound-info
  (righty (cdr (assoc 'Y (ly:grob-property grob 'right-bound-info
  (deltay (- righty lefty))
  (dir (if ( deltay 0) 1 -1))
  )


  (ly:stencil-translate
(ly:stencil-add
  (grob-interpret-markup grob
(markup
  (#:path glissWidth
(list (list 'moveto 0 0)
  (list 'curveto (first handle) (second handle) (third handle) (fourth handle) width (* height dir))
  (ly:stencil-translate
; the \rotate markup command doesn't let us pick a rotation center, so we resort to the stencil command
(ly:stencil-rotate
  (grob-interpret-markup grob
(markup #:arrow-head X RIGHT #t))
  (radians-degrees
($atan2
  (- (* height dir) (fourth handle))
  (- width (third handle 1 0)
(cons width (* height dir

(if ( dir 0)
   (cons (interval-start X-ext) (+ (interval-start Y-ext) 0.1))
   (cons (interval-start X-ext) (+ (interval-start Y-ext) height) #f)))


#(define (add-gliss m)
   (case (ly:music-property m 'name)
 ((NoteEvent) (set! (ly:music-property m 'articulations)
  (append (ly:music-property m 'articulations)
 (list (make-music (quote GlissandoEvent)
   m)
 (else #f)))

addGliss = #(define-music-function (parser location music)
 (ly:music?)
   (map-some-music add-gliss music))


\relative c' {
  \numericTimeSignature
  \tempo 4=52
\override NoteHead.font-size = #-1.5

$(add-grace-property 'Voice 'NoteHead 'font-size -4.5)


\time 5/8


   \override Score.GraceSpacing.spacing-increment = #7

   \once \override Glissando #'bound-details =
 #'((right (attach-dir . -2) (end-on-accidental .
#f) (padding . 1))
(left (attach-dir . 0) (padding . 0.)))

   \addGliss {
   \once \override Glissando #'stencil = #(path-gliss '(7 1 0 4))
   \grace b16
   a''4.~-}
   \tuplet 5/4 { a16 gis fis, e'- a,~ }

\time 3/8

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


Re: override stencil question

2015-06-04 Thread priosfilho
Good! I appreciate it, Nathan. It works like a charming, now. 







--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/how-to-create-lines-between-all-consecutive-notes-tp142126p177490.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: Creating cut-away or scrapbook scores in LilyPond

2015-06-04 Thread Stephen MacNeil
As I said i couldn't get your SpanBar to go. But your main brilliant
function - sortClef - well that inspired me.

here it is

http://mglessons.com/lilypond/try-klaus-stephen.ly

I think just roll all the functions into one and it's good?

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


RE: How to omit tuplet range indicator

2015-06-04 Thread Mark Stephen Mrotek
Venus,

To eliminate the bracket:
\override TupletBracket #'bracket-visibility = ##f

To eliminate the number:
\override TupletNumber #'stencil = ##f

Mark

-Original Message-
From: lilypond-user-bounces+carsonmark=ca.rr@gnu.org
[mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of
Venus' Wink
Sent: Thursday, June 04, 2015 5:47 PM
To: lilypond-user
Subject: How to omit tuplet range indicator

Hi,

Under some condition, at both sides of number attached tuplet, letter-L-like
lines are put to indicate the range of the tuplet, you know.

How could I omit them?

For example:

\version 2.18.2
\relative c' {

c8 \tuplet 3/2 {d16 e f}
}

yields output.png of the attachments.

I would like to get purpose.png.

Thanks
Venus' Wink


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth


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


How to omit tuplet range indicator

2015-06-04 Thread Venus' Wink
Hi,

Under some condition, at both sides of number attached tuplet,
letter-L-like lines are put to indicate the range of the tuplet,
you know.

How could I omit them?

For example:

\version 2.18.2
\relative c' {

c8 \tuplet 3/2 {d16 e f}
}

yields output.png of the attachments.

I would like to get purpose.png.

Thanks
Venus' Wink


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: How to omit tuplet range indicator

2015-06-04 Thread Venus' Wink





Hi Ralph,Thanks for your kind information.I'm sorry but your link hasn't seemed to lead to user list in my native.As for me, up to now many questions of mine have been even solved enough by kind English readers.Thanks againVenus' Wink-Original Message-From: palmer.r.vio...@gmail.comSent: Thu, 4 Jun 2015 22:22:41 -0400To: venuswi...@inbox.comSubject: Re: How to omit tuplet range indicatorOn Thu, Jun 4, 2015 at 9:31 PM, Venus' Wink venuswi...@inbox.com wrote:




Hi all,These are OK.Thanks a lot.Venus' WinkGreetings again, Venus' Wink -From your email, I would guess that English is not your native language. Did you know that there are a number of non-English LilyPond user lists? For example, Spanish, French, and German. If you are interested, please go to :http://lilypond.org/community.htmland scroll down to the bottom of the page (not far), where you will see links to "Other languages".All the best,Ralph-- Ralph PalmerBrattleboro, VTUSApalmer.r.vio...@gmail.com










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


Re: Creating cut-away or scrapbook scores in LilyPond

2015-06-04 Thread Stephen MacNeil
Hi Klaus

glad you found it useful. I looked at your file nice job. We took the same
approach (creating a new StaffGroup). This means that to continue you need
to add 2 more -- another flute and another bassoon -- or else the grouping
is wrong.

I changed your file however i lost the SpanBar ... not sure why.

http://mglessons.com/lilypond/try-klaus.ly

I did have another approach - one without creating a new staff and using
the existing flute and bassoon section. It works however I was unable to
force the SpanBar and SystemStartBracket. I think ideally that would be the
way to go. Any idea how to force them to appear when it's not the beginning
of a system?

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


Re: How to omit tuplet range indicator

2015-06-04 Thread Ralph Palmer
On Thu, Jun 4, 2015 at 8:47 PM, Venus' Wink venuswi...@inbox.com wrote:

 Hi,

 Under some condition, at both sides of number attached tuplet,
 letter-L-like lines are put to indicate the range of the tuplet,
 you know.

 How could I omit them?

 For example:

 \version 2.18.2
 \relative c' {

 c8 \tuplet 3/2 {d16 e f}
 }

 yields output.png of the attachments.

 I would like to get purpose.png.

 Thanks
 Venus' Wink


Greetings, Venus' Wink -

Please take a look at

Controlling tuplet bracket visibility

in the LilyPond Snippet Repository :

http://lsr.di.unimi.it/LSR/Item?id=337

That snippet addresses your problem.

All the best,

Ralph

-- 
Ralph Palmer
Brattleboro, VT
USA
palmer.r.vio...@gmail.com
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:Creating cut-away or scrapbook scores in LilyPond

2015-06-04 Thread Stephen MacNeil
I won't bias your creativity by sharing what I tried. Let's see what
you've got!

- Abraham

Can I see what you tried?

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


Re: Creating cut-away or scrapbook scores in LilyPond

2015-06-04 Thread Stephen MacNeil
http://mglessons.com/lilypond/try-klaus-stephen2.ly

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


Re: Generate multiple score from a single music expression

2015-06-04 Thread Gilles THIBAULT
 I didn't think to the solution proposed by Mark that looks very interesting.
 I'm checking :)
It was not something like that, you wanted ?

%

\include extractMusic.ly

fullMusic = \new StaffGroup 
  \new Staff 
\relative c' { c2 d4 e f g a b c2 d4 e f g a b c1}
  \new Staff \with { \clef F  } 
\relative c' { c2 b a g e c d g, c1}


\score { \fullMusic }
\score { \extractBegin \fullMusic { s1*2 s2 }}
\score { \extractEnd \fullMusic s1*2}

%
-- 
Gilles

test.pdf
Description: Adobe PDF document
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: override stencil question

2015-06-04 Thread Nathan Ho
On Thu, Jun 4, 2015 at 1:14 PM, priosfilho pauloriosfi...@gmail.com wrote:

 Thanks a lot, Nathan! This will really works fine.

 I just have one question now. I would very much appreciate if you could
 help
 me with that.

 I would like to have local control upon all the four variables of list
 'curveto. With the set-arc function you created, I have control only upon
 the two last variables.


Hi Paulo,

I think we're miscommunicating here, because I didn't create the set-arc
function. My code was developed from a version earlier in the thread -- I
couldn't work off your code because it's broken. At the end of the
definition of path-gliss, there's a mismatched )#f))) and the example
doesn't invoke the path-gliss function at all.

I'm sorry, but there's only so much I can do without a working example of
what you're using! If you can provide that, I can complete the task of
getting the arrowhead working in your code.

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


Re: override stencil question

2015-06-04 Thread priosfilho
Sorry, Nathan. I will try to make my point clearer. 

*Firstly*, I got the code developed earlier in this thread and altered the
numbers of handles of path-gliss to four -- the original version came with
the values (list 'curveto 0 0 (first handle) (second handle)).

Here's my version of the code:

\version 2.18.2

glissWidth = #0.175 % global variable for glissando width

#(define (path-gliss handle)
  (lambda (grob)
(if (ly:stencil? (ly:line-spanner::print grob))
(let* ((stencil (ly:line-spanner::print grob))
  (X-ext (ly:stencil-extent stencil X))
  (Y-ext (ly:stencil-extent stencil Y))
  (width (interval-length X-ext))
  (height (interval-length Y-ext))
  (lefty (cdr (assoc 'Y (ly:grob-property grob 'left-bound-info
  (righty (cdr (assoc 'Y (ly:grob-property grob 
'right-bound-info
  (deltay (- righty lefty))
  (dir (if ( deltay 0) 1 -1))
  
 
  
  )


  (ly:stencil-translate
(grob-interpret-markup grob
  (markup
;(#: tiny (format ~a (ly:grob-properties grob)))
;(format ~a (cdr (assoc 'Y (ly:grob-property grob
'left-bound-info
;(#: tiny (format ~a handle))
(#:path glissWidth
  (list (list 'moveto 0 0)
(list 'curveto (first handle) (second handle) (third 
handle) (fourth
handle) width (* height dir)) 

(if ( dir 0)
   (cons (interval-start X-ext) (+ (interval-start Y-ext) 0.1))
   (cons (interval-start X-ext) (+ (interval-start Y-ext) 
height)#f)))


#(define (add-gliss m)
   (case (ly:music-property m 'name)
 ((NoteEvent) (set! (ly:music-property m 'articulations)
  (append (ly:music-property m 'articulations)
 (list (make-music (quote GlissandoEvent)
   m)
 (else #f)))

addGliss = #(define-music-function (parser location music)
 (ly:music?)
   (map-some-music add-gliss music))


\relative c' {
  \numericTimeSignature
  \tempo 4=52
\override NoteHead.font-size = #-1.5

$(add-grace-property 'Voice 'NoteHead 'font-size -4.5)


\time 5/8 
  
   
   \override Score.GraceSpacing.spacing-increment = #7
   
   \once \override Glissando #'bound-details = 
 #'((right (attach-dir . -2) (end-on-accidental .
#f) (padding . 1)) 
(left (attach-dir . 0) (padding . 0.)))  
   
   \addGliss {
   \once \override Glissando #'stencil = #(path-gliss '(7 1 0 4))
   \grace b16
   a''4.~-} 
   \tuplet 5/4 { a16 gis fis, e'- a,~ } 
  
\time 3/8   
 
}

With that, i am able to get that (missing only the arrowhead to get what I
want):

http://lilypond.1069038.n5.nabble.com/file/n177488/example1.png 

---

Then, I got your useful version and was able to get that:

\version 2.18.2


arc = #(list 0 0) % global variable to bezier curve handle 
glissWidth = #0.2 % global variable for glissando width 

#(define (set-arc x y) 
(set! arc (list x y))) 

#(define (get-arc) 
arc) 

#(define (radians-degrees theta)
   (* theta (/ 180 PI)))

#(define (path-gliss grob) 
  
(if (ly:stencil? (ly:line-spanner::print grob)) 
(let* ((stencil (ly:line-spanner::print grob)) 
(X-ext (ly:stencil-extent stencil X)) 
(Y-ext (ly:stencil-extent stencil Y)) 
(width (interval-length X-ext)) 
(height (interval-length Y-ext)) 
(lefty (cdr (assoc 'Y (ly:grob-property grob
'left-bound-info
(righty (cdr (assoc 'Y (ly:grob-property grob
'right-bound-info 
(deltay (- righty lefty)) 
(dir (if ( deltay 0) 1 -1)) 
(handle (get-arc))) ;- getting the
handle value here   

   (ly:stencil-translate
 (ly:stencil-add
   (grob-interpret-markup grob 
 (markup 
 ;(#: tiny (format ~a (ly:grob-properties grob))) 
 ;(format ~a (cdr (assoc 'Y (ly:grob-property grob
'left-bound-info 
   ;(#: tiny (format ~a handle))
   (#:path glissWidth 
 (list (list 'moveto 0 0) 
   (list 'curveto 0 0 (first handle)
(second handle) width (* height dir))
   (ly:stencil-translate
 ; the \rotate markup command doesn't let us pick a rotation
center, so we resort to the stencil command
 (ly:stencil-rotate
   (grob-interpret-markup grob
 (markup #:arrow-head X RIGHT #t))
   (radians-degrees
 

Re: override stencil question

2015-06-04 Thread Nathan Ho
On Thu, Jun 4, 2015 at 11:06 AM, priosfilho pauloriosfi...@gmail.com
wrote:

 Hi,

 I'm just new to Lilypond, not a programing knower, but just trying to
 follow
 some instructions on the forum so I can finally achieve really beautiful
 scores in a not-too-easy but definitely intelligent way.

 I wanted to make a curved glissando between two notes and this thread
 helped
 me a lot with that. I am able to redraw the curve to fit my intents but by
 now I am just missing an arrow at the end of it pointing to the second
 note's notehead.


Hi Paulo,

Can you show me the code you're using, or link to the thread you got it
from?

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


Re: override stencil question

2015-06-04 Thread priosfilho
Hi,

I'm just new to Lilypond, not a programing knower, but just trying to follow
some instructions on the forum so I can finally achieve really beautiful
scores in a not-too-easy but definitely intelligent way. 

I wanted to make a curved glissando between two notes and this thread helped
me a lot with that. I am able to redraw the curve to fit my intents but by
now I am just missing an arrow at the end of it pointing to the second
note's notehead. 

http://lilypond.1069038.n5.nabble.com/file/n177481/Screen_Shot_2015-06-04_at_14.png
 

I've been trying hard to do that by inserting arrow-head markup inside what
you coded. But I am just not able to do that. When I get closer, the gliss
curve is gone and I have only the arrow-head attached to the grace note of
the example.

Do you guys have any idea how I could implement this inside this code. Or
maybe it would be a simpler solution for this also.

Thanks!

Paulo

 



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/how-to-create-lines-between-all-consecutive-notes-tp142126p177481.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: override stencil question

2015-06-04 Thread priosfilho
Hey Nathan

This is just the code developed in the thread plus more adjustable handles
for curveto:

% \version 2.17.13

glissWidth = #0.175 % global variable for glissando width

#(define (path-gliss handle)
  (lambda (grob)
(if (ly:stencil? (ly:line-spanner::print grob))
(let* ((stencil (ly:line-spanner::print grob))
  (X-ext (ly:stencil-extent stencil X))
  (Y-ext (ly:stencil-extent stencil Y))
  (width (interval-length X-ext))
  (height (interval-length Y-ext))
  (lefty (cdr (assoc 'Y (ly:grob-property grob 'left-bound-info
  (righty (cdr (assoc 'Y (ly:grob-property grob 
'right-bound-info
  (deltay (- righty lefty))
  (dir (if ( deltay 0) 1 -1))
  
 
  
  )


  (ly:stencil-translate
(grob-interpret-markup grob
  (markup
;(#: tiny (format ~a (ly:grob-properties grob)))
;(format ~a (cdr (assoc 'Y (ly:grob-property grob
'left-bound-info
;(#: tiny (format ~a handle))
(#:path glissWidth
  (list (list 'moveto 0 0)
(list 'curveto (first handle) (second handle) (third 
handle) (fourth
handle) width (* height dir)) 

(if ( dir 0)
   (cons (interval-start X-ext) (+ (interval-start Y-ext) 0.1))
   (cons (interval-start X-ext) (+ (interval-start Y-ext) 
height)#f)))


#(define (add-gliss m)
   (case (ly:music-property m 'name)
 ((NoteEvent) (set! (ly:music-property m 'articulations)
  (append (ly:music-property m 'articulations)
 (list (make-music (quote GlissandoEvent)
   m)
 (else #f)))

addGliss = #(define-music-function (parser location music)
 (ly:music?)
   (map-some-music add-gliss music))


and in the score:

\relative c' {
%...
\time 5/8 
  {
   \override Score.GraceSpacing.spacing-increment = #7
   
\addGliss {
  \once \override Glissando #'bound-details = 
   #'((right(attach-dir . -0.5) (end-on-accidental . #t) 
   (padding . 0.5)) (left (attach-dir . 2) (padding . -0.1)))
  \once \override Glissando #'stencil = #(path-gliss '(4 0 1.5 5)) 
   
   \s \snh \grace b16^(} 
a'' \single \voz-ef c, 4.~-) 
   \override Stem.details.beamed-lengths = #'(6 6 6)
   \tuplet 5/4 {  16 gis fis, e'- a,~ } 
   \revert Stem.details |
   \revert Score.GraceSpacing.spacing-increment
  }
\time 3/8
}


-

To insert the arrow-heads, I tried to implement some lines of the code
discussed in the next link:

http://lilypond.1069038.n5.nabble.com/arpeggio-line-td57703.html
http://lilypond.1069038.n5.nabble.com/arpeggio-line-td57703.html  

I tried to adapt that and insert in the glissando code, but that I was not
able to do. 








--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/how-to-create-lines-between-all-consecutive-notes-tp142126p177483.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: Creating cut-away or scrapbook scores in LilyPond

2015-06-04 Thread tisimst
Stephen,

On Thu, Jun 4, 2015 at 5:03 AM, Kevin Barry [via Lilypond] 
ml-node+s1069038n177476...@n5.nabble.com wrote:


 On Thu, Jun 4, 2015 at 7:06 AM, Stephen MacNeil [hidden email]
 http:///user/SendEmail.jtp?type=nodenode=177476i=0 wrote:

 One score no hacks really and ... ya works great!


 Looks good; do you mind posting the code for it? Not that I would ever do
 this myself, but I did try doing this (unsuccessfully) and am curious about
 how you overcame the problems I had.

 Kevin


Yes, please do share so we can all learn from what you've done. Thanks!

- Abraham




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Creating-cut-away-or-scrapbook-scores-in-LilyPond-tp177473p177479.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: Creating cut-away or scrapbook scores in LilyPond

2015-06-04 Thread Stephen MacNeil
here are 4 and 5 of the ly files that I attempted

final is the same as 5 using variables

http://mglessons.com/lilypond/try-final.ly

http://mglessons.com/lilypond/try5.ly


confused how to keep the staff going I used 2 scores  anyway

http://mglessons.com/lilypond/try4.ly


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


Re: Text extender in repeat

2015-06-04 Thread Pierre Perol-Schneider
Hi Simon,

2015-06-03 21:23 GMT+02:00 Simon Albrecht simon.albre...@mail.de:
...

 Pierre, it’s up to you if you’d like to use this in the LSR snip.

...

Thank you! 'Look's perfect to me: http://lsr.di.unimi.it/LSR/Item?id=1006

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


Creating cut-away or scrapbook scores in LilyPond

2015-06-04 Thread Stephen MacNeil
ok did it :)

One score no hacks really and ... ya works great!

http://mglessons.com/lilypond/try5.pdf

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


Re: Creating cut-away or scrapbook scores in LilyPond

2015-06-04 Thread Kevin Barry
On Thu, Jun 4, 2015 at 7:06 AM, Stephen MacNeil classicalja...@gmail.com
wrote:

 One score no hacks really and ... ya works great!


Looks good; do you mind posting the code for it? Not that I would ever do
this myself, but I did try doing this (unsuccessfully) and am curious about
how you overcame the problems I had.

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


Re: Creating cut-away or scrapbook scores in LilyPond

2015-06-04 Thread Klaus Blum
Here we go again: 

% -

\version 2.18.2

\paper {
  ragged-right = ##f
}

#(define-markup-command (instNameI layout props text)
   (markup?)
   (interpret-markup layout props
 #{
   \markup { \hcenter-in #10 $text }
 #}))

instNameII =
#(define-music-function (parser location text) (markup?)
   #{
 \balloonLengthOff
 \override BalloonTextItem #'annotation-line = ##f
 \override BalloonTextItem #'annotation-balloon = ##f
 \balloonGrobText #'Rest #'(-10 . 0) \markup { \hcenter-in #10 $text }
 \grace {\hide r8}
   #})

sortClef = {
  \override Score.BreakAlignment #'break-align-orders =
  #'  #((left-edge   cue-end-clef   breathing-sign   staff-bar   clef
  cue-clef   key-cancellation   key-signature   ambitus
  time-signature   custos)
(left-edge   staff-bar   cue-end-clef   breathing-signclef
  cue-clef   key-cancellation   key-signature   ambitus
  time-signature   custos)
(left-edge   breathing-sign   staff-bar   clef   key-cancellation
  key-signature   ambitus   time-signature   cue-clef   custos))
  % \once \override Score.Clef.break-visibility = #'#(#f #t #t)
}

fluteMusicII = {
  \clef treble
  \instNameII Flute
  R1*4
}

bassoonMusicII = {
  \clef bass
  \instNameII Bassoon
  R1
  \override Staff.BarLine.allow-span-bar = ##f
  R1*3
}

violinIMusicI = {
  \clef treble
  R1*4
}

violinIIMusicI = {
  \clef treble
  R1*4
}

violaMusicI = {
  \clef alto
  R1*4
}

violoncelloMusicI = {
  \clef bass
  R1*4
}

violinIMusicII = {
  \clef treble
  R1*4
}

violinIIMusicII = {
  \clef treble
  R1*4
}

violaMusicII = {
  \clef alto
  R1*4
}

violoncelloMusicII = {
  \clef bass
  R1*4
}



\score {
  
\new StaffGroup 
  \new Staff = violinIStaff \with {
instrumentName = \markup \instNameI Violin I
shortInstrumentName = Vln. I
  }
  {
\violinIMusicI
\violinIMusicII
  }
  \new Staff \with {
instrumentName = \markup \instNameI Violin II
shortInstrumentName = Vln. II
  }
  {
\violinIIMusicI
\violinIIMusicII
  }
  \new Staff \with {
instrumentName = \markup \instNameI Viola
shortInstrumentName = Vla.
  }
  {
\violaMusicI
\violaMusicII
  }
  \new Staff \with {
instrumentName = \markup \instNameI Violoncello
shortInstrumentName = Vlc.
  }
  {
\violoncelloMusicI
\violoncelloMusicII
  }

{
  \skip 1*4 % Strange: the more time is skipped here, the more the
instrument names are moved to the left
  \once \override Staff.BarLine.allow-span-bar = ##t
  % unfortunately, once doesn't work here, hence the addition in the
bassoon part
  \sortClef
  \once \override Score.Clef.full-size-change = ##t
  \new StaffGroup \with {
alignAboveContext = #violinIStaff
  }
  
\new Staff \with {
  instrumentName = Flute
  shortInstrumentName = Flt.
}
\fluteMusicII
\new Staff \with {
  instrumentName = Bassoon
  shortInstrumentName = Bsn.
} \bassoonMusicII
  
}
  
  \layout {
\context {
  \Staff
  \override InstrumentName.X-offset = #-7  % doesn't work for the
woodwinds
}
\context {
  \Voice
  \consists Balloon_engraver
}
  }
}

% -

Drawback: The instrument names for the woodwinds are attached to invisible
(grace-) rests that consume additional space. 

Cheers, 
Klaus



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Creating-cut-away-or-scrapbook-scores-in-LilyPond-tp177436p177477.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: override stencil question

2015-06-04 Thread Nathan Ho
On Thu, Jun 4, 2015 at 11:35 AM, priosfilho pauloriosfi...@gmail.com
wrote:

 Hey Nathan

 This is just the code developed in the thread plus more adjustable handles
 for curveto:


Unfortunately this code isn't compiling for me. There are a few extra )'s
in there.

I created this from code earlier in the thread; maybe it'll help you:



arc = #(list 0 0) % global variable to bezier curve handle
glissWidth = #0.2 % global variable for glissando width

#(define (set-arc x y)
(set! arc (list x y)))

#(define (get-arc)
arc)

#(define (radians-degrees theta)
   (* theta (/ 180 PI)))

#(define (path-gliss grob)

(if (ly:stencil? (ly:line-spanner::print grob))
(let* ((stencil (ly:line-spanner::print grob))
(X-ext (ly:stencil-extent stencil X))
(Y-ext (ly:stencil-extent stencil Y))
(width (interval-length X-ext))
(height (interval-length Y-ext))
(lefty (cdr (assoc 'Y (ly:grob-property grob
'left-bound-info
  (righty (cdr (assoc 'Y (ly:grob-property grob
'right-bound-info
(deltay (- righty lefty))
(dir (if ( deltay 0) 1 -1))
(handle (get-arc))) ;- getting the
handle value here

   (ly:stencil-translate
 (ly:stencil-add
   (grob-interpret-markup grob
 (markup
 ;(#: tiny (format ~a (ly:grob-properties grob)))
   ;(format ~a (cdr (assoc 'Y (ly:grob-property grob
'left-bound-info
   ;(#: tiny (format ~a handle))
   (#:path glissWidth
 (list (list 'moveto 0 0)
   (list 'curveto 0 0 (first
handle) (second handle) width (* height dir))
   (ly:stencil-translate
 ; the \rotate markup command doesn't let us pick a rotation
center, so we resort to the stencil command
 (ly:stencil-rotate
   (grob-interpret-markup grob
 (markup #:arrow-head X RIGHT #t))
   (radians-degrees
 ($atan2
   (- (* height dir) (second handle))
   (- width (first handle 1 0)
 (cons width (* height dir
 (if ( dir 0)
  (cons (interval-start X-ext) (+ (interval-start Y-ext) 0.1))
  (cons (interval-start X-ext) (+ (interval-start Y-ext)
height)
  #f))

\new Staff \with {
\override Glissando #'bound-details = #'((right (attach-dir . 0)
(end-on-accidental . #f) (padding . 2.)) (left (attach-dir . 0) (padding .
0.)))
\override Glissando #'stencil = #path-gliss
}
\transpose c c' {
  #(set-arc 2 -4)
  c2\glissando c''2
}



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


Re: override stencil question

2015-06-04 Thread priosfilho
Thanks a lot, Nathan! This will really works fine.

I just have one question now. I would very much appreciate if you could help
me with that.  

I would like to have local control upon all the four variables of list
'curveto. With the set-arc function you created, I have control only upon
the two last variables.

I tried to substitute the line

   (list 'curveto 0 0 (first handle) (second handle) width (* height
dir))

 for:

   (list 'curveto (first handle) (second handle) (third handle) (fourth
handle) width (* height dir))

and the lines

   ($atan2
   (- (* height dir) (second handle))
   (- width (first handle 1 0)

for:

   ($atan2
   (- (* height dir) (fourth handle))
   (- width (third handle 1 0)


...but was not successful. 

Would you help me with that?

Thank you again!

Best,
Paulo




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/how-to-create-lines-between-all-consecutive-notes-tp142126p177485.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