lilypond-book

2012-04-23 Thread MING TSANG
Is it possible to execute lilypond-book in frescobaldi v2.04?
 
Blessing in+,
Ming.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: barcheck warning when using Timing.measurePosition in polyphonic music

2012-04-23 Thread Federico Bruni

Il 23/04/2012 01:53, Nick Payne ha scritto:

If you replace

\set Timing.measurePosition = #(ly:make-moment -2 4)

with

\set Score.measureLength = #(ly:make-moment 2 4)

you don't get a barcheck error.


Thanks, this is what I was looking for.

I've noticed that - unlike measurePosition - measureLength settings 
remains also in the following bars.

I've tried to use \once \set but it doesn't work.
So I think that I have to \set it back to 4/4:

\version "2.15.36"

\new Voice \relative c'' {
  \time 4/4
  \partial 2 g2 |
  g2 g |
  \set Score.measureLength = #(ly:make-moment 2 4)
  g2 |
  % this is needed to go back to 4/4
  \set Score.measureLength = #(ly:make-moment 4 4)
  g2 g |
}


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


Re: conditional branch within scheme

2012-04-23 Thread Stefan Thomas
Dear Jan-Peter,
thanks! It was exactly, what I wanted!

Am 23. April 2012 20:10 schrieb Jan-Peter Voigt :

> Dear Stefan,
>
> here's a try, that has a parameter dir, which takes a symbol. If the
> symbol equals 'above, the Staff is aligned above, else below:
> --snip--
> \version "2.14.2"
> ossiastaff = #(define-music-function (parser location x dir y) ( string?
> symbol? ly:music? )
>  (let ((align (if (eq? 'above dir) #{ \set Staff.alignAboveContext = $x #}
> #{ \set Staff.alignBelowContext = $x #})))
>   #{
>   \new Staff = "ossia" \with {
>   \override Clef #'stencil = ##f
>  \override KeySignature #'stencil = ##f
>  \override TimeSignature #'stencil = ##f
>  fontSize = #-3
>  \override StaffSymbol #'staff-space = #(magstep -3)
>  \override StaffSymbol #'thickness = #(magstep -3)
> } {  $align \override PianoStaff.SpanBar #'glyph-name = #":" $y }
>  #}
> ))
>
> \score {
>  \new PianoStaff <<
>\new Staff="mainstaff" \relative c'' { \time 3/4 \key g \major
>   d4 g,8 a b c d4 g, g
>   << {  e'4  c8 \mordent d e fis g4 g, g   } { \ossiastaff
> "mainstaff" #'above { s4 c32[ b c16.] s4 s4 }  } >>
>}
>  >>
> }
> \score {
>  \new PianoStaff <<
>\new Staff="mainstaff" \relative c'' { \time 3/4 \key g \major
>   d4 g,8 a b c d4 g, g
>   << {  e'4  c8 \mordent d e fis g4 g, g   } { \ossiastaff
> "mainstaff" #'below { s4 c32[ b c16.] s4 s4 }  } >>
>}
>  >>
> }
> --snip--
>
> If you want to use strings "above" and "below", you have to compare them
> with string=?
>
> HTH
> Cheers, Jan-Peter
>
> Am 22.04.2012 um 20:27 schrieb Stefan Thomas:
>
> > Dear community,
> > I've written some scheme-code for making it easier to create
> ossia-staffs.
> > The syntax for the code I've created is \ossiastaff "staffname" { music}
> > It works fine but now it works only for ossia-staffs above. I would
> prefer a syntax like
> > \ossiastaff "staffname" "above" (or below) { music}
> > Here is my code:
> >
> >
> > \version "2.14.2"
> > ossiastaff = #(define-music-function (parser location x y) ( string?
> ly:music?  )
> >   #{
> >\new Staff = "ossia" \with {
> >  alignAboveContext = $x
> >   \override Clef #'stencil = ##f
> >   \override KeySignature #'stencil = ##f
> >   \override TimeSignature #'stencil = ##f
> >   fontSize = #-3
> >   \override StaffSymbol #'staff-space = #(magstep -3)
> >   \override StaffSymbol #'thickness = #(magstep -3)
> > } { \override PianoStaff.SpanBar #'glyph-name = #":" $y }
> > #})
> >
> > mainthing = \relative c'' { \time 3/4 \key g \major
> > d4 g,8 a b c d4 g, g
> > <<{  e'4  c8 \mordent d e fis g4 g, g   } { \ossiastaff "mainstaff" {
> >
> >   s4 c32[ b c16.] s4 s4 }  } >>
> >
> > }
> >
> > \score {
> >   \new PianoStaff <<
> >   \new Staff="mainstaff" \mainthing
> >
> > >>
> > }
> >
> >
> >
> > ___
> > 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


Sustain pedal question.

2012-04-23 Thread Hwaen Ch'uqi
Greetings All,
  When set to bracket style, the spanner seems broken in this passage
which utilizes spacer rests, a cross-staff voice, and a \times
command. In the first two measures, it ends at the fourth beat instead
of continuing to the downbeat of the next measure. The third measure
is correctly engraved. Am I missing something obvious?
  Many thanks for any help.
Hwaen Ch'uqi

\version "2.14.2"

\score{
  \new PianoStaff<<
\new Staff = up{
  \key c \major \time 4/4 \clef treble \relative{
\stemDown \times 2/3 {dis8-4\p cis b} a8*2/3 \change Staff = down
\stemUp g_1 f dis f g \change Staff = up \stemDown a b cis %1
dis cis b a \change Staff = down \stemUp g f dis f g \change
Staff = up \stemDown a b cis %2
dis cis b a \change Staff = down \stemUp g f \change Staff = up
\stemNeutral \clef bass s2 %3
  }
}
\new Staff = down{
  \set Staff.pedalSustainStyle = #'bracket
  \key c \major \time 4/4 \clef bass \relative{
s1\sustainOn %1
s\sustainOff\sustainOn %2
s2\sustainOff\sustainOn \stemUp dis,8*2/3 cis \change Staff = up
\stemDown b-4 a g f %3
  }
}
  >>
  \layout{
  }
}

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


Re: conditional branch within scheme

2012-04-23 Thread Jan-Peter Voigt
Dear Stefan,

here's a try, that has a parameter dir, which takes a symbol. If the symbol 
equals 'above, the Staff is aligned above, else below:
--snip--
\version "2.14.2"
ossiastaff = #(define-music-function (parser location x dir y) ( string? 
symbol? ly:music? )
  (let ((align (if (eq? 'above dir) #{ \set Staff.alignAboveContext = $x #} #{ 
\set Staff.alignBelowContext = $x #})))
  #{ 
   \new Staff = "ossia" \with { 
  \override Clef #'stencil = ##f
  \override KeySignature #'stencil = ##f
  \override TimeSignature #'stencil = ##f
  fontSize = #-3
  \override StaffSymbol #'staff-space = #(magstep -3)
  \override StaffSymbol #'thickness = #(magstep -3)
} {  $align \override PianoStaff.SpanBar #'glyph-name = #":" $y }  
  #}
))

\score {
  \new PianoStaff <<
\new Staff="mainstaff" \relative c'' { \time 3/4 \key g \major
  d4 g,8 a b c d4 g, g 
  << {  e'4  c8 \mordent d e fis g4 g, g   } { \ossiastaff "mainstaff" 
#'above { s4 c32[ b c16.] s4 s4 }  } >> 
}
  >>
}
\score {
  \new PianoStaff <<
\new Staff="mainstaff" \relative c'' { \time 3/4 \key g \major
  d4 g,8 a b c d4 g, g 
  << {  e'4  c8 \mordent d e fis g4 g, g   } { \ossiastaff "mainstaff" 
#'below { s4 c32[ b c16.] s4 s4 }  } >> 
}
  >>
}
--snip--

If you want to use strings "above" and "below", you have to compare them with 
string=?

HTH
Cheers, Jan-Peter

Am 22.04.2012 um 20:27 schrieb Stefan Thomas:

> Dear community,
> I've written some scheme-code for making it easier to create ossia-staffs. 
> The syntax for the code I've created is \ossiastaff "staffname" { music} 
> It works fine but now it works only for ossia-staffs above. I would prefer a 
> syntax like
> \ossiastaff "staffname" "above" (or below) { music} 
> Here is my code:
> 
> 
> \version "2.14.2"
> ossiastaff = #(define-music-function (parser location x y) ( string? 
> ly:music?  )
>   #{ 
>\new Staff = "ossia" \with { 
>  alignAboveContext = $x
>   \override Clef #'stencil = ##f
>   \override KeySignature #'stencil = ##f
>   \override TimeSignature #'stencil = ##f
>   fontSize = #-3
>   \override StaffSymbol #'staff-space = #(magstep -3)
>   \override StaffSymbol #'thickness = #(magstep -3)
> } { \override PianoStaff.SpanBar #'glyph-name = #":" $y }  
> #})
> 
> mainthing = \relative c'' { \time 3/4 \key g \major
> d4 g,8 a b c d4 g, g 
> <<{  e'4  c8 \mordent d e fis g4 g, g   } { \ossiastaff "mainstaff" {  
>   
>   s4 c32[ b c16.] s4 s4 }  } >> 
>   
> }
> 
> \score {
>   \new PianoStaff <<
>   \new Staff="mainstaff" \mainthing
>   
> >>
> }
> 
> 
> 
> ___
> 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: multiple tags

2012-04-23 Thread Gilles



Is is possible to have simultaneous multiple tags?

What makes you think that?


As i had difficulties managing multiple tags, i have made for me some
little functions to simplify it.
With the joined file, your code would become, with the \keepWithTags :
%%
\include "tagUtil.ly"

control = {
  s1*2
  \tag #'threes { \time 3/4 s2. }
  \tag #'twos { \time 2/4 s2 } }
tset = \relative c' {
  c4 d e f
  \tag #'up {g4 a b c }
  \tag #'down { g4 f e d }
  \tag #'threes { g4 f e }
  \tag #'twos { g2 } }

\score {
  \new Staff <<
  \keepWithTag #'threes \control
  \keepWithTags #'(up threes) \tset
  >> }
\score {
  \new Staff <<
  \keepWithTag #'twos \control
  \keepWithTags #'(down twos) \tset
  >> }


You can see some examples in the file.

Gilles

tagUtil.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


conditional branch within scheme

2012-04-23 Thread Stefan Thomas
Dear community,
I've written some scheme-code for making it easier to create ossia-staffs.
The syntax for the code I've created is \ossiastaff "staffname" { music}
It works fine but now it works only for ossia-staffs above. I would prefer
a syntax like
\ossiastaff "staffname" "above" (or below) { music}
Here is my code:


\version "2.14.2"
ossiastaff = #(define-music-function (parser location x y) ( string?
ly:music?  )
  #{
   \new Staff = "ossia" \with {
 alignAboveContext = $x
  \override Clef #'stencil = ##f
  \override KeySignature #'stencil = ##f
  \override TimeSignature #'stencil = ##f
  fontSize = #-3
  \override StaffSymbol #'staff-space = #(magstep -3)
  \override StaffSymbol #'thickness = #(magstep -3)
} { \override PianoStaff.SpanBar #'glyph-name = #":" $y }
#})

mainthing = \relative c'' { \time 3/4 \key g \major
d4 g,8 a b c d4 g, g
<<{  e'4  c8 \mordent d e fis g4 g, g   } { \ossiastaff "mainstaff" {

  s4 c32[ b c16.] s4 s4 }  } >>

}

\score {
  \new PianoStaff <<
  \new Staff="mainstaff" \mainthing

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


Fwd: Re: parenthesizing arpeggios

2012-04-23 Thread Urs Liska

Thanks again very much. I checked it out and it works perfectly!

Just for the record (or anybody who searches), this is what I did:

\version "2.15.36"

parenthArpeggio= {
  \once \override Arpeggio #'stencil = #(lambda (grob)
(parenthesize-stencil (ly:arpeggio::print grob) 0.1 0.5 0.5 0.2))
  \once \override Arpeggio #'before-line-breaking = #(lambda (grob)
(set! (ly:grob-property grob 'X-extent)
  (ly:stencil-extent (ly:grob-property grob 'stencil) X)))
}

parenthArpeggioDraft = {
  \parenthArpeggio 
  \once \override Arpeggio #'color = #red

}

\relative c' {
  \repeat unfold 4 {
-\arpeggio
  }
\parenthArpeggio-\arpeggio
  -\arpeggio
  \parenthArpeggioDraft-\arpeggio
  -\arpeggio
}

Hope it helps somebody ...
Best
Urs

 Original-Nachricht 
Betreff:Re: parenthesizing arpeggios
Datum:  Sun, 22 Apr 2012 20:23:01 -0500
Von:David Nalesnik 
An: Urs Liska 
Kopie (CC): Lilypond-User 



Hi again!


   Here's something that works for arpeggios.  The attached file is a
   bit large because I needed to include several functions from
   stencil.scm to draw the parentheses.


Oh, what ever was I thinking!  No need at all for all that duplicated 
code...


This is all you need:

\version "2.15.36"

\relative c' {
  \override Arpeggio #'stencil = #(lambda (grob)
(parenthesize-stencil (ly:arpeggio::print grob) 0.1 0.5 0.5 0.2))
  \override Arpeggio #'before-line-breaking = #(lambda (grob)
(set! (ly:grob-property grob 'X-extent)
  (ly:stencil-extent (ly:grob-property grob 'stencil) X)))
  \repeat unfold 4 {
-\arpeggio
  }
-\arpeggio
-\arpeggio
-\arpeggio
-\arpeggio
}

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