Re: ottavation function

2015-10-30 Thread Noeck
Hi Simon,

just to make sure: "Post awaiting moderation." is the usual thing to
happen on sourceforge and someone will have a look at some point if he
allows my comment?

Cheers,
Joram

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


Re: ottavation function

2015-10-30 Thread Gilberto Agostinho
Simon Albrecht-2 wrote
> Try:
> \layout {
>\context {
>  \Staff
>  \override OttavaBracket.springs-and-rods = 
> #ly:spanner::set-spacing-rods
>  %\override OttavaBracket.minimum-length = 0.3
>}
> }
> and adjust minimum-length to taste.

For some reason this has no effect for me, Simon. Do you have any idea what
I can be doing wrong? Of course I uncommented the minimum-length line and
then I added tried adding this layout block before and after the function,
and always before my music block, and nothing worked :(



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/ottavation-function-tp182968p182992.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: ottavation function

2015-10-30 Thread Simon Albrecht

On 30.10.2015 22:01, Gilberto Agostinho wrote:

Second thing, try this code:

\relative c'' {
   R1*7
   \ottavation #1 c8 \ottavation #0 d, d d d d d d
}

It will output only "8va" without the vertical line. I believe that,
according to Gould, we always need to have the vertical "hook" in the end of
an 8va, so probably we need something analogous to \textLengthOn here.


Try:
\layout {
  \context {
\Staff
\override OttavaBracket.springs-and-rods = 
#ly:spanner::set-spacing-rods

%\override OttavaBracket.minimum-length = 0.3
  }
}
and adjust minimum-length to taste.
This can be easily included in a style-sheet.

Yours, Simon

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


Re: ottavation function

2015-10-30 Thread Simon Albrecht

On 30.10.2015 22:31, Noeck wrote:

Hi Simon,

just to make sure: "Post awaiting moderation." is the usual thing to
happen on sourceforge and someone will have a look at some point if he
allows my comment?


Done already :-)
I suppose Phil or Trevor could well give you a status where this 
wouldn’t be necessary. There is actually no policy on this ATM, but I 
don’t see any reason to mistrust you.


Yours, Simon

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


Re: ottavation function

2015-10-30 Thread Noeck
Hi Simon,

> And regarding your other comments: please comment in the tracker yourself.

Thanks for pushing me to sign up. Finally I have an account and I will
comment myself.

Cheers,
Joram

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


Re: ottavation function

2015-10-30 Thread Simon Albrecht

On 30.10.2015 22:01, Gilberto Agostinho wrote:

Hi Simon, thanks for the improvements, I knew my function was utterly
inefficient but I have a hard time with Scheme.


I’ve had that too, but it gets better :-)


  Just two things about this
all:

Which modifications to your function should I do if I want to have only a
"8" text, without the "va"? Maybe we could create a \ottavation-no-text for
that.


Simply comment out (i.e. prefix with a ‘;’) the line
‘#:raise (if upward? 0.6 0) text’
(should be line 22).
Or use the attached version, where you can adjust the 
‘display-ottavation-suffix’ variable at the beginning.



Second thing, try this code:

\relative c'' {
   R1*7
   \ottavation #1 c8 \ottavation #0 d, d d d d d d
}

It will output only "8va" without the vertical line. I believe that,
according to Gould, we always need to have the vertical "hook" in the end of
an 8va,


That has been extensively discussed already; I think there is a tracker 
issue also. Personally, I disagree with Gould here.

Anyway, it is only marginally related.

Yours, Simon
\version "2.19.28"
\paper { #(set-paper-size "a8landscape") indent = 0 }
#(ly:set-option 'point-and-click #f)
\header { tagline = ##f }

display-ottavation-suffix = ##f

#(define-markup-command
  (format-ottava layout props dir interval)
  (integer? integer?)
  "Output a markup for use in { \\set Staff.ottavation }.
Takes as input the direction of ottavation (-1 or 1)
 and the interval (one of the numbers 8, 15, 22, 29)"
  (let* ((upward? (positive? dir))
 (number (number->string interval))
 (text (if display-ottavation-suffix
   (case interval
 ((8) "va")
 ((15 22 29) "ma"))
   ""))
 (text (markup #:small text)))
(interpret-markup layout props
  (markup
   #:concat (
  number
  #:raise (if upward? 0.6 0) text
  )

ottavation =
#(define-music-function (number) (integer?)
   (let* ((direction (if (positive? number) UP DOWN))
  (right-text (make-draw-line-markup (cons 0 (if (> number 0) -.8 .8
  (interval (+ 1 (* 7 (abs number
  (ottavation-markup (make-format-ottava-markup direction interval)))
 (if
  (= number 0)
  #{
\ottava #0
  #}
  #{
\override Staff.OttavaBracket.stencil = #ly:line-spanner::print
\override Staff.OttavaBracket.bound-details =
#`((left . ((Y . 0.0)
(attach-dir . ,LEFT)
(padding . 0)
(stencil-align-dir-y . ,direction)))
   (right . ((Y . 0.0) ; Change the integer here
  (padding . 0)
  (attach-dir . ,RIGHT)
  (text . ,right-text
\override Staff.OttavaBracket.left-bound-info =
#ly:line-spanner::calc-left-bound-info-and-text
\override Staff.OttavaBracket.right-bound-info =
#ly:line-spanner::calc-right-bound-info
\ottava $number
\set Staff.ottavation = $ottavation-markup
  #}
  )))

\relative c' {
  \ottavation #1
  c'4 c c c
  \ottavation #2
  c'4 c c c
  \ottavation #4
  c''4 c c c
  \ottavation #-1
  c,4 c c c
  \ottavation #-3
  c,,4 c c c
  \ottavation #0
  R1
}___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: ottavation function

2015-10-30 Thread Trevor Daniels

Noeck wrote Friday, October 30, 2015 9:31 PM

> just to make sure: "Post awaiting moderation." is the usual thing to
> happen on sourceforge and someone will have a look at some point if he
> allows my comment?

All approved now - future posts should be forwarded immediately.

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


Re: ottavation function

2015-10-30 Thread Noeck
> All approved now - future posts should be forwarded immediately.
> 
> Trevor


Thanks a lot, Simon and Trevor

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


Re: ottavation function

2015-10-30 Thread Simon Albrecht

On 30.10.2015 23:29, Gilberto Agostinho wrote:

Simon Albrecht-2 wrote

Try:
\layout {
\context {
  \Staff
  \override OttavaBracket.springs-and-rods =
#ly:spanner::set-spacing-rods
  %\override OttavaBracket.minimum-length = 0.3
}
}
and adjust minimum-length to taste.

For some reason this has no effect for me, Simon. Do you have any idea what
I can be doing wrong? Of course I uncommented the minimum-length line and
then I added tried adding this layout block before and after the function,
and always before my music block, and nothing worked :(


You’re right, I only tested it with the default \ottava function, and 
that works.
0.3 is the default value for minimum-length, so you don’t need to 
uncomment that line for testing.
Hm, I can’t tell why it doesn’t work properly with the overrides from 
our custom function… The line at the right end is printed with the 
spacing-rods override, but minimum-length remains without effect. Can 
anyone help out with that?


Yours, Simon

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


Re: ottavation function

2015-10-30 Thread Noeck
Hi Gilberto and Simon,

I have my own ottava function as a replacement of \ottava, more about it
below.

@Gilberto: Very nice, I tried to move the lines up/down once but without
success. You solve all my issues [3], [4] :) I will gladly use your
solution!

@Simon: Even better. Thanks. At first, the endings (22da, 29na) looked
convincing, but I wondered why I have seen 22ma before (e.g. in Bravura
[1]). When looking at this and searching online, I tend to think ma is
correct as the Italian word seems to be 'ventiduesimo/-a' and the same
for 29ma ('ventinovesima'). Or do you have other references?

Back to my implementation which is attached: It does similar things:
- make 'va' etc. top-aligned and 'vb' etc. bottom aligned
- add arbitrary octaves (22, 29, no principal limit)
- it directly replaces the usual \ottava command, by using
  #(make-music 'OttavaMusic 'ottava-number octave)
- it does not touch the lines (even though I wanted to)

I now realized that issue 3865 [3] and 3866 [4] are a reaction to mails
by me and I consider the "Simon-enhanced" version of Gilbertos code much
better and more relevant than what was mentioned in the issue before.
Comparing with the attached code, I am surprised how similar this is. So
there should be some consensus possible.

I would love to see this change in lilypond. I think a few things should
be decided, neither of these should hinder this to be implemented:
- default is medium or bold? (Both are possible via override)
- da/na or ma - which is correct? (see above)
- I often see 8 can the 'va'-extension be made optional?
- Can a real dotted line be supported (instead of just short dashes)
  optionally?

Concerning boldness, I quote a mail by Brian Barker from the thread last
year [5]:

> What does E. Gould say?
> Page 28:
> 
> The octave sign is written in italic, the numeral '8' is 1 1/2 
> stave-paces high. The optional 'va' is placed flush with the top of _ottava 
> sopra_ (_8^va_), flush with the base of _ottava bassa_ (_8va_).
>
> Indicate the extent of the transposition with a line of dashes (hereafter 
> called a dotted line). The line extends from the top edge of the _8_ for _8 
> sopra_ and the base of the _8_ for _8 bassa_, and runs parallel to the stave. 
> 
> 
> And those 8s look bold to me.

Cheers,
Joram



[1]: http://www.smufl.org/version/latest/glyph/ventiduesimaAlta/
[2]: http://italian.about.com/od/grammar/a/aa042600c.htm
[3]: http://sourceforge.net/p/testlilyissues/issues/3865/
[4]: http://sourceforge.net/p/testlilyissues/issues/3866/
[5]: http://lists.gnu.org/archive/html/lilypond-user/2014-02/msg00318.html
ottava =
#(define-music-function (parser location octave) (integer?)
   (_i "Set the octavation.")
   #{
 #(make-music 'OttavaMusic 'ottava-number octave)
 \set Staff.ottavation =
 #(if (< octave -1) #{ \markup \concat { #(number->string (+ 1 (* -7 octave))) \fontsize #-2 "mb" } #}
  (if (= octave -1) #{ \markup \concat { "8" \fontsize #-2 "vb" } #}
  (if (= octave +0) #f
  (if (= octave +1) #{ \markup \concat { "8" \fontsize #-2 \translate-scaled #'(0 . 0.85) "va" } #}
#{ \markup \concat { #(number->string (+ 1 (* 7 octave))) \fontsize #-2 \translate-scaled #'(0 . 0.85) "ma" } #}
  
   #})


% example

% layout settings for bold dotted lines (does not fully work as expected)
%\layout {
%  \override Score.OttavaBracket #'style = #'dotted-line
%  \override Score.OttavaBracket #'thickness = #2
%  \override Score.OttavaBracket #'font-series = #'bold
%}

\new Staff \relative c''' {
  \ottava #1 a a
  \ottava #-1 a,, a
  \ottava #2 a''' a
  \ottava #-2 a a
  \ottava #3 a' a
  \ottava #-3 a,, a
  \ottava #0
}___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: ottavation function

2015-10-30 Thread Simon Albrecht

On 30.10.2015 21:29, Noeck wrote:

At first, the endings (22da, 29na) looked
convincing, but I wondered why I have seen 22ma before (e.g. in Bravura
[1]). When looking at this and searching online, I tend to think ma is
correct as the Italian word seems to be 'ventiduesimo/-a' and the same
for 29ma ('ventinovesima'). Or do you have other references?


This made me laugh :-) I don’t have any references, and I know better 
Latin than Italian – so of course you’re right. Just replace ll. 14 ff. 
from my file with

(text (case interval
 ((8) "va")
 ((15 22 29) "ma")))

And regarding your other comments: please comment in the tracker yourself.

Thanks for the correction,
Simon

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


Re: ottavation function

2015-10-30 Thread Simon Albrecht

Hello Gilberto,

On 30.10.2015 18:49, Gilberto Agostinho wrote:

H. S. Teoh wrote

Very nice!  But shouldn't this be fixed in Lilypond itself, not just as
an external function?

Thanks! And sure, if people want to implement this idea in LilyPond itself
that would be ideal.


Thank you for this work! FWIW, I made a new version which basically 
sticks with the functionality and design you provided (except for 
extending it to 22da and, for the fun of it, 29na), but removes the code 
duplication, so it is easier to adapt.


I’ll add comments in the respective issues 3865 and 3866 also.

Yours, Simon
\version "2.19.28"

#(define-markup-command
  (format-ottava layout props dir interval)
  (integer? integer?)
  "Output a markup for use in { \\set Staff.ottavation }.
Takes as input the direction of ottavation (-1 or 1)
 and the interval (one of the numbers 8, 15, 22, 29)"
  (let* ((upward? (positive? dir))
 (number (number->string interval))
 (text (case interval
 ((8) "va")
 ((15) "ma")
 ((22) "da")
 ((29) "na")))
 (text (markup #:small text)))
(interpret-markup layout props
  (markup
   #:concat (
  number
  #:raise (if upward? 0.6 0) text
  )

ottavation =
#(define-music-function (number) (integer?)
   (let* ((direction (if (positive? number) UP DOWN))
  (right-text (make-draw-line-markup (cons 0 (if (> number 0) -.8 .8
  (interval (+ 1 (* 7 (abs number
  (ottavation-markup (make-format-ottava-markup direction interval)))
 (if
  (= number 0)
  #{
\ottava #0
  #}
  #{
\override Staff.OttavaBracket.stencil = #ly:line-spanner::print
\override Staff.OttavaBracket.bound-details =
#`((left . ((Y . 0.0)
(attach-dir . ,LEFT)
(padding . 0)
(stencil-align-dir-y . ,direction)))
   (right . ((Y . 0.0) ; Change the integer here
  (padding . 0)
  (attach-dir . ,RIGHT)
  (text . ,right-text
\override Staff.OttavaBracket.left-bound-info =
#ly:line-spanner::calc-left-bound-info-and-text
\override Staff.OttavaBracket.right-bound-info =
#ly:line-spanner::calc-right-bound-info
\ottava $number
\set Staff.ottavation = $ottavation-markup
  #}
  )))

\relative c' {
  \ottavation #1
  c'4 c c c
  \ottavation #2
  c'4 c c c
  \ottavation #4
  c''4 c c c
  \ottavation #-1
  c,4 c c c
  \ottavation #-3
  c,,4 c c c
  \ottavation #0
  R1
}___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: ottavation function

2015-10-30 Thread H. S. Teoh
On Fri, Oct 30, 2015 at 10:31:22AM -0700, Gilberto Agostinho wrote:
> Hello LilyPonders,
> 
> I would like to share a little function I created for myself.
> According to Elaine Gould's /Behind Bars/, the ottava dashed line
> should attach itself to the top of the 8va (or 15ma) and to the bottom
> of the 8vb (or 15mb), instead of attaching itself to the centre of the
> numbers. See:
> 
>  
> 
> ottavation.ly
>   
> ottavation2.ly
>   
> 
> Hope someone finds this useful.
[...]

Very nice!  But shouldn't this be fixed in Lilypond itself, not just as
an external function?


T

-- 
Just because you can, doesn't mean you should.

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


Re: ottavation function

2015-10-30 Thread Urs Liska


Am 30.10.2015 um 18:34 schrieb H. S. Teoh:
> On Fri, Oct 30, 2015 at 10:31:22AM -0700, Gilberto Agostinho wrote:
>> Hello LilyPonders,
>>
>> I would like to share a little function I created for myself.
>> According to Elaine Gould's /Behind Bars/, the ottava dashed line
>> should attach itself to the top of the 8va (or 15ma) and to the bottom
>> of the 8vb (or 15mb), instead of attaching itself to the centre of the
>> numbers. See:
>>
>>  
>>
>> ottavation.ly
>>   
>> ottavation2.ly
>>   
>>
>> Hope someone finds this useful.
> [...]
>
> Very nice!  But shouldn't this be fixed in Lilypond itself, not just as
> an external function?

Can always be taken as a start!

>
>
> T
>


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


Re: ottavation function

2015-10-30 Thread Gilberto Agostinho
Hi Simon, thanks for the improvements, I knew my function was utterly
inefficient but I have a hard time with Scheme. Just two things about this
all:

Which modifications to your function should I do if I want to have only a
"8" text, without the "va"? Maybe we could create a \ottavation-no-text for
that.

Second thing, try this code:

\relative c'' {
  R1*7
  \ottavation #1 c8 \ottavation #0 d, d d d d d d
}

It will output only "8va" without the vertical line. I believe that,
according to Gould, we always need to have the vertical "hook" in the end of
an 8va, so probably we need something analogous to \textLengthOn here. I
don't have her book right now with me but I can check this information on my
library next week.

Thanks and take care,
Gilberto



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/ottavation-function-tp182968p182983.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: ottavation function

2015-10-30 Thread Gilberto Agostinho
H. S. Teoh wrote
> Very nice!  But shouldn't this be fixed in Lilypond itself, not just as
> an external function?

Thanks! And sure, if people want to implement this idea in LilyPond itself
that would be ideal.



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/ottavation-function-tp182968p182971.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: Ottavation text too long for next line

2015-05-17 Thread Knute Snortum
Great suggestions.  Thanks.


Knute Snortum
(via Gmail)

On Sat, May 16, 2015 at 5:04 PM, Kieren MacMillan 
kieren_macmil...@sympatico.ca wrote:

 Hi Knute,

 Maybe something like this will work for you?

 \version 2.19.20
 \language english

 #(define (ottava-jr grob)
(let* (
   ;; have we been split?
   (orig (ly:grob-original grob))

   ;; if yes, get the split pieces (our siblings)
   (siblings (if (ly:grob? orig)
 (ly:spanner-broken-into orig)
 '(

  (if (and (= (length siblings) 2)
   (eq? (car (last-pair siblings)) grob))
  (ly:grob-set-property! grob 'text '8va m.d.

 octaveUp = {
   \once \override Staff.OttavaBracket.direction = #UP
   \set Staff.ottavation = #8va pour la main droite seulement
   \once \override Staff.OttavaBracket.after-line-breaking = #ottava-jr
   \set Voice.middleCPosition = #(- 6 5)
 }

 octaveOff = {
   \unset Staff.ottavation
   \unset Voice.middleCPosition
 }

 \relative c' {
   
 {
   s1 | s1 | s1 | s1 |
   \octaveUp
   \repeat unfold 4 { e4 f g a }
   \octaveOff
   s1 | s1 | s1 | s1 | s1 | s1 | s1 | s1 |
 }
 \\
 {
   \repeat unfold 16 { c4 d e f }
 }
   
 }

 Hope that helps!
 Kieren.
 

 Kieren MacMillan, composer
 ‣ website: www.kierenmacmillan.info
 ‣ email: i...@kierenmacmillan.info


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


RE: Ottavation text too long for next line

2015-05-16 Thread Mark Stephen Mrotek
Knute,

 

When I eliminated the indent ( \layout {\indent = #0} ), all of it fits on the 
first line.

 

Mark

 

From: lilypond-user-bounces+carsonmark=ca.rr@gnu.org 
[mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of Knute 
Snortum
Sent: Saturday, May 16, 2015 10:14 AM
To: lilypond-user@gnu.org
Subject: Ottavation text too long for next line

 

I have a piece where I need a fairly long ottavation text that goes from one 
line to the next (it says that the ottavation applies to the right hand only).  
The problem is that there is only one measure on the second line and the text 
doesn't fit when it's repeated.  One solution is to set \break so that the 
ottavation is all on one line but this sometimes produces stretched or crowded 
measures.  Is there another solution?

 

\version 2.19.20

\language english

 

octaveUp = { 

  \set Staff.ottavation = #8va pour la main droite seulement

  \once \override Staff.OttavaBracket.direction = #UP

  \set Voice.middleCPosition = #(- 6 5) % c'' 

}

 

octaveOff = {

  \unset Staff.ottavation

  \unset Voice.middleCPosition

}

 

\relative c' {

  

{

  s1 | s1 | s1 | s1 |

  \octaveUp

  \repeat unfold 4 { e4 f g a }

  \octaveOff

  s1 | s1 | s1 | s1 | s1 | s1 | s1 | s1 | 

}

\\

{

  \repeat unfold 16 { c4 d e f }

}

  

}

 

Knute Snortum

(via Gmail)

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


Re: Ottavation text too long for next line

2015-05-16 Thread Simon Albrecht

Hi Knute,

well this is one of those complicated cases where Lily is not yet smart 
enough. I’d suggest to make the text ‘shorter’, the following may give 
some ideas:


\version 2.19.20
\language english

octaveUp = {
  \set Staff.ottavation = \markup \override #'(baseline-skip . 1.5)
  \column { \line { 8va \tiny \normal-text m.d. } \tiny \normal-text 
seulement }

  \once \override Staff.OttavaBracket.direction = #UP
  \set Voice.middleCPosition = #(- 6 5) % c''
}

octaveOff = {
  \unset Staff.ottavation
  \unset Voice.middleCPosition
}

\relative c' {
  
{
  s1 | s1 | s1 | s1 |
  \octaveUp
  \repeat unfold 4 { e4 f g a }
  \octaveOff
  s1 | s1 | s1 | s1 | s1 | s1 | s1 | s1 |
}
\\
{
  \repeat unfold 4 { c4 d e f }
  c_\markup \italic loco d e f
  \repeat unfold 11 { c4 d e f }
}
  
}

The loco marking on the other voice should be considered an 
alternative to writing m.d. seulement, of course.


HTH, Simon


Am 16.05.2015 um 19:13 schrieb Knute Snortum:
I have a piece where I need a fairly long ottavation text that goes 
from one line to the next (it says that the ottavation applies to the 
right hand only).  The problem is that there is only one measure on 
the second line and the text doesn't fit when it's repeated.  One 
solution is to set \break so that the ottavation is all on one line 
but this sometimes produces stretched or crowded measures.  Is there 
another solution?


\version 2.19.20
\language english

octaveUp = {
  \set Staff.ottavation = #8va pour la main droite seulement
  \once \override Staff.OttavaBracket.direction = #UP
  \set Voice.middleCPosition = #(- 6 5) % c''
}

octaveOff = {
  \unset Staff.ottavation
  \unset Voice.middleCPosition
}

\relative c' {
  
{
  s1 | s1 | s1 | s1 |
  \octaveUp
  \repeat unfold 4 { e4 f g a }
  \octaveOff
  s1 | s1 | s1 | s1 | s1 | s1 | s1 | s1 |
}
\\
{
  \repeat unfold 16 { c4 d e f }
}
  
}

Knute Snortum
(via Gmail)


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


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


Re: Ottavation text too long for next line

2015-05-16 Thread Kieren MacMillan
Hi Knute,

Maybe something like this will work for you?

\version 2.19.20
\language english

#(define (ottava-jr grob)
   (let* (
  ;; have we been split?
  (orig (ly:grob-original grob))

  ;; if yes, get the split pieces (our siblings)
  (siblings (if (ly:grob? orig)
(ly:spanner-broken-into orig)
'(

 (if (and (= (length siblings) 2)
  (eq? (car (last-pair siblings)) grob))
 (ly:grob-set-property! grob 'text '8va m.d.

octaveUp = { 
  \once \override Staff.OttavaBracket.direction = #UP
  \set Staff.ottavation = #8va pour la main droite seulement
  \once \override Staff.OttavaBracket.after-line-breaking = #ottava-jr
  \set Voice.middleCPosition = #(- 6 5)
}

octaveOff = {
  \unset Staff.ottavation
  \unset Voice.middleCPosition
}

\relative c' {
  
{
  s1 | s1 | s1 | s1 |
  \octaveUp
  \repeat unfold 4 { e4 f g a }
  \octaveOff
  s1 | s1 | s1 | s1 | s1 | s1 | s1 | s1 | 
}
\\
{
  \repeat unfold 16 { c4 d e f }
}
  
}

Hope that helps!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: ottavation duplicates text after \break

2014-12-24 Thread Thomas Morley
2014-12-24 21:48 GMT+01:00 Jinsong Zhao jsz...@yeah.net:
 Hi there,

 For the following snippet,I want the ottavation duplicates text after \break
 to be (8va), how to get that?

 \version 2.19.15
 \relative c'' {
  c4 \ottava #1
  \set Staff.ottavation = #octave
  c4 c4 c4 \break
  c4 c4 c4 c4
 }

 Thanks in advance.

 Best regards,
 Jinsong


Pity OttavaBracket has no bound-details property, at least not per
default. Though you can set the stencil property to
ly:line-spanner::print and use bound-details then to mimic/adjust
several values.
It's not really convincing, try dotted notes for example.

At least it should do most of what you want:

\version 2.18.2

myOttava = {
  \override Staff.OttavaBracket.stencil =
 #ly:line-spanner::print
  \override Staff.OttavaBracket.bound-details =
 #`((right
  (attach-dir . 2)
  (Y . 0)
  (text . ,(make-draw-line-markup (cons 0 -0.8
(right-broken
  (attach-dir . 1)
  (padding . 0)
  (text . #f))
(left
  (attach-dir . -2)
  (Y . 0)
  (stencil-align-dir-y . ,CENTER)
  (text . octave)
  (stencil-offset -0.5 . 0)
  (padding . 0.75))
(left-broken
  (attach-dir . 1)
  ;(padding . 2)
  (text . 8va)))
  \override Staff.OttavaBracket.left-bound-info =
 #ly:line-spanner::calc-left-bound-info-and-text
  \override Staff.OttavaBracket.right-bound-info =
 #ly:line-spanner::calc-right-bound-info
}

\relative c''' {
  c1
  c1
  \once \myOttava
  \ottava #1
  c'1
  \break
  c1
  c1
  \ottava #0
  c1
  %% default OttavaBracket:
  \ottava #1
  c1^Default:
  \break
  c1
  c1
}


HTH,
  Harm

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


Re: ottavation duplicates text after \break

2014-12-24 Thread Jinsong Zhao

On 2014/12/24 17:31, Thomas Morley wrote:

2014-12-24 21:48 GMT+01:00 Jinsong Zhao jsz...@yeah.net:

Hi there,

For the following snippet,I want the ottavation duplicates text after \break
to be (8va), how to get that?

\version 2.19.15
\relative c'' {
  c4 \ottava #1
  \set Staff.ottavation = #octave
  c4 c4 c4 \break
  c4 c4 c4 c4
}

Thanks in advance.

Best regards,
Jinsong



Pity OttavaBracket has no bound-details property, at least not per
default. Though you can set the stencil property to
ly:line-spanner::print and use bound-details then to mimic/adjust
several values.
It's not really convincing, try dotted notes for example.

At least it should do most of what you want:

\version 2.18.2

myOttava = {
   \override Staff.OttavaBracket.stencil =
  #ly:line-spanner::print
   \override Staff.OttavaBracket.bound-details =
  #`((right
   (attach-dir . 2)
   (Y . 0)
   (text . ,(make-draw-line-markup (cons 0 -0.8
 (right-broken
   (attach-dir . 1)
   (padding . 0)
   (text . #f))
 (left
   (attach-dir . -2)
   (Y . 0)
   (stencil-align-dir-y . ,CENTER)
   (text . octave)
   (stencil-offset -0.5 . 0)
   (padding . 0.75))
 (left-broken
   (attach-dir . 1)
   ;(padding . 2)
   (text . 8va)))
   \override Staff.OttavaBracket.left-bound-info =
  #ly:line-spanner::calc-left-bound-info-and-text
   \override Staff.OttavaBracket.right-bound-info =
  #ly:line-spanner::calc-right-bound-info
}

\relative c''' {
   c1
   c1
   \once \myOttava
   \ottava #1
   c'1
   \break
   c1
   c1
   \ottava #0
   c1
   %% default OttavaBracket:
   \ottava #1
   c1^Default:
   \break
   c1
   c1
}


HTH,
   Harm



Thank you very much for the solution. I searched, there is a bug report 
(issue?) submitted to google code page:

https://code.google.com/p/lilypond/issues/detail?id=2748

Another question, just curious about how to find the necessary 
information to solve such kind of problems? The information in LilyPond 
document is dispersed everywhere. What's the best way to learn those 
information?


Thanks again for your kind help.

Merry Xmas and Happy New Year.

Jinsong

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


Re: ottavation

2011-04-07 Thread Peter O'Doherty

Thanks a lot Mike and Nick. Your suggestions have been very helpful.
Regards,
Peter


On 04/07/2011 01:37 AM, Nick Payne wrote:

On 06/04/11 23:26, Peter O'Doherty wrote:

Thanks.
The code you sent applies \ottava #1 to the whole score, whereas I 
also have instances of |8vb and 15va etc|. All I need is a way to 
change the property to print only 8 or 15 without va, vb etc. to save 
me typing \set Staff.ottavation = #8 each time.

Thanks,
Peter

\score { \new Staff {
 {
{
  \ottava #1
  %\set Staff.ottavation = #8
  c''1
  \ottava #-1
  %\set Staff.ottavation = #8
  c,1
}

}}
\layout {
  \context {
% \Score ottavation=#8 % this does not work
} }}


Why not just define something like

eightU = { \ottava #1 \set Staff.ottavation = #8 }
eightD = { \ottava #-1 \set Staff.ottavation = #8 }

{
  \eightU
  c''1
  \eightD
  c,1
}

Nick


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


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


RE: ottavation

2011-04-06 Thread James Lowe
Hello,

)-Original Message-
)From: lilypond-user-bounces+james.lowe=datacore@gnu.org
)[mailto:lilypond-user-bounces+james.lowe=datacore@gnu.org] On
)Behalf Of Peter O'Doherty
)Sent: 06 April 2011 09:51
)To: lilypond-user
)Subject: ottavation
)
)Hi,
)
)How can I adjust \set Staff.ottavation = #8 to include it in the layout
)section so it applies to the whole score?

Can't you just use

\clef treble_8 in your score

http://lilypond.org/doc/v2.13/Documentation/notation/displaying-pitches#clef

Instead of using a \layout { } construct?

james


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


Re: ottavation

2011-04-06 Thread m...@apollinemike.com
On Apr 6, 2011, at 7:22 AM, James Lowe wrote:

 From: Peter O'Doherty [mailto:k.p.odohe...@gmail.com] 
 Sent: 06 April 2011 12:21
 To: James Lowe
 Subject: Re: ottavation
 
 Thanks for your reply, James. My question wasn't very clear - there are 
 numerous instances of ottava passages in the score, but not the whole score 
 so \clef treble_8 is not suitable. It's not the ottava instruction as such 
 I want to use in the \layout { } but the format, i.e. just an 8 instead of 
 8va.
 Regards,
 Peter
 
 On Wed, Apr 6, 2011 at 12:27 PM, James Lowe james.l...@datacore.com wrote:
 Hello,
 
 )-Original Message-
 )From: lilypond-user-bounces+james.lowe=datacore@gnu.org
 )[mailto:lilypond-user-bounces+james.lowe=datacore@gnu.org] On
 )Behalf Of Peter O'Doherty
 )Sent: 06 April 2011 09:51
 )To: lilypond-user
 )Subject: ottavation
 )
 )Hi,
 )
 )How can I adjust \set Staff.ottavation = #8 to include it in the layout
 )section so it applies to the whole score?
 Can't you just use
 
 \clef treble_8 in your score
 
 http://lilypond.org/doc/v2.13/Documentation/notation/displaying-pitches#clef
 
 Instead of using a \layout { } construct?
 
 james

\score { \new Staff {
\relative c'' {
a b c d
}}
\layout { \context { \Score ottavation=#8 } }}

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


Re: ottavation

2011-04-06 Thread Peter O'Doherty

Thanks.
The code you sent applies \ottava #1 to the whole score, whereas I also 
have instances of |8vb and 15va etc|. All I need is a way to change the 
property to print only 8 or 15 without va, vb etc. to save me typing 
\set Staff.ottavation = #8 each time.

Thanks,
Peter

\score { \new Staff {
 {
{
  \ottava #1
  %\set Staff.ottavation = #8
  c''1
  \ottava #-1
  %\set Staff.ottavation = #8
  c,1
}

}}
\layout {
  \context {
% \Score ottavation=#8 % this does not work
} }}




On 04/06/2011 01:51 PM, m...@apollinemike.com wrote:

On Apr 6, 2011, at 7:22 AM, James Lowe wrote:


From: Peter O'Doherty [mailto:k.p.odohe...@gmail.com]
Sent: 06 April 2011 12:21
To: James Lowe
Subject: Re: ottavation

Thanks for your reply, James. My question wasn't very clear - there are numerous instances of ottava passages 
in the score, but not the whole score so \clef treble_8 is not suitable. It's not the ottava 
instruction as such I want to use in the \layout { } but the format, i.e. just an 8 instead of 
8va.
Regards,
Peter

On Wed, Apr 6, 2011 at 12:27 PM, James Lowejames.l...@datacore.com  wrote:
Hello,

)-Original Message-
)From: lilypond-user-bounces+james.lowe=datacore@gnu.org
)[mailto:lilypond-user-bounces+james.lowe=datacore@gnu.org] On
)Behalf Of Peter O'Doherty
)Sent: 06 April 2011 09:51
)To: lilypond-user
)Subject: ottavation
)
)Hi,
)
)How can I adjust \set Staff.ottavation = #8 to include it in the layout
)section so it applies to the whole score?
Can't you just use

\clef treble_8 in your score

http://lilypond.org/doc/v2.13/Documentation/notation/displaying-pitches#clef

Instead of using a \layout { } construct?

james

\score { \new Staff {
\relative c'' {
a b c d
}}
\layout { \context { \Score ottavation=#8 } }}

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



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


Re: ottavation

2011-04-06 Thread m...@apollinemike.com
On Apr 6, 2011, at 9:26 AM, Peter O'Doherty wrote:

 Thanks. 
 The code you sent applies \ottava #1 to the whole score, whereas I also have 
 instances of 8vb and 15va etc. All I need is a way to change the property to 
 print only 8 or 15 without va, vb etc. to save me typing \set 
 Staff.ottavation = #8 each time.
 Thanks,
 Peter
 
 \score { \new Staff {
  {
 {
   \ottava #1
   %\set Staff.ottavation = #8
   c''1
   \ottava #-1
   %\set Staff.ottavation = #8
   c,1
 }
 
 }}
 \layout { 
   \context {  
 % \Score ottavation=#8 % this does not work
 } }}
 
 
 
 
 On 04/06/2011 01:51 PM, m...@apollinemike.com wrote:
 
 On Apr 6, 2011, at 7:22 AM, James Lowe wrote:
 
 From: Peter O'Doherty [mailto:k.p.odohe...@gmail.com] 
 Sent: 06 April 2011 12:21
 To: James Lowe
 Subject: Re: ottavation
 
 Thanks for your reply, James. My question wasn't very clear - there are 
 numerous instances of ottava passages in the score, but not the whole score 
 so \clef treble_8 is not suitable. It's not the ottava instruction as 
 such I want to use in the \layout { } but the format, i.e. just an 8 
 instead of 8va.
 Regards,
 Peter
 
 On Wed, Apr 6, 2011 at 12:27 PM, James Lowe james.l...@datacore.com wrote:
 Hello,
 
 )-Original Message-
 )From: lilypond-user-bounces+james.lowe=datacore@gnu.org
 )[mailto:lilypond-user-bounces+james.lowe=datacore@gnu.org] On
 )Behalf Of Peter O'Doherty
 )Sent: 06 April 2011 09:51
 )To: lilypond-user
 )Subject: ottavation
 )
 )Hi,
 )
 )How can I adjust \set Staff.ottavation = #8 to include it in the layout
 )section so it applies to the whole score?
 Can't you just use
 
 \clef treble_8 in your score
 
 http://lilypond.org/doc/v2.13/Documentation/notation/displaying-pitches#clef
 
 Instead of using a \layout { } construct?
 
 james
 \score { \new Staff {
 \relative c'' {
 a b c d
 }}
 \layout { \context { \Score ottavation=#8 } }}
 
 Cheers,
 MS
 ___
 lilypond-user mailing list
 lilypond-user@gnu.org
 http://lists.gnu.org/mailman/listinfo/lilypond-user
 

Kinda kludgy, but it works!  Automating this type of truncating can likely 
become part of LilyPond for 2.15/2.16.  In the meantime, this should do the 
trick.

#(define (make-ottava-set-short music)
  (let ((octavation (ly:music-property music 'ottava-number)))

(list (context-spec-music
   (make-apply-context
(lambda (context)
  (let ((offset (* -7 octavation))
(string (assoc-get octavation '((2 . 15)
(1 . 8)
(0 . #f)
(-1 . 8)
(-2 . 15)
(set! (ly:context-property context 'middleCOffset) offset)
(set! (ly:context-property context 'ottavation) string)
(ly:set-middle-C! context
   'Staff


shortOttava = #(define-music-function (parser location octave) (integer?)
(make-music 'OttavaMusic 'ottava-number octave 'elements-callback 
make-ottava-set-short))

\score { \new Staff {
\relative c'' {
\shortOttava #1 a b c d \shortOttava #0 a b c d
}}}___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: ottavation

2011-04-06 Thread Nick Payne

On 06/04/11 23:26, Peter O'Doherty wrote:

Thanks.
The code you sent applies \ottava #1 to the whole score, whereas I 
also have instances of |8vb and 15va etc|. All I need is a way to 
change the property to print only 8 or 15 without va, vb etc. to save 
me typing \set Staff.ottavation = #8 each time.

Thanks,
Peter

\score { \new Staff {
 {
{
  \ottava #1
  %\set Staff.ottavation = #8
  c''1
  \ottava #-1
  %\set Staff.ottavation = #8
  c,1
}

}}
\layout {
  \context {
% \Score ottavation=#8 % this does not work
} }}


Why not just define something like

eightU = { \ottava #1 \set Staff.ottavation = #8 }
eightD = { \ottava #-1 \set Staff.ottavation = #8 }

{
  \eightU
  c''1
  \eightD
  c,1
}

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