Re: How to tweak X-Y-offset of left Fingerings in a chord

2021-04-14 Thread Jean Abou Samra


Le 13/04/2021 à 23:18, Thomas Morley a écrit :

Hi,

let's say I've a chord with Fingerings left.
Now I want to tweak a certain Fingering a little bit up/down and left/right.

How to do so?

Here a minimal to play with:

{
   \set fingeringOrientations = #'(left)
   

   %% below does not work
   \once \override Fingering.Y-offset = 10
   \once \override Fingering.X-offset = 10
   

   
}

Changing fingeringOrientations is not an option.
Using extra-offset neither, because the Fingering will be the right
bound of the FigerGlideSpanner, which would look misplaced then.


Any hints?


Thanks,
   Harm



Hi,

Something very weird seems to be going
on. Try:

{
  \set fingeringOrientations = #'(left)
  \once \override Staff.FingeringColumn.positioning-done =
    #(lambda (grob)
   (let* ((fingering-array (ly:grob-object grob 'fingerings))
  (fingerings (ly:grob-array->list fingering-array)))
 (for-each
   (lambda (fingering x)
 (ly:message "Before: ~s" (ly:grob-property-data fingering 
'X-offset))

 (ly:grob-set-property! fingering 'X-offset x)
 (ly:message "After: ~s" (ly:grob-property-data fingering 
'X-offset)))

   fingerings
   '(0 -10))
 #t))
  
}

This displays

Before: ()

After: 0

Before: ()

After: -10

No X-offset before seems somewhat odd, but why
not. Maybe something that I haven't yet understood
is setting it.

However, the values 0 and -10 have no effect.
Instead, the \tweak takes effect (try changing
the -4), even though the value it gives to the
property is supposed to be overwritten.

This very much reminds me of
https://lists.gnu.org/archive/html/bug-lilypond/2021-01/msg00014.html ...

For X-offset, the following seems to do the trick
as long as the values are negative:

{
  \set fingeringOrientations = #'(left)
  \once \override Staff.FingeringColumn.positioning-done = ##t
  
}

For Y-offset, I haven't found a workaround yet.


Cheers,
Jean



Re: How to tweak X-Y-offset of left Fingerings in a chord

2021-04-14 Thread Xavier Scheuer
On Wed, 14 Apr 2021 at 10:31, Jean Abou Samra  wrote:
>
>
> Hi,
>
> Something very weird seems to be going
> on. Try:

Hello,

Speaking of weird, the tweaks work if there is only one fingering in the
chord.

\set fingeringOrientations = #'(left)


Cheers,
Xavier

-- 
Xavier Scheuer 


Re: How to tweak X-Y-offset of left Fingerings in a chord

2021-04-14 Thread Thomas Morley
Am Mi., 14. Apr. 2021 um 10:42 Uhr schrieb Xavier Scheuer :
>
> On Wed, 14 Apr 2021 at 10:31, Jean Abou Samra  wrote:
> >
> >
> > Hi,
> >
> > Something very weird seems to be going
> > on. Try:
>
> Hello,
>
> Speaking of weird, the tweaks work if there is only one fingering in the 
> chord.
>
> \set fingeringOrientations = #'(left)
> 
>
> Cheers,
> Xavier
>
> --
> Xavier Scheuer 
>

Yeah, I noticed already. And it contradicts reasonable user-expectations.
Viewing it from inside LilyPond: the situation is indeed different if
you have one or more Fingerings. Multiple Fingerings are collected in
FingeringColumn and an own placing algorithm is at work. With only one
Fingering a FingeringColumn is not created at all.

I wonder if it would make sense if a FingeringColumn (with easy
accessible customizing possibilities) would always be created even for
only one Fingering, similar to NoteColumn with a single NoteHead.

Cheers,
  Harm



Re: How to tweak X-Y-offset of left Fingerings in a chord

2021-04-14 Thread Jean Abou Samra



Le 14/04/2021 à 10:30, Jean Abou Samra a écrit :



For Y-offset, I haven't found a workaround yet.



Okay, this does the job:

\version "2.22.0"

{
  \set fingeringOrientations = #'(left)
  \once \override Staff.FingeringColumn.positioning-done =
    #(lambda (grob)
   (let* ((fingering-array (ly:grob-object grob 'fingerings))
  (fingerings (ly:grob-array->list fingering-array)))
 (for-each
   (lambda (fingering x y)
 (ly:grob-translate-axis! fingering x X)
 (ly:grob-translate-axis! fingering y Y))
   fingerings
   '(1 -0.5)
   '(5 -1))
 #t))
  
}

Puzzled,
Jean




Re: How to tweak X-Y-offset of left Fingerings in a chord

2021-04-14 Thread Thomas Morley
Am Mi., 14. Apr. 2021 um 10:30 Uhr schrieb Jean Abou Samra :
>
>
> Le 13/04/2021 à 23:18, Thomas Morley a écrit :
>
> Hi,
>
> let's say I've a chord with Fingerings left.
> Now I want to tweak a certain Fingering a little bit up/down and left/right.
>
> How to do so?
>
> Here a minimal to play with:
>
> {
>   \set fingeringOrientations = #'(left)
>   
>
>   %% below does not work
>   \once \override Fingering.Y-offset = 10
>   \once \override Fingering.X-offset = 10
>   
>
>   
> }
>
> Changing fingeringOrientations is not an option.
> Using extra-offset neither, because the Fingering will be the right
> bound of the FigerGlideSpanner, which would look misplaced then.
>
>
> Any hints?
>
>
> Thanks,
>   Harm
>
>
> Hi,
>
> Something very weird seems to be going
> on. Try:
>
> {
>   \set fingeringOrientations = #'(left)
>   \once \override Staff.FingeringColumn.positioning-done =
> #(lambda (grob)
>(let* ((fingering-array (ly:grob-object grob 'fingerings))
>   (fingerings (ly:grob-array->list fingering-array)))
>  (for-each
>(lambda (fingering x)
>  (ly:message "Before: ~s" (ly:grob-property-data fingering 
> 'X-offset))
>  (ly:grob-set-property! fingering 'X-offset x)
>  (ly:message "After: ~s" (ly:grob-property-data fingering 
> 'X-offset)))
>fingerings
>'(0 -10))
>  #t))
>   
> }
>
> This displays
>
> Before: ()
>
> After: 0
>
> Before: ()
>
> After: -10
>
> No X-offset before seems somewhat odd, but why
> not. Maybe something that I haven't yet understood
> is setting it.
>
> However, the values 0 and -10 have no effect.
> Instead, the \tweak takes effect (try changing
> the -4), even though the value it gives to the
> property is supposed to be overwritten.
>
> This very much reminds me of
> https://lists.gnu.org/archive/html/bug-lilypond/2021-01/msg00014.html ...
>
> For X-offset, the following seems to do the trick
> as long as the values are negative:
>
> {
>   \set fingeringOrientations = #'(left)
>   \once \override Staff.FingeringColumn.positioning-done = ##t
>   
> }
>
> For Y-offset, I haven't found a workaround yet.
>
>
> Cheers,
> Jean

I had a look at fingering-column.cc. While my C++-knowledge is aprox.
zero, It seems that X/Y-offset is simply ignored, and positioning is
done via the C++ version of ly:grob-translate-axis!, I could be wrong,
though.

Nevertheless, using it like below seems to work:

\version "2.23.2"

moveColumnedFinger =
#(define-music-function (finger x-y-move)(index? pair?)
#{
  \override Staff.FingeringColumn.positioning-done =
  #(lambda (grob)
(let* ((fingers-array (ly:grob-object grob 'fingerings))
   (fingers
 (if (ly:grob-array? fingers-array)
 (ly:grob-array->list fingers-array)
 '()))
   (digit-grob-alist
 (map
   (lambda (finger)
 (cons
   (ly:event-property (event-cause finger) 'digit)
   finger))
   fingers)))

(ly:grob-set-property!
  (assoc-get finger digit-grob-alist) 'color red)
(ly:grob-translate-axis!
  (assoc-get finger digit-grob-alist) (car x-y-move) X)
(ly:grob-translate-axis!
  (assoc-get finger digit-grob-alist) (cdr x-y-move) Y)
(ly:fingering-column::calc-positioning-done grob)))
#})


{
  \set fingeringOrientations = #'(right)
  < c'\glide-3 e'\glide-2 >2
  s1*2
  \set fingeringOrientations = #'(left)
  \once \moveColumnedFinger 2 #'(-1 . 1)
  < d'-3 fis'-2 >2
}

Ofcourse only one Fingering can be moved with this code.
While it is not too hard to extend this coding for moving multiple
Fingerings at once, it would be inconveniant calling it in a .ly-file.
Itw ould result in something at the lines of:

\moveColumnedFingers
  #(list
'(1 . (x1 . y1))
'(2 . (x2 . y2))
'(3 ... )
...)

Not a nice user-interface, I'd say.

Additional, it would not work with only one Fingering present in chord
like 
Thus. I wonder, if it would be better toalways create a FingerigColumn.

Thanks,
  Harm



Re: How to tweak X-Y-offset of left Fingerings in a chord

2021-04-14 Thread Thomas Morley
Am Mi., 14. Apr. 2021 um 11:47 Uhr schrieb Jean Abou Samra :
>
>
> Le 14/04/2021 à 10:30, Jean Abou Samra a écrit :
> >
> >
> > For Y-offset, I haven't found a workaround yet.
> >
>
> Okay, this does the job:
>
> \version "2.22.0"
>
> {
>\set fingeringOrientations = #'(left)
>\once \override Staff.FingeringColumn.positioning-done =
>  #(lambda (grob)
> (let* ((fingering-array (ly:grob-object grob 'fingerings))
>(fingerings (ly:grob-array->list fingering-array)))
>   (for-each
> (lambda (fingering x y)
>   (ly:grob-translate-axis! fingering x X)
>   (ly:grob-translate-axis! fingering y Y))
> fingerings
> '(1 -0.5)
> '(5 -1))
>   #t))
>
> }
>
> Puzzled,
> Jean
>

You were faster :)

Thanks,
 Harm



Re: How to tweak X-Y-offset of left Fingerings in a chord

2021-04-14 Thread Thomas Morley
Am Mi., 14. Apr. 2021 um 11:48 Uhr schrieb Thomas Morley
:
>
> Am Mi., 14. Apr. 2021 um 10:30 Uhr schrieb Jean Abou Samra 
> :
> >
> >
> > Le 13/04/2021 à 23:18, Thomas Morley a écrit :
> >
> > Hi,
> >
> > let's say I've a chord with Fingerings left.
> > Now I want to tweak a certain Fingering a little bit up/down and left/right.
> >
> > How to do so?
> >
> > Here a minimal to play with:
> >
> > {
> >   \set fingeringOrientations = #'(left)
> >   
> >
> >   %% below does not work
> >   \once \override Fingering.Y-offset = 10
> >   \once \override Fingering.X-offset = 10
> >   
> >
> >   
> > }
> >
> > Changing fingeringOrientations is not an option.
> > Using extra-offset neither, because the Fingering will be the right
> > bound of the FigerGlideSpanner, which would look misplaced then.
> >
> >
> > Any hints?
> >
> >
> > Thanks,
> >   Harm
> >
> >
> > Hi,
> >
> > Something very weird seems to be going
> > on. Try:
> >
> > {
> >   \set fingeringOrientations = #'(left)
> >   \once \override Staff.FingeringColumn.positioning-done =
> > #(lambda (grob)
> >(let* ((fingering-array (ly:grob-object grob 'fingerings))
> >   (fingerings (ly:grob-array->list fingering-array)))
> >  (for-each
> >(lambda (fingering x)
> >  (ly:message "Before: ~s" (ly:grob-property-data fingering 
> > 'X-offset))
> >  (ly:grob-set-property! fingering 'X-offset x)
> >  (ly:message "After: ~s" (ly:grob-property-data fingering 
> > 'X-offset)))
> >fingerings
> >'(0 -10))
> >  #t))
> >   
> > }
> >
> > This displays
> >
> > Before: ()
> >
> > After: 0
> >
> > Before: ()
> >
> > After: -10
> >
> > No X-offset before seems somewhat odd, but why
> > not. Maybe something that I haven't yet understood
> > is setting it.
> >
> > However, the values 0 and -10 have no effect.
> > Instead, the \tweak takes effect (try changing
> > the -4), even though the value it gives to the
> > property is supposed to be overwritten.
> >
> > This very much reminds me of
> > https://lists.gnu.org/archive/html/bug-lilypond/2021-01/msg00014.html ...
> >
> > For X-offset, the following seems to do the trick
> > as long as the values are negative:
> >
> > {
> >   \set fingeringOrientations = #'(left)
> >   \once \override Staff.FingeringColumn.positioning-done = ##t
> >   
> > }
> >
> > For Y-offset, I haven't found a workaround yet.
> >
> >
> > Cheers,
> > Jean
>
> I had a look at fingering-column.cc. While my C++-knowledge is aprox.
> zero, It seems that X/Y-offset is simply ignored, and positioning is
> done via the C++ version of ly:grob-translate-axis!, I could be wrong,
> though.
>
> Nevertheless, using it like below seems to work:
>
> \version "2.23.2"
>
> moveColumnedFinger =
> #(define-music-function (finger x-y-move)(index? pair?)
> #{
>   \override Staff.FingeringColumn.positioning-done =
>   #(lambda (grob)
> (let* ((fingers-array (ly:grob-object grob 'fingerings))

Btw, 'fingerings as a pointer from FingeringColumn to its containing
Fingerings is completely undocumented, afaict.

>(fingers
>  (if (ly:grob-array? fingers-array)
>  (ly:grob-array->list fingers-array)
>  '()))
>(digit-grob-alist
>  (map
>(lambda (finger)
>  (cons
>(ly:event-property (event-cause finger) 'digit)
>finger))
>fingers)))
>
> (ly:grob-set-property!
>   (assoc-get finger digit-grob-alist) 'color red)
> (ly:grob-translate-axis!
>   (assoc-get finger digit-grob-alist) (car x-y-move) X)
> (ly:grob-translate-axis!
>   (assoc-get finger digit-grob-alist) (cdr x-y-move) Y)
> (ly:fingering-column::calc-positioning-done grob)))
> #})
>
>
> {
>   \set fingeringOrientations = #'(right)
>   < c'\glide-3 e'\glide-2 >2
>   s1*2
>   \set fingeringOrientations = #'(left)
>   \once \moveColumnedFinger 2 #'(-1 . 1)
>   < d'-3 fis'-2 >2
> }
>
> Ofcourse only one Fingering can be moved with this code.
> While it is not too hard to extend this coding for moving multiple
> Fingerings at once, it would be inconveniant calling it in a .ly-file.
> Itw ould result in something at the lines of:
>
> \moveColumnedFingers
>   #(list
> '(1 . (x1 . y1))
> '(2 . (x2 . y2))
> '(3 ... )
> ...)
>
> Not a nice user-interface, I'd say.
>
> Additional, it would not work with only one Fingering present in chord
> like 
> Thus. I wonder, if it would be better toalways create a FingerigColumn.
>
> Thanks,
>   Harm



Re: How to tweak X-Y-offset of left Fingerings in a chord

2021-04-14 Thread Thomas Morley
Am Mi., 14. Apr. 2021 um 11:48 Uhr schrieb Thomas Morley
:
>
> Am Mi., 14. Apr. 2021 um 10:30 Uhr schrieb Jean Abou Samra 
> :
> >
> >
> > Le 13/04/2021 à 23:18, Thomas Morley a écrit :
> >
> > Hi,
> >
> > let's say I've a chord with Fingerings left.
> > Now I want to tweak a certain Fingering a little bit up/down and left/right.
> >
> > How to do so?
> >
> > Here a minimal to play with:
> >
> > {
> >   \set fingeringOrientations = #'(left)
> >   
> >
> >   %% below does not work
> >   \once \override Fingering.Y-offset = 10
> >   \once \override Fingering.X-offset = 10
> >   
> >
> >   
> > }
> >
> > Changing fingeringOrientations is not an option.
> > Using extra-offset neither, because the Fingering will be the right
> > bound of the FigerGlideSpanner, which would look misplaced then.
> >
> >
> > Any hints?
> >
> >
> > Thanks,
> >   Harm
> >
> >
> > Hi,
> >
> > Something very weird seems to be going
> > on. Try:
> >
> > {
> >   \set fingeringOrientations = #'(left)
> >   \once \override Staff.FingeringColumn.positioning-done =
> > #(lambda (grob)
> >(let* ((fingering-array (ly:grob-object grob 'fingerings))
> >   (fingerings (ly:grob-array->list fingering-array)))
> >  (for-each
> >(lambda (fingering x)
> >  (ly:message "Before: ~s" (ly:grob-property-data fingering 
> > 'X-offset))
> >  (ly:grob-set-property! fingering 'X-offset x)
> >  (ly:message "After: ~s" (ly:grob-property-data fingering 
> > 'X-offset)))
> >fingerings
> >'(0 -10))
> >  #t))
> >   
> > }
> >
> > This displays
> >
> > Before: ()
> >
> > After: 0
> >
> > Before: ()
> >
> > After: -10
> >
> > No X-offset before seems somewhat odd, but why
> > not. Maybe something that I haven't yet understood
> > is setting it.
> >
> > However, the values 0 and -10 have no effect.
> > Instead, the \tweak takes effect (try changing
> > the -4), even though the value it gives to the
> > property is supposed to be overwritten.
> >
> > This very much reminds me of
> > https://lists.gnu.org/archive/html/bug-lilypond/2021-01/msg00014.html ...
> >
> > For X-offset, the following seems to do the trick
> > as long as the values are negative:
> >
> > {
> >   \set fingeringOrientations = #'(left)
> >   \once \override Staff.FingeringColumn.positioning-done = ##t
> >   
> > }
> >
> > For Y-offset, I haven't found a workaround yet.
> >
> >
> > Cheers,
> > Jean
>
> I had a look at fingering-column.cc. While my C++-knowledge is aprox.
> zero, It seems that X/Y-offset is simply ignored, and positioning is
> done via the C++ version of ly:grob-translate-axis!, I could be wrong,
> though.
>
> Nevertheless, using it like below seems to work:
>
> \version "2.23.2"
>
> moveColumnedFinger =
> #(define-music-function (finger x-y-move)(index? pair?)
> #{
>   \override Staff.FingeringColumn.positioning-done =
>   #(lambda (grob)
> (let* ((fingers-array (ly:grob-object grob 'fingerings))
>(fingers
>  (if (ly:grob-array? fingers-array)
>  (ly:grob-array->list fingers-array)
>  '()))
>(digit-grob-alist
>  (map
>(lambda (finger)
>  (cons
>(ly:event-property (event-cause finger) 'digit)
>finger))
>fingers)))
>
> (ly:grob-set-property!
>   (assoc-get finger digit-grob-alist) 'color red)
> (ly:grob-translate-axis!
>   (assoc-get finger digit-grob-alist) (car x-y-move) X)
> (ly:grob-translate-axis!
>   (assoc-get finger digit-grob-alist) (cdr x-y-move) Y)
> (ly:fingering-column::calc-positioning-done grob)))
> #})
>
>
> {
>   \set fingeringOrientations = #'(right)
>   < c'\glide-3 e'\glide-2 >2
>   s1*2
>   \set fingeringOrientations = #'(left)
>   \once \moveColumnedFinger 2 #'(-1 . 1)
>   < d'-3 fis'-2 >2
> }
>
> Ofcourse only one Fingering can be moved with this code.
> While it is not too hard to extend this coding for moving multiple
> Fingerings at once, it would be inconveniant calling it in a .ly-file.
> Itw ould result in something at the lines of:
>
> \moveColumnedFingers
>   #(list
> '(1 . (x1 . y1))
> '(2 . (x2 . y2))
> '(3 ... )
> ...)
>
> Not a nice user-interface, I'd say.
>
> Additional, it would not work with only one Fingering present in chord
> like 
> Thus. I wonder, if it would be better toalways create a FingerigColumn.
>
> Thanks,
>   Harm

Looks like below is easier for selecting a single Fingering and also
working if no FingeringColumn is present.

{
  \set fingeringOrientations = #'(right)
  < c'\glide-3 e'\glide-2 >2
  s1*2
  \set fingeringOrientations = #'(left)
  <
d'-3
fis'
  -\tweak after-line-breaking
#(lambda (grob)
  (ly:grob-translate-axis! grob 1 Y)
  (ly:grob-translate-axis! grob -2 X)
  )
  -2
  >2
}

I'll define an event-function for easier usage.
I've to run for my regular jo

Re: Text placing in two-choir pice

2021-04-14 Thread Karlin High

On 4/11/2021 3:08 PM, Jogchum Reitsma wrote:

I'm beginning to set Psalm 100 by Heinrich Schütz.


This reminds me of Brent Annable's post from 2018 with the entire 
Schwanengesang. The Psalm 100 would be near the end.



--
Karlin High
Missouri, USA



Manual

2021-04-14 Thread Mario Moles
Hi!
You know the manual for moveto, lineto etc ?
Thanks.


Re: Manual

2021-04-14 Thread Helge Kruse

On 15.04.2021 08:13, Mario Moles wrote:

Hi!
You know the manual for moveto, lineto etc ?
Thanks.


Sounds like you ask for PostScript commands. Would this help?
https://www.adobe.com/jp/print/postscript/pdfs/PLRM.pdf

Regards,
Helge