Re: ClefModifier tweaks conditional on clef

2017-05-12 Thread Noeck


Am 11.05.2017 um 01:03 schrieb Simon Albrecht:
> 
> Change clefs can be recognised by the glyph name as well. You can try
> putting some sort of (display glyph-name) in the body of the
> let-expression (on the same level like the actual functionality) to find
> out more.

Ah of course. Thanks, Simon.

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


Re: ClefModifier tweaks conditional on clef

2017-05-10 Thread Simon Albrecht

Am 10.05.2017 um 19:26 schrieb Noeck:

Am 10.05.2017 um 00:03 schrieb Simon Albrecht:

of course you could write a callback:

Thanks Simon,

that's much better than my approach to replace the \clef command with a
\once \override or \tweak and \clef combination.

I'll figure out what the #\F means


It’s a Scheme ‘character’.


  but could someone tell me how I can
find out whether the clef is a CueClef or clef of a clef change?
Is there a property I can access in your callback?


Change clefs can be recognised by the glyph name as well. You can try 
putting some sort of (display glyph-name) in the body of the 
let-expression (on the same level like the actual functionality) to find 
out more.


Best, Simon

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


Re: ClefModifier tweaks conditional on clef

2017-05-10 Thread Noeck
Am 10.05.2017 um 00:03 schrieb Simon Albrecht:
> of course you could write a callback:

Thanks Simon,

that's much better than my approach to replace the \clef command with a
\once \override or \tweak and \clef combination.

I'll figure out what the #\F means but could someone tell me how I can
find out whether the clef is a CueClef or clef of a clef change?
Is there a property I can access in your callback?

Best,
Joram

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


Re: ClefModifier tweaks conditional on clef

2017-05-09 Thread tisimst
All,

On Tue, May 9, 2017 at 2:58 PM, Noeck [via Lilypond] <
ml+s1069038n203034...@n5.nabble.com> wrote:

> does it only handle the x-offset? Try-and-error told me that the first
> number is the X-offset for _8 and the second for ^8.
> But can I affect the y position?
>

Oh, yeah. Sorry about that. I was going off of memory, but forgot that this
is how the pairs are actually utilized. Thanks, Simon, for a usable
solution.

Best,
Abraham




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/ClefModifier-tweaks-conditional-on-clef-tp203018p203039.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


Re: ClefModifier tweaks conditional on clef

2017-05-09 Thread Simon Albrecht

Am 09.05.2017 um 23:39 schrieb Kieren MacMillan:

Hi Joram,


does it only handle the x-offset? Try-and-error told me that the first
number is the X-offset for _8 and the second for ^8.
But can I affect the y position?

Ah! I look forward to seeing the answer.
It would be great (actually, kind of essential) if it did.


Perhaps needless to mention, and I’m sure the following implementation 
isn’t to be taken serious, but of course you could write a callback:


%%%
\version "2.19.58"

#(define (adapt-to-clef-glyph grob)
   (let* ((clef-glyph (ly:grob-property
  (ly:grob-parent grob 1)
  'glyph-name
  ""))
  (F-clef (string-any #\F clef-glyph)))
 (if F-clef 10 0)))

\layout {
  \context {
\Staff
\override ClefModifier.Y-offset = #adapt-to-clef-glyph
  }
}

{
  \clef "treble_8"
  1
  \clef "bass_8"
  c,1
}
%%

Best, Simon

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


Re: ClefModifier tweaks conditional on clef

2017-05-09 Thread Kieren MacMillan
Hi Joram,

> does it only handle the x-offset? Try-and-error told me that the first
> number is the X-offset for _8 and the second for ^8.
> But can I affect the y position?

Ah! I look forward to seeing the answer.
It would be great (actually, kind of essential) if it did.

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: ClefModifier tweaks conditional on clef

2017-05-09 Thread Noeck
Hi,

does it only handle the x-offset? Try-and-error told me that the first
number is the X-offset for _8 and the second for ^8.
But can I affect the y position?

Best,
Joram

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


Re: ClefModifier tweaks conditional on clef

2017-05-09 Thread Kieren MacMillan
Abraham,

> The ClefModifier grob has a property called "clef-alignments" that handles 
> this, providing individual positioning for G, F, and C clefs (you'll likely 
> need to play around with the numbers a bit): 
> http://lilypond.org/doc/v2.19/Documentation/internals/clefmodifier

Oh, FFS… I clearly didn’t RTFM.
Apologies — and 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: ClefModifier tweaks conditional on clef

2017-05-09 Thread tisimst
Kieren,

On Tue, May 9, 2017 at 8:02 AM, Kieren MacMillan [via Lilypond] <
ml+s1069038n203018...@n5.nabble.com> wrote:

> Hello all,
>
> In Gould (p. 506), it suggests that the clef modifier for the bass clef
> should dangle from the tip of the bass clef. Lilypond does the following by
> default:
>
>
> I would like to move this to the tip, but without affecting the modifier
> for the treble clef (which is in the perfect position right now).
>
> I know I could define a macro (e.g. “bassb”) which outputs a clef with the
> modifier tweaked… but I’d rather put it in a context modification, inside
> the stylesheet (where my clefs, fonts, etc. are set). Is there a nice
> global way to apply X-offset/Y-offset/extra-offset(/??) tweaks
> conditionally based on which clef is being used?
>

The ClefModifier grob has a property called "clef-alignments" that handles
this, providing individual positioning for G, F, and C clefs (you'll likely
need to play around with the numbers a bit):

http://lilypond.org/doc/v2.19/Documentation/internals/clefmodifier

HTH,
Abraham




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/ClefModifier-tweaks-conditional-on-clef-tp203018p203026.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


ClefModifier tweaks conditional on clef

2017-05-09 Thread Kieren MacMillan
Hello all,

In Gould (p. 506), it suggests that the clef modifier for the bass clef should 
dangle from the tip of the bass clef. Lilypond does the following by default:



I would like to move this to the tip, but without affecting the modifier for 
the treble clef (which is in the perfect position right now).

I know I could define a macro (e.g. “bassb”) which outputs a clef with the 
modifier tweaked… but I’d rather put it in a context modification, inside the 
stylesheet (where my clefs, fonts, etc. are set). Is there a nice global way to 
apply X-offset/Y-offset/extra-offset(/??) tweaks conditionally based on which 
clef is being used?

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