Re: different font size settings for instrumentName and shortInstrumentName

2016-09-21 Thread Pierre Perol-Schneider
Done:
http://lsr.di.unimi.it/LSR/Item?id=1046

Cheers,
Pierre

2016-09-21 18:50 GMT+02:00 Kieren MacMillan :

> Hi Pierre,
>
> That works perfectly!
>
> Might I suggest that would make a great snippet in the doc section on
> instrument names?
> I can’t be the only one who’s ever wanted different size names for the two
> types…
>
> Many 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: different font size settings for instrumentName and shortInstrumentName

2016-09-21 Thread Simon Albrecht

Hi Kieren,

I think the most natural way to do this would be to define a scheme 
function, which generates an output def, so that the following two 
examples would have the same result:


%%%
\version "2.19.47"

\score {
  \new Staff \with {
instrumentName = \markup \fontsize #3 "Flute"
shortInstrumentName = \markup \fontsize #-2 "Fl."
  }
  { 1 \break 1 }
}

nameInstrument =
#(define-scheme-function (long short) (string? string?)
   (ly:make-output-def
;;; do whatever it takes to make an output def with the above content…
))

\score {
  \new Staff \nameInstrument "Flute" "Fl." { 1 \break 1 }
}
%%

David K. recently made it possible to use multiple \with blocks per 
context creation, so that could easily be combined with other 
modifications to the Staff.


Unfortunately, ly:make-output-def is totally opaque, even looking at the 
definition in the source doesn’t give me (ok, I don’t know any C++) the 
slightest hint how to use it. What’s more, one cannot use \displayScheme 
on a with block… so I need to ask for others to chime in here – it can’t 
be too complicated, can it?


Best, Simon

On 21.09.2016 16:08, Kieren MacMillan wrote:

Hello all,

Has anyone elegantly solved the problem of having different font settings 
(size, in particular) for instrumentName and shortInstrumentName? I know I 
could write a music function, and then use

 instrumentName = “long name”
 shortInstrumentName = \myfunction ”short name”

or even just use

 instrumentName = “long name”
 shortInstrumentName = \markup \fontsize #-2 ”short name”

etc., but I’d prefer a global solution that can be set as a context override.

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



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


Re: different font size settings for instrumentName and shortInstrumentName

2016-09-21 Thread Kieren MacMillan
Hi Pierre,

That works perfectly!

Might I suggest that would make a great snippet in the doc section on 
instrument names?
I can’t be the only one who’s ever wanted different size names for the two 
types…

Many 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: different font size settings for instrumentName and shortInstrumentName

2016-09-21 Thread Pierre Perol-Schneider
Or even:

\version "2.19.48"

longInstrumeentNameFontSize = 6
shortInstrumeentNameFontSize = -3

\layout {
\context {
\Staff
\override InstrumentName.after-line-breaking = #(lambda (grob)
   (ly:grob-set-property! grob 'long-text
  (markup #:fontsize longInstrumeentNameFontSize (ly:grob-property
grob 'long-text)))
  (ly:grob-set-property! grob 'text
  (markup #:fontsize shortInstrumeentNameFontSize (ly:grob-property
grob 'text)))

  )
}
}

\new Staff
   \with {
 instrumentName = "Flute"
 shortInstrumentName = "Fl."
   }
   { c''1 \break c'' }

Cheers,
Pierre

2016-09-21 18:28 GMT+02:00 Pierre Perol-Schneider <
pierre.schneider.pa...@gmail.com>:

> Hi Kieren,
>
> How about:
>
> 
> \version "2.19.48"
>
> shortInstrumeentNameFontSize = -3
>
> \layout {
> \context {
> \Staff
> \override InstrumentName.after-line-breaking = #(lambda (grob)
>   (ly:grob-set-property! grob 'text
>   (markup #:fontsize shortInstrumeentNameFontSize
> (ly:grob-property grob 'text
> }
> }
>
> \new Staff
>\with {
>  instrumentName = "Flute"
>  shortInstrumentName = "Fl."
>}
>{ c''1 \break c'' }
> 
>
> Cheers,
> Pierre
>
> 2016-09-21 16:08 GMT+02:00 Kieren MacMillan  >:
>
>> Hello all,
>>
>> Has anyone elegantly solved the problem of having different font settings
>> (size, in particular) for instrumentName and shortInstrumentName? I know I
>> could write a music function, and then use
>>
>> instrumentName = “long name”
>> shortInstrumentName = \myfunction ”short name”
>>
>> or even just use
>>
>> instrumentName = “long name”
>> shortInstrumentName = \markup \fontsize #-2 ”short name”
>>
>> etc., but I’d prefer a global solution that can be set as a context
>> override.
>>
>> 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
>>
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: different font size settings for instrumentName and shortInstrumentName

2016-09-21 Thread Pierre Perol-Schneider
Hi Kieren,

How about:


\version "2.19.48"

shortInstrumeentNameFontSize = -3

\layout {
\context {
\Staff
\override InstrumentName.after-line-breaking = #(lambda (grob)
  (ly:grob-set-property! grob 'text
  (markup #:fontsize shortInstrumeentNameFontSize (ly:grob-property
grob 'text
}
}

\new Staff
   \with {
 instrumentName = "Flute"
 shortInstrumentName = "Fl."
   }
   { c''1 \break c'' }


Cheers,
Pierre

2016-09-21 16:08 GMT+02:00 Kieren MacMillan :

> Hello all,
>
> Has anyone elegantly solved the problem of having different font settings
> (size, in particular) for instrumentName and shortInstrumentName? I know I
> could write a music function, and then use
>
> instrumentName = “long name”
> shortInstrumentName = \myfunction ”short name”
>
> or even just use
>
> instrumentName = “long name”
> shortInstrumentName = \markup \fontsize #-2 ”short name”
>
> etc., but I’d prefer a global solution that can be set as a context
> override.
>
> 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
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


different font size settings for instrumentName and shortInstrumentName

2016-09-21 Thread Kieren MacMillan
Hello all,

Has anyone elegantly solved the problem of having different font settings 
(size, in particular) for instrumentName and shortInstrumentName? I know I 
could write a music function, and then use

instrumentName = “long name”
shortInstrumentName = \myfunction ”short name”

or even just use

instrumentName = “long name”
shortInstrumentName = \markup \fontsize #-2 ”short name”

etc., but I’d prefer a global solution that can be set as a context override.

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