With \markup { \score { can I separately control the score size?

2014-06-29 Thread Richard Shann
When \markup contains a musical quote as a \score block the size of the
music would generally need to be smaller than the main score.
I have got as far as putting #(layout-set-staff-size 12) in the layout
block of the \markup \score , but that's got obvious problems as
does using \new Staff \with { fontSize = #-2 } inside the \markup \score

Any clues how to do this?

Richard





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


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread Pierre Perol-Schneider
2014-06-29 11:09 GMT+02:00 Richard Shann :


> Any clues how to do this?
>


\version "2.18.2"

\markup\scale #'(.5 . .5) {

   \score {

 \new Staff { c''1 }

 \layout {}

   }

}




\version "2.19.8"
\markup\scale #'(.5 . .5) {

   \score {

 c''1

   }

}


%%


HTH

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


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread Richard Shann
That works great, thank you. The only further tweak I needed was to put
\large before the text so that text comes out at a normal size with the
music reduced.
Richard

On Sun, 2014-06-29 at 11:40 +0200, Pierre Perol-Schneider wrote:
> 2014-06-29 11:09 GMT+02:00 Richard Shann :
>  
> Any clues how to do this?
> 
> 
> \version "2.18.2"
> 
> 
> \markup\scale #'(.5 . .5) {
> 
>\score {
> 
>  \new Staff { c''1 }
> 
>  \layout {}
> 
>}
> 
> }
> 
> 
> 
> 
> \version "2.19.8"
> 
> \markup\scale #'(.5 . .5) { 
> 
>\score {
> 
>  c''1
> 
>}
> 
> }
> 
> 
> %%
> 
> 
> HTH
> 
> Pierre
> 
> 
> 
> 
> 



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


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread Pierre Perol-Schneider
2014-06-29 13:42 GMT+02:00 Richard Shann :

That works great, thank you. The only further tweak I needed was to put
> \large before the text so that text comes out at a normal size with the
> music reduced.
>

I'm trying to make an easy function for (without success) :

%
\version "2.19.8"

mySize =
#(define-music-function (parser location arg) (number?)
(markup (make-scale-markup (cons arg arg

\mySize #.5 {
  \score {
c''1
  }
}
%

LilyPond says :"Expect: 2, found 1: ((0.5 . 0.5))"

Anyone ?

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


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread David Kastrup
Pierre Perol-Schneider  writes:

> 2014-06-29 13:42 GMT+02:00 Richard Shann :
>
> That works great, thank you. The only further tweak I needed was to put
>> \large before the text so that text comes out at a normal size with the
>> music reduced.
>>
>
> I'm trying to make an easy function for (without success) :
>
> %
> \version "2.19.8"
>
> mySize =
> #(define-music-function (parser location arg) (number?)
> (markup (make-scale-markup (cons arg arg
>
> \mySize #.5 {
>   \score {
> c''1
>   }
> }
> %
>
> LilyPond says :"Expect: 2, found 1: ((0.5 . 0.5))"

No, it doesn't.  It says:

fatal error: make-scale-markup: Wrong number of arguments.  Expect: 2, found 1: 
((0.5 . 0.5))

> Anyone ?

\scale needs two arguments.  You call it with one.

Then mySize is declared as a music function, but if it ever got to the
point of returning, it would fail because of returning a markup instead.

You want to use define-markup-command instead.  You want to make sure
you get the quite different definition/call as compared to
define-music-function right.  I would refrain from using the markup
macro when you don't have the syntax under control: when using #{
\markup ... #} instead, you are at least likely to get somewhat better
error messages.  Which is sort of the reverse of what #{...#} did with
error reporting in 2.14 or so, but why not make use of improvements?

And of course, the invocation needs to be inside of a \markup command.

-- 
David Kastrup

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


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread David Nalesnik
Hi,

On Sun, Jun 29, 2014 at 8:35 AM, David Kastrup  wrote:

> Pierre Perol-Schneider  writes:
>
> > 2014-06-29 13:42 GMT+02:00 Richard Shann :
> >
> > That works great, thank you. The only further tweak I needed was to put
> >> \large before the text so that text comes out at a normal size with the
> >> music reduced.
> >>
> >
> > I'm trying to make an easy function for (without success) :
> >
> > %
> > \version "2.19.8"
> >
> > mySize =
> > #(define-music-function (parser location arg) (number?)
> > (markup (make-scale-markup (cons arg arg
> >
> > \mySize #.5 {
> >   \score {
> > c''1
> >   }
> > }
> > %
> >
> > LilyPond says :"Expect: 2, found 1: ((0.5 . 0.5))"
>
> No, it doesn't.  It says:
>
> fatal error: make-scale-markup: Wrong number of arguments.  Expect: 2,
> found 1: ((0.5 . 0.5))
>
> > Anyone ?
>
> \scale needs two arguments.  You call it with one.
>
> Then mySize is declared as a music function, but if it ever got to the
> point of returning, it would fail because of returning a markup instead.
>
> You want to use define-markup-command instead.  You want to make sure
> you get the quite different definition/call as compared to
> define-music-function right.  I would refrain from using the markup
> macro when you don't have the syntax under control: when using #{
> \markup ... #} instead, you are at least likely to get somewhat better
> error messages.  Which is sort of the reverse of what #{...#} did with
> error reporting in 2.14 or so, but why not make use of improvements?
>
> And of course, the invocation needs to be inside of a \markup command.
>

This is what I got:

 \version "2.19.8"

 #(define-markup-command (mySize layout props arg t) (number? markup?)

  (interpret-markup layout props

(make-scale-markup (cons arg arg) t)))


 foo =

\markup {

  \score {

\new Staff {

  c1 c c c

}

\layout {}

  }

}


 \markup { \mySize #2 \foo }


%


HTH,

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


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread Pierre Perol-Schneider
2014-06-29 15:35 GMT+02:00 David Kastrup :


> > LilyPond says :"Expect: 2, found 1: ((0.5 . 0.5))"
>
> No, it doesn't.  It says:
>
> fatal error: make-scale-markup: Wrong number of arguments.  Expect: 2,
> found 1: ((0.5 . 0.5))
>

Ok


> Then mySize is declared as a music function, but if it ever got to the
> point of returning, it would fail because of returning a markup instead.
>

Ok, in fact I wanted to avoid this because...

And of course, the invocation needs to be inside of a \markup command.
>

... I don't want to put \markup
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread Pierre Perol-Schneider
Hi,

2014-06-29 15:40 GMT+02:00 David Nalesnik :

This is what I got:
>

Ok, thanks, but I'd like to find something like :

\mySize #.5 \Score ...

without \markup in order to find an alternate code as :
http://lsr.di.unimi.it/LSR/Item?id=862

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


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread Thomas Morley
2014-06-29 15:57 GMT+02:00 Pierre Perol-Schneider
:
> Hi,
>
> 2014-06-29 15:40 GMT+02:00 David Nalesnik :
>
>
>> This is what I got:
>
>
> Ok, thanks, but I'd like to find something like :
>
> \mySize #.5 \Score ...
>
> without \markup in order to find an alternate code as :
> http://lsr.di.unimi.it/LSR/Item?id=862
>
> Cheers,
> Pierre
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

Hi Pierre,

are you aware that we have two commands called `score'?
One is a music-function the other a markup-command.

I don't think you can replace the LSR-snippet-code with one outputting a markup.
It's simply a different thing.

However the following code takes a score (the music) as an argument
and returns a scaled markup:

\version "2.19.8"

mySize =
#(define-scheme-function (parser location nmbr score) (number? ly:score?)
  (markup #:scale (cons nmbr nmbr) #:score score))

\mySize #.5
  \score {
c''1
\layout {} %% needed even with 2.19.8
  }

Cheers,
  Harm

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


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread David Kastrup
Pierre Perol-Schneider  writes:

> Hi,
>
> 2014-06-29 15:40 GMT+02:00 David Nalesnik :
>
> This is what I got:
>>
>
> Ok, thanks, but I'd like to find something like :
>
> \mySize #.5 \Score ...
>
> without \markup in order to find an alternate code as :
> http://lsr.di.unimi.it/LSR/Item?id=862

That does not make even sense as a rationale since the synopsis used in
that snippet is utterly different.

-- 
David Kastrup

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


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread Pierre Perol-Schneider
Hi Harm,

2014-06-29 16:03 GMT+02:00 Thomas Morley :


> are you aware that we have two commands called `score'?
> One is a music-function the other a markup-command.
>

No I arn't.


> I don't think you can replace the LSR-snippet-code with one outputting a
> markup.
> It's simply a different thing.
>

Ok.


> However the following code takes a score (the music) as an argument
> and returns a scaled markup:
>

Great, that's what I'm looking for :

%%%
mySize =
#(define-scheme-function (parser location nmbr score) (number? ly:score?)
  (markup #:scale (cons (+ 1 (* 0.1 nmbr)) (+ 1 (* 0.1 nmbr))) #:score
score))

\mySize #-5
  \score {
c''1
\layout {
  indent = 0
}
  }

\mySize #0
  \score {
c''1
\layout {
  indent = 0
}
  }

\mySize #5
  \score {
c''1
\layout {
  indent = 0
}
  }


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


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread Pierre Perol-Schneider
2014-06-29 16:10 GMT+02:00 David Kastrup :


> That does not make even sense as a rationale since the synopsis used in
> that snippet is utterly different.
>

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


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread David Kastrup
Thomas Morley  writes:

> \version "2.19.8"
>
> mySize =
> #(define-scheme-function (parser location nmbr score) (number? ly:score?)
>   (markup #:scale (cons nmbr nmbr) #:score score))
>
> \mySize #.5
>   \score {
> c''1
> \layout {} %% needed even with 2.19.8

Because the implicit \layout {} is squeezed in at a syntactical level.

>   }

You can get away without it by letting the parser deal with the score markup:

\version "2.19.7"

mySize =
#(define-scheme-function (parser location nmbr score) (number? ly:score?)
  #{ \markup \scale #(cons nmbr nmbr) \score { #score } #})

\mySize #.5
  \score {
c''1
  }

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


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread Pierre Perol-Schneider
2014-06-29 16:17 GMT+02:00 David Kastrup :


> You can get away without it by letting the parser deal with the score
> markup:
>

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


Re: Weird spacing related to barlines

2014-06-29 Thread Phil Holmes
- Original Message - 
From: "Keith OHara" 

To: 
Sent: Sunday, June 29, 2014 4:32 AM
Subject: Re: Weird spacing related to barlines



Phil Holmes  philholmes.net> writes:


Can anyone explain what's going on here?

\score {
 \new MensuralStaff {



 \layout {
  \context {
\Score
  \override SpacingSpanner #'spacing-increment = #0
\remove "Default_bar_line_engraver"
 }}}


The "Default_bar_line_engraver" works oddly, in that it turns bar lines
on and off.  Without it, when you say \bar"|" in the music, you start
getting barlines after every note, and a double barline after every
measure.  We don't see them because the MensuralStaff sets barlines
to be invisible.

\override SpacingSpanner #'spacing-increment = #0.0
asks for zero space between notes, but there is no ragged-right,
so LilyPond tries to stretch out the lines, and the space between
barlines is the only space that can stretch.

The barlines use a different setting for spacing
\override BarLine #'space-alist #'first-note = #'( fixed-space . 0.0)
for historical reasons, and unfortunately.

If you don't have measures, maybe leave "Default_bar_line_engraver"
in place, and just stop the measure-counting with
 \context {\Score timing = ##f  }
and put \bar"" wherever a break would be allowable.



Thanks for the update, Keith.  Unfortunately, I can't manually insert breaks 
because it's 4 or 5 part music: I just thought the effect of adding \bar "" 
odd.  On the upside, it's songs, so the spacing is mostly set by the lyrics.


--
Phil Holmes 



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


Re: How to place markup and crescendo one after the other?

2014-06-29 Thread Jacques Menu
Hello Thomas and Knute,

Thanks, Thomas’ solution is exactly what I needed!

JM

Le 28 juin 2014 à 19:41, Thomas Morley  a écrit :

> 2014-06-28 18:41 GMT+02:00 Jacques Menu :
>> Hello folks,
>> 
>> I’d like to have « a tempo » and then the cresc sign, instead of them 
>> stacked vertically.
>> 
>> Sure it’s simple, but can’t find out…
>> 
>> Thanks for your help!
>> 
>> JM
>> 
>> %%
>> \version "2.18.2"
>> 
>> \relative f, {
>> \clef "bass"
>> \time 3/4
>> \slurUp
>> bes2.-\markup{\italic"a tempo"} ( \< |
>> ees,2.\mf \> | bes'2. \< |
>> \once\numericTimeSignature\time 4/4
>> c2. \! )
>> \slurNeutral
>> }
>> %%
>> 
>> 
>> 
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> Hi,
> 
> how about:
> 
> \version "2.18.2"
> 
> atempo = #(make-dynamic-script (markup #:normal-text #:italic "atempo"))
> 
> \relative f, {
>  \clef "bass"
>  \time 3/4
>  \slurUp
>  %% To avoid too short Hairpin:
>  \once \override Hairpin.minimum-length = 12  %% adjust the value
>  %% Optional:
>  %\once \override DynamicText.self-alignment-X = #-0.5 %% adjust the value
>  bes2.(\atempo \< |
>  ees,2.\mf \> |
>  bes'2. \< |
>  \once\numericTimeSignature\time 4/4
>  c2. \! )
>  \slurNeutral
> }
> 
> Cheers,
>  Harm


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


Text inside hairpin

2014-06-29 Thread Javier Ruiz-Alma
How can text be placed inside a hairpin?  See image for sample. 

 

\version "2.18.2"

{

c''\<

c''

c''-\markup \teeny \italic "cresc."

c''\!

}

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


Re: Text inside hairpin

2014-06-29 Thread Pierre Perol-Schneider
2014-06-29 17:12 GMT+02:00 Javier Ruiz-Alma :

How can text be placed inside a hairpin?  See image for sample.
>

%%%
\version "2.18.2"

{
  \once\override Hairpin.height = #1.2
  c''\<
  c''
  \once\override TextScript.extra-offset = #'(0 . 2)
  c''-\markup \teeny \italic "cresc."
  c''\!
}

\layout {
  \context {
\Staff
\hide KeySignature
\omit TimeSignature
\omit Clef
  }
}

\relative c'' {
  \key g\minor
  \once\override Hairpin.height = #1.2
  b!8*2/3[ \<[c cis d ees d]
  \once\override TextScript.extra-offset = #'(0 . 1.7)
  c[ _\markup\tiny\italic "cresc." cis d e e f\!]
}
%%

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


Re: Text inside hairpin

2014-06-29 Thread Richard Shann
On Sun, 2014-06-29 at 18:36 +0200, Pierre Perol-Schneider wrote:
> 2014-06-29 17:12 GMT+02:00 Javier Ruiz-Alma :
> 
> How can text be placed inside a hairpin?  See image for
> sample. 
> 
> 
>  
> %%%
> \version "2.18.2"
> 
> {
>   \once\override Hairpin.height = #1.2
>   c''\<
>   c''
>   \once\override TextScript.extra-offset = #'(0 . 2)

I was intrigued by this, because there is text which you can drag in the
final PDF typeset in Denemo, so I wondered what syntax it would use. It
came up with

-\tweak #'extra-offset #'( -1.6 . 1.42 )

which perhaps might be neater?

It will be nice if Denemo can become a source for finding out LilyPond
syntax rather than having to ask on the m/l, but at the moment I fear
Denemo's LilyPond output is often rather inelegant.

Richard Shann




>   c''-\markup \teeny \italic "cresc."
>   c''\!
> }
> 
> \layout {
>   \context {
> \Staff
> \hide KeySignature
> \omit TimeSignature
> \omit Clef
>   }
> }
> 
> \relative c'' {
>   \key g\minor
>   \once\override Hairpin.height = #1.2
>   b!8*2/3[ \<[c cis d ees d] 
>   \once\override TextScript.extra-offset = #'(0 . 1.7)
>   c[ _\markup\tiny\italic "cresc." cis d e e f\!]
> }
> %%
> 
> 
> Cheers,
> Pierre
> 
> 
> 
> ___
> 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


What is it with \bar "||"?

2014-06-29 Thread Patrick or Cynthia Karl
I recently had a problem with a \bar "||" at the end of a line suppressing the 
initial repeat sign in the following repeat volta section.  The answer was to 
use some magical \bar instead which cured the problem.  It was not clear to me 
then why the \bar "||" seemed to cause the following section to be treated as a 
new piece.

I am now having a similar problem with the following code:

\version "2.18.2"

A =   \relative b' {
f4 g g a% 16
\bar "||"
(f4) f f f  % 17
}

which throws an error: syntax error, unexpected EVENT_IDENTIFIER
for the attempted slur across the double bar line.

Is there a workaround for this?  If so, should I be able to figure it out?

I still think the documentation about repeat signs only being suppressed at the 
beginning of a piece is wrong and should be fixed.  It might also be nice to 
have a better explanation why the \bar "||" has the effects it does.

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


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread Paul Morris
Hi all,

Is this way of scaling a score (by putting it inside a markup) the best way
to do it, if you want to keep all of the proportions strictly consistent at
different sizes?  

The approach in the staffSize snippet does not keep the proportions
consistent, which becomes apparent at larger sizes (perhaps this should be
noted in the snippet text).  The set-global-staff-size approach also seems
to leave the staff lines and stems proportionally thinner at larger sizes. 
See examples below.

I sometimes use LilyPond to create SVG images, and then I edit them with
Inkscape to adjust their size.  That's because I couldn't find a way to
resize them with LilyPond without affecting the proportions, but it looks
like this markup scaling approach might do the trick.

-Paul


Examples of three different ways to scale a staff to twice its size:


%
\version "2.19.7"

staffSize =
#(define-music-function (parser location new-size) (number?)
   #{
 \set fontSize = #new-size
 \override StaffSymbol.staff-space = #(magstep new-size)
 \override StaffSymbol.thickness = #(magstep new-size)
   #})

mySize =
#(define-scheme-function (parser location nmbr score) (number? ly:score?)
   #{ \markup \scale #(cons nmbr nmbr) \score { #score } #})

theMusic = \relative f {
  c'8 d e f g a b c
}

{
  \theMusic
}

\new Staff \with {
  \staffSize #6
} {
  \theMusic
}

\mySize #2
\score {
  \theMusic
}

%

%

\version "2.19.7"

#(set-global-staff-size 40)

theMusic = \relative f {
  c'8 d e f g a b c
}

{
  \theMusic
}

%



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/With-markup-score-can-I-separately-control-the-score-size-tp163772p163796.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: What is it with \bar "||"?

2014-06-29 Thread Thomas Morley
2014-06-29 20:08 GMT+02:00 Patrick or Cynthia Karl :
> I recently had a problem with a \bar "||" at the end of a line suppressing 
> the initial repeat sign in the following repeat volta section.  The answer 
> was to use some magical \bar instead which cured the problem.  It was not 
> clear to me then why the \bar "||" seemed to cause the following section to 
> be treated as a new piece.
>
> I am now having a similar problem with the following code:
>
> \version "2.18.2"
>
> A =   \relative b' {
> f4 g g a% 16
> \bar "||"
> (f4) f f f  % 17
> }
>
> which throws an error: syntax error, unexpected EVENT_IDENTIFIER
> for the attempted slur across the double bar line.
>
> Is there a workaround for this?  If so, should I be able to figure it out?

This has nothing to do with the double barline, same would happen with
every other barline.

The Slur has to be started before \bar "whatever" is called.

\relative b' {
f4 g g a(% 16
\bar "||"
f4) f f f  % 17
}

> I still think the documentation about repeat signs only being suppressed at 
> the beginning of a piece is wrong and should be fixed.  It might also be nice 
> to have a better explanation why the \bar "||" has the effects it does.


Again, it has nothing to do with \bar "||", see:

\relative b' {
c1
\bar ""
\break
\repeat volta 2 { d }
}

The point is that \bar is a music-function setting 'whichBar and
\repeat does as well.

Now I have to guess, because lack of cc-knowledge:
\repeat is defined in cc, \bar in scheme. I guess \repeat is called
first and \bar second.
I.e. two commands at the same musical moment one overriding the other.

Cheers,
  Harm

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


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread Pierre Perol-Schneider
Hi Paul,

2014-06-29 19:10 GMT+02:00 Paul Morris :


> Examples of three different ways to scale a staff to twice its size:
>

Thanks for the tip Paul.
Il keep it for a future snippet in the LSR v2.20 (just 2 ways if you don't
mind).

Cheers,
Pierre
\version "2.19.8"
%=> http://lilypond.1069038.n5.nabble.com/With-markup-score-can-I-separately-control-the-score-size-td163772.html

\layout {
  indent = 0
}

theMusic = \relative f {
  c'8 d e f g a b c
}

\markup\left-column { "staffSize :" \vspace #1 }

staffSize =
#(define-music-function (parser location new-size) (number?)
   #{
 \set fontSize = #new-size
 \override StaffSymbol.staff-space = #(magstep new-size)
 \override StaffSymbol.thickness = #(magstep new-size)
   #})



\new Staff 
\with { \staffSize #-3 } 
{
  \mark\markup "#-3"
  \theMusic
}

\new Staff 
\with { \staffSize #0 } 
{
  \mark\markup "#0"
  \theMusic
}

\new Staff 
\with { \staffSize #3 } 
{
  \mark\markup "#3"
  \theMusic
}

\markup\left-column { "mySize :" \vspace #1 }
mySize =
#(define-scheme-function (parser location nmbr score) (number? ly:score?)
  #{ \markup \scale #(cons (+ 1 (* 0.1 nmbr)) (+ 1 (* 0.1 nmbr))) \score { #score } #})

\mySize #-3
\score {
  {
\mark\markup "#-3"
\theMusic
  }
}

\mySize #0
\score {
  {
\mark\markup "#0"
\theMusic
  }
}

\mySize #3
\score {
  {
\mark\markup "#3"
\theMusic
  }
}
  ___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread Thomas Morley
2014-06-29 19:10 GMT+02:00 Paul Morris :
> Hi all,
>
> Is this way of scaling a score (by putting it inside a markup) the best way
> to do it, if you want to keep all of the proportions strictly consistent at
> different sizes?
>
> The approach in the staffSize snippet does not keep the proportions
> consistent, which becomes apparent at larger sizes (perhaps this should be
> noted in the snippet text).  The set-global-staff-size approach also seems
> to leave the staff lines and stems proportionally thinner at larger sizes.
> See examples below.
>
> I sometimes use LilyPond to create SVG images, and then I edit them with
> Inkscape to adjust their size.  That's because I couldn't find a way to
> resize them with LilyPond without affecting the proportions, but it looks
> like this markup scaling approach might do the trick.

No, it does not.
Try your example with:

theMusic = \relative f {
  c'8 d e f g a b c
  \break
  c'8 d e f g a b c
}

>
> -Paul
>
>
> Examples of three different ways to scale a staff to twice its size:
>
>
> %
> \version "2.19.7"
>
> staffSize =
> #(define-music-function (parser location new-size) (number?)
>#{
>  \set fontSize = #new-size
>  \override StaffSymbol.staff-space = #(magstep new-size)
>  \override StaffSymbol.thickness = #(magstep new-size)
>#})
>
> mySize =
> #(define-scheme-function (parser location nmbr score) (number? ly:score?)
>#{ \markup \scale #(cons nmbr nmbr) \score { #score } #})
>
> theMusic = \relative f {
>   c'8 d e f g a b c
> }
>
> {
>   \theMusic
> }
>
> \new Staff \with {
>   \staffSize #6
> } {
>   \theMusic
> }
>
> \mySize #2
> \score {
>   \theMusic
> }
>
> %
>
> %
>
> \version "2.19.7"
>
> #(set-global-staff-size 40)
>
> theMusic = \relative f {
>   c'8 d e f g a b c
> }
>
> {
>   \theMusic
> }
>
> %
>
>
>
> --
> View this message in context: 
> http://lilypond.1069038.n5.nabble.com/With-markup-score-can-I-separately-control-the-score-size-tp163772p163796.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

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


Re: Defining a command to perform a TextSpanner

2014-06-29 Thread Martyn Quick
Thanks for the response.  That works exactly as I wanted.

I've no idea why it does though.  What does the minus sign do?

How on earth does startPM know where to stop the definition?

Is the blank line needed?

I was trying something like:
stopPM = { \stopTextSpan }

but that gave me an error that I didn't understand.

Sorry for what are probably stupid questions, but these more subtle aspects of 
programming lilypond are taking me a while to get to grips with.

Martyn






 From: David Kastrup 
To: Martyn Quick  
Cc: "lilypond-user@gnu.org"  
Sent: Wednesday, 25 June 2014, 19:50
Subject: Re: Defining a command to perform a TextSpanner
 

Martyn Quick  writes:

> I've been using the TextSpanner in the following way:
>
> \version "2.18.2"
>
> music = {
>   \textSpannerDown
>   \override TextSpanner.bound-details.left.text =
>     \markup { \upright "P.M." }
>   e,8 e,\startTextSpan e, e, e, e, e,\stopTextSpan e,
> }
>
> \score {
>   <<
>   \new Staff { \clef "treble_8"
>     \music
>   }
>   \new TabStaff {
>     \music
>   }
>   >>
> }
>
> This does what is often seen in guitar music, namely using
> "P.M. ... ... ..." to denote when palm-mute is applied to the playing.
>
> Is there a way of defining a function (or more likely a pair of
> functions) to do this more briefly (and more simply in the code.  I
> guess I'm looking for something along the lines of:
>
> " e, \startPM e, e, e, \stopPM e, e, "
>
> to achieve the same effect.

startPM = -\single\textSpannerDown
          -\tweak bound-details.left.text \markup \upright "P.M."



          -\startTextSpan

stopPM = \stopTextSpan

\new Staff { \clef "G_8" e, \startPM e, e, e, \stopPM e, e, }

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


Re: What is it with \bar "||"?

2014-06-29 Thread Thomas Morley
2014-06-29 20:52 GMT+02:00 Thomas Morley :
> 2014-06-29 20:08 GMT+02:00 Patrick or Cynthia Karl :
>> I recently had a problem with a \bar "||" at the end of a line suppressing 
>> the initial repeat sign in the following repeat volta section.  The answer 
>> was to use some magical \bar instead which cured the problem.  It was not 
>> clear to me then why the \bar "||" seemed to cause the following section to 
>> be treated as a new piece.
>>
>> I am now having a similar problem with the following code:
>>
>> \version "2.18.2"
>>
>> A =   \relative b' {
>> f4 g g a% 16
>> \bar "||"
>> (f4) f f f  % 17
>> }
>>
>> which throws an error: syntax error, unexpected EVENT_IDENTIFIER
>> for the attempted slur across the double bar line.
>>
>> Is there a workaround for this?  If so, should I be able to figure it out?
>
> This has nothing to do with the double barline, same would happen with
> every other barline.
>
> The Slur has to be started before \bar "whatever" is called.
>
> \relative b' {
> f4 g g a(% 16
> \bar "||"
> f4) f f f  % 17
> }
>
>> I still think the documentation about repeat signs only being suppressed at 
>> the beginning of a piece is wrong and should be fixed.  It might also be 
>> nice to have a better explanation why the \bar "||" has the effects it does.
>
>
> Again, it has nothing to do with \bar "||", see:
>
> \relative b' {
> c1
> \bar ""
> \break
> \repeat volta 2 { d }
> }
>
> The point is that \bar is a music-function setting 'whichBar and
> \repeat does as well.
>
> Now I have to guess, because lack of cc-knowledge:
> \repeat is defined in cc, \bar in scheme. I guess \repeat is called
> first and \bar second.
> I.e. two commands at the same musical moment one overriding the other.
>
> Cheers,
>   Harm

Actually it is a little more complicated.
The Repeat_acknowledge_engraver reads "defaultBarType" and takes it
into account.

Therefore the following works, although \bar "|" outputs _no_ barline
at line-begin:

\relative b' {
c1
c
\bar "|"
\break
\repeat volta 2 { d d }
}

Setting a different defaultBarType will work, too:
\relative b' {
\set Score.defaultBarType = #"||"
c1
c
\bar "||"
\break
\repeat volta 2 { d d }
}

In both examples the defaultBarType is recognized and the \repeat
command is not overridden.
And prints his own repeat-sign, taken from:
startRepeatType = #".|:"
which prints a _single_ barline at line end.

To get a double barline at line-end and a repeat-barline at line-start
you can let \bar ".|:-||" override the startRepeatType:

\relative b' {
c1
c
\bar ".|:-||"
\break
\repeat volta 2 { d d }
}

Or you can set this barline-type as the startRepeatType

\relative b' {
c1
c
\once \set Score.startRepeatType = ".|:-||"
\break
\repeat volta 2 { d d }
}

HTH,
  Harm

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


RE: Text inside hairpin

2014-06-29 Thread Javier Ruiz-Alma
> Pierre Perol-Schneider wrote:
>> How can text be placed inside a hairpin?  See image for
>> sample. 
>> 
>> 
>>  
>> %%%
>> \version "2.18.2"
>> 
>> {
>>   \once\override Hairpin.height = #1.2
>>   c''\<
>>   c''
>>   \once\override TextScript.extra-offset = #'(0 . 2)

I tried this, but I'm looking for an alternative to "extra-offset".  
Extra-offset doesn't free-up the space for other objects to move into.
Thank You


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


Re: Text inside hairpin

2014-06-29 Thread Janek Warchoł
There's a snippet doing this in OpenLilyLib:
https://github.com/openlilylib/openlilylib/tree/master/notation-snippets/hairpin-with-text

2014-06-29 18:36 GMT+02:00 Pierre Perol-Schneider
:
> 2014-06-29 17:12 GMT+02:00 Javier Ruiz-Alma :
>
>
>> How can text be placed inside a hairpin?  See image for sample.
>
>
> %%%
> \version "2.18.2"
>
> {
>   \once\override Hairpin.height = #1.2
>   c''\<
>   c''
>   \once\override TextScript.extra-offset = #'(0 . 2)
>
>   c''-\markup \teeny \italic "cresc."
>   c''\!
> }
>
> \layout {
>   \context {
> \Staff
> \hide KeySignature
> \omit TimeSignature
> \omit Clef
>   }
> }
>
> \relative c'' {
>   \key g\minor
>   \once\override Hairpin.height = #1.2
>   b!8*2/3[ \<[c cis d ees d]
>   \once\override TextScript.extra-offset = #'(0 . 1.7)
>   c[ _\markup\tiny\italic "cresc." cis d e e f\!]
> }
> %%
>
> Cheers,
> Pierre
>
>
> ___
> 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: Text inside hairpin

2014-06-29 Thread Javier Ruiz-Alma
The scheme funct. places text outside the hairpin.
I was looking for some command for either hairpin or text that would turn off 
collision avoidance, and allow overlaying one over the other, but didn't 
succeed in my search.
I can imagine creating scheme for inside the hairpin would be a challenge, as 
text fontsize would need to scale to available vertical space inside center of 
hairpin, which depends on both hairpin height, length as well as text length.
As a workaround, I typeset the TextScript above the staff, where it didn't push 
other objects apart, then used extra-offset to bring it to the desired position 
in the center of the hairpin below the staff.

-Original Message-
From: Janek Warchoł 
There's a snippet doing this in OpenLilyLib:
https://github.com/openlilylib/openlilylib/tree/master/notation-snippets/hairpin-with-text

2014-06-29 18:36 GMT+02:00 Pierre Perol-Schneider
:
> 2014-06-29 17:12 GMT+02:00 Javier Ruiz-Alma :
>
>
>> How can text be placed inside a hairpin?  See image for sample.
>
>
> %%%
> \version "2.18.2"
>
> {
>   \once\override Hairpin.height = #1.2
>   c''\<
>   c''
>   \once\override TextScript.extra-offset = #'(0 . 2)
>
>   c''-\markup \teeny \italic "cresc."
>   c''\!
> }
>
> \layout {
>   \context {
> \Staff
> \hide KeySignature
> \omit TimeSignature
> \omit Clef
>   }
> }
>
> \relative c'' {
>   \key g\minor
>   \once\override Hairpin.height = #1.2
>   b!8*2/3[ \<[c cis d ees d]
>   \once\override TextScript.extra-offset = #'(0 . 1.7)
>   c[ _\markup\tiny\italic "cresc." cis d e e f\!] } 
> %%
>
> Cheers,
> Pierre
>
>
> ___
> 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: Text inside hairpin

2014-06-29 Thread Janek Warchoł
2014-06-30 0:32 GMT+02:00 Javier Ruiz-Alma :
> The scheme funct. places text outside the hairpin.

Huh??  Have you looked at example usage of that snippet, available
under the link?  At the end there's a case with text inside Hairpin,
and it works with 2.18.2 and 2.19.9 on my machine; it seems to do
exactly what you want.

I think i know what i'm talking about since i wrote that function myself!

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


Re: With \markup { \score { can I separately control the score size?

2014-06-29 Thread Simon Albrecht

Am 29.06.2014 19:10, schrieb Paul Morris:

Hi all,

Is this way of scaling a score (by putting it inside a markup) the best way
to do it, if you want to keep all of the proportions strictly consistent at
different sizes?

The approach in the staffSize snippet does not keep the proportions
consistent, which becomes apparent at larger sizes (perhaps this should be
noted in the snippet text).  The set-global-staff-size approach also seems
to leave the staff lines and stems proportionally thinner at larger sizes.
… which is a good thing, since it preserves the optical impression 
instead of keeping the numerical proportions.
If the proportions would remain the same independent of the staff size, 
small staves would look too light and be more difficult to read, and 
large staves would become too heavy and appear clumsy.
It’s the same with text fonts, by the way: high quality typefaces (e.g. 
the TeX standard Latin Modern font as used also in LilyPond) usually 
have different shapes for different font sizes. Thus large headers get 
thinner lines, more detail etc. and small annotations or whatever get 
broader lines and less detail for the sake of legibility and a 
consistent visual appearance.


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


RE: Text inside hairpin

2014-06-29 Thread Javier Ruiz-Alma
user error!
Reviewed the cited LSR instead of staying at openlilylib...my bad.
Thanks for not letting me go without a shake.  Javier

From: Janek Warchoł [mailto:janek.lilyp...@gmail.com] 

2014-06-30 0:32 GMT+02:00 Javier Ruiz-Alma :
> The scheme funct. places text outside the hairpin.

Huh??  Have you looked at example usage of that snippet, available under the 
link?  At the end there's a case with text inside Hairpin, and it works with 
2.18.2 and 2.19.9 on my machine; it seems to do exactly what you want.

I think i know what i'm talking about since i wrote that function myself!

best,
Janek


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


Re: lilypond-user Digest, Vol 139, Issue 116

2014-06-29 Thread Patrick or Cynthia Karl

> Message: 2
> Date: Sun, 29 Jun 2014 22:04:05 +0200
> From: Thomas Morley 
> Subject: Re: What is it with \bar "||"?
> 
> 
> Actually it is a little more complicated.

First of all let me say that I appreciate everyone's patience with me.  I have 
learned more that I thought I would from this discussion.

Second, it seems to me that this topic is much more complicated that it ought 
to be.

Finally, I still think that the following statement in section 1.4 of the 
Notation documentation:

volta   ... If the repeat is at the beginning of a piece, a repeat bar line is 
only printed at the end of
the repeat.

needs modification because it is misleading.  It implies that if the repeat is 
not at the beginning of a piece, a repeat bar will be printed at the beginning 
of the repeat.  That implication is evidently false.



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


Re: What is it with \bar "||"?

2014-06-29 Thread Patrick or Cynthia Karl
Sorry for not having changed the subject appropriately.

On Jun 29, 2014, at 9:40 PM, Patrick or Cynthia Karl wrote:

> 
>> Message: 2
>> Date: Sun, 29 Jun 2014 22:04:05 +0200
>> From: Thomas Morley 
>> Subject: Re: What is it with \bar "||"?
>> 
>> 
>> Actually it is a little more complicated.
> 
> First of all let me say that I appreciate everyone's patience with me.  I 
> have learned more that I thought I would from this discussion.
> 
> Second, it seems to me that this topic is much more complicated that it ought 
> to be.
> 
> Finally, I still think that the following statement in section 1.4 of the 
> Notation documentation:
> 
> volta ... If the repeat is at the beginning of a piece, a repeat bar 
> line is only printed at the end of
>   the repeat.
> 
> needs modification because it is misleading.  It implies that if the repeat 
> is not at the beginning of a piece, a repeat bar will be printed at the 
> beginning of the repeat.  That implication is evidently false.
> 
> 


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


Re: lilypond-user Digest, Vol 139, Issue 116

2014-06-29 Thread Jay Anderson
On Sun, Jun 29, 2014 at 7:40 PM, Patrick or Cynthia Karl  wrote:
> Second, it seems to me that this topic is much more complicated that it ought 
> to be.

Many seemingly simple things become complicated when you finally dig
into the details. The goal is to control the complexity.

> Finally, I still think that the following statement in section 1.4 of the 
> Notation documentation:
>
> volta   ... If the repeat is at the beginning of a piece, a repeat bar line 
> is only printed at the end of
> the repeat.
>
> needs modification because it is misleading.  It implies that if the repeat 
> is not at the beginning of
> a piece, a repeat bar will be printed at the beginning of the repeat.  That 
> implication is evidently false.

It's not false, but you'd need a deeper understanding of the system to
know why in this case it behaved differently than expected. I can see
how one might expect the different behavior:

First try: \musicA \break \repeat volta 2 { \musicB }
-> Result: Hmm I want a double bar instead of a single bar before the
break. I'll add it in.
Second try: \musicA \bar "||" \break \repeat volta 2 { \musicB }
-> Result: The double bar worked, but where did my initial repeat bar
go? This is very surprising.

One way to think of the '\repeat volta' command is as a short hand for
adding in the correct bar lines around a section of music (it does a
bit more than that as well). If you manually override the bar at one
end of the repeat then you get the overridden bar.

-Jay

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


Re: Text inside hairpin

2014-06-29 Thread Janek Warchoł
You're welcome :)
Maybe i should add this function to official LilyPond?

2014-06-30 3:29 GMT+02:00 Javier Ruiz-Alma :
> user error!
> Reviewed the cited LSR instead of staying at openlilylib...my bad.
> Thanks for not letting me go without a shake.  Javier
>
> From: Janek Warchoł [mailto:janek.lilyp...@gmail.com]
>
> 2014-06-30 0:32 GMT+02:00 Javier Ruiz-Alma :
>> The scheme funct. places text outside the hairpin.
>
> Huh??  Have you looked at example usage of that snippet, available under the 
> link?  At the end there's a case with text inside Hairpin, and it works with 
> 2.18.2 and 2.19.9 on my machine; it seems to do exactly what you want.
>
> I think i know what i'm talking about since i wrote that function myself!
>
> best,
> Janek
>

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


Re: Text inside hairpin

2014-06-29 Thread Urs Liska

Am 30.06.2014 08:41, schrieb Janek Warchoł:

You're welcome :)
Maybe i should add this function to official LilyPond?

2014-06-30 3:29 GMT+02:00 Javier Ruiz-Alma :

user error!
Reviewed the cited LSR instead of staying at openlilylib...my bad.
Thanks for not letting me go without a shake.  Javier

From: Janek Warchoł [mailto:janek.lilyp...@gmail.com]

2014-06-30 0:32 GMT+02:00 Javier Ruiz-Alma :

The scheme funct. places text outside the hairpin.


Huh??  Have you looked at example usage of that snippet, available under the 
link?  At the end there's a case with text inside Hairpin, and it works with 
2.18.2 and 2.19.9 on my machine; it seems to do exactly what you want.

I think i know what i'm talking about since i wrote that function myself!

best,
Janek





It seems that the snippet-description field is suboptimal as it only 
states to typeset the text _below_ the hairpin.


Urs


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