Re: midiExpression in voices with Staff_performer

2019-04-15 Thread Leo Correia de Verdier
Dear list! 

Can any of you check this for possible mistakes so I can rule out myself as 
source of error before I send it in as a bug report?

Love
/Leo


> 11 feb. 2019 kl. 11:14 skrev Leo Correia de Verdier 
> :
> 
> Dear list!
> 
> I’m trying to add different midiExpressions to a staff with two voices on 
> different midi channels. The problem I have is that \set midiExpression only 
> seems to work if placed before the first note of a voice. Subsequent \set-s 
> don’t appear in the output midi file. The following \set midiExpression works 
> as long as Staff_performer is in its original place in the staff context, but 
> I can’t get it to work with it moved to Voice. I still think it is something 
> I’m doing wrong, but it might be a bug.
> 
> \version "2.19.82"
> \score {
>  \new Staff <<
>\new Voice \relative c''' {
>  \set midiExpression = #.1
>  \voiceOne
>  g1 
>  \set midiExpression = #.4 %this doesn't make it to the output midi file
>  e 
>}
>\new Voice \relative c'' {
>  \voiceTwo
>  b1 c
>} >>
>  \layout { }
>  \midi {
>\context {
>  \Staff
>  \remove "Staff_performer"
>}
>\context {
>  \Voice
>  \consists "Staff_performer"
>}
>  }
> }


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


Re: A LilyPond Café in Paris

2019-04-15 Thread Mathieu Demange
Hello,

Thanks for the very positive feedback! Part of the plan was also to provide 
open documentation and communication material to everyone willing to organise a 
« Café Lily » around the corner. Indeed, a post on lilypondblog.org 
 is a very good idea (especially if it could also 
host, or at least provide a link to this « toolkit »). I’m currently working on 
releasing the poster-kit as a GIMP file (with a CC-0 license thanks to my 
friend William Lamy, who designed it).

Best,

Mathieu

> On 10 Apr 2019, at 00:36, Urs Liska  wrote:
> 
> 
> Am 08.04.19 um 16:30 schrieb Karlin High:
>> On 4/8/2019 9:06 AM, Abraham Lee wrote:
>>> I think you should a write-up on lilypondblog.org 
>>> , even a quick one would be great!
>> 
>> +1
>> 
>> I was thinking the same thing. If others elsewhere want to organize similar 
>> events, it could be helpful to hear how this one went.
> 
> 
> Don't hesitate contacting me or Paul Morris. We'll create an account for 
> anyone volunteering for this.
> 
> Urs
> 
> 
> ___
> 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


Slur with left and/or right arrow head

2019-04-15 Thread Lukas-Fabian Moser

Folks,

in https://archiv.lilypondforum.de/index.php?topic=1744.msg9669#msg9669, 
Harm invented a truly wonderful new feature allowing to add an arrow 
head to the right end of a Slur (or, for that matter, a Tie, 
PhrasingSlur etc.). I reproduce it here with only trivial changes 
(mainly omitting parser/location).


Now I also need slurs with arrows pointing to the left (and ideally, 
also the option to have an arrow tip at both ends of the Slur). At first 
glance the asymmetry favoring the right hand side of a Slur seems to be 
hard-coded pretty deeply in Harm's code. Is there a cheap way to add a 
choice of "left or right end" (if not even the "or/and" possibility)?


Best
Lukas


\version "2.19.82"

#(define grob-name
  (lambda (x)
    (if (ly:grob? x)
    (assq-ref (ly:grob-property x 'meta) 'name)
    (ly:error "~a is not a grob" x

#(define (add-arrow-head-to-curve control-points)
  (lambda (grob)
    (let* ((orig (if (ly:spanner? grob)
 (ly:grob-original grob)
 #f))
   (siblings (if (ly:grob? orig)
 (ly:spanner-broken-into orig)
 '()))
   (function (assoc-get 'stencil
 (reverse (ly:grob-basic-properties grob
   (stil ;; Ugh, is there no better way to test that a grob has no
   ;; 'stencil and that no other previous procedure 
assigned

   ;; a stencil-value to said grob?
   (if (and (procedure? function)
    (not (eq? (procedure-name function)
  'add-arrow-head-to-curve)))
   (function grob)
   (begin
 (ly:warning "~a has no stencil. Ignoring." grob)
 #f
   (if (or (null? siblings)
   (equal? grob (car (last-pair siblings
   (let* ((default-stil-lngth
    (interval-length (ly:stencil-extent stil X)))
  (frst (car control-points))
  (thrd (caddr control-points))
  (frth (cadddr control-points))
  (delta-x-cps (- (car frth) (car frst)))
  ;; Get the difference between stil-length and the 
distance

  ;; of first-to-last control-point
  (diff (- default-stil-lngth delta-x-cps))
  ;; Get the legs of the triangle at third/fourth control-
  ;; point.
  (delta-iv
    (cons (- (car frth) (car thrd)) (- (cdr frth) (cdr 
thrd
  (radians->degree (lambda (radians) (/ (* radians 180) 
PI)))
  (angl (radians->degree (atan (cdr delta-iv) (car 
delta-iv

  ;; Ties seems to need a lower angle
  (ang (if (member (grob-name grob)
  '(Tie RepeatTie LaissezVibrerTie))
   (* angl 0.75)
   angl))
  (arrowhead-stil (ly:font-get-glyph 
(ly:grob-default-font grob)

    "arrowheads.open.01"))
  ;; The arrowhead is too small for Tie
  (arrowhead (if (eq? 'Tie (grob-name grob))
 (ly:stencil-scale arrowhead-stil 1.7 1.7)
 arrowhead-stil))
  (rotated-arrowhead (ly:stencil-rotate arrowhead ang 0 0))
  (arrowhead-lngth
    (interval-length (ly:stencil-extent 
rotated-arrowhead X


 (ly:stencil-add
   stil
   (ly:stencil-translate
 rotated-arrowhead
 ;; Ugh, 3.8 found by trial and error
 (cons (+ diff (/ arrowhead-lngth 3.8) (car frth))
   (+ (cdr frth) 0)
    stil

#(define arrowed-curve
  (lambda (grob)
    (let* ((curve-dir (ly:grob-property grob 'direction))
   (right-bound (if (ly:spanner? grob)
    (ly:spanner-bound grob RIGHT)
    #f))
   (right-bound-stem (if (ly:grob? right-bound)
 (ly:grob-object right-bound 'stem)
 #f))
   (right-bound-stem-dir
 (if (ly:grob? right-bound-stem)
 (ly:grob-property right-bound-stem 'direction)
 #f))
   (c-ps (ly:grob-property grob 'control-points))
   ;(function (assoc-get 'control-points
   ; (reverse (ly:grob-basic-properties 
grob

   ;(c-pss (function grob))
   (frst (car c-ps))
   (thrd (caddr c-ps))
   ;; corr-values are my choice.
   ;; A little space is needed to make room for the arrowhead
   (corr (cond ((eq? (grob-name grob) 'RepeatTie)
    (cons -0.25 (* 0.3 

Re: tag issue

2019-04-15 Thread Gianmaria Lari
On Sat, 13 Apr 2019 at 13:06, Thomas Morley 
wrote:

> Am Sa., 13. Apr. 2019 um 12:20 Uhr schrieb Gianmaria Lari
> :
> >
> > Harm, if I understood corretly the code:
> >
> > \version "2.18.2"
> > \tagGroup #'(testOne testTwo)
> >
> > music = {
> >   \tag #'testOne a
> >   \tag #'testTwo b
> > }
> > \keepWithTag #'testOne {\music~\music}
> >
> >
> > is converted to:
> >
> > \keepWithTag #'testOne  {
> >
> >   \tag #'testOne a
> >   \tag #'testTwo b
> > ~
> >   \tag #'testOne a
> >   \tag #'testTwo b
> >
> > }
> >
> >
> > But then why lilypond removes the tie? Shouldn't just remove the
> expression following testTwo that is "b" ?
>
> Some steps back.
> (1) How are Ties done in LilyPond?
> For note-events a TieEvent is added to the note's articulations-property,
> see:
> \void \displayMusic b4~


I tried your examples and now I understood perfectly how does it works.
Everything is very clear now.
Thanks a lot, g.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Polymetric bar lines and bar numbering

2019-04-15 Thread Graham King


> On 15 Apr 2019, at 11:04, tapani  wrote:
> 
> I have created a polymetric score with independent bar lines in different
> parts, using the instructions here: 
> http://lilypondblog.org/2014/05/independent-meters/
>   
> 
> However, this option turns off bar numbering in the score. Adding it
> explicitly like this doesn't work:
> 
>  \context {
>\Score
>\remove "Timing_translator"
>\remove "Default_bar_line_engraver"
>\consists "Bar_number_engraver"
>  }
> 
> I tried adding \consists "Bar_number_engraver" to the Staff context, but now
> the bar numbers are printed for every part, rather than the score (as one
> would expect...).
> 
> How can I restore bar numbering to the score?
> 
> Many thanks. Tapani
> 

I suspect that the best you can hope for is bar-numbering for the top stave of 
the score.

There is a long thread about this[1], in which the first post has an attachment 
that _might_ help you.  The conclusion that I drew from the discussion was that 
bar numbering in polymetric scores is a can of worms, to be avoided unless the 
specific use-case is simple enough to side-step the problems that arise.

Have a look through the thread and see what you think.

HTH
- Graham

[1] the thread starts at 
https://lists.gnu.org/archive/html/lilypond-user/2015-11/msg00187.html 
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Polymetric bar lines and bar numbering

2019-04-15 Thread tapani
I have created a polymetric score with independent bar lines in different
parts, using the instructions here: 
http://lilypondblog.org/2014/05/independent-meters/
  

However, this option turns off bar numbering in the score. Adding it
explicitly like this doesn't work:

  \context {
\Score
\remove "Timing_translator"
\remove "Default_bar_line_engraver"
\consists "Bar_number_engraver"
  }

I tried adding \consists "Bar_number_engraver" to the Staff context, but now
the bar numbers are printed for every part, rather than the score (as one
would expect...).

How can I restore bar numbering to the score?

Many thanks. Tapani



--
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: More on outline list numbering markup

2019-04-15 Thread Andrew Bernard
Hi Harm,

That post is great, thank you.

But I swear the creation of the macro is not mentioned in the 2.19 manuals.
I certainly looked hard. Should this be a documentation enhancement
request? Else tell me the exact reference please - that would be useful.

Andrew



On Mon, 15 Apr 2019 at 20:36, Thomas Morley 
wrote:

>
> > Where is this in the manuals?
>
> http://lilypond.org/doc/v2.19/Documentation/extending-big-page#markup-functions
> gives some explanations.
>
>
> Cheers,
>   Harm
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: More on outline list numbering markup

2019-04-15 Thread Thomas Morley
Am Mo., 15. Apr. 2019 um 12:12 Uhr schrieb Andrew Bernard
:

> My question is, where does the function make-counter-markup come from in this 
> code? Is this something that is created by the define-markup-command function 
> internally?
>
> If you have say
> #(define-markup-command (whizzo layout props)...
> does a function make-whizzo-markup get defined? What is the actual purpose of 
> such a function, if that is the case?

You may refer to my post here:
http://lists.gnu.org/archive/html/lilypond-user/2018-10/msg00358.html

> Where is this in the manuals?
http://lilypond.org/doc/v2.19/Documentation/extending-big-page#markup-functions
gives some explanations.


Cheers,
  Harm

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


More on outline list numbering markup

2019-04-15 Thread Andrew Bernard
Recently I posted a Scheme function to do outline list numbering in markup
for one of the list members. Completely unbeknownst to me, LSR 543 shows a
counter done in Scheme for markup. My code was developed entirely
independently. It's also more of a full outliner than a plain counter. But
LSR 543 is highly instructive.

My question is, where does the function make-counter-markup come from in
this code? Is this something that is created by the define-markup-command
function internally? LSR 543 code is appended for reference.

If you have say

#(define-markup-command (whizzo layout props)...

does a function make-whizzo-markup get defined? What is the actual purpose
of such a function, if that is the case?

Where is this in the manuals?

Andrew

#(define counter-alist '())

#(define-markup-command (counter layout props name) (string?)
  "Increases and prints out the value of the given counter named @var{name}.
  If the counter does not yet exist, it is initialized with 1."
  (let* ((oldval (assoc-ref counter-alist name))
 (newval (if (number? oldval) (+ oldval 1) 1)))
  (set! counter-alist (assoc-set! counter-alist name newval))
  (interpret-markup layout props
(markup (number->string newval)

#(define-markup-command (setcounter layout props name value) (string? number?)
  "Set the given counter named @var{name} to the given @var{value} and prints
  out the value. The counter does not yet have to exist."
  (set! counter-alist (assoc-set! counter-alist name (- value 1)))
  (interpret-markup layout props (make-counter-markup name)))
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Hide time signature in final partial measure

2019-04-15 Thread Thomas Liggett
On Sat, 13 Apr 2019 at 18:40, Michael Gerdau  wrote:
>
> Hi Thomas,
>
> just realized, I did not answer your original question.
>
> If you want the TimeSignature change and just not show it, you need to \omit 
> it in the Voice instead of the NullVoice.
>
> Kind regards,
> Michael
> --
> Michael Gerdau email: m...@qata.de
> GPG-keys available on request or at public keyserver

Hi Michael,

Thanks for your help – it pointed me in the direction of the manual in
which I discovered that NullVoice isn’t intended to be used for a
global-type voice (with time signatures, baronies etc.) but rather
just for aligning lyrics. So, as you say, replacing NullVoice with
Voice produces the expected behaviour.

Kind regards,
Thomas

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