How to organize a single piece of work with different versions?

2018-02-10 Thread Edmundo Carmona Antoranz
Hi!

As you might have noticed from previous mails I have sent, I'm working
on a project to process works from Bach on lilypond.

I have already put up BWV 1013 and 1030 (I dare you to guess the
instrument that I play). However, each one of them has many different
editions. Right now I have set up 2 editions of BWV 1030 (on top of
Bach's manuscript). Bach's manuscript is on 'master' and I have set up
1 branch for each of the other 2 editions (this also allows to be able
to see differences between the editions _relatively_ easily). I have
also set up different book name prefixes so that files (PDF and midi)
come out with different names as well (which requires switching
between branches in order to be able to generate the different
editions).

I would like to get your feedback to know if this is the right
approach or if I should try something different.

In case you want to take a look: https://github.com/eantoranz/bwv

Thanks in advance.

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


Re: how to donate to lilypond and/or openlilylib development?

2018-02-10 Thread Karlin High
On Sat, Feb 10, 2018 at 9:43 PM, Mason Hock  wrote:
>  is it possible to make a general donation, ideally a small recurring monthly 
> donation, to Lilypond and/or openlilylib?

I understand David Kastrup is the only full-time community-supported
developer. d...@gnu.org

http://lists.gnu.org/archive/html/lilypond-user/2017-05/msg00533.html

"In Europe's EURO zone [...] SEPA transfers are usually easiest
(account number on request) as the fees must not exceed in-country EUR
transfers. U.S. and U.K. and a number of other countries get fewer
fees via Paypal (this mail address works fine)."
-- 
Karlin High
Missouri, USA

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


how to donate to lilypond and/or openlilylib development?

2018-02-10 Thread Mason Hock
This link

http://lilypond.org/sponsoring.html

describes paying developers to implement specific features. Is this the only 
way to contribute to Lilypond financially, or is it possible to make a general 
donation, ideally a small recurring monthly donation, to Lilypond and/or 
openlilylib?

Thanks,

Mason

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


Pedal line to barline

2018-02-10 Thread Andrew Bernard
Some time ago I asked about how to extend a pedal line so that the off
event goes at the end of the note duration, for use usually at at the end
of a bar. Various people suggested that having a to-barline option would
make sense, similar to hairpins.

Can I propose that as an enhancement, assuming that it has not been created
yet as far as I know?

This would be so useful.

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


Re: does the custom \dynamic function create DynamicText grobs?

2018-02-10 Thread Kieren MacMillan
Hi Thomas,

This seems to work:

  \override DynamicText.after-line-breaking =
  #(lambda (grob) (ly:grob-suicide! grob))

But this is the Scheme equivalent of me shooting a machine gun with a blindfold 
on, so please tell me if I've done something wrong.

Thanks,
Kieren.

> On Feb 10, 2018, at 8:36 PM, Thomas Morley  wrote:
> 
> 2018-02-11 2:08 GMT+01:00 Kieren MacMillan :
>> Hi Thomas,
>> 
>> Thanks for the quick response.
>> 
>>> DynamicText is caused, but you can't nuke the stencil via
>>> \omit (which would be stencil-override).
>> 
>> Ah.
>> 
>>> But you could do it later.
>>> Applying
>>> \override DynamicText.after-line-breaking =
>>> #(lambda (grob) (ly:grob-set-property! grob 'stencil '()))
>>> will work, though.
>> 
>> That is like \hide rather than \omit, no?
>> (At least that's how it _appears_ to behave when I apply it to my 
>> non-minimal "real world" score.)
>> 
>> For now, this works fine — I'm just trying to blank out all dynamics, so I 
>> can print out a score and pencil in dynamics on the score, away from the 
>> computer — but I am curious if there's a real "stencil nuke" (in case I ever 
>> need to do it in an edition-engraver tweak, for example).
> 
> 
> 
> Well, not a real "stencil nuke", but in this case you could use
> X-offset and trash the stencil as a side-effect.
> 
> At least:
> {
>  \override DynamicText.X-offset ={
>  \override DynamicText.X-offset =
>#(lambda (grob) (ly:grob-set-property! grob 'stencil '()))
>  c'1
>-\tweak before-line-breaking
>  #(lambda (grob)
>(ly:grob-set-property! grob 'stencil
>  (grob-interpret-markup grob "very long dynamic")))
>-#(make-music 'AbsoluteDynamicEvent)
> }
>#(lambda (grob) (ly:grob-set-property! grob 'stencil '()))
>  c'1
>-\tweak before-line-breaking
>  #(lambda (grob)
>(ly:grob-set-property! grob 'stencil
>  (grob-interpret-markup grob "very long dynamic")))
>-#(make-music 'AbsoluteDynamicEvent)
> }
> seems to work.
> Not tested beyond this example, though.
> 
> Best,
>  Harm



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: does the custom \dynamic function create DynamicText grobs?

2018-02-10 Thread Thomas Morley
2018-02-11 2:36 GMT+01:00 Thomas Morley :
> 2018-02-11 2:08 GMT+01:00 Kieren MacMillan :
>> Hi Thomas,
>>
>> Thanks for the quick response.
>>
>>> DynamicText is caused, but you can't nuke the stencil via
>>> \omit (which would be stencil-override).
>>
>> Ah.
>>
>>> But you could do it later.
>>> Applying
>>> \override DynamicText.after-line-breaking =
>>>  #(lambda (grob) (ly:grob-set-property! grob 'stencil '()))
>>> will work, though.
>>
>> That is like \hide rather than \omit, no?
>> (At least that's how it _appears_ to behave when I apply it to my 
>> non-minimal "real world" score.)
>>
>> For now, this works fine — I'm just trying to blank out all dynamics, so I 
>> can print out a score and pencil in dynamics on the score, away from the 
>> computer — but I am curious if there's a real "stencil nuke" (in case I ever 
>> need to do it in an edition-engraver tweak, for example).
>
>
>
> Well, not a real "stencil nuke", but in this case you could use
> X-offset and trash the stencil as a side-effect.
>
> At least:
> {
>   \override DynamicText.X-offset ={
>   \override DynamicText.X-offset =
> #(lambda (grob) (ly:grob-set-property! grob 'stencil '()))
>   c'1
> -\tweak before-line-breaking
>   #(lambda (grob)
> (ly:grob-set-property! grob 'stencil
>   (grob-interpret-markup grob "very long dynamic")))
> -#(make-music 'AbsoluteDynamicEvent)
> }
> #(lambda (grob) (ly:grob-set-property! grob 'stencil '()))
>   c'1
> -\tweak before-line-breaking
>   #(lambda (grob)
> (ly:grob-set-property! grob 'stencil
>   (grob-interpret-markup grob "very long dynamic")))
> -#(make-music 'AbsoluteDynamicEvent)
> }
> seems to work.
> Not tested beyond this example, though.
>
> Best,
>   Harm

Argh, c/p-fail.
This is the code:
{
  \override DynamicText.X-offset =
#(lambda (grob) (ly:grob-set-property! grob 'stencil '()))
  c'1
-\tweak before-line-breaking
  #(lambda (grob)
(ly:grob-set-property! grob 'stencil
  (grob-interpret-markup grob "very long dynamic")))
-#(make-music 'AbsoluteDynamicEvent)
}

Cheers,
  Harm

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


Re: does the custom \dynamic function create DynamicText grobs?

2018-02-10 Thread Thomas Morley
2018-02-11 2:08 GMT+01:00 Kieren MacMillan :
> Hi Thomas,
>
> Thanks for the quick response.
>
>> DynamicText is caused, but you can't nuke the stencil via
>> \omit (which would be stencil-override).
>
> Ah.
>
>> But you could do it later.
>> Applying
>> \override DynamicText.after-line-breaking =
>>  #(lambda (grob) (ly:grob-set-property! grob 'stencil '()))
>> will work, though.
>
> That is like \hide rather than \omit, no?
> (At least that's how it _appears_ to behave when I apply it to my non-minimal 
> "real world" score.)
>
> For now, this works fine — I'm just trying to blank out all dynamics, so I 
> can print out a score and pencil in dynamics on the score, away from the 
> computer — but I am curious if there's a real "stencil nuke" (in case I ever 
> need to do it in an edition-engraver tweak, for example).



Well, not a real "stencil nuke", but in this case you could use
X-offset and trash the stencil as a side-effect.

At least:
{
  \override DynamicText.X-offset ={
  \override DynamicText.X-offset =
#(lambda (grob) (ly:grob-set-property! grob 'stencil '()))
  c'1
-\tweak before-line-breaking
  #(lambda (grob)
(ly:grob-set-property! grob 'stencil
  (grob-interpret-markup grob "very long dynamic")))
-#(make-music 'AbsoluteDynamicEvent)
}
#(lambda (grob) (ly:grob-set-property! grob 'stencil '()))
  c'1
-\tweak before-line-breaking
  #(lambda (grob)
(ly:grob-set-property! grob 'stencil
  (grob-interpret-markup grob "very long dynamic")))
-#(make-music 'AbsoluteDynamicEvent)
}
seems to work.
Not tested beyond this example, though.

Best,
  Harm

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


Re: does the custom \dynamic function create DynamicText grobs?

2018-02-10 Thread Kieren MacMillan
Hi Thomas,

Thanks for the quick response.

> DynamicText is caused, but you can't nuke the stencil via
> \omit (which would be stencil-override).

Ah.

> But you could do it later.
> Applying
> \override DynamicText.after-line-breaking =
>  #(lambda (grob) (ly:grob-set-property! grob 'stencil '()))
> will work, though.

That is like \hide rather than \omit, no?
(At least that's how it _appears_ to behave when I apply it to my non-minimal 
"real world" score.)

For now, this works fine — I'm just trying to blank out all dynamics, so I can 
print out a score and pencil in dynamics on the score, away from the computer — 
but I am curious if there's a real "stencil nuke" (in case I ever need to do it 
in an edition-engraver tweak, for example).

Thanks!
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: does the custom \dynamic function create DynamicText grobs?

2018-02-10 Thread Thomas Morley
2018-02-11 0:30 GMT+01:00 Kieren MacMillan :
> Hi Harm,
>
> Does the snippet below show expected behaviour from your custom \dynamic 
> function?
> I would have expected the \omit to affect both "dynamic texts"…
>
> Thanks,
> Kieren.
>
>   SNIPPET BEGINS
[...]

Hi Kieren,

in a nutshell the code works as this minimal:

{
  c'1
-\tweak before-line-breaking
  #(lambda (grob)
(ly:grob-set-property! grob 'stencil
  (grob-interpret-markup grob "ff")))
-#(make-music 'AbsoluteDynamicEvent)
}

So, yes DynamicText is caused, but you can't nuke the stencil via
\omit (which would be stencil-override).
But you could do it later.

Applying

\override DynamicText.after-line-breaking =
  #(lambda (grob) (ly:grob-set-property! grob 'stencil '()))

will work, though.

Cheers,
  Harm

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


does the custom \dynamic function create DynamicText grobs?

2018-02-10 Thread Kieren MacMillan
Hi Harm,

Does the snippet below show expected behaviour from your custom \dynamic 
function?
I would have expected the \omit to affect both "dynamic texts"…

Thanks,
Kieren.

  SNIPPET BEGINS
\version "2.19.64"

#(use-modules (ice-9 regex))

#(define (note-column::main-extent grob)
"Return extent of the noteheads in the 'main column', (i.e. excluding any 
suspended noteheads), or extent of the rest (if there are no heads)."
  (let* ((note-heads (ly:grob-object grob 'note-heads))
 (stem (ly:grob-object grob 'stem))
 (rest (ly:grob-object grob 'rest)))
(cond ((ly:grob-array? note-heads)
   (let (;; get the cdr from all note-heads-extents, where the car
 ;; is zero
 (n-h-right-coords
   (filter-map
 (lambda (n-h)
   (let ((ext (ly:grob-extent n-h grob X)))
  (and (= (car ext) 0) (cdr ext
 (ly:grob-array->list note-heads
 ;; better be paranoid, find the max of n-h-right-coords and return
 ;; a pair with (cons 0 )
 (cons 0.0 (reduce max 0 n-h-right-coords
  ((ly:grob? rest)
   (ly:grob-extent rest grob X))
  ;; better be paranoid
  (else '(0 . 0)

%% TODO #\space as well?
#(define char-set:dynamics
  (char-set #\f #\m #\p #\r #\s #\z))

%% TODO
%% There's the scheme-procedure `make-regexp', I'm not confident with reg-exps
%% to use it, though
#(define (make-reg-exp separator-pair)
  (format #f "\\~a[^~a~a]*\\~a"
(car separator-pair)
(car separator-pair)
(cdr separator-pair)
(cdr separator-pair)))

#(define (dynamics-list separator-pair strg)
;; Takes a string, which is splitted at space. Local reg-exp and separators are
;; processed from @var{separator-pair}.
;; Dynamic signs within the splitted string (which are rendered by separators)
;; are selected by matching reg-exp and by containing only dynamic characters
;; between the separators.
;;
;; Returns a new list containing not-dynamic strings and sublists with always
;; three entries.  Before-the-dynamic - dynamic - after-dynamic.
;;
;; Example:
;; (dynamics-list (cons #\{ #\}) "poco -{f}- piu"))
;; =>
;; (list "poco" (list "-" "f" "-") "piu")
;;
  (let ((reg-exp (make-reg-exp separator-pair))
(separators (char-set (car separator-pair) (cdr separator-pair
(map
  (lambda (s)
(let* ((match (string-match reg-exp s)))
   (if match
   (let* ((poss-dyn (match:substring match))
  (cand (string-trim-both poss-dyn separators)))
 (if (string-every char-set:dynamics cand)
   (list
 (match:prefix match)
 cand
 (match:suffix match))
 s))
   s)))
  (string-split strg #\space

#(define (get-all-list-indices lst)
"Takes a list and returns a new list of all indices of sublists in @var{lst}"
  (filter-map
(lambda (e c) (if (list? e) c #f))
lst
(iota (length lst

#(define (dynamic-text::format-dynamics fontsize markup-command lst)
;; (1) Convert lst into a list where the targeted string is rendered
;; with dynamic-markup.  The targeted string is identified by being
;; second in a three-element-(sub-)list of lst.
;; (2) remove empty strings from (sub-)lists.
;; (3) insert " " between any element of lst but not between
;; elements of the (sub-)lists
;; (4) Return a new list, unfolded one level
;; TODO disentangle applying markup-commands from other stuff?
(append-map
  (lambda (y) (if (list? y) y (list y)))
  (list-insert-separator
(map
  (lambda (e)
(if (and (list? e) (= (length e) 3))
(remove
   (lambda (x) (and (string? x) (string-null? x)))
   (list
 (car e)
 (if (number? fontsize)
 (make-fontsize-markup fontsize
   (markup-command (second e)))
 (markup-command (second e)))
 (last e)))
e))
  lst)
" ")))

#(define (dynamic-text::format-text fontsize markup-command lst)
"Format string-parts of @var{lst} with @var{fontsize} and @var{markup-command}"
  (map
(lambda (arg)
  (if (string? arg)
  (if (number? fontsize)
  (make-fontsize-markup fontsize
(markup-command arg))
  (markup-command arg))
  arg))
lst))

#(define (get-list-parts lst dyn-indices idx)
;; Relying on @var{idx}, which selects from @var{dyn-indices} return a new
;; list containing sublists with stuff before the selected dynamic, the
;; dynamic itself and stuff after the dynamic.
  (if (null? dyn-indices)
  (list lst '() '())
  (let* (;; if idx exceeds, print a warning and use first possible

Re: missing document browser

2018-02-10 Thread Daryls_Produce
Yes. I'm in Frescobaldi!

:-)



--
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: make all sharp signs and flat signs visible within one measure

2018-02-10 Thread Simon Albrecht

Hi Gert,

maybe you’d like to use

\cadenzaOn
\set Score.barAlways = ##t
\set Score.defaultBarType = #""

That way, time will stop being measured, and line breaks be allowed 
between every two notes. Use \bar "|" where you want. And while “cadenza 
mode” is active, all accidentals will be marked as you want.


For the future: it’s easier to help out if you give a small, but 
complete (compilable) code example showing what you’ve tried and what 
you want to achieve.


Best, Simon


On 10.02.2018 18:20, Gert Koetsier wrote:


Hello,

I make organ harmonisations for the psalms.

It is customary in dutch to not use a time indication for psalms, but 
tactus minor, tactus major, etc.


I personally do this by using the \time command (e.g. 10/2) for each 
line and override the timesignature. This looks quite clear.


Yet it can happen that it is ambiguous, because when bes occurs  more 
than once in a measure only the first bes wil be indicated as such. I 
would like to have a tweak that enables me to make each bes visible as 
such.


Can any help me out? or should I adpopt another way to reach this goal?

Glad to hear from anyone of you.

Gert Koetsier

Dronten, Netherlands

Verzonden vanuit Mail  
voor Windows 10




___
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: make all sharp signs and flat signs visible within one measure

2018-02-10 Thread Torsten Hämmerle
Hi Gert,

You can set the \accidentalStyle to "forget": 

~~+
\version "2.18.2"
\relative { \accidentalStyle forget bes'4 bes bes bes }

Does this solve your problem?

Groeten,
Torsten



--
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: make all sharp signs and flat signs visible within one measure

2018-02-10 Thread David Kastrup
Gert Koetsier  writes:

> Hello,
> I make organ harmonisations for the psalms.
> It is customary in dutch to not use a time indication for psalms, but
> tactus minor, tactus major, etc.
> I personally do this by using the \time command (e.g. 10/2) for each
> line and override the timesignature. This looks quite clear.
>
> Yet it can happen that it is ambiguous, because when bes occurs more
> than once in a measure only the first bes wil be indicated as such. I
> would like to have a tweak that enables me to make each bes visible as
> such.
> Can any help me out? or should I adpopt another way to reach this goal?
>
> Glad to hear from anyone of you.



-- 
David Kastrup

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


make all sharp signs and flat signs visible within one measure

2018-02-10 Thread Gert Koetsier


Hello,
I make organ harmonisations for the psalms.
It is customary in dutch to not use a time indication for psalms, but tactus 
minor, tactus major, etc.
I personally do this by using the \time command (e.g. 10/2) for each line and 
override the timesignature. This looks quite clear.

Yet it can happen that it is ambiguous, because when bes occurs  more than once 
in a measure only the first bes wil be indicated as such. I would like to have 
a tweak that enables me to make each bes visible as such.
Can any help me out? or should I adpopt another way to reach this goal?

Glad to hear from anyone of you.

Gert Koetsier
Dronten, Netherlands


Verzonden vanuit Mail voor Windows 10

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


Re: Tweaking Hairpin shape

2018-02-10 Thread David Nalesnik
Hi Stefano,

On Sat, Feb 10, 2018 at 11:14 AM, Stefano Troncaro
 wrote:
> Hi David, thank you for your suggestions, this is almost done!
>
> I decided to pass an alist to the function instead of changing the amount of
> arguments based on the procedure name, mainly because if I write more angle
> functions in the future I want to be able to do so without having to temper
> with the stencil definition. That is however a useful idea that I would have
> never thought about, and I may find it useful in the future.
>
> I have a few doubts if you don't mind.
>
> 1) At first I couldn't make the alist approach work because for some reason
> I can't define one in a let or let* block. Do you know why? I googled and I
> couldn't find an explanation.
>
> 2) Is there a way to define an alist different than a succession of acons? I
> thought I would be able to create it with a syntax like '((k1 . v1) (k2 .
> v2) ... etc) but in the end I had to settle for (acons k1 v1 (acons k2 v2
> ... (acons kn vn '(.

Not sure what you could have been doing wrong, but there are two ways you could
define the alist

(list (cons 'grob grob) (cons 'width width) (cons 'starth starth)
(cons 'endh endh))

or through quasi-quoting:

 `((grob . ,grob) (width . ,width) (starth . ,starth) (endh . ,endh))


> 3) I made the following function to make it so that the upper line of the
> hairpin runs parallel with the staff lines. It does so by finding the angle
> that is formed between the "zero-point" of the hairpin (the point where it
> begins to open) and the ending point of the higher hairpin line, that is in
> (width, height). The function takes into account that the lines of hairpins
> that go through a system break have different starting and ending heights,
> this is called "adjusted height" here.

But the spanner is cloned for each broken segment, so you aren't
actually comparing
with the initial bit.  Each new segment is simply drawn with a stencil
reflecting its
position within the whole.

With all this in mind, the function
> finds the angle of the upper line of the hairpin, and returns the negative
> of that angle, which ideally would result in that angle being 0 degrees,
> making it so that the upper line is parallel to the staff. But the end
> result is slightly off (see image). I don't know if the math is wrong or if
> this problem arises from rounding differences. If it is the later I may need
> to formulate another approach entirely. Any insight on this?

I noticed this.  I'm not great with trig, so I'm not seeing right away
how to approach this
by rotating the hairpin.  But why rotate it in the first place?  You
simply want the top or
bottom line--you also need to consider if the hairpin is above the
staff--to be horizontal.  So
create a property 'follow-staff or something and, when set, draw a
straight line for one of the two lines
which are joined to create the hairpin, instead of two lines which
split the opening width.

>
> Thank you for all the help!!

You're very welcome!

David

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


Re: LilyPond/LaTeX template for Anglican chant

2018-02-10 Thread Simon Albrecht

On 10.02.2018 15:09, Gregrs wrote:

Dear all,

In case it's useful to anyone, I've just created a template for 
typesetting psalms with Anglican chant using LilyPond, LaTeX and GNU Make.


Looks nice, thanks for sharing!
Did you consider using Urs’ lilyglyphs package for the dynamics? Of 
course that would require compiling with xelatex or lualatex…


Best, Simon

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


Re: Tweaking Hairpin shape

2018-02-10 Thread Stefano Troncaro
Hi David, thank you for your suggestions, this is almost done!

I decided to pass an alist to the function instead of changing the amount
of arguments based on the procedure name, mainly because if I write more
angle functions in the future I want to be able to do so without having to
temper with the stencil definition. That is however a useful idea that I
would have never thought about, and I may find it useful in the future.

I have a few doubts if you don't mind.

1) At first I couldn't make the alist approach work because for some reason
I can't define one in a let or let* block. Do you know why? I googled and I
couldn't find an explanation.

2) Is there a way to define an alist different than a succession of acons?
I thought I would be able to create it with a syntax like '((k1 . v1) (k2 .
v2) ... etc) but in the end I had to settle for (acons k1 v1 (acons k2 v2
... (acons kn vn '(.

3) I made the following function to make it so that the upper line of the
hairpin runs parallel with the staff lines. It does so by finding the angle
that is formed between the "zero-point" of the hairpin (the point where it
begins to open) and the ending point of the higher hairpin line, that is in
(width, height). The function takes into account that the lines of hairpins
that go through a system break have different starting and ending heights,
this is called "adjusted height" here. With all this in mind, the function
finds the angle of the upper line of the hairpin, and returns the negative
of that angle, which ideally would result in that angle being 0 degrees,
making it so that the upper line is parallel to the staff. But the end
result is slightly off (see image). I don't know if the math is wrong or if
this problem arises from rounding differences. If it is the later I may
need to formulate another approach entirely. Any insight on this?

> #(define hairpin-upper-with-staff
>(lambda (prop-alist)
>  (let* ((starth (assq-ref prop-alist 'starth))
> (endh (assq-ref prop-alist 'endh))
> (width (assq-ref prop-alist 'width))
> (adj-hgt (- endh starth))
> (def-ang (ly:angle width adj-hgt)) )
>(- def-ang
>
>
Thank you for all the help!!

2018-02-08 21:50 GMT-03:00 David Nalesnik :

> Hi Stefano,
>
> On Thu, Feb 8, 2018 at 4:43 PM, Stefano Troncaro
>  wrote:
> > Hello again!
> >
> > I managed to modify David's translation of ly:hairpin::print to have it
> use
> > two properties, Hairpin.rotate and Hairpin.straight-end, to achieve
> almost
> > all the results I wanted.
>
> Glad you got some use out of this!  I like the look of the
> straight-edged hairpins.
>
> >
> > The idea is that Hairpin.rotate can be either a numerical value,
> > representing the angle of rotation, or a procedure that returns the
> angle of
> > rotation. In one of the examples I used the function discussed earlier in
> > this thread to have it automatically detect the angle of a beam.
> However, I
> > can't manage to make this idea work when the procedure given to
> > Hairpin.rotate requires more than one variable. This is very inconvenient
> > because for some cases the procedure would need to calculate again a lot
> of
> > things that are already calculated in the process of making the stencil.
>
> First of all, calling ly:grob-property calls any procedure the
> property is set to.  The function ly:grob-property-data won't.
>
> I don't know of any way in Scheme to overload functions or to count
> arguments.  If you name your function, however, you can use
> procedure-name.  (See the attached.)
>
> HTH,
> David
>
\version "2.19.80"

#(define (proc-number-or-false? obj)
   (or (procedure? obj)
   (number? obj)
   (eq? obj #f)))

#(define (define-grob-property symbol type? description)
   (if (not (equal? (object-property symbol 'backend-doc) #f))
   (ly:error (_ "symbol ~S redefined") symbol))

   (set-object-property! symbol 'backend-type? type?)
   (set-object-property! symbol 'backend-doc description)
   symbol)

#(map
  (lambda (x)
(apply define-grob-property x))

  `(
 (circled-tip-radius ,number? "Radius for hairpin circled tip")
 (rotate ,proc-number-or-false? "Custom rotation: a number specifies angle in degrees, a procedure will receive the grob and return an angle, #f deactivates rotation")
 (straight-end ,boolean? "Straighten the end of the hairpin when it's rotated?")
 ))


#(define broken-neighbor
   (lambda (grob)
 (let* ((pieces (ly:spanner-broken-into (ly:grob-original grob)))
(me-list (member grob pieces)))
   (if (> (length me-list) 1)
   (cadr me-list)
   '()

#(define (interval-dir-set i val dir)
   (cond ((= dir LEFT) (set-car! i val))
 ((= dir RIGHT) (set-cdr! i val))
 (else (ly:error "dir must be LEFT or RIGHT"

#(define (other-dir dir) (- dir))

#(define hairpin::print-scheme
   (lambda (grob)
 (let ((grow-dir 

Re: LilyPond/LaTeX template for Anglican chant

2018-02-10 Thread Kieren MacMillan
Hi Greg,

> In case it's useful to anyone, I've just created a template for typesetting 
> psalms with Anglican chant using LilyPond, LaTeX and GNU Make.

Lovely work! Haven't looked at the code yet, but the output is fabulous — 
looking forward to diving under the hood, if I can find the time.

As someone who grew up in the [Canadian] Anglican church, and still fill in as 
organist, choir director, or mercenary singer in Anglican and United Churches, 
this looks like "home".

Thanks for the contribution!

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


LilyPond/LaTeX template for Anglican chant

2018-02-10 Thread Gregrs

Dear all,

In case it's useful to anyone, I've just created a template for 
typesetting psalms with Anglican chant using LilyPond, LaTeX and GNU 
Make.


https://github.com/gregrs-uk/anglican-chant-template

Best wishes,
Greg

--
Twitter: @gregrs_uk
PGP key ID: 64907C8A
Fingerprint: EBD1 077F CCDD 841E A505 3FAA D2E8 592E 6490 7C8A


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


Re: Phrasing slur with multiple voices

2018-02-10 Thread Timothy Lanfear
Here is an alternative approach, putting the g' and f' quavers in the 
voice that continues through the parallel music section but adjusting 
their appearance to have down stems.


\version "2.19.81"

{
  \new Staff {
    \time 2/4
    \voiceOne 4\( 4 4
    <<
  { \voiceTwo g'8 f'8\) }
  \new Voice { \voiceOne a'4 }
  \new Voice { \voiceFour ces'4 }
    >>
  }
}


On 09/02/18 14:11, Andrew Bernard wrote:
Something like this perhaps. You can tune the slur shape better than 
my rough example.


===
\version "2.19.81"

{
  \time 2/4
  \clef treble
  <<
    {
  \voiceOne
  \shape #'((0 . 0.5) (0 . 0.5) (4 . 1) (3 . -3)) Slur
  4^(   |
   a') |
    }
    \new Voice
    {
  \voiceThree
  \stemDown
  s2 s4 ces'4 |
    }
    \new Voice
    {
  \voiceTwo
  \stemDown
  s2
  s4 g'8 f' |
    }
  >>
}

===



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


--
Timothy Lanfear, Bristol, UK.


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


Re: \RemoveAllEmptyStaves and Dyanmics context line for piano pedals

2018-02-10 Thread Andrew Bernard
Hi Torsten,

Thanks so much for this supremely clear explanation.

It's quite subtle really, isn't it? A big help. Probably this context does
not come up often for people - my piano scores flutter between, one, two,
three, and four staves in a quite complex manner. Scriabin too, but he does
not go down to one staff much, if at all, as I recall. So a kind of rare
corner case arises in my work - but lilypond as usual triumphs!

Andrew


On 10 February 2018 at 20:57, Torsten Hämmerle 
wrote:

>
> The difference between \RemoveEmptyStaves and \RemoveAllEmptyStaves is that
> \RemoveEmptyStaves will not remove empty staves in the first system, the
> reason for it being that in orchestral scores it is common to display all
> instruments involved in the first system - no matter if they play or not.
>
> Your problem is caused by the fact that, from LilyPond's point of view,
> staves containing "no music", i.e. rests or spacer rests only, are
> considered as "empty". Therefore, dynamics will also vanish using
> \RemoveEmtpyStaves.
>
> The difference between PianoStaff and GrandStaff, by the way, is that
> PianoStaff uses the "Keep_alive_together_engraver". This has the effect
> (in
> orchestral scores) that both piano staves are shown as soon as one of them
> contains music.
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \RemoveAllEmptyStaves and Dyanmics context line for piano pedals

2018-02-10 Thread Torsten Hämmerle
Hi Andrew,

The difference between \RemoveEmptyStaves and \RemoveAllEmptyStaves is that
\RemoveEmptyStaves will not remove empty staves in the first system, the
reason for it being that in orchestral scores it is common to display all
instruments involved in the first system - no matter if they play or not.

Your problem is caused by the fact that, from LilyPond's point of view,
staves containing "no music", i.e. rests or spacer rests only, are
considered as "empty". Therefore, dynamics will also vanish using
\RemoveEmtpyStaves.

The difference between PianoStaff and GrandStaff, by the way, is that
PianoStaff uses the "Keep_alive_together_engraver". This has the effect (in
orchestral scores) that both piano staves are shown as soon as one of them
contains music.

Solution to your problem:
Just use GrandStaff (without "Keep_alive_together") and apply
\RemoveAllEmptyStaves to the Staff lines only but *not* for the dynomics
line:

~~~
\version "2.18.2"

\score {
  \new GrandStaff <<
<<
  \new Staff { \repeat unfold 4 { b'1 } \break \repeat unfold 4 { b'1 }
\break \repeat unfold 4 { b'1 } }
  \new Dynamics { s1*2 s1*3\p\< s1*2\f s1*2\> s1\pp }
>>
\new Staff { R1*10 b1 b1 }
  >>
  \layout {
\context {
  \Staff
  \RemoveEmptyStaves
  \override VerticalAxisGroup.remove-first = ##t
}
  }
}

That way, the \new Dynamics line will not be removed and GrandStaff instead
of PianoStaff saves you from the Keep_alive_together engraver.
I didn't use \RemoveAllEmptyStaves here because it didn't exist back in
2.18.2

All the best,
Torsten



--
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