How do I apply patch files to my LilyPond binary on Windows?

2017-11-14 Thread Robert Murdoch

Hi,

I was wondering if it was possible to apply patch files to binaries on 
Windows, and if so how to do it.


I have been waiting for about a month for LilyPond 2.19.81 where 
hopefully the problem with the repeat ties in chords will be fixed (in 
case any reader doesn't know, as of 2.19.80 repeat ties can be applied 
to all notes in a chord, but not individual notes). I have been eyeing 
the bug tracker (https://sourceforge.net/p/testlilyissues/issues/) and 
git repository (http://git.savannah.gnu.org/cgit/lilypond.git) and it 
appears to have been fixed in the master branch.


Now I'm wondering if I can apply the patch at 
https://codereview.appspot.com/332990043 to my Windows binary file. I 
was going to complain that I was running out of patience waiting for the 
next unstable release, but then I realised it's my own fault for not 
asking this question sooner.


Anyway, thanks for reading.


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


Re: double time signature problem

2017-11-14 Thread David Kastrup
David Wright  writes:

> Fair enough; I didn't know that. So how far back do you have to go in
> German to hear things that would sound archaic or stilted to modern
> ears?

I sound archaic or stilted to modern ears.  It's a bit of a moving
target, but Luther was a language trendsetter regarding written language
since he decided to write things as they were spoken.  So his German
reads quite different from that of contemporaries.  He is not the first
to translate parts of the Bible into German, but other attempts read
quite contrived and hard to understand to modern readers in comparison.

Luthers has been rephrased and reworded over the centuries as well and
does read a bit strange, but the grammar appears sound, it's just some
vocabulary and its usage.  Quite less of a change than "Get thee gone,
knave!  Thou speakest not in good faith." would appear to English
speakers who tend to horribly mangle attempts at constructing elements
of grammar still in use at Shakespearean time.  German has not really
retired grammar since then, and even archaic usage like "Rede Er kein
dummes Zeug!" fits into active grammar use well enough that native
speakers would not get it wrong.

In English you have the phenomen of the change from Middle English to
Early Modern English which is like a complete change of language.  It's
not as much as there actual was such a rapid change of language than a
geographical shift of the centre and mode of written culture, "nobody
talks like that here/anymore" catching up with a continuity of writing.

Luther basically has been the last major such moment in German, with the
shift from Mittelhochdeutsch already being behind.

> I know that Wagner invented an archaic form of German for the Ring to
> lend it "authenticity" but did he have sources/ examples to draw on?

Out of my depth here.

> ¹ But I don't keep up with contemporary composers.
> ² Almost all the *psalm* texts in Messiah are BCP, not KJV.

Ok, but the difference does not appear all that large to me regarding
the "archaicness".

-- 
David Kastrup

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


Re: double time signature problem

2017-11-14 Thread Werner Arnhold
Thanks to all list members who answered.

I decided to use the solution from the blog of Urs in the file
"alternating-time-signatures.ly". It works very fine. It seems to me to
be a more general approach than the similar solution from Joshua (thanks
to him too).

The question of a good-looking position of the word "Welt" in measure 5
will take a bit more work for me, I have no experience with Null Voices.
So I will dive into it in the near future.

So far thank you all!

Werner

Am Montag, den 13.11.2017, 17:45 +0100 schrieb Urs Liska:
> 
> 
> Am 13.11.2017 um 16:16 schrieb David Wright:
> 
> > On Mon 13 Nov 2017 at 10:55:06 (+0100), Werner Arnhold wrote:
> > > Hi, list members,
> > > 
> > > I try to typeset an old choral work with hemiolic measures. That leads
> > > me to a 3/4 Mesure sometimes changed to a 3/2 measure without special
> > > indication and immediately back again. So I wanted to follow a printed
> > > example with two time signatures at the beginning of the first line.
> > The word you want to search on is alternatingTimeSignatures
> > but I've only turned up
> > https://lists.gnu.org/archive/html/lilypond-devel/2014-05/msg00045.html
> > which might not be up-to-date. Urs may reply with a better version.
> > The one I use is attached.
> 
> Some more reference is in this blog post:
> http://lilypondblog.org/2014/06/polymetrics-in-sibelius-vs-lilypond/
> 
> The key idea is to create the visual time signature including all
> occuring time signatures and then suppress the *printing* of time
> signatures. That way you can write the actual time signatures (=>
> semantically correct) but have only the general rule printed at the
> beginning.
> 
> HTH
> Urs
> 
> > 
> > Cheers,
> > David.
> > 
> > 
> > ___
> > 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



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


Re: midi volume single note

2017-11-14 Thread Gianmaria Lari
On 13 November 2017 at 13:31, Caagr98  wrote:

> I was thinking of something like this:
>
> <<
>   { c'1 }
>   { s8 \set Voice.midiExpression=#0.5 s2.. Voice.midiExpression=#1 }
> >> c'1
>
> That is, simultaneously: a) play a note, b) wait a short while, reduce
> volume, wait until rest of the note is finished (2.. is 7/8 of a measure),
> then reset to normal.
>

Thank you, perfect

In case other people need it, here it is a complete example where c1 note
is played reducing volume from maximum to minimum in step of 1/32.

\version "2.19.80"
right = \fixed c'' { c1 }

dynamics = {
s32 \set Voice.midiExpression=#1
s32 \set Voice.midiExpression=#0.96774
s32 \set Voice.midiExpression=#0.93548
s32 \set Voice.midiExpression=#0.90323
s32 \set Voice.midiExpression=#0.87097
s32 \set Voice.midiExpression=#0.83871
s32 \set Voice.midiExpression=#0.80645
s32 \set Voice.midiExpression=#0.77419
s32 \set Voice.midiExpression=#0.74194
s32 \set Voice.midiExpression=#0.70968
s32 \set Voice.midiExpression=#0.67742
s32 \set Voice.midiExpression=#0.64516
s32 \set Voice.midiExpression=#0.6129
s32 \set Voice.midiExpression=#0.58065
s32 \set Voice.midiExpression=#0.54839
s32 \set Voice.midiExpression=#0.51613
s32 \set Voice.midiExpression=#0.48387
s32 \set Voice.midiExpression=#0.45161
s32 \set Voice.midiExpression=#0.41936
s32 \set Voice.midiExpression=#0.3871
s32 \set Voice.midiExpression=#0.35484
s32 \set Voice.midiExpression=#0.32258
s32 \set Voice.midiExpression=#0.29032
s32 \set Voice.midiExpression=#0.25806
s32 \set Voice.midiExpression=#0.22581
s32 \set Voice.midiExpression=#0.19355
s32 \set Voice.midiExpression=#0.16129
s32 \set Voice.midiExpression=#0.12903
s32 \set Voice.midiExpression=#0.09677
s32 \set Voice.midiExpression=#0.06452
s32 \set Voice.midiExpression=#0.03226
s32 \set Voice.midiExpression=#0
}

\score {
  \new Staff \with { midiInstrument = "accordion"}
  \new Voice <<\right \dynamics>>
  \midi {}
  \layout {}
}

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


Tuplets curved brackets?

2017-11-14 Thread Menu Jacques
Hello folks,

MusicXML has the notion of curved tuplets brackets:

  

Didn’t find anything in the doc nor snippets. How can that be achieved with 
LilyPond?

Thanks for your help!

JM




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


Re: midi volume single note

2017-11-14 Thread David Kastrup
Gianmaria Lari  writes:

> On 13 November 2017 at 13:31, Caagr98  wrote:
>
>> I was thinking of something like this:
>>
>> <<
>>   { c'1 }
>>   { s8 \set Voice.midiExpression=#0.5 s2.. Voice.midiExpression=#1 }
>> >> c'1
>>
>> That is, simultaneously: a) play a note, b) wait a short while, reduce
>> volume, wait until rest of the note is finished (2.. is 7/8 of a measure),
>> then reset to normal.
>>
>
> Thank you, perfect
>
> In case other people need it, here it is a complete example where c1 note
> is played reducing volume from maximum to minimum in step of 1/32.
>
> \version "2.19.80"
> right = \fixed c'' { c1 }
>
> dynamics = {
> s32 \set Voice.midiExpression=#1
> s32 \set Voice.midiExpression=#0.96774
> s32 \set Voice.midiExpression=#0.93548
> s32 \set Voice.midiExpression=#0.90323
[...]
> }
>
> \score {
>   \new Staff \with { midiInstrument = "accordion"}
>   \new Voice <<\right \dynamics>>
>   \midi {}
>   \layout {}
> }

Well, that calls for something programmatic I think.

\version "2.19.80"

right = \fixed c'' { c1 }

withExpr =
#(define-music-function (steps start end music)
   (index? number? number? ly:music?)
   (let ((len (ly:make-duration 0 0
			(/ (ly:moment-main (ly:music-length music))
			   (1+ steps)
 #{ \context Bottom
	<< #music
	   { #@(append
  (map
	   (lambda (v)
		 #{ \set midiExpression = #v  \skip #len #})
	   (iota steps start (/ (- end start) (1+ steps
	  (list #{ \set midiExpression = #end #})) }
	>>
 #}))

\score {
  \new Staff \with { midiInstrument = "accordion"}
  \displayLilyMusic \new Voice { \withExpr 32 1 0 \right }
  \midi {}
  \layout {}
}


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


Re: Tuplets curved brackets?

2017-11-14 Thread Ben

On 11/14/2017 5:02 AM, Menu Jacques wrote:

Hello folks,

MusicXML has the notion of curved tuplets brackets:

   

Didn’t find anything in the doc nor snippets. How can that be achieved with 
LilyPond?

Thanks for your help!

JM





Hi,

Is this what you mean?
(see attached)

Also, what version are you using?

Here is a 2.19 option:

\version "2.19.80"


tupletBracketToSlur = {
  % Use slur-stencil
  \override TupletBracket.stencil = #ly:slur::print
  %% Use 'thickness from Slur
  \override TupletBracket.thickness = #1.2
  %% 'control-points need to be set
  \override TupletBracket.control-points =
    #(lambda (grob)
  (let* ((x-pos (ly:grob-property grob 'X-positions))
 (pos (ly:grob-property grob 'positions))
 (x-ln (interval-length x-pos))
 (dir (ly:grob-property grob 'direction))
 ;; read out the height of the TupletBracket, may be
 ;; negative!
 (height (- (cdr pos) (car pos)))
 ;; height-corr is introduced because sometimes the shape
 ;; of the slur needs to be adjusted.
 ;; It is used in the 2nd/3rd control-point.
 ;; The value of 0.3 is found by trial and error
 (height-corr (* 0.3 dir height))
 (edge-height (ly:grob-property grob 'edge-height
   '(0.7 . 0.7)))
 (pad 1.0))
    (list
  ;; first cp
  (cons
    (+ (car x-pos) 0.5)
    (- (+ (* dir pad) (+ (car pos) (* -1 dir
 (car edge-height
  (if (= dir -1)
  (if (> height 3)
    (/ dir 2.0)
    0.0)
  (if (< height -3)
    (/ dir 2.0)
    0.0
  ;; second cp
  (cons
    (+ (car x-pos) (* x-ln 1/4))
    (+ (* dir pad) (+ (car pos) (* dir (+ 0.5 height-corr)
  ;; third cp
  (cons
    (+ (car x-pos) (* x-ln 3/4))
    (+ (* dir pad) (+ (cdr pos) (* dir (- 0.5 height-corr)
  ;; fourth cp
  (cons
    (- (cdr x-pos) 0.5)
    (+ (* dir pad) (+ (cdr pos) (* -1 dir (cdr edge-height)
    )))
  \override TupletBracket.staff-padding = #'()
  #(define (invert-direction x) (if (eq? UP
(ly:tuplet-bracket::calc-direction x)) DOWN UP))
\override TupletBracket.direction = #invert-direction
}


\layout { \tupletBracketToSlur }

{ a a \tuplet 3/2 { a8 a a }  a4 }
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Tuplets curved brackets?

2017-11-14 Thread Jacques Menu Muzhic
Hello Ben,

Yes, that’s the solution I was looking for, thanks so much!

JM

> Le 14 nov. 2017 à 12:25, Ben  a écrit :
> 
> On 11/14/2017 5:02 AM, Menu Jacques wrote:
>> Hello folks,
>> 
>> MusicXML has the notion of curved tuplets brackets:
>> 
>>   > start"/>
>> 
>> Didn’t find anything in the doc nor snippets. How can that be achieved with 
>> LilyPond?
>> 
>> Thanks for your help!
>> 
>> JM
>> 
>> 
>> 
> 
> Hi,
> 
> Is this what you mean?
> (see attached)
> 
> Also, what version are you using? 
> 
> Here is a 2.19 option:
> 
> \version "2.19.80"
> 
> 
> tupletBracketToSlur = {
>   % Use slur-stencil
>   \override TupletBracket.stencil = #ly:slur::print
>   %% Use 'thickness from Slur
>   \override TupletBracket.thickness = #1.2
>   %% 'control-points need to be set
>   \override TupletBracket.control-points =
> #(lambda (grob)
>   (let* ((x-pos (ly:grob-property grob 'X-positions))
>  (pos (ly:grob-property grob 'positions))
>  (x-ln (interval-length x-pos))
>  (dir (ly:grob-property grob 'direction))
>  ;; read out the height of the TupletBracket, may be
>  ;; negative!
>  (height (- (cdr pos) (car pos)))
>  ;; height-corr is introduced because sometimes the shape
>  ;; of the slur needs to be adjusted.
>  ;; It is used in the 2nd/3rd control-point.
>  ;; The value of 0.3 is found by trial and error
>  (height-corr (* 0.3 dir height))
>  (edge-height (ly:grob-property grob 'edge-height
>'(0.7 . 0.7)))
>  (pad 1.0))
> (list
>   ;; first cp
>   (cons
> (+ (car x-pos) 0.5)
> (- (+ (* dir pad) (+ (car pos) (* -1 dir
>  (car edge-height
>   (if (= dir -1)
>   (if (> height 3)
> (/ dir 2.0)
> 0.0)
>   (if (< height -3)
> (/ dir 2.0)
> 0.0
>   ;; second cp
>   (cons
> (+ (car x-pos) (* x-ln 1/4))
> (+ (* dir pad) (+ (car pos) (* dir (+ 0.5 height-corr)
>   ;; third cp
>   (cons
> (+ (car x-pos) (* x-ln 3/4))
> (+ (* dir pad) (+ (cdr pos) (* dir (- 0.5 height-corr)
>   ;; fourth cp
>   (cons
> (- (cdr x-pos) 0.5)
> (+ (* dir pad) (+ (cdr pos) (* -1 dir (cdr edge-height)
> )))
>   \override TupletBracket.staff-padding = #'()
>   #(define (invert-direction x) (if (eq? UP
> (ly:tuplet-bracket::calc-direction x)) DOWN UP))
> \override TupletBracket.direction = #invert-direction
> }
> 
> 
> \layout { \tupletBracketToSlur }
> 
> { a a \tuplet 3/2 { a8 a a }  a4 } 
> ___
> 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: Tuplets curved brackets?

2017-11-14 Thread Jacques Menu Muzhic
Hello Ben,

How can one undo the effect of tupletBracketToSlur to use it on a per-tuplet 
basis?
Prefixing it with \once is not a solution I’ve seen.

Below, I’d like the third triplet to use square brackets again:

{
  a a \tuplet 3/2 { a8 a a }  a4 | %!
  \tupletBracketToSlur   % HERE OK
  a a \tuplet 3/2 { a8 a a }  a4
  % AND THERE ???
  a a \tuplet 3/2 { a8 a a }  a4
}

Thanks!

JM

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


macro variable doesn't behave same as original?

2017-11-14 Thread Patrick Smith
This works:

\version "2.18.2"
\relative c' {
  \time 2/4
  c4 c( d) d( e) e( f) f( g) g( a) a( b) b( c) c( b) b( a) a( g) g( f) f(
e) e( d) d( c2)~ c2 \fermata  \bar "|."
  layout{}
}

This doesn't work:

\version "2.18.2"
macrovariable = {c4 c( d) d( e) e( f) f( g) g( a) a( b) b( c) c( b) b( a)
a( g) g( f) f( e) e( d) d( c2)~ c2 }
\relative c' {
  \time 2/4
  \macrovariable \fermata  \bar "|."
  layout{}
}

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


Re: macro variable doesn't behave same as original?

2017-11-14 Thread Caagr98
In the first version, you're applying the \fermata post-event to the c2, which 
is perfectly valid. In the second one, you're applying it to the {...}, which 
doesn't make sense. I'm afraid I don't know any good solution, though.

On 11/14/17 13:21, Patrick Smith wrote:
> This works:
> 
> \version "2.18.2"
> \relative c' {
>   \time 2/4
>   c4 c( d) d( e) e( f) f( g) g( a) a( b) b( c) c( b) b( a) a( g) g( f) f( e) 
> e( d) d( c2)~ c2 \fermata  \bar "|."
>   layout{}
> }
> 
> This doesn't work:
> 
> \version "2.18.2"
> macrovariable = {c4 c( d) d( e) e( f) f( g) g( a) a( b) b( c) c( b) b( a) a( 
> g) g( f) f( e) e( d) d( c2)~ c2 }
> \relative c' {
>   \time 2/4
>   \macrovariable \fermata  \bar "|."
>   layout{}
> }
> 
> Why?
> 
> 
> ___
> 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: Tuplets curved brackets?

2017-11-14 Thread Werner LEMBERG

> How can one undo the effect of tupletBracketToSlur to use it on a
> per-tuplet basis?  Prefixing it with \once is not a solution I’ve
> seen.

Try `\single'.


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


Re: Tuplets curved brackets?

2017-11-14 Thread David Kastrup
Jacques Menu Muzhic  writes:

> Hello Ben,
>
> How can one undo the effect of tupletBracketToSlur to use it on a
> per-tuplet basis?
> Prefixing it with \once is not a solution I’ve seen.
>
> Below, I’d like the third triplet to use square brackets again:
>
> {
>   a a \tuplet 3/2 { a8 a a }  a4 | %!
>   \tupletBracketToSlur   % HERE OK
>   a a \tuplet 3/2 { a8 a a }  a4
>   % AND THERE ???
>   a a \tuplet 3/2 { a8 a a }  a4
> }
>

Untested, but try using

   \temporary \tupletBracketToSlur
   ...
   \undo \tupletBracketToSlur

-- 
David Kastrup

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


Re: macro variable doesn't behave same as original?

2017-11-14 Thread David Kastrup
Caagr98  writes:

>> On 11/14/17 13:21, Patrick Smith wrote:
>>> This works:
>>> 
>>> \version "2.18.2"
>>> \relative c' {
>>>   \time 2/4
>>>   c4 c( d) d( e) e( f) f( g) g( a) a( b) b( c) c( b) b( a) a( g) g(
>>> f) f( e) e( d) d( c2)~ c2 \fermata  \bar "|."
>>>   layout{}
>>> }
>>> 
>>> This doesn't work:
>>> 
>>> \version "2.18.2"
>>> macrovariable = {c4 c( d) d( e) e( f) f( g) g( a) a( b) b( c) c( b)
>>> b( a) a( g) g( f) f( e) e( d) d( c2)~ c2 }
>>> \relative c' {
>>>   \time 2/4
>>>   \macrovariable \fermata  \bar "|."
>>>   layout{}
>>> }
>>> 
>>> Why?
>
> In the first version, you're applying the \fermata post-event to the
> c2, which is perfectly valid. In the second one, you're applying it to
> the {...}, which doesn't make sense. I'm afraid I don't know any good
> solution, though.

Using 2.21.0.  Which isn't released yet.  Not a particularly good
solution but one that should do the trick.

-- 
David Kastrup

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


Re: Tuplets curved brackets?

2017-11-14 Thread Andrew Bernard
Hi Ben,

Would you consider adding this to openlilylib? I am happy to help out with
that if needed. This is too excellent to be lost in the mailing list
archives forever.

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


Re: Tuplets curved brackets?

2017-11-14 Thread SoundsFromSound
Andrew Bernard wrote
> Hi Ben,
> 
> Would you consider adding this to openlilylib? I am happy to help out with
> that if needed. This is too excellent to be lost in the mailing list
> archives forever.
> 
> Andrew
> 
> ___
> lilypond-user mailing list

> lilypond-user@

> https://lists.gnu.org/mailman/listinfo/lilypond-user

Hi Andrew!

I love this little snippet too, it's so handy to have.   :)

I got it from here on the mailing list earlier this year...
http://lilypond.1069038.n5.nabble.com/Triplets-td199199.html

I agree though, it should be shared with everyone! I am not familiar with
openlilylib submission process. 

But I love the resources it's such a wealth of information...have a good
day!

-Ben




-
composer | sound designer | asmr artist 
--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: macro variable doesn't behave same as original?

2017-11-14 Thread Patrick Smith
I can wait for 2.21.0.

I'll continuing coding with the assumption that the macrovariable will
indeed be a one-for-one, text in-place, copy of the original.

On Tue, Nov 14, 2017 at 7:44 AM, David Kastrup  wrote:

> Caagr98  writes:
>
> >> On 11/14/17 13:21, Patrick Smith wrote:
> >>> This works:
> >>>
> >>> \version "2.18.2"
> >>> \relative c' {
> >>>   \time 2/4
> >>>   c4 c( d) d( e) e( f) f( g) g( a) a( b) b( c) c( b) b( a) a( g) g(
> >>> f) f( e) e( d) d( c2)~ c2 \fermata  \bar "|."
> >>>   layout{}
> >>> }
> >>>
> >>> This doesn't work:
> >>>
> >>> \version "2.18.2"
> >>> macrovariable = {c4 c( d) d( e) e( f) f( g) g( a) a( b) b( c) c( b)
> >>> b( a) a( g) g( f) f( e) e( d) d( c2)~ c2 }
> >>> \relative c' {
> >>>   \time 2/4
> >>>   \macrovariable \fermata  \bar "|."
> >>>   layout{}
> >>> }
> >>>
> >>> Why?
> >
> > In the first version, you're applying the \fermata post-event to the
> > c2, which is perfectly valid. In the second one, you're applying it to
> > the {...}, which doesn't make sense. I'm afraid I don't know any good
> > solution, though.
>
> Using 2.21.0.  Which isn't released yet.  Not a particularly good
> solution but one that should do the trick.
>
> --
> David Kastrup
>
> ___
> 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: macro variable doesn't behave same as original?

2017-11-14 Thread David Kastrup
Patrick Smith  writes:

> I can wait for 2.21.0.
>
> I'll continuing coding with the assumption that the macrovariable will
> indeed be a one-for-one, text in-place, copy of the original.
>
> On Tue, Nov 14, 2017 at 7:44 AM, David Kastrup  wrote:
>
>> Caagr98  writes:
>>
>> >> On 11/14/17 13:21, Patrick Smith wrote:
>> >>> This works:
>> >>>
>> >>> \version "2.18.2"
>> >>> \relative c' {
>> >>>   \time 2/4
>> >>>   c4 c( d) d( e) e( f) f( g) g( a) a( b) b( c) c( b) b( a) a( g) g(
>> >>> f) f( e) e( d) d( c2)~ c2 \fermata  \bar "|."
>> >>>   layout{}
>> >>> }

Well, you won't get away with the \layout that crops up nilly-willy in
the middle of the code.  But then it is not compatible with your "This
works:" statement either.

-- 
David Kastrup

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


Re: midi volume single note

2017-11-14 Thread Gianmaria Lari
On 14 November 2017 at 11:30, David Kastrup  wrote:

> Gianmaria Lari  writes:
>
> > On 13 November 2017 at 13:31, Caagr98  wrote:
> >
> >> I was thinking of something like this:
> >>
> >> <<
> >>   { c'1 }
> >>   { s8 \set Voice.midiExpression=#0.5 s2.. Voice.midiExpression=#1 }
> >> >> c'1
> >>
> >> That is, simultaneously: a) play a note, b) wait a short while, reduce
> >> volume, wait until rest of the note is finished (2.. is 7/8 of a
> measure),
> >> then reset to normal.
> >>
> >
> > Thank you, perfect
> >
> > In case other people need it, here it is a complete example where c1 note
> > is played reducing volume from maximum to minimum in step of 1/32.
> >
> > \version "2.19.80"
> > right = \fixed c'' { c1 }
> >
> > dynamics = {
> > s32 \set Voice.midiExpression=#1
> > s32 \set Voice.midiExpression=#0.96774
> > s32 \set Voice.midiExpression=#0.93548
> > s32 \set Voice.midiExpression=#0.90323
> [...]
> > }
> >
> > \score {
> >   \new Staff \with { midiInstrument = "accordion"}
> >   \new Voice <<\right \dynamics>>
> >   \midi {}
> >   \layout {}
> > }
>
> Well, that calls for something programmatic I think.
>

Well, I was hoping that a nice guy pop up with your nice lily/scheme
code:)  Thanks !!!

P.S.
I didn't wrote the long list of "s32 \set Voice.midiExpression=#x" by
hand; I wrote some lines of code to generate them programmatically (much
less practical then your code but better than write them by hand). Here it
is the function I used:

public string setVolume(float duration, int resolution, float
volumeStart, float volumeEnd)
{
int steps = (int)((1 / duration) / (1 / (float)resolution));
float val = (volumeStart - volumeEnd) / (steps - 1);
string s = "";
for (int i = 1; i <= steps; i++)
{
s += "s" + resolution.ToString()+ " " + "\\set
Voice.midiExpression=#";
s += Math.Round(volumeStart, 5).ToString() + "\n";
volumeStart -= val;
}
return s;
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: midi volume single note

2017-11-14 Thread Caagr98
You could also generate it dynamically at runtime, with something like this 
(please note that I haven't tested it):

gradual = #(define-music-function (f mus) (procedure? ly:music?)
  (make-simulaneous-music
(list mus (make-sequential-music
(let ((len (lambda (l) (ly:music-length (make-sequential-music 
l
  (l '()))
  (do () ((ly:moment On 14 November 2017 at 11:30, David Kastrup  > wrote:
> 
> Gianmaria Lari mailto:gianmarial...@gmail.com>> 
> writes:
> 
> > On 13 November 2017 at 13:31, Caagr98  > wrote:
> >
> >> I was thinking of something like this:
> >>
> >> <<
> >>   { c'1 }
> >>   { s8 \set Voice.midiExpression=#0.5 s2.. Voice.midiExpression=#1 }
> >> >> c'1
> >>
> >> That is, simultaneously: a) play a note, b) wait a short while, reduce
> >> volume, wait until rest of the note is finished (2.. is 7/8 of a 
> measure),
> >> then reset to normal.
> >>
> >
> > Thank you, perfect
> >
> > In case other people need it, here it is a complete example where c1 
> note
> > is played reducing volume from maximum to minimum in step of 1/32.
> >
> > \version "2.19.80"
> > right = \fixed c'' { c1 }
> >
> > dynamics = {
> > s32 \set Voice.midiExpression=#1
> > s32 \set Voice.midiExpression=#0.96774
> > s32 \set Voice.midiExpression=#0.93548
> > s32 \set Voice.midiExpression=#0.90323
> [...]
> > }
> >
> > \score {
> >   \new Staff \with { midiInstrument = "accordion"}
> >   \new Voice <<\right \dynamics>>
> >   \midi {}
> >   \layout {}
> > }
> 
> Well, that calls for something programmatic I think.
> 
> 
> Well, I was hoping that a nice guy pop up with your nice lily/scheme code:)  
> Thanks !!!
> 
> P.S.
> I didn't wrote the long list of "s32 \set Voice.midiExpression=#x" by 
> hand; I wrote some lines of code to generate them programmatically (much less 
> practical then your code but better than write them by hand). Here it is the 
> function I used:
> 
>         public string setVolume(float duration, int resolution, float 
> volumeStart, float volumeEnd)
>         {
>             int steps = (int)((1 / duration) / (1 / (float)resolution));
>             float val = (volumeStart - volumeEnd) / (steps - 1);
>             string s = "";
>             for (int i = 1; i <= steps; i++)
>             {
>                 s += "s" + resolution.ToString()+ " " + "\\set 
> Voice.midiExpression=#";
>                 s += Math.Round(volumeStart, 5).ToString() + "\n";
>                 volumeStart -= val;
>             }
>             return s;
>         }
> 

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


A problem with "placing grace notes between arpeggios and chords"

2017-11-14 Thread Robert Blackstone
Hello,

Snippet http://lsr.di.unimi.it/LSR/Item?id=410 shows an excellent way to insert 
a grace note between an arpeggio and the arpeggiated chord (BTW, the example is 
from Chopin's Nocturne No. 11 Op. 37, No. 1, not Op.37 No. 2 )

Anyway, in this form it compiles on my system. But since I prefer to use the 
real pitches, I commented out "\relative c' "  and adjusted all notes.
Result: the notes are perfect but there are no arpeggios any more. 

Why?
And what can I do to correct it (except going back to "\relative c' ")?

Thanks in advance for any advice.

Best regards, 
Robert Blackstone




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


Re: How do I apply patch files to my LilyPond binary on Windows?

2017-11-14 Thread Karlin High
On Tue, Nov 14, 2017 at 2:40 AM, Robert Murdoch  
wrote:



Now I'm wondering if I can apply the patch at
https://codereview.appspot.com/332990043 to my Windows binary file.


The patch is for .cc and .hh files, which to me says "C++ source code." 
I think it would take a god-like understanding of compilers and EXE 
files to "patch" a binary based on those. The expectation for binaries 
is replacement, not modification.


To get that patch before another release comes out, expect to follow the 
Contributor Guide for building LilyPond from source.


http://lilypond.org/doc/v2.19/Documentation/contributor/quick-start

Those instructions are all presuming usage of LilyDev Linux in 
VirtualBox. I gather you are working in Windows, and probably want to 
stay there. But unless you are comfortable with getting all the 
Linux-origin build tools and dependencies playing nice together on 
Windows, that LilyDev is the way to go.


The Contributor Guide also has instructions for producing a Windows EXE 
setup file, so it probably would be possible to get what you want from 
that. But if I was trying it, there is an excellent chance that another 
release would be out before I got it all working. :)


http://lilypond.org/gub/
http://lilypond.org/doc/v2.19/Documentation/contributor/notes-on-builds-with-gub
--
Karlin High
Missouri, USA

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


Re: A problem with "placing grace notes between arpeggios and chords"

2017-11-14 Thread David Kastrup
Robert Blackstone  writes:

> Hello,
>
> Snippet http://lsr.di.unimi.it/LSR/Item?id=410 shows an excellent way
> to insert a grace note between an arpeggio and the arpeggiated chord
> (BTW, the example is from Chopin's Nocturne No. 11 Op. 37, No. 1, not
> Op.37 No. 2 )
>
> Anyway, in this form it compiles on my system. But since I prefer to
> use the real pitches, I commented out "\relative c' " and adjusted all
> notes.
> Result: the notes are perfect but there are no arpeggios any more. 
>
> Why?
> And what can I do to correct it (except going back to "\relative c' ")?
>
> Thanks in advance for any advice.



-- 
David Kastrup

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


Re: A problem with "placing grace notes between arpeggios and chords"

2017-11-14 Thread Ben

On 11/14/2017 7:23 AM, Robert Blackstone wrote:

Hello,

Snippet http://lsr.di.unimi.it/LSR/Item?id=410 shows an excellent way to insert 
a grace note between an arpeggio and the arpeggiated chord (BTW, the example is 
from Chopin's Nocturne No. 11 Op. 37, No. 1, not Op.37 No. 2 )

Anyway, in this form it compiles on my system. But since I prefer to use the real 
pitches, I commented out "\relative c' "  and adjusted all notes.
Result: the notes are perfect but there are no arpeggios any more.

Why?
And what can I do to correct it (except going back to "\relative c' ")?

Thanks in advance for any advice.

Best regards,
Robert Blackstone




Hi Robert,

First, I opened the snippet you linked to in Frescobaldi.
Then, I converted all relative pitches to absolute using the built-in 
function, one mouse click did it all.


Here is the resulting code which compiles just fine, without errors.
Maybe you could compare to your code and see the mistake?

Hope this helps.
(see attached)

%
\version "2.19.80"
%% http://lsr.di.unimi.it/LSR/Item?id=410
%% see also http://www.lilypond.org/doc/v2.18/Documentation/snippets/chords

\score {
  \new PianoStaff { <<
    \new Staff {
  \clef treble \key es \major
  \override PhrasingSlur.positions = #'(2.5 . 2.2)
  \override Slur.minimum-length = #3
  4^\( 
  << {
    \acciaccatura bes'8\arpeggio
    \once \override NoteColumn.ignore-collision = ##t
    as'4
  }
  \new Voice { \voiceTwo
    \hideNotes \grace bes8\arpeggio
    \unHideNotes \oneVoice 4
  } >> 4\)\fermata |
  4^\( 
  << {
    \acciaccatura g'8\arpeggio
    \once \override NoteColumn.ignore-collision = ##t
    f'4
  }
  \new Voice { \voiceTwo
    \hideNotes \grace g8\arpeggio
    \unHideNotes \oneVoice 4
  } >> 4\)\fermata |
    }
    \new Staff {
  \clef bass \key es \major
  bes,4 es as, c\fermata |
 \fermata
    }
  >> }
  \layout {
    \context {
  \Staff
  \consists "Span_arpeggio_engraver"
  connectArpeggios = ##t
    }
  }
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: How do I apply patch files to my LilyPond binary on Windows?

2017-11-14 Thread Robert Murdoch
Understood. Sorry to hear it, though. Well, I'll try waiting out a bit 
more. Seems the devs are hard at work squashing bugs.



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


Re: A problem with "placing grace notes between arpeggios and chords"

2017-11-14 Thread Thomas Morley
2017-11-14 13:23 GMT+01:00 Robert Blackstone :
> Hello,
>
> Snippet http://lsr.di.unimi.it/LSR/Item?id=410 shows an excellent way to 
> insert a grace note between an arpeggio and the arpeggiated chord

Looking at the snippet, I thought what a mess. All those added Voices,
hide and unhide Notes, ignore-collision ...

Thus I come up with below.
Single draw-back so far: you'll need to use \grace and add the Slur manually.


\version "2.19.65"

#(define set-arpeggio-position
;; Sets Arpeggio.positions taken from the chord's note-heads ending the Slur
  (lambda (grob)
(if (grob::has-interface grob 'slur-interface)
(let* ((right-bound (ly:spanner-bound grob RIGHT))
   (right-note-column
 (if (grob::has-interface right-bound 'note-column-interface)
 right-bound
 (ly:grob-parent right-bound X)))
   (left-bound (ly:spanner-bound grob LEFT))
   (left-note-column (ly:grob-parent left-bound X))
   (staff-space
 (ly:output-def-lookup (ly:grob-layout grob) 'staff-space))
   (note-heads (ly:grob-object right-note-column 'note-heads))
   (staff-pos-ls
 (if (ly:grob-array? note-heads)
 (sort
   (map
 (lambda (nh)
   (ly:grob-property nh 'staff-position))
 (ly:grob-array->list note-heads))
<)
 #f))
   (cond-elts (ly:grob-object left-bound 'conditional-elements))
   (arp-ls
 (if (ly:grob-array? cond-elts)
 (filter
   (lambda (arp)
 (grob::has-interface arp 'arpeggio-interface))
   (ly:grob-array->list cond-elts))
 '()))
   (arp (if (pair? arp-ls) (car arp-ls) #f))
   (arp-pos
 (if staff-pos-ls
 (interval-widen
   (cons
 (/ (car staff-pos-ls) 2)
 (/ (last staff-pos-ls) 2))
   (/ staff-space 2))
 #f)))
  (if (and arp arp-pos)
  (ly:grob-set-property! arp 'positions arp-pos))
#f

setArpeggioPosition =
\once \override Slur.before-line-breaking = #set-arpeggio-position

<<
  \new Staff {
\key ees \major

\override PhrasingSlur.positions = #'(2.5 . 2.2)
\phrasingSlurUp

4\(

\setArpeggioPosition
%% probably adjust the Slur a little:
\once \override Slur.minimum-length = 2
\shape #'((0 . 0) (-0.2 . -0.2) (-0.2 . -0.3) (-0.2 . -0.4)) Slur
\grace bes'8(\arpeggio
4
\fermata\)

\(

\setArpeggioPosition
%% probably adjust the Slur a little:
\once \override Slur.minimum-length = 2
\shape #'((0 . 0) (-0.2 . -0.2) (-0.2 . -0.3) (-0.2 . -0.4)) Slur
\grace g'8(\arpeggio
4
\fermata\)
  }

  \new Staff {
\clef bass
\key es \major
bes,4 es as, c,\fermata |



\fermata
  }
>>

Regards,
  Harm

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


Re: double time signature problem

2017-11-14 Thread Karlin High

On 11/14/2017 2:39 AM, David Kastrup wrote:

Luther basically has been the last major such moment in German, with the
shift from Mittelhochdeutsch already being behind.


Here's a "very short introduction" to the German language. It's aimed at 
English speakers, and has a few paragraphs of origins, history, and 
compare-and-contrast with English.


http://www.germanstudies.org.uk/vsigerman.htm

Love that site for its Early New High German online dictionary.

And I just learned something there:

"Der Hund hat den Mann gebissen" and
"Den Mann hat der Hund gebissen"
both mean "The dog has bitten the man".

I knew the Russian language had that word-order feature/bug, but didn't 
realize German did too. My knowledge of German is mostly limited to a 
Schwäbisch-Pfälzisch dialect filtered through 12 generations in America.

--
Karlin High
Missouri, USA

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


Re: double time signature problem

2017-11-14 Thread Wols Lists
On 14/11/17 16:50, Karlin High wrote:
> And I just learned something there:
> 
> "Der Hund hat den Mann gebissen" and
> "Den Mann hat der Hund gebissen"
> both mean "The dog has bitten the man".
> 
> I knew the Russian language had that word-order feature/bug, but didn't
> realize German did too. My knowledge of German is mostly limited to a
> Schwäbisch-Pfälzisch dialect filtered through 12 generations in America.

This is actually a *normal* feature of most languages. English is
actually very unusual in that nouns, for the most part, do not visibly
decline (that is - the form used remains the same regardless of whether
the noun is subject, object, dative, whatever. The only visible change
is the addition of 's for the genitive).

"der Hund" means "the dog (subject)", and "den Mann" means "the man
(object)", so it's perfectly clear who bit whom, regardless of where the
word is in the sentence.

You can get confusion, because in German they decline the word "the",
and combined with a noun that changes in the right way, you might get it
all ambiguous.

It's the same with gender - and that can also be confusing especially
when making a diminutive. "Die Frau" (feminine), "Das Fraulein"
(neuter). "Die Mad", "Das Madchen" likewise. Again, here English is very
unusual because words do not have a gender (the objects they refer to
may, but that's different ... :-)

Cheers,
Wol

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


Re: A problem with "placing grace notes between arpeggios and chords"

2017-11-14 Thread Thomas Morley
2017-11-14 17:39 GMT+01:00 Thomas Morley :
> 2017-11-14 13:23 GMT+01:00 Robert Blackstone :
>> Hello,
>>
>> Snippet http://lsr.di.unimi.it/LSR/Item?id=410 shows an excellent way to 
>> insert a grace note between an arpeggio and the arpeggiated chord
>
> Looking at the snippet, I thought what a mess. All those added Voices,
> hide and unhide Notes, ignore-collision ...
>
> Thus I come up with below.
> Single draw-back so far: you'll need to use \grace and add the Slur manually.

To circumvent it I topped my chutzpah with below.
With \arpeggioAcciaccatura there's no need anymore to type \arpeggio
or start/end Slurs expecitely.
\arpeggioAcciaccatura takes an optional argument which specifies the
note-event from the target-chord which should be the right-bound of
the chord.
This happens in typed order, defaulting to the first typed note-event.

\version "2.19.65"

#(define (set-arpeggio-position idx)
;; Sets Arpeggio.positions taken from the chord's note-heads ending the Slur
  (lambda (grob)
(if (grob::has-interface grob 'slur-interface)
(let* ((right-bound (ly:spanner-bound grob RIGHT))
   (right-note-column
 (if (grob::has-interface right-bound 'note-column-interface)
 right-bound
 (ly:grob-parent right-bound X)))
   (left-bound (ly:spanner-bound grob LEFT))
   (left-note-column (ly:grob-parent left-bound X))
   (staff-space
 (ly:output-def-lookup (ly:grob-layout grob) 'staff-space))
   (note-heads (ly:grob-object right-note-column 'note-heads))
   (staff-pos-ls
 (if (ly:grob-array? note-heads)
 (sort
   (map
 (lambda (nh)
   (ly:grob-property nh 'staff-position))
 (ly:grob-array->list note-heads))
<)
 #f))
   (cond-elts (ly:grob-object left-bound 'conditional-elements))
   (arp-ls
 (if (ly:grob-array? cond-elts)
 (filter
   (lambda (arp)
 (grob::has-interface arp 'arpeggio-interface))
   (ly:grob-array->list cond-elts))
 '()))
   (arp (if (pair? arp-ls) (car arp-ls) #f))
   (arp-pos
 (if staff-pos-ls
 (interval-widen
   (cons
 (/ (car staff-pos-ls) 2)
 (/ (last staff-pos-ls) 2))
   (/ staff-space 2))
 #f)))
  (if (and (ly:grob-array? note-heads)
   (> (ly:grob-array-length note-heads) idx))
  (ly:spanner-set-bound!
grob RIGHT (list-ref (ly:grob-array->list note-heads) idx))
  (ly:warning
"Referenced note-head does not exist in ~a, idx ~a too high?
Ignoring."
note-heads
idx)
  )
  (if (and arp arp-pos)
  (ly:grob-set-property! arp 'positions arp-pos))
#f

setArpeggioPosition =
#(define-music-function (val)(index?)
#{
  \once \override Slur.before-line-breaking = #(set-arpeggio-position val)
#})


startArpeggioAcciaccaturaMusic =  {
  <>\startGraceSlur\arpeggio
  \temporary \override Flag.stroke-style = #"grace"
}

stopArpeggioAcciaccaturaMusic =  {
  \revert Flag.stroke-style
  <>\stopGraceSlur
}

#(defmacro-public def-my-grace-function (start stop . docstring)
  "Helper macro for defining grace music"
  `(define-music-function (idx music) ((index? 0) ly:music?)
 ,@docstring
 (make-music
   'GraceMusic
   'element
 (make-music
   'SequentialMusic
   'elements
 (list
   #{
 \setArpeggioPosition $idx
  $(ly:music-deep-copy ,start)
   #}
   music
   (ly:music-deep-copy ,stop))

arpeggioAcciaccatura =
#(def-my-grace-function
   startArpeggioAcciaccaturaMusic
   stopArpeggioAcciaccaturaMusic
   (_i "Create an acciaccatura from the following music expression.
The Slur-end is bound to the note-head specified by an optional argument, which
should be an index. If not present the Slur is bound to the first typed
note-event of the chord
   "))

<<
  \new Staff {
\key ees \major

\override PhrasingSlur.positions = #'(2.5 . 2.2)
\phrasingSlurUp

4\(

%\setArpeggioPosition 2
%% probably adjust the Slur a little:
\once \override Slur.minimum-length = 2
\shape #'((0 . 0) (-0.2 . -0.2) (-0.2 . -0.3) (-0.2 . -0.4)) Slur
\arpeggioAcciaccatura 2 bes'8
4
\fermata\)
\(


%% probably adjust the Slur a little:
\once \override Slur.minimum-length = 2
\shape #'((0 . 0) (-0.2 . -0.2) (-0.2 . -0.3) (-0.2 . -0.4)) Slur
\arpeggioAcciaccatura 2 g'8

Re: A problem with "placing grace notes between arpeggios and chords"

2017-11-14 Thread Robert Blackstone
Thank you very much, Harm.
Two solutions. No way that I would ever have been able to figure this out. I'm 
very impressed.

The "bad news" is that only the first part of my problem is solved. What I 
would need is a cross-staff arpeggio that includes the bass notes (in this 
testfile; the, or a, real occurrence is in bar 91 of Chopin's Nocturne Op. 37 
No. 2. Another nasty problem is in bar 119 of the same Nocturne. ) 

Thanks again.
Best regards,

Robert Blackstone





On 14 Nov 2017, at 18:57 , Thomas Morley  wrote:

> 2017-11-14 17:39 GMT+01:00 Thomas Morley :
>> 2017-11-14 13:23 GMT+01:00 Robert Blackstone :
>>> Hello,
>>> 
>>> Snippet http://lsr.di.unimi.it/LSR/Item?id=410 shows an excellent way to 
>>> insert a grace note between an arpeggio and the arpeggiated chord
>> 
>> Looking at the snippet, I thought what a mess. All those added Voices,
>> hide and unhide Notes, ignore-collision ...
>> 
>> Thus I come up with below.
>> Single draw-back so far: you'll need to use \grace and add the Slur manually.
> 
> To circumvent it I topped my chutzpah with below.
> With \arpeggioAcciaccatura there's no need anymore to type \arpeggio
> or start/end Slurs expecitely.
> \arpeggioAcciaccatura takes an optional argument which specifies the
> note-event from the target-chord which should be the right-bound of
> the chord.
> This happens in typed order, defaulting to the first typed note-event.
> 
> \version "2.19.65"
> 
> #(define (set-arpeggio-position idx)
> ;; Sets Arpeggio.positions taken from the chord's note-heads ending the Slur
>  (lambda (grob)
>(if (grob::has-interface grob 'slur-interface)
>(let* ((right-bound (ly:spanner-bound grob RIGHT))
>   (right-note-column
> (if (grob::has-interface right-bound 'note-column-interface)
> right-bound
> (ly:grob-parent right-bound X)))
>   (left-bound (ly:spanner-bound grob LEFT))
>   (left-note-column (ly:grob-parent left-bound X))
>   (staff-space
> (ly:output-def-lookup (ly:grob-layout grob) 'staff-space))
>   (note-heads (ly:grob-object right-note-column 'note-heads))
>   (staff-pos-ls
> (if (ly:grob-array? note-heads)
> (sort
>   (map
> (lambda (nh)
>   (ly:grob-property nh 'staff-position))
> (ly:grob-array->list note-heads))
><)
> #f))
>   (cond-elts (ly:grob-object left-bound 'conditional-elements))
>   (arp-ls
> (if (ly:grob-array? cond-elts)
> (filter
>   (lambda (arp)
> (grob::has-interface arp 'arpeggio-interface))
>   (ly:grob-array->list cond-elts))
> '()))
>   (arp (if (pair? arp-ls) (car arp-ls) #f))
>   (arp-pos
> (if staff-pos-ls
> (interval-widen
>   (cons
> (/ (car staff-pos-ls) 2)
> (/ (last staff-pos-ls) 2))
>   (/ staff-space 2))
> #f)))
>  (if (and (ly:grob-array? note-heads)
>   (> (ly:grob-array-length note-heads) idx))
>  (ly:spanner-set-bound!
>grob RIGHT (list-ref (ly:grob-array->list note-heads) idx))
>  (ly:warning
>"Referenced note-head does not exist in ~a, idx ~a too high?
> Ignoring."
>note-heads
>idx)
>  )
>  (if (and arp arp-pos)
>  (ly:grob-set-property! arp 'positions arp-pos))
>#f
> 
> setArpeggioPosition =
> #(define-music-function (val)(index?)
> #{
>  \once \override Slur.before-line-breaking = #(set-arpeggio-position val)
> #})
> 
> 
> startArpeggioAcciaccaturaMusic =  {
>  <>\startGraceSlur\arpeggio
>  \temporary \override Flag.stroke-style = #"grace"
> }
> 
> stopArpeggioAcciaccaturaMusic =  {
>  \revert Flag.stroke-style
>  <>\stopGraceSlur
> }
> 
> #(defmacro-public def-my-grace-function (start stop . docstring)
>  "Helper macro for defining grace music"
>  `(define-music-function (idx music) ((index? 0) ly:music?)
> ,@docstring
> (make-music
>   'GraceMusic
>   'element
> (make-music
>   'SequentialMusic
>   'elements
> (list
>   #{
> \setArpeggioPosition $idx
>  $(ly:music-deep-copy ,start)
>   #}
>   music
>   (ly:music-deep-copy ,stop))
> 
> arpeggioAcciaccatura =
> #(def-my-grace-function
>   startArpeggioAcciaccaturaMusic
>   stopArpeggioAcciaccaturaMusic
>   (_i "Create an acciaccatura from the following music expression.
> The Slur-end is bound to the note-head specified by an optional argum

Re: A problem with "placing grace notes between arpeggios and chords"

2017-11-14 Thread Robert Blackstone

 Hi Ben (I assume that is your name),

Thank you very much. I recognized my stupid mistakes, one a typo, the other an 
oversight when I converted the relative pitches into the absolute pitches. 
I simply did not notice that the same grace-note is bes'8 on its first 
occurrence and bes8 on the second, and I do not understand why that should be 
like this.

My next puzzle is to extend the arpeggio to the bass-note below the chord but I 
doubt I will find a solution or a tweak.

Best regards,

Robert Blackstone


 
On 14 Nov 2017, at 15:52 , Ben  wrote:

> On 11/14/2017 7:23 AM, Robert Blackstone wrote:
>> Hello,
>> 
>> Snippet http://lsr.di.unimi.it/LSR/Item?id=410 shows an excellent way to 
>> insert a grace note between an arpeggio and the arpeggiated chord (BTW, the 
>> example is from Chopin's Nocturne No. 11 Op. 37, No. 1, not Op.37 No. 2 )
>> 
>> Anyway, in this form it compiles on my system. But since I prefer to use the 
>> real pitches, I commented out "\relative c' "  and adjusted all notes.
>> Result: the notes are perfect but there are no arpeggios any more. 
>> 
>> Why?
>> And what can I do to correct it (except going back to "\relative c' ")?
>> 
>> Thanks in advance for any advice.
>> 
>> Best regards, 
>> Robert Blackstone
>> 
>> 
> 
> Hi Robert,
> 
> First, I opened the snippet you linked to in Frescobaldi. 
> Then, I converted all relative pitches to absolute using the built-in 
> function, one mouse click did it all.
> 
> Here is the resulting code which compiles just fine, without errors. 
> Maybe you could compare to your code and see the mistake? 
> 
> Hope this helps.
> (see attached)
> 
> %
> \version "2.19.80"
> %% http://lsr.di.unimi.it/LSR/Item?id=410
> %% see also http://www.lilypond.org/doc/v2.18/Documentation/snippets/chords
> 
> \score {
>   \new PianoStaff { <<
> \new Staff {
>   \clef treble \key es \major
>   \override PhrasingSlur.positions = #'(2.5 . 2.2)
>   \override Slur.minimum-length = #3
>   4^\( 
>   << {
> \acciaccatura bes'8\arpeggio
> \once \override NoteColumn.ignore-collision = ##t
> as'4
>   }
>   \new Voice { \voiceTwo
> \hideNotes \grace bes8\arpeggio
> \unHideNotes \oneVoice 4
>   } >> 4\)\fermata |
>   4^\( 
>   << {
> \acciaccatura g'8\arpeggio
> \once \override NoteColumn.ignore-collision = ##t
> f'4
>   }
>   \new Voice { \voiceTwo
> \hideNotes \grace g8\arpeggio
> \unHideNotes \oneVoice 4
>   } >> 4\)\fermata |
> }
> \new Staff {
>   \clef bass \key es \major
>   bes,4 es as, c\fermata |
>  \fermata
> }
>   >> }
>   \layout {
> \context {
>   \Staff
>   \consists "Span_arpeggio_engraver"
>   connectArpeggios = ##t
> }
>   }
> }
> ___
> 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: double time signature problem

2017-11-14 Thread Blöchl Bernhard

...
(neuter). "Die Mad", "Das Madchen" likewise. Again, here English is 
very

unusual ...


I argue there is meant "Die Magd", "das Mädchen" for maid/maiden in the 
job sensefarmgirl or maidservant. I argue Magd instead of Mad. (My 
talent for languages is absolutely nought.)


Regards



Cheers,
Wol

___
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: A problem with "placing grace notes between arpeggios and chords"

2017-11-14 Thread Thomas Morley
2017-11-14 20:08 GMT+01:00 Robert Blackstone :
> Thank you very much, Harm.
> Two solutions. No way that I would ever have been able to figure this out. 
> I'm very impressed.
>
> The "bad news" is that only the first part of my problem is solved. What I 
> would need is a cross-staff arpeggio that includes the bass notes (in this 
> testfile; the, or a, real occurrence is in bar 91 of Chopin's Nocturne Op. 37 
> No. 2. Another nasty problem is in bar 119 of the same Nocturne. )
>

Comparing the different editions at IMSLP, I'd say say there's a wide
variety how this piece is typeset.

Here some coding-thoughts:

\score {
  <<
\new Staff {
  \grace { \once \hideNotes e'8\arpeggio }
  e'4
}
\new Staff
{ \clef bass
<<
  \new Voice {
\voiceOne
\once \slurDown
\grace e8_~\arpeggio 2.
  }
  \new Voice { \voiceTwo  }
>>
}
  >>

  \layout {
\context {
  \Score
  \consists "Span_arpeggio_engraver"
  connectArpeggios = ##t
}
  }
}


\score {
  <<
\new Staff <<
  \key g \major
  \new Voice {
  s1
\voiceOne
ais''4\arpeggio
  }
  \new Voice {
  s1
  \set tieWaitForNote = ##t

  \grace {
\once \override Slur.positions = #'(3 . 5)
  b'16[^( b'~ dis''-\tweak minimum-length #5 _~]
  }
  \voiceFour
  \dotsUp
  2.\arpeggio)
  }
  \new Voice {
  s1
\voiceTwo ais'4
  }
  >>
\new Staff {
  \key g \major
  \clef bass
  s1
  2.\arpeggio
}
  >>

  \layout {
\context {
  \Score
  \consists "Span_arpeggio_engraver"
  connectArpeggios = ##t
}
  }
}


Cheers,
  Harm

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


Re: Tuplets curved brackets?

2017-11-14 Thread Jacques Menu Muzhic
Hello David,

\single it not the solution, but \temporary…\undo is.

Thanks for your help!

JM
 
> Le 14 nov. 2017 à 13:42, David Kastrup  a écrit :
> 
> Jacques Menu Muzhic  writes:
> 
>> Hello Ben,
>> 
>> How can one undo the effect of tupletBracketToSlur to use it on a
>> per-tuplet basis?
>> Prefixing it with \once is not a solution I’ve seen.
>> 
>> Below, I’d like the third triplet to use square brackets again:
>> 
>> {
>>  a a \tuplet 3/2 { a8 a a }  a4 | %!
>>  \tupletBracketToSlur   % HERE OK
>>  a a \tuplet 3/2 { a8 a a }  a4
>>  % AND THERE ???
>>  a a \tuplet 3/2 { a8 a a }  a4
>> }
>> 
> 
> Untested, but try using
> 
>   \temporary \tupletBracketToSlur
>   ...
>   \undo \tupletBracketToSlur
> 
> -- 
> David Kastrup

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


Re: How do I apply patch files to my LilyPond binary on Windows?

2017-11-14 Thread Simon Albrecht

On 14.11.2017 09:40, Robert Murdoch wrote:
Now I'm wondering if I can apply the patch at 
https://codereview.appspot.com/332990043 to my Windows binary file.


No you can’t, since the patch changes the C++ part which is compiled to 
form the binary. So you’d have to build LilyPond yourself – or indeed 
wait till the next development release (normally these happen once every 
two weeks – the schedule might be more irregular now due to preparations 
for the stable release).


Best, Simon

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


[OT] Grammatic gender

2017-11-14 Thread Simon Albrecht

On 14.11.2017 18:54, Wols Lists wrote:

It's the same with gender - and that can also be confusing especially
when making a diminutive. "Die Frau" (feminine), "Das Fraulein"
(neuter). "Die Mad", "Das Madchen" likewise.


Actually, the base word is „Die Maid“. Mark Twain has famously and 
hilariously roasted the German language, partly for its use of grammatic 
gender :-)



  Again, here English is very
unusual because words do not have a gender (the objects they refer to
may, but that's different ... :-)


How would that be true? It may seem so, because the articles for all 
three genders are the same, but words are referred to by ‘he’, ‘she’, or 
‘it’. In English the sun is male, the moon female (like in most 
languages, and unlike in German, where it’s the other way around). Only 
yesterday I talked with an American native english speaker about the 
grammatic gender of death; she said it could be all three, depending on 
circumstances…


Best, Simon

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


Re: double time signature problem

2017-11-14 Thread Simon Albrecht

On 14.11.2017 20:36, Blöchl Bernhard wrote:

(neuter). "Die Mad", "Das Madchen" likewise. Again, here English is very
unusual ...


I argue there is meant "Die Magd"


The diminutive of „Magd“ is „Mägdelein“ or maybe „Mägdchen“ (nobody 
would use the latter), but not „Mädchen“.


Best, Simon

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


Re: double time signature problem

2017-11-14 Thread Noeck

> The diminutive of „Magd“ is „Mägdelein“ or maybe „Mägdchen“ (nobody
> would use the latter), but not „Mädchen“.

But still "Mädchen" seems to be derived from "Magd":
http://www.wissen.de/wortherkunft/maedchen

Cheers,
Joram

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


Re: [OT] Grammatic gender

2017-11-14 Thread Andrew Bernard
Hi Simon,

As a native English speaker, allow me to say that the examples you have
given are not grammatical gender but literary. English does not have such a
thing. Since there are no gendered definite or indefinite articles ('the',
'a') there is just no such concept in English grammar.

Often people refer to boats as 'she', but that's not a part of grammar. As
for 'grammatic gender of death' - it's pure tosh, I am sorry. For a start,
death cannot have a gender as it is an abstract noun. Any such description
is purely literary. As an aside, although 'grammatic' is considered to be
in current use, most people now would use the form 'grammatical', the most
recent example of use in the Oxford English Dictionary II being 1889. [But
I have no objection to using older and obsolete words - in fact, I love it!]

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