Re: Layout of a (piano) hand indicator

2018-05-08 Thread foxfanfare
Thomas Morley-2 wrote
> HTH a bit,  Harm

Yes it did! Thank you for the explanations!
Thomas Morley-2 wrote
> Likely better to create a new grob for piano-hand-indicator and whileon it
> a barre-indicator for guitar.

About this, I wonder if it is necessary for the hand-indicator bracket to be
linked with the fingering orientation? Would this not be easier and logical
to attach it to the notehead? Imagine you'd like to make an edition without
any fingerings and one with, you could just remove the fingering engraver
for this. But then, the brackets will also disapear!



--
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: Layout of a (piano) hand indicator

2018-05-07 Thread Thomas Morley
Hi Andrew,

2018-05-07 13:50 GMT+02:00 Andrew Bernard :
> Hi Harm,
>
> I use the original function a lot. This is a staggering amount of what can
> only be described as virtuoso code, for such a little thing. I am amazed.
> Thanks.

Well, sometimes it's still buggy. I'll try to improve, when I find some time...

>
> I understand this builds on the fingering function to work. Could it not be
> done more simply (?) with some sort of note head engraver, or something? I
> am way out of my depth here, but it does seem that the idea has been built
> on a foundation that is actually for something else (not a criticism, mind
> you).

It _is_ a criticism which already came to my mind :)
To shanghai a grob for a purpose it wasn't made for, will most likely
cause troubles somewhere.

Likely better to create a new grob for piano-hand-indicator and while
on it a barre-indicator for guitar.

Probably not that trivial, in any case very time consuming, I suppose.

Best,
  Harm

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


Re: Layout of a (piano) hand indicator

2018-05-07 Thread Thomas Morley
2018-05-07 20:25 GMT+02:00 foxfanfare :
> I just played a little with the complex snippet of Harm and it worked like a
> charm!
> You definitely should put this code in the snippets directory!
>
>
> Thomas Morley-2 wrote
>>   %% FingeringColumn present, because two or more fingerings present and
>>   %% `fingeringOrientations' is `left'
>>   %%
>>   %% need to manually adjust Fingerings, but sometimes FingeringColumn
>> still
>>   %% delivers surprises ...
>
> I didn't understand where was the problem actually?
>
> I take the opportunity to ask a question about this FingeringColumn
> interface which I don't understand. I tried to shorter the distance between
> fingerings when they are in column but without succes.
>
> I can get it worked with: "\override Fingering.padding = #0" but this will
> then concern all the fingerings in the score (of course I can use \once but
> I will need to make that every time this occurs).
>
> The documentation mentioned a padding parameter for the
> fingering-column-interface wich seems interesting in this case, but nothing
> happen when I use this! What did I miss?
>
> Exemple:
> \version "2.19.81"
>
> \relative {
>   \textLengthOn
>   \set fingeringOrientations = #'()
>   1^"normal"
>   \once \override Fingering.padding = #0
>   ^"OK but will affect every fingers"
>   \once \override FingeringColumn.padding = #0
>   ^"doesn't work?"
> }



Hi,

FingeringColumn is not easy to deal with and not really over-documented ...

FingeringColumn is only created if necassary at Staff-level.
Condition: fingeringOrientations contains left or right _and_ more
than one in-chord fingering is present.
So none of your examples create a FingeringColumn.

Also, see:

%% If FingeringColumn present, print.
printIfFC =
  \override Staff.FingeringColumn.after-line-breaking =
  #(lambda (grob) (format #t "\ngrob there? ~a" grob))

%% no FingeringColumn
\relative c' {
  \printIfFC
  \set fingeringOrientations = #'(down)
  1
  \set fingeringOrientations = #'(up)
  1
}

%% no FingeringColumn
\relative c' {
  \printIfFC
  \set fingeringOrientations = #'(left)
  1
  1-2-3
  \set fingeringOrientations = #'(right)
  1
  1-2-3
}

%% FingeringColumn present because `fingeringOrientations' is 'left or 'right
%% _and_ more than one in-chord fingering is present
\relative c' {
  \printIfFC
  \set fingeringOrientations = #'(left)
  1
  1-2-3
  \set fingeringOrientations = #'(right)
  1
  1-2-3
}

%% FingeringColumn.padding
\relative c' {
  \printIfFC
  \set fingeringOrientations = #'(left)
  1
  \override Staff.FingeringColumn.padding = 5
  1
}

Btw, don't do \set fingeringOrientations = #'(), it creates a warning:
"no placement found for fingerings". Default is '(up down).
See:

%% Default fingeringOrientations are defined in Score-context.
%% Display them with:
printFingeringOrientations =
\context Score
\applyContext
#(lambda (ctx)
  (format
#t
"\nIn ~a fingeringOrientations: ~a\n\tor look into engraver-init.ly"
ctx
(ly:context-property ctx 'fingeringOrientations)))

{
  \printFingeringOrientations
  R1
}

For default-`fingeringOrientations the fingerings are accumulated in
ScriptColumn together with other stuff.
See:

\relative {
  \once \override ScriptColumn.after-line-breaking =
  #(lambda (grob)
(let* ((scripts-array (ly:grob-object grob 'scripts))
   (scripts
 ;; the check is probably not needed, better be paranoid, though
 (if (ly:grob-array? scripts-array)
 (ly:grob-array->list scripts-array)
 '(
(format #t "\nScriptColumn.scripts:\n~y" scripts)))
  
  %% demonstrate tweaking padding
  
}

HTH a bit,
  Harm

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


Re: Layout of a (piano) hand indicator

2018-05-07 Thread foxfanfare
I just played a little with the complex snippet of Harm and it worked like a
charm!
You definitely should put this code in the snippets directory!


Thomas Morley-2 wrote
>   %% FingeringColumn present, because two or more fingerings present and
>   %% `fingeringOrientations' is `left'
>   %%
>   %% need to manually adjust Fingerings, but sometimes FingeringColumn
> still
>   %% delivers surprises ... 

I didn't understand where was the problem actually?

I take the opportunity to ask a question about this FingeringColumn
interface which I don't understand. I tried to shorter the distance between
fingerings when they are in column but without succes. 

I can get it worked with: "\override Fingering.padding = #0" but this will
then concern all the fingerings in the score (of course I can use \once but
I will need to make that every time this occurs). 

The documentation mentioned a padding parameter for the
fingering-column-interface wich seems interesting in this case, but nothing
happen when I use this! What did I miss?

Exemple:
\version "2.19.81"

\relative {
  \textLengthOn
  \set fingeringOrientations = #'()
  1^"normal"
  \once \override Fingering.padding = #0
  ^"OK but will affect every fingers"
  \once \override FingeringColumn.padding = #0
  ^"doesn't work?"
}



--
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: Layout of a (piano) hand indicator

2018-05-07 Thread Andrew Bernard
Hi Harm,

I use the original function a lot. This is a staggering amount of what can
only be described as virtuoso code, for such a little thing. I am amazed.
Thanks.

I understand this builds on the fingering function to work. Could it not be
done more simply (?) with some sort of note head engraver, or something? I
am way out of my depth here, but it does seem that the idea has been built
on a foundation that is actually for something else (not a criticism, mind
you).


On 7 May 2018 at 07:44, Thomas Morley  wrote:

> Hi,
>
> I've read your post in the morning and some things in Simon's function
> were obvious to impove.
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Layout of a (piano) hand indicator

2018-05-06 Thread foxfanfare
Thomas Morley-2 wrote
> Below my own attempt.
> The function has an optional argument, `details', for finetuning.

Ooo... Thank you very much Harm! This looks amazing :)
I'll try to play with this tomorrow and tell you how it works for me :-)



--
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: Layout of a (piano) hand indicator

2018-05-06 Thread Thomas Morley
Hi,

I've read your post in the morning and some things in Simon's function
were obvious to impove.
But then I started testing use-cases and noticed the problem is very
complex, if you try a high amount of automatism (but still with the
possibility for the user to adjust values).
Some points of the coding challenge:
Make it robust for \voiceXxx, suspended NoteHeads in the column, accidentals.
The real problems arise when you try to make it work together with
common fingerings for fingeringOrientation set 'left or even unset.

First some remarks to Simon's coding

2018-05-06 9:45 GMT+02:00 foxfanfare :

> hook =
> #(let ((direction? (lambda (n) (= 1 (abs n

No need to define a predicate, we have ly:dir?

> (hook-markup #{ \markup \path #0.12 #'((moveto 0 0)
> (rlineto -0.85 0)
> (rlineto 0 3)) #}))
> (define-event-function (direction on-line)
>   (direction? boolean?)

`on-line' can be read, no need to have it as a function's argument.

>   (let* ((self-al (if on-line 0 0.31))
>  (self-al (if (= direction 1) (- self-al) self-al)))

`direction' could be used as a multiplier.

>
> #{
>   \tweak self-alignment-Y $self-al
>   \tweak extra-offset #'(0.75 . 0)
>   \tweak extra-spacing-width #'(-0.5 . 0)
>   \finger \markup \scale #(cons 1 direction) #hook-markup
> #})))



Below my own attempt.
The function has an optional argument, `details', for finetuning.

There are some helper-procedures, probably overkill, but it was going
on my nerves ;)

Still, there are some issues, when FingeringColumn comes into the game ...



\version "2.19.81"

%% From
%% https://archiv.lilypondforum.de/index.php/topic,2507.msg14157.html#msg14157
%% slightly changed
#(define (get-parent-in-hierarchie grob searchword)
  ;; goes up in hierarchie until it finds
  ;; a grob named searchword
  (define result #f)

  (define compare
(lambda (x)
  (and (ly:grob? x)
   (eq? searchword (grob::name x)

  (define (get-par grob)
(let* ((parx (ly:grob-parent grob X))
   (pary (ly:grob-parent grob Y)))

  (cond ((not(equal? result #f))
  result )
((compare parx)
  (set! result parx)
  result)
((compare pary)
  (set! result pary)
  result)
(else
  (if (ly:grob? parx)
  (get-par parx))
  (if(ly:grob? pary)
  (get-par pary))
  ;; the inner function gets called from here
  (let* ((result (get-par grob)))
;; check if we found something
(if (ly:grob? result)
result
#f)))

#(define (get-grob-most-left-relative-coordinate ref-point)
  ;; most suitable for container-grobs
  (lambda (grob)
(if (ly:grob? grob)
(cond
  ((eq? (grob::name grob) 'NoteColumn)
 (let* ((note-heads-array (ly:grob-object grob 'note-heads))
(note-heads-grobs
  (if (ly:grob-array? note-heads-array)
  (ly:grob-array->list note-heads-array)
  '()))
(note-heads-refpoints
  (map
(lambda (nh)
  (ly:grob-relative-coordinate nh ref-point X))
note-heads-grobs))
(sorted-note-heads-refpoints (sort note-heads-refpoints <)))
  (if (not (null? sorted-note-heads-refpoints))
  (car sorted-note-heads-refpoints
   ((eq? (grob::name grob) 'AccidentalPlacement)
  (let* ((acc-list (ly:grob-object grob 'accidental-grobs))
 (acc-refpoints
   (map
 (lambda (acc)
   (ly:grob-relative-coordinate (cadr acc) ref-point X))
 acc-list))
 (sorted-acc-refpoints (sort acc-refpoints <)))
   (if (not (null? sorted-acc-refpoints))
   (car sorted-acc-refpoints
   (else
 (if (ly:grob? grob)
 (ly:grob-relative-coordinate grob ref-point X
'(

hook =
#(define-event-function (details direction)
  ((number-list? '(0 0 -0.85 3)) ly:dir?)
  (let* ((hook-markup
 #{
 \markup
   \path
 #0.175
 #`((moveto 0 0)
   (rlineto ,(caddr details) 0)
   (rlineto 0 ,(* direction (cadddr details
 #}))
#{
   \tweak before-line-breaking
 #(lambda (grob)
(let* (;; grob-parent may be FingeringColumn
   (grob-parent (ly:grob-parent grob X))
   (note-head (get-parent-in-hierarchie grob 'NoteHead))
   (staff-pos (ly:grob-property note-head 'staff-po

Re: Layout of a (piano) hand indicator

2018-05-06 Thread foxfanfare
Simon Albrecht-2 wrote
> Please don’t infinitely propagate typos. It’s called ‘length’ in English.

Sorry but I'm no native speacker...
...pardon my French :)




--
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: Layout of a (piano) hand indicator

2018-05-06 Thread David Kastrup
Simon Albrecht  writes:

> On 06.05.2018 11:43, foxfanfare wrote:
>
> ……
>> (define-event-function (direction on-line lenght offset)
>> (direction? boolean? number? pair?)
>> (let* ((self-al (if on-line 0 0.31))
>>  (self-al (if (= direction 1) (- self-al) self-al))
>>  (hook-markup #{
>>\markup \path #0.12 #`((moveto 0 0)
>>(rlineto -0.85 0)
>>(rlineto 0 ,lenght))
> ……
>> 1) As can see, the markup is centered aligned. If the lenght
>
> Please don’t infinitely propagate typos. It’s called ‘length’ in English.

"infinitely"?  A steep challenge.  I suggest one of "indiscriminately",
"indefinitely", "inattentively", "inanely", "insidiously",
"infuriatingly", "incessantly", "inventively", "ingeniously".

-- 
David Kastrup

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


Re: Layout of a (piano) hand indicator

2018-05-06 Thread Simon Albrecht

On 06.05.2018 11:43, foxfanfare wrote:

……

(define-event-function (direction on-line lenght offset)
(direction? boolean? number? pair?)
(let* ((self-al (if on-line 0 0.31))
 (self-al (if (= direction 1) (- self-al) self-al))
 (hook-markup #{
   \markup \path #0.12 #`((moveto 0 0)
   (rlineto -0.85 0)
   (rlineto 0 ,lenght))

……

1) As can see, the markup is centered aligned. If the lenght


Please don’t infinitely propagate typos. It’s called ‘length’ in English.

Best, Simon

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


Re: Layout of a (piano) hand indicator

2018-05-06 Thread foxfanfare
I andrew, thanks for your help!


Andrew Bernard wrote
> How is your Scheme coding skill?

Very low... but I'm learning!

Your exemple was a big help, especially because the order of appearence of
the elements in my function wasn't good and didn't allowed me to add a
variable in the original markup...

So now I can add all the parameters I wanted:

\version "2.19.81"

hook =
#(let ((direction? (lambda (n) (= 1 (abs n)
   (define-event-function (direction on-line lenght offset)
   (direction? boolean? number? pair?)
   (let* ((self-al (if on-line 0 0.31))
(self-al (if (= direction 1) (- self-al) self-al))
(hook-markup #{
  \markup \path #0.12 #`((moveto 0 0)
  (rlineto -0.85 0)
  (rlineto 0 ,lenght))
  #})
)
   #{
 \tweak self-alignment-Y $self-al
 \tweak extra-offset #offset
 \tweak extra-spacing-width #'(-0.5 . 0)
 \finger \markup \scale #(cons 1 direction) #hook-markup
   #})))


\layout {
  \context {
\Voice
fingeringOrientations = #'(left)
  }
}

\relative {
  4 

}

I have two questions though:

1) As can see, the markup is centered aligned. If the lenght is higher, it
moves further from the note head. I can adjust it with my Y-offset command,
but I think there is a way to make it by default top aligned, no?

2) This solution adds a lot of numbers after the initial \hook command.
Isn't there a way to tell the function some default values for the "lenght"
and "offset" parameters I have added, and just tweak them if necessary in
the score?




--
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: Layout of a (piano) hand indicator

2018-05-06 Thread Andrew Bernard
Hello foxfanfare,

I use this function from Simon a lot.

Here's a way to add extra parameters to this function. As an example, this
lets you specify the length of the hook.

How is your Scheme coding skill? You'll notice the use of quasiquoting to
get the length value where it is needed in the case.

Adding other parameters as you desire I leave as an exercise for the reader.


Andrew


=

\version "2.19.81"

hook =
#(let ((direction? (lambda (n) (= 1 (abs n
   )

   (define-event-function (direction on-line len)
 (direction? boolean? number?)
 (let* ((self-al (if on-line 0.6 0.31))
(self-al (if (= direction 1) (- self-al) self-al))
(hook-markup #{
  \markup \path #0.175 #`((moveto 0 0)
  (rlineto -0.85 0)
  (rlineto 0 ,len))
  #})
)
   #{
 \tweak self-alignment-Y $self-al
 \tweak extra-spacing-width #'(-.5 . 0)
 \finger \markup \scale #(cons 1 direction) #hook-markup
   #})))


\layout {
  \context {
\Voice
fingeringOrientations = #'(left)
  }
}

{
  4 
}

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


RE: Layout of a (piano) hand indicator

2018-05-06 Thread foxfanfare
(* I forgot the function:

hook =
#(let ((direction? (lambda (n) (= 1 (abs n
(hook-markup #{ \markup \path #0.12 #'((moveto 0 0)
(rlineto -0.85 0)
(rlineto 0 3)) #}))
(define-event-function (direction on-line)
  (direction? boolean?)
  
  (let* ((self-al (if on-line 0 0.31))
 (self-al (if (= direction 1) (- self-al) self-al)))

#{
  \tweak self-alignment-Y $self-al
  \tweak extra-offset #'(0.75 . 0)
  \tweak extra-spacing-width #'(-0.5 . 0)
  \finger \markup \scale #(cons 1 direction) #hook-markup
#})))



--
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: Layout of a (piano) hand indicator

2018-05-06 Thread foxfanfare
Hi everyone,

I dig up this old topic because I need some help understanding this
function. Simon has posted an interesting function which I would like to
use:



... but I also would like to access some parameters in certain cases (let's
say "rlineto 0 3" and "extra-offset #'(0.75 . 0)" with a simple tweak. For
instance:

2

I tried adding some properties in the original code without success. I still
struggle in working with this language...

Could someone please tell me how I should achieve this?



--
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: Layout of a (piano) hand indicator

2015-11-30 Thread Mark Stephen Mrotek
Simon,

Attached is a snippet for bracket and hand indication from my library. I
cannot remember from whom I got it, so I cannot properly ascribe.

Mark

-Original Message-
From: lilypond-user-bounces+carsonmark=ca.rr@gnu.org
[mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of
Simon Albrecht
Sent: Monday, November 30, 2015 3:29 PM
To: Urs Liska ; lilypond-user 
Subject: Re: Layout of a (piano) hand indicator

Hello Urs,

it's very handy that you just came up with this thread, since I'm needing
the very thing in a score I just do.
I wrote an event function to nicely wrap up your approach:

%%%
\version "2.19.32"

hook =
#(let ((direction? (lambda (n) (= 1 (abs n
(hook-markup #{ \markup \path #0.175 #'((moveto 0 0)
(rlineto -0.85 0)
(rlineto 0 3)) #}))
(define-event-function (direction on-line) (direction? boolean?)
  (let* ((self-al (if on-line 0.6 0.31))
 (self-al (if (= direction 1) (- self-al) self-al)))
#{
  \tweak self-alignment-Y $self-al
  \tweak extra-spacing-width #'(-.5 . 0)
  \finger \markup \scale #(cons 1 direction) #hook-markup
#})))

\layout {
   \context {
 \Voice
 fingeringOrientations = #'(left)
   }
}

{
 } %%

It's not quite elegant with its hard-coded values, but it's easy to use.

Thanks for the ideas,
Simon

On 24.11.2015 23:44, Urs Liska wrote:
>
> Am 24.11.2015 um 22:39 schrieb Simon Albrecht:
>> On 24.11.2015 18:49, Urs Liska wrote:
>>> Hi all,
>>>
>>> please consider the attached image, especially the "half-bracket" at 
>>> the center. This is to indicate that this d' is to be played with 
>>> the left hand.
>>>
>>> Is there anything I could improve to the proportions and placement 
>>> of that sign?
>>>
>>> Any suggestions for improvement welcome. Suggestions for *not* 
>>> improving it even more ;-)
>> I agree that it looks quite good, and that the vertical part should 
>> be shorter. Also, the horizontal part could be longer in my eyes.
>> And I'd be very interested in how you did it :-)
>>
> I use a very simple \path. Originally I simply added it as a \markup 
> and used extra-offset to position it. But thanks to Abraham's blog 
> post I changed that to use a fingering indication. However, I'm not 
> really sure this is more reliable (for example against transposition):
>
> So this is what it looks like now:
>
> \set fingeringOrientations = #'(left)
>  \markup {
>\path #0.175
>#'((moveto 0 -2)
>   (rlineto 0 3)
>   (rlineto 0.85 0)
>   (moveto -1.5 2)) } > 8
>
> Urs
>
>> Yours, Simon



Hand indicators.docx
Description: MS-Word 2007 document
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Layout of a (piano) hand indicator

2015-11-30 Thread Simon Albrecht

Hello Urs,

it’s very handy that you just came up with this thread, since I’m 
needing the very thing in a score I just do.

I wrote an event function to nicely wrap up your approach:

%%%
\version "2.19.32"

hook =
#(let ((direction? (lambda (n) (= 1 (abs n
   (hook-markup #{ \markup \path #0.175 #'((moveto 0 0)
   (rlineto -0.85 0)
   (rlineto 0 3)) #}))
   (define-event-function (direction on-line) (direction? boolean?)
 (let* ((self-al (if on-line 0.6 0.31))
(self-al (if (= direction 1) (- self-al) self-al)))
   #{
 \tweak self-alignment-Y $self-al
 \tweak extra-spacing-width #'(-.5 . 0)
 \finger \markup \scale #(cons 1 direction) #hook-markup
   #})))

\layout {
  \context {
\Voice
fingeringOrientations = #'(left)
  }
}

{
   
}
%%

It’s not quite elegant with its hard-coded values, but it’s easy to use.

Thanks for the ideas,
Simon

On 24.11.2015 23:44, Urs Liska wrote:


Am 24.11.2015 um 22:39 schrieb Simon Albrecht:

On 24.11.2015 18:49, Urs Liska wrote:

Hi all,

please consider the attached image, especially the "half-bracket" at the
center. This is to indicate that this d' is to be played with the
left hand.

Is there anything I could improve to the proportions and placement of
that sign?

Any suggestions for improvement welcome. Suggestions for *not* improving
it even more ;-)

I agree that it looks quite good, and that the vertical part should be
shorter. Also, the horizontal part could be longer in my eyes.
And I’d be very interested in how you did it :-)


I use a very simple \path. Originally I simply added it as a \markup and
used extra-offset to position it. But thanks to Abraham's blog post I
changed that to use a fingering indication. However, I'm not really sure
this is more reliable (for example against transposition):

So this is what it looks like now:

\set fingeringOrientations = #'(left)
 8

Urs


Yours, Simon


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


Re: Layout of a (piano) hand indicator

2015-11-25 Thread Thomas Morley
2015-11-25 16:40 GMT+01:00 Robin Bannister :
> David Kastrup wrote:
>
>> Of course, the `let' is spurious.  You can just use thumbBracketSettings
>> directly instead of settings.
>
>
> The 'let' is my plodding anti-cryptic:
> a small step with a locally relevant name, and a slot for comment
>
>
>> Probably as of 2.14 or something.
>
>
> Written with 2.12 early 2009.
> Untouched since then.
> I've never used it.
>
>
> Cheers,
> Robin

Hi Robin,

how about putting it into LSR (currently running 2.18.2)?
Every now and then people ask for such a bracket so there is use for
it and at least it would be maintained every LSR-upgrade.


Cheers,
  Harm

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


Re: Layout of a (piano) hand indicator

2015-11-25 Thread Robin Bannister

David Kastrup wrote:


Of course, the `let' is spurious.  You can just use thumbBracketSettings
directly instead of settings.


The 'let' is my plodding anti-cryptic:
a small step with a locally relevant name, and a slot for comment



Probably as of 2.14 or something.


Written with 2.12 early 2009.
Untouched since then.
I've never used it.


Cheers,
Robin

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


Re: Layout of a (piano) hand indicator

2015-11-25 Thread David Kastrup
Robin Bannister  writes:

> David Kastrup wrote:
>
>> See issue 4671: probably as of version 2.19.33, convert-ly should be
>> able to do this by itself.  Another possibility is to not use
>> ly:music-function-extract at all but rather write
>>
>> #{ \whateveritwas ... #}
>>
>> here.  That should be fairly convertible.
>>
>
> OK. I had to pay a two dollar streamlining fee though.
>
>
> thumbBracket = #(define-music-function (spec) (string?)
>  (let ((settings thumbBracketSettings)) ;% as Defaults, or user defined
> #{ \thumbBracketEx $spec $settings #}))

2.18.2 requires (define-music-function (parser location spec) ...

The first version to allow (define-music-function (spec) ... is 2.19.22
and the first version to allow (thumbBracketEx spec settings) is 2.19.22
as well.  So if you drop the "parser location" arguments, there is no
point in not calling thumbBracketEx directly.

Of course, the `let' is spurious.  You can just use thumbBracketSettings
directly instead of settings.  Probably as of 2.14 or something.  So
either way there are some more possible streamlinings even when writing
for 2.18.

-- 
David Kastrup

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


Re: Layout of a (piano) hand indicator

2015-11-25 Thread Robin Bannister

David Kastrup wrote:


See issue 4671: probably as of version 2.19.33, convert-ly should be
able to do this by itself.  Another possibility is to not use
ly:music-function-extract at all but rather write

#{ \whateveritwas ... #}

here.  That should be fairly convertible.



OK. I had to pay a two dollar streamlining fee though.


thumbBracket = #(define-music-function (spec) (string?)
 (let ((settings thumbBracketSettings)) ;% as Defaults, or user defined
#{ \thumbBracketEx $spec $settings #}))



Cheers,
Robin

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


Re: Layout of a (piano) hand indicator

2015-11-25 Thread David Kastrup
Robin Bannister  writes:

> On 25.11.2015 12:32, David Kastrup wrote:
>> Thomas Morley  writes:
>> [...]
>>> There's Robin's approach:
>>> http://lists.gnu.org/archive/html/lilypond-user/2009-07/msg00536.html
>>>
>>> Although it does not compile with 2.19.32 even after running convert-ly.
>>> I assume it wouldn't be that hard to do the remaining manually, right
>>> now I've not the time, though...
>>
>> You have to replace one instance of
>>
>> ((ly:music-function-extract whateveritwas) (*parser*) (*location*) ...)
>
> Done - cf thumbBracket.ily
>
> I'm still on 2.18.2, but I made an exception here.

See issue 4671: probably as of version 2.19.33, convert-ly should be
able to do this by itself.  Another possibility is to not use
ly:music-function-extract at all but rather write

#{ \whateveritwas ... #}

here.  That should be fairly convertible.

-- 
David Kastrup

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


Re: Layout of a (piano) hand indicator

2015-11-25 Thread David Kastrup
David Kastrup  writes:

> Thomas Morley  writes:
>
>> 2015-11-25 11:42 GMT+01:00 Urs Liska :
>>>
>>>
>>> Am 25.11.2015 um 11:26 schrieb Jacques Menu:
 Hello Urs,

 The horizontal part is not visible if the note head lies on a line:
>>>
>>> I know that and therefore I wouldn't consider this a proper solution.
>>> If I would want to make that a generally usable tool I would have to
>>> think about some logic to support this.
>>> But in the score at hand I just need that once ...
>>>
>>> Urs
>>
>>
>>
>> There's Robin's approach:
>> http://lists.gnu.org/archive/html/lilypond-user/2009-07/msg00536.html
>>
>> Although it does not compile with 2.19.32 even after running convert-ly.
>> I assume it wouldn't be that hard to do the remaining manually, right
>> now I've not the time, though...
>
> You have to replace one instance of
>
> ((ly:music-function-extract whateveritwas) (*parser*) (*location*) ...)
>
> with
>
> (whateveritwas ...)
>
> Maybe ly:music-function-extract should have been renamed altogether when
> removing the parser/location arguments so that one could have provided a
> compatibility wrapper under that name.
>
> I'm not sure how often this will be an issue, though.

I'll try to see whether I can convert direct calls of the result from
ly:music-function-extract in convert-ly, though.

-- 
David Kastrup

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


Re: Layout of a (piano) hand indicator

2015-11-25 Thread David Kastrup
Thomas Morley  writes:

> 2015-11-25 11:42 GMT+01:00 Urs Liska :
>>
>>
>> Am 25.11.2015 um 11:26 schrieb Jacques Menu:
>>> Hello Urs,
>>>
>>> The horizontal part is not visible if the note head lies on a line:
>>
>> I know that and therefore I wouldn't consider this a proper solution.
>> If I would want to make that a generally usable tool I would have to
>> think about some logic to support this.
>> But in the score at hand I just need that once ...
>>
>> Urs
>
>
>
> There's Robin's approach:
> http://lists.gnu.org/archive/html/lilypond-user/2009-07/msg00536.html
>
> Although it does not compile with 2.19.32 even after running convert-ly.
> I assume it wouldn't be that hard to do the remaining manually, right
> now I've not the time, though...

You have to replace one instance of

((ly:music-function-extract whateveritwas) (*parser*) (*location*) ...)

with

(whateveritwas ...)

Maybe ly:music-function-extract should have been renamed altogether when
removing the parser/location arguments so that one could have provided a
compatibility wrapper under that name.

I'm not sure how often this will be an issue, though.

-- 
David Kastrup

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


Re: Layout of a (piano) hand indicator

2015-11-25 Thread Thomas Morley
2015-11-25 11:42 GMT+01:00 Urs Liska :
>
>
> Am 25.11.2015 um 11:26 schrieb Jacques Menu:
>> Hello Urs,
>>
>> The horizontal part is not visible if the note head lies on a line:
>
> I know that and therefore I wouldn't consider this a proper solution.
> If I would want to make that a generally usable tool I would have to
> think about some logic to support this.
> But in the score at hand I just need that once ...
>
> Urs



There's Robin's approach:
http://lists.gnu.org/archive/html/lilypond-user/2009-07/msg00536.html

Although it does not compile with 2.19.32 even after running convert-ly.
I assume it wouldn't be that hard to do the remaining manually, right
now I've not the time, though...

Cheers,
  Harm

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


Re: Layout of a (piano) hand indicator

2015-11-25 Thread Urs Liska


Am 25.11.2015 um 11:26 schrieb Jacques Menu:
> Hello Urs,
>
> The horizontal part is not visible if the note head lies on a line:

I know that and therefore I wouldn't consider this a proper solution.
If I would want to make that a generally usable tool I would have to
think about some logic to support this.
But in the score at hand I just need that once ...

Urs

>
> {
>   \set fingeringOrientations = #'(left)
>  \markup {
> \path #0.175
> #'((moveto 0 -2)
>(rlineto 0 3)
>(rlineto 0.85 0)
>(moveto -1.5 2))
>   } > 8
> }
>
> {
>   \set fingeringOrientations = #'(left)
>  \markup {
> \path #0.175
> #'((moveto 0 -2)
>(rlineto 0 3)
>(rlineto 0.85 0)
>(moveto -1.5 2))
>   } > 8
> }
>
> JM
>
>> Le 24 nov. 2015 à 23:44, Urs Liska  a écrit :
>>
>>
>>
>> Am 24.11.2015 um 22:39 schrieb Simon Albrecht:
>>> On 24.11.2015 18:49, Urs Liska wrote:
 Hi all,

 please consider the attached image, especially the "half-bracket" at the
 center. This is to indicate that this d' is to be played with the
 left hand.

 Is there anything I could improve to the proportions and placement of
 that sign?

 Any suggestions for improvement welcome. Suggestions for *not* improving
 it even more ;-)
>>> I agree that it looks quite good, and that the vertical part should be
>>> shorter. Also, the horizontal part could be longer in my eyes.
>>> And I’d be very interested in how you did it :-)
>>>
>> I use a very simple \path. Originally I simply added it as a \markup and
>> used extra-offset to position it. But thanks to Abraham's blog post I
>> changed that to use a fingering indication. However, I'm not really sure
>> this is more reliable (for example against transposition):
>>
>> So this is what it looks like now:
>>
>> \set fingeringOrientations = #'(left)
>> > \markup {
>>  \path #0.175
>>  #'((moveto 0 -2)
>> (rlineto 0 3)
>> (rlineto 0.85 0)
>> (moveto -1.5 2)) } > 8
>>
>> Urs
>>
>>> Yours, Simon
>> ___
>> 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: Layout of a (piano) hand indicator

2015-11-25 Thread Jacques Menu
Hello Urs,

The horizontal part is not visible if the note head lies on a line:

{
  \set fingeringOrientations = #'(left)
   8
}

{
  \set fingeringOrientations = #'(left)
   8
}

JM

> Le 24 nov. 2015 à 23:44, Urs Liska  a écrit :
> 
> 
> 
> Am 24.11.2015 um 22:39 schrieb Simon Albrecht:
>> On 24.11.2015 18:49, Urs Liska wrote:
>>> Hi all,
>>> 
>>> please consider the attached image, especially the "half-bracket" at the
>>> center. This is to indicate that this d' is to be played with the
>>> left hand.
>>> 
>>> Is there anything I could improve to the proportions and placement of
>>> that sign?
>>> 
>>> Any suggestions for improvement welcome. Suggestions for *not* improving
>>> it even more ;-)
>> 
>> I agree that it looks quite good, and that the vertical part should be
>> shorter. Also, the horizontal part could be longer in my eyes.
>> And I’d be very interested in how you did it :-)
>> 
> 
> I use a very simple \path. Originally I simply added it as a \markup and
> used extra-offset to position it. But thanks to Abraham's blog post I
> changed that to use a fingering indication. However, I'm not really sure
> this is more reliable (for example against transposition):
> 
> So this is what it looks like now:
> 
> \set fingeringOrientations = #'(left)
>  \markup {
>  \path #0.175
>  #'((moveto 0 -2)
> (rlineto 0 3)
> (rlineto 0.85 0)
> (moveto -1.5 2)) } > 8
> 
> Urs
> 
>> Yours, Simon
> 
> ___
> 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: Layout of a (piano) hand indicator

2015-11-24 Thread Urs Liska


Am 24.11.2015 um 22:39 schrieb Simon Albrecht:
> On 24.11.2015 18:49, Urs Liska wrote:
>> Hi all,
>>
>> please consider the attached image, especially the "half-bracket" at the
>> center. This is to indicate that this d' is to be played with the
>> left hand.
>>
>> Is there anything I could improve to the proportions and placement of
>> that sign?
>>
>> Any suggestions for improvement welcome. Suggestions for *not* improving
>> it even more ;-)
>
> I agree that it looks quite good, and that the vertical part should be
> shorter. Also, the horizontal part could be longer in my eyes.
> And I’d be very interested in how you did it :-)
>

I use a very simple \path. Originally I simply added it as a \markup and
used extra-offset to position it. But thanks to Abraham's blog post I
changed that to use a fingering indication. However, I'm not really sure
this is more reliable (for example against transposition):

So this is what it looks like now:

\set fingeringOrientations = #'(left)
 8

Urs

> Yours, Simon

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


Re: Layout of a (piano) hand indicator

2015-11-24 Thread Simon Albrecht

On 24.11.2015 18:49, Urs Liska wrote:

Hi all,

please consider the attached image, especially the "half-bracket" at the
center. This is to indicate that this d' is to be played with the left hand.

Is there anything I could improve to the proportions and placement of
that sign?

Any suggestions for improvement welcome. Suggestions for *not* improving
it even more ;-)


I agree that it looks quite good, and that the vertical part should be 
shorter. Also, the horizontal part could be longer in my eyes.

And I’d be very interested in how you did it :-)

Yours, Simon

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


Re: Layout of a (piano) hand indicator

2015-11-24 Thread Noeck
Hi Urs,

to me it looks pretty much optimal. To be more precise:

I like:
+ the top edge is at a defined position between the staff lines
+ it has round edges (as far as I can tell)
+ the distance from the note head/stem is good (positioning in general)

I find acceptable but other choices could also look good:
- the length of the vertical line (shorter?)
- it is hard to tell from the png how wide it is as even the stems have
different widths in the image. But I would probably make it a bit
thinner. About the thickness of a staff line. At most as thick as a stem.

Cheers,
Joram


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


RE: Layout of a (piano) hand indicator

2015-11-24 Thread Mark Stephen Mrotek
Urs,

V 2.18 has a snippet at:
http://lilypond.org/doc/v2.18/Documentation/notation/common-notation-for-keyboards#staff_002dchange-lines

Mark

-Original Message-
From: lilypond-user-bounces+carsonmark=ca.rr@gnu.org 
[mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of Urs 
Liska
Sent: Tuesday, November 24, 2015 9:50 AM
To: lilypond-user 
Subject: Layout of a (piano) hand indicator

Hi all,

please consider the attached image, especially the "half-bracket" at the 
center. This is to indicate that this d' is to be played with the left hand.

Is there anything I could improve to the proportions and placement of that sign?

Any suggestions for improvement welcome. Suggestions for *not* improving it 
even more ;-)

Best
Urs



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


Re: Layout of a (piano) hand indicator

2015-11-24 Thread Kieren MacMillan
Hi all,

> I did a blog post about this very thing!



Hope this helps!
Kieren.


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


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


Re: Layout of a (piano) hand indicator

2015-11-24 Thread tisimst
Urs,

On Tuesday, November 24, 2015, Urs Liska [via Lilypond] <
ml-node+s1069038n18406...@n5.nabble.com> wrote:

> Hi all,
>
> please consider the attached image, especially the "half-bracket" at the
> center. This is to indicate that this d' is to be played with the left
> hand.
>
> Is there anything I could improve to the proportions and placement of
> that sign?
>
> Any suggestions for improvement welcome. Suggestions for *not* improving
> it even more ;-)
>
> Best
> Urs
>
>
> ___
> lilypond-user mailing list
> [hidden email] 
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
> *gesang.png* (11K) Download Attachment
> 
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://lilypond.1069038.n5.nabble.com/Layout-of-a-piano-hand-indicator-tp184061.html
> To start a new topic under User, email ml-node+s1069038n...@n5.nabble.com
> 
> To unsubscribe from Lilypond, click here
> 
> .
> NAML
> 
>

I did a blog post about this very thing! You'll have to look back a ways
though in the archives (not lilypondblog). I probably wouldn't make the
vertical section quite so long.

Best

Abraham




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Layout-of-a-piano-hand-indicator-tp184061p184063.html
Sent from the User mailing list archive at Nabble.com.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user