Re: The best way to structure multi-file projects?

2010-12-16 Thread Nick Payne

On 17/12/10 16:54, Keith OHara wrote:

I am easily confused, so I keep the structure (\bookpart \score \new Staff,
etc.) in one file where I can see it all at once.  This means that I need to
use {% %} to switch on/off typesetting of pieces (instead of a single-line %)
but that is easy enough.


I organise things the same way, but I use %{...}% instead, which means 
that I only need to add or remove a single percent sign to comment or 
uncomment sections. i.e.


% this section is commented and won't be executed
%{

%}

% this section is not commented and will be executed
%%{

%}

Nick

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


Re: The best way to structure multi-file projects?

2010-12-16 Thread Keith OHara
Frank Steinmetzger  gmx.de> writes:

> This work (namely Bach’s Mass in B minor, BWV 232) has 27 pieces, hence I 
wanted to make it as easy as possible to work on single pieces at a time, but 
also to compile the whole thing.
> 
> So, of course, each piece is in an own file again. But this time, I wanted to 
> have everything that is needed to load a piece in one single line (so they 
can be switched on and off the easiest).
> 
> 
> As a result, the piece files now contain the entire score block, plus 
variable 
> definitions for all staves and lyrics to be used within the \score. 

I am easily confused, so I keep the structure (\bookpart \score \new Staff, 
etc.) in one file where I can see it all at once.  This means that I need to 
use {% %} to switch on/off typesetting of pieces (instead of a single-line %) 
but that is easy enough.

I have been happy with an organization like this:

(1) a file "header.ily" containing all the definitions that might be used more 
than once,

common = { % settings for the beginning of each movement/piece
  \override Score.PaperColumn #'keep-inside-line = ##t
}
\include "english.ly" 
fzp = #(make-dynamic-script "fzp")
\header {
  composer = "Bach"
  [...]

(2) a few files with names like "strings.ily" that contain only variable 
definitions.  Each variable holds all the notes in one movement/piece for one 
instrument.  One special variable (same as your variable 'control') holds 
everything that affects all instruments, such as tempo changes, repeats, 
rehearsal marks, and settings that apply to the whole score.  

violinImI = \relative c'' {
  \key d\major
  a4\p\< ... 
  \cueDuring "v2" #UP R1*2
  [...]

controlmI = {
  \common % from "header.ily"  
  \override Score.Hairpin #'minimum-length = #4
  \time 4/4
  [...]


(3) one file for each section of final output, with names like 
"StringParts.ly" :
\include "header.ily"
\include "strings.ily"
\include "percussion.ily"
[...]
\addquote "v2" \violinIImI
\paper {...}
\book {
  \header { instrument = "Violin I" }
  \score {
\keepWithTag#'part \new Staff <<
  \compressFullBarRests
  \violinImI
  \controlmI
[...]

(4) temporary files with names like "strings.ly" that can be compiled by 
LilyPond to produce a .pdf of only the section I am currently working on.  My 
text editor has a shortcut to run LilyPond on "_foo_.ly" when I am editing 
"_foo_.ily".  I make a copy one of the files in (3) and %{ %} comment out or 
delete the parts I want to leave out.

(You might be interested to see the rather different method that Jay Anderson 
used to set some horn concertos,
http://www.mutopiaproject.org/cgibin/piece-info.cgi?id=1735)


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


Re: How to print 2 rehearsal marks above and below same bar line

2010-12-16 Thread Jan Warchoł
2010/12/16 James :
> Is it easy to display those nice lines around the bounding boxes by
> adding a \paper { } variable?
>
> I can only find
> \paper { annotate-spacing = ##t }
> Which gives the arrows/values.

you have to use this:

#(ly:set-option 'debug-skylines #t)

(in top-level).
I don't know where i learned it and i don't know if it's documented at all.
Looks really cool, though :D

cheers,
Janek

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


Re: bar number printed above the phrase (slur) curve

2010-12-16 Thread Jan Warchoł
2010/12/16 MING TSANG :
> Hi, Janek:
>
> Thank you for the solution.   That means I need to tune up after the score
> sheet is completed for the large score.
> Is there a parameter that will put the bar number just above the staff / bar
> line?

You can use
  \override Score.BarNumber #'outside-staff-priority = ##f
(without \once) and all bar numbers will be affected, but then some
may collide with slurs or other objects. Unfortunately as far as i
know there is no way of telling LilyPond "please lower the bar numbers
so they are inside slurs, but don't do this if there is not enough
space under a slur" :/

cheers,
Janek

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


Re: Organ pedalboard fingerings

2010-12-16 Thread Music Teacher
Hi organists,

Dupré and more or less all the french school uses the Dupré
heel-symbol (the boolean U), Fernando Germani like in this last link
uses a circle for heels,
Pedal has 30 notes (C-f') in continental Europa, many organs from the
romantic has still 27 notes (C-d') and many organs in south Germany
and Netherlands have 17-18 notes (C-f0). Last but not least the short
octave is rebuild (with authentical barock organs) that reduces the
number of notes in the first octave (with or without f# / g#) and some
rare french barock organs have 3 octaves (FF-f1)

Francois

2010/12/16, Carl Sorensen :
>
>
>
> On 12/16/10 4:17 PM, "Bertrand Bordage"  wrote:
>
>> Something quite better :
>> http://books.google.com/books?id=c9x1XBrdwuIC&lpg=PP1&pg=PA4#v=onepage&q&f=fal
>> se
>> > e&q&f=false>
>
> Yes -- page 4 shows the regular and inverted symbols, and indicates why you
> would want to use them -- when the pedal and left hand lines are written in
> the same staff.
>
>>
>> and this ... http://www.ldsorganistblog.com/2009/10/pedal-points.html
>
> Also interesting.
>
> Thanks,
>
> Carl
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user
>

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


Re: Organ pedalboard fingerings

2010-12-16 Thread Carl Sorensen



On 12/16/10 4:17 PM, "Bertrand Bordage"  wrote:

> Something quite better :
> http://books.google.com/books?id=c9x1XBrdwuIC&lpg=PP1&pg=PA4#v=onepage&q&f=fal
> se 
>  e&q&f=false>

Yes -- page 4 shows the regular and inverted symbols, and indicates why you
would want to use them -- when the pedal and left hand lines are written in
the same staff.

> 
> and this ... http://www.ldsorganistblog.com/2009/10/pedal-points.html

Also interesting.

Thanks,

Carl


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


Re: The best way to structure multi-file projects?

2010-12-16 Thread Frank Steinmetzger
On Thursday 16 December 2010 18:48:27 Phil Holmes wrote:
> Frank,
> 
> The example you've posted seems to work as expected.  Is there something
> you feel is wrong with the approach you use here?

Indeed, it doth work. For now I have done 8 pieces with 48 pages altogether, 
and it already takes Lily ages to distribute the scores.

In an earlier thread I was told that I can interrupt the page breaking 
algorithm via bookparts, but you may have noticed in my example that \book{} 
was commented out, because as I mentioned I can't use variables in bookparts.


What I would really love to do is use LaTeX to bring them all together. I'm 
using it already to create the front and back page. I have also already 
managed to get little example staves running with lilypond-book, but with the 
bigger scores I only got errors in LaTeX so far (missing files or something 
like that).
-- 
Gruß | Greetings | Qapla'
Ich untersage jegliche Verwendung meiner E-Mail-Adressen bei Facebook.

Was ist Onanie? - Liebe an und für sich.
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: The best way to structure multi-file projects?

2010-12-16 Thread Phil Holmes
Frank,

The example you've posted seems to work as expected.  Is there something you 
feel is wrong with the approach you use here?

--
Phil Holmes


  - Original Message - 
  From: Frank Steinmetzger 
  To: lilypond-user@gnu.org 
  Sent: Thursday, December 16, 2010 12:00 AM
  Subject: The best way to structure multi-file projects?


  Hello list


  Triggered by my recent problem with a strange notion of Lilypond, due to 
which 

  it seems to prefer an even number of pages for a score in a multi-score 

  work, I wanted to try and fix that in another document of mine.


  This work (namely Bach’s Mass in B minor, BWV 232) has 27 pieces, hence I 
wanted to make it as easy as possible to work on single pieces at a time, but 
also to compile the whole thing.


  So, of course, each piece is in an own file again. But this time, I wanted to 

  have everything that is needed to load a piece in one single line (so they 
can be switched on and off the easiest).



  As a result, the piece files now contain the entire score block, plus 
variable 

  definitions for all staves and lyrics to be used within the \score. However 

  there is one problem - I can't use this approach with bookparts, because I 
can't define variables within a bookpart (I get unknown string error). The 
obvious solution to this would be of course to not use variables, but write 
everything into the \score directly. This has at least the problem of having to 
duplicate parts that are common to all staves.



  But still, I am curious: how do you structure your bigger projects (both in 

  terms of physical files as well as logical structure) in order to remain 

  flexible in case you decide to change something globally? I'm only producing 

  choir sheets, so I have no need for separate versions of the files like 
instrument parts.



  I attached one piece and the main file, adapted to be a working minimal 

  example. ;-)

  -- 

  Gruß | Greetings | Qapla'

  Kids in the back seat cause accidents. Accidents in the backseat cause kids.




--


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


Re: bar number printed above the phrase (slur) curve

2010-12-16 Thread Patrick Karl

> 
> Message: 1
> Date: Thu, 16 Dec 2010 09:34:54 +0100
> From: Jan Warcho? 
> Subject: Re: bar number printed above the phrase (slur) curve
> To: MING TSANG 
> Cc: lilypond-user 
> Message-ID:
>   
> Content-Type: text/plain; charset=UTF-8
> 
> 2010/12/16 MING TSANG :
>> 
>> Is it possible to line up all bar number just above the staff / bar line,
>> especially bar 2, 4 and 5 which is on top of the phrase curve?
>> 
>> Here is a simpler example.
>> [65 lines of code]
> 
> A proper tiny example for your question would
> be something like this (i wrote it in less than a minute):
> 
> \version "2.13.40"
> \relative c''{
>  \override Score.BarNumber #'break-visibility = #'#(#t #t #t)
>  \stemUp \slurUp e e e( e | e e) e e
> }
> 
> Now back to the problem. I hoped that adding this
> 
> \override BarNumber #'avoid-slur = #'inside
> \override BarNumber #'outside-staff-priority = ##f
> 
> would solve it (similarly to the example in Learning Manual 4.4.3),
> but it doesn't.
> I also tried adding some Y-offset, but it doesn't work at all - a bug?
> see this, the bar number doesn't move at all:
> 
> \version "2.13.40"
> \relative c''{
> \override BarNumber #'Y-offset = #5.0
> c c c c \break c c c c
> }
> 
> My knowledge ends here. Can anyone wiser than me use my tiny example
> of Ming's problem and solve it?

I think I get satisfactory results with:

\version "2.12.3"
\relative c''{
 \override Score.BarNumber #'break-visibility = #'#(#t #t #t)
 \override Score.BarNumber #'outside-staff-priority = ##f
 \override Score.BarNumber #'Y-offset = #-2.4
 \stemUp \slurUp e e e( e | e e) e e
}


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


Re: bar number printed above the phrase (slur) curve

2010-12-16 Thread MING TSANG
Hi, Janek:

Thank you for the solution.   That means I need to tune up after the score 
sheet 
is completed for the large score.  

Is there a parameter that will put the bar number just above the staff / bar 
line?

Ming.





From: MING TSANG 
To: Jan Warchoł 
Cc: James ; lilypond-user 
Sent: Thu, December 16, 2010 8:45:55 AM
Subject: Re: bar number printed above the phrase (slur) curve


Hi, Janek'

Thank you for your patient.  I thought my sample is simple.  Will remember next 
time.


Here is the tiny example again: (with your suggestion)

\version "2.13.40"
\relative c''{
  \override Score.BarNumber #'break-visibility = #'#(#t #t #t)
  \override BarNumber #'avoid-slur = #'inside
  \override BarNumber #'outside-staff-priority = ##f
  \override BarNumber #'Y-offset = #5.0
  \stemUp \slurUp e e e( e | c d) g, e( | f g a) b 
}

I include your suggestion. However bar #2 is still print outside the phrase 
curve far away from the staff / bar line.  Bar #3 looks good even though it is 
above the phrase  curve.  What I hope to do is to make bar numbers pretty much 
line bar#4 all through the score.

Thank you again for your help
Ming.



From: Jan Warchoł 
To: MING TSANG 
Cc: James ; lilypond-user 
Sent: Thu, December 16, 2010 3:34:54 AM
Subject: Re: bar number printed above the phrase (slur) curve

2010/12/16 MING TSANG :
>
> Is it  possible to line up all bar number just above the staff / bar line,
> especially bar 2, 4 and 5 which is on top of the phrase curve?
>
> Here is a simpler example.
> [65 lines of code]

Ming, you really miss the point of tiny examples. Have you read
carefully the link about tiny examples that i sent you? (
http://lilypond.org/tiny-examples.html )
The code that you posted now compiles succesfully, but it is horribly
long and compllicated. A proper tiny example for your question would
be something like this (i wrote it in less than a minute):

\version "2.13.40"
\relative c''{
  \override Score.BarNumber #'break-visibility = #'#(#t #t #t)
  \stemUp \slurUp e e e( e | e e) e e
}

If you don't stick to these rules, don't be surprised if no one
answers your questions :( We simply value our time. (And the fact  that
i'm answering means that - judging by general standards in places like
this list - i have extraordinary patience).

Now back to the problem. I hoped that adding this

\override BarNumber #'avoid-slur = #'inside
\override BarNumber #'outside-staff-priority = ##f

would solve it (similarly to the example in Learning Manual 4.4.3),
but it doesn't.
I also tried adding some Y-offset, but it doesn't work at all - a bug?
see this, the bar number doesn't move at all:

\version "2.13.40"
\relative c''{
\override BarNumber #'Y-offset = #5.0
c c c c \break c c c c
}

My knowledge ends here. Can anyone wiser than me use my tiny example
of Ming's problem and solve it?

cheers,
Janek


> [Ming's code:]
>
> \version "2.13.40"
>
> \header {
>   title = "Walking in Winter Wonderland"
> }
>
> #(set-global-staff-size 30)
>  \include "english.ly"
> TimeKey = { \time 4/4  \key ef  \major  }
> SopMusic   = \relative c' {
> % Draw a box round the following bar number(s)
> \override Score.BarNumber #'stencil
>= #(make-stencil-boxer 0.1 0.25 ly:text-interface::print)
>  \partial 4
>  bf'8.\( bf16 \repeat volta 2 { \bar "|:"  bf2^\markup {E \flat}\)
> r4 bf8.\( bf16 | g8 bf4.\) r4 bf8.\( bf16 |%bar 00-02
>  bf2^\markup {Fm}\) r4^\markup {Fm+5} bf8.\( bf16 | af8^\markup
> {Fm7} bf4.\) r4^\markup {B\flat 7}  bf4\( | d8. d16 d8 c8~  c4\) r8. c16\(
> |%bar 03-05
>  g8.^\markup {E\flat} gf16 f8 e8~^\markup {C7+5} e4\) r4 |
> g8.^\markup {F9}\( g16 g8. g16 f8.^\markup{B\flat 7} f16 f8. f16 | }
> \alternative { { ef2^\markup{E\flat}\) r4 bf'8. bf16 \bar ":|" }
>  %bar 06-08
>  { ef,2^\markup{E\flat} r4 s4 || } }
>\label #'lastPage
> }
> VerseOne   = \lyricmode {
> Sleigh bellsring, are youlist- 'nin? In the
> lane snow isglist- 'nin'. Abeau- ti- ful sight, we're
> hap- py to- night.walk- in' in a win- ter won- der- land! Gone a-
> }
> VerseTwo   =  \lyricmode {
> "" "" way is the blue bird, here to  stay is a
> new bird He sings a love song, as  we go a- long
> walk- in' in a win- ter won- der "" "" ""land
> }
>
>
> \score {
>   \new GrandStaff = "GrandStaff_score" <<
> \new ChoirStaff <<
>   \new Staff <<
>  \override Score.BarNumber #'break-visibility = #all-visible
>   \override Score.BarNumber #'self-alignment-X = #0
>   \override Score.BarNumber #'Y-offset = #0
>   \override Score.BarNumber #'extra-offset = #'(0 . 0.1)
>  \clef "treble"
> \tempo 4 = 118
> \TimeKey
> \new Voice = "Sop"  {  \voiceOne   \SopMusic  }
>  \new Lyrics \lyricsto "Sop" { \VerseOne   }
>  \new Lyrics \lyricsto "Sop" { \VerseTwo   }
>

Re: how to write a scheme function to override glissando properties

2010-12-16 Thread Patrick Schmidt


Am 14.12.2010 um 20:16 schrieb Marc Hohl:


Am 14.12.2010 14:25, schrieb Patrick Schmidt:

Hi all,

Hi Patrick,


I noticed that glissandi are quite often hardly visible in a Staff- 
context. There is also a huge difference in the look of glissandi  
in Staff- and TabStaff-contexts. I'd like to write a function to  
adjust these differences for Staffs and TabStaffs separately but I  
don't even manage to manipulate the look in general. I'd be very  
grateful if someone showed me what's missing in the following code  
alternatives:



[...]

Don't you think that you could introduce global values within a  
layout block which fit

for the whole document?

Something like

\layout {
  \context {
\Voice
\override Glissando #'minimum-length =#
\override Glissando #'springs-and-rods = #ly:spanner::set- 
spacing-rods

  }
  \context {
\TabVoice
\override Glissando #'minimum-length = #staves>
\override Glissando #'springs-and-rods = #ly:spanner::set- 
spacing-rods

  }
}


Hi Marc,

thanks for your solution but I'm still trying to find out what's  
wrong with the scheme function I posted. I discussed the need for  
this function with Carl and he gave me some advice: http://www.mail- 
archive.com/lilypond-de...@gnu.org/msg32745.html.


It might be impossible to find a general set of values for staves and  
tab staves. If I don't succeed I learned something about writing  
scheme functions, at least. Maybe you can spot the mistake in the  
function?


Thanks for your help!

patrick

Regards,

Marc



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


Re: Writhing an non vocal letter before the tone in Lyrics

2010-12-16 Thread Marek Klein
Hi Stjepan,

2010/12/16 Stjepan Horvat 

> Hello, Is there a solution for my problem?! I'm from Croation and am
> writing a
> song-book for my friend..In Croation language we use consonant's before a
> word..
>
> An example:
>
> A phrase "s tobom" means "with you" but the letter "s" does not go under
> the
> tone.
> So i tried to do something like s_tobom or "s tobom" but then i would wan't
> the word tobom to be in the center of the tone and not the whole fraze..
> it does not look good..
> here is an lilypond example:
>
> \version "2.12.3"
> \relative { c4 c d4 e }
> \addlyrics { i -- dem "s to" -- bom }
>
> or is there a way to write a letter under the \grace tone..maybe that could
> be a
> soultion..
>
> I would want when i write a word under the tone that it defines like that
> "word"
> and than add's s on the left side of the word..so its s+"word" and not
> "s+word"
>
>
in Slovak language we have similar prepositions and I like the way lilypond
does it if I would write s_to -- bom. But if you don't like it, you could
shift particular sylable to the left with
\once \override LyricText #'X-offset = #-2.4

For example:
\version "2.12.3"
left = { \once \override LyricText #'X-offset = #-2.4 }
\relative { c4 c d4 e }
\addlyrics { i -- dem  \left "s to" -- bom }

HTH.

Marek
--
Marek Klein
http://gregoriana.sk
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: nested variables in scheme

2010-12-16 Thread Rob Canning
jakob lund said :
> 2010/12/16 Rob Canning :
> > David Kastrup said :
> >> r...@goto10.org writes:
> >>
> >> > beza #0.4
> >> >
> >> > feeding into something like this: (which doesn't work)
> >> >
> >> > beza =  #(define-music-function (parser location thickness) (number?)
> >> >    #{
> >> > \bezier #'( 0.1  1.0 0.15  1.0 $number )
> >> >  #})
> >>
> >> What happens if you write $thickness instead?
> >
> >
> >
> > here is a simplified version of the problem and the lilypond error:
> >
> > hpRot = #(define-music-function (parser location rot) (list?)
> >          #{
> >          \once \override Hairpin #'rotation = $rot
> >          #})
> >
> > fooBar =  #(define-music-function (parser location zabadoo) (number?)
> >            #{
> >            { a b c d  \hpRot #'($zabadoo 0 1)  s2^\<  s s s \! }
> >            #})
> >
> > \fooBar #3
> >
> >
> > Drawing 
> > systems.../usr/share/lilypond/2.12.2/scm/layout-page-layout.scm:53:9: In
> > procedure ly:system-print in expression (ly:system-print sys):
> > /usr/share/lilypond/2.12.2/scm/layout-page-layout.scm:53:9: Wrong type
> > (expecting real number): lilyvartmpc
> >
> >
> >
> > from what i can guess the variable is not being evaluated but instead being
> > passed as lilyvartmpc ...
> >
> 
> in that case, try
> try #(list $zabadoo 0 1) instead of #'($zabadoo 0 1)
> ... I havent tested it myself though...

that works! 
thank you jakob and thank you lilyponders :)
rob


/me really needs to learn scheme 
> 
> 
> > thanks
> >
> > rob
> >
> > ___
> > lilypond-user mailing list
> > lilypond-user@gnu.org
> > http://lists.gnu.org/mailman/listinfo/lilypond-user
> >
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user
> 
--
r...@goto10.org
rob.goto10.org
--

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


Re: nested variables in scheme

2010-12-16 Thread jakob lund
2010/12/16 Rob Canning :
> David Kastrup said :
>> r...@goto10.org writes:
>>
>> > beza #0.4
>> >
>> > feeding into something like this: (which doesn't work)
>> >
>> > beza =  #(define-music-function (parser location thickness) (number?)
>> >    #{
>> > \bezier #'( 0.1  1.0 0.15  1.0 $number )
>> >  #})
>>
>> What happens if you write $thickness instead?
>
>
>
> here is a simplified version of the problem and the lilypond error:
>
> hpRot = #(define-music-function (parser location rot) (list?)
>          #{
>          \once \override Hairpin #'rotation = $rot
>          #})
>
> fooBar =  #(define-music-function (parser location zabadoo) (number?)
>            #{
>            { a b c d  \hpRot #'($zabadoo 0 1)  s2^\<  s s s \! }
>            #})
>
> \fooBar #3
>
>
> Drawing systems.../usr/share/lilypond/2.12.2/scm/layout-page-layout.scm:53:9: 
> In
> procedure ly:system-print in expression (ly:system-print sys):
> /usr/share/lilypond/2.12.2/scm/layout-page-layout.scm:53:9: Wrong type
> (expecting real number): lilyvartmpc
>
>
>
> from what i can guess the variable is not being evaluated but instead being
> passed as lilyvartmpc ...
>

in that case, try
try #(list $zabadoo 0 1) instead of #'($zabadoo 0 1)
... I havent tested it myself though...


> thanks
>
> rob
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user
>

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


Re: nested variables in scheme

2010-12-16 Thread Rob Canning
David Kastrup said :
> r...@goto10.org writes:
> 
> > beza #0.4
> >
> > feeding into something like this: (which doesn't work)
> >
> > beza =  #(define-music-function (parser location thickness) (number?)
> >#{
> > \bezier #'( 0.1  1.0 0.15  1.0 $number )
> >  #})
> 
> What happens if you write $thickness instead?



here is a simplified version of the problem and the lilypond error:

hpRot = #(define-music-function (parser location rot) (list?)   
  #{
  \once \override Hairpin #'rotation = $rot 
  #})

fooBar =  #(define-music-function (parser location zabadoo) (number?)   
#{  
{ a b c d  \hpRot #'($zabadoo 0 1)  s2^\<  s s s \! }   
#})

\fooBar #3


Drawing systems.../usr/share/lilypond/2.12.2/scm/layout-page-layout.scm:53:9: 
In 
procedure ly:system-print in expression (ly:system-print sys):
/usr/share/lilypond/2.12.2/scm/layout-page-layout.scm:53:9: Wrong type 
(expecting real number): lilyvartmpc



from what i can guess the variable is not being evaluated but instead being 
passed as lilyvartmpc ...

thanks

rob

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


Re: bar number printed above the phrase (slur) curve

2010-12-16 Thread Jan Warchoł
2010/12/16 -Eluze :
>
> using Score.BarNumber might help!

Silly me :) of course i should have used Score.BarNumber.

So, Ming, here is the final solution: add
  \once \override Score.BarNumber #'outside-staff-priority = ##f
before every bar number that should be below the slur.

You can also use
  \once \override Score.BarNumber #'Y-offset = #insertAnumberHere
to fine-tune the bar number position.

So for example

\version "2.13.40"
\relative c''{
  \override Score.BarNumber #'break-visibility = #'#(#t #t #t)
  \stemUp \slurUp e e e( e \once \override Score.BarNumber
#'outside-staff-priority = ##f |
  c d) g, e( | f g a) b |
  c d) g, e( \once \override Score.BarNumber #'outside-staff-priority
= ##f | f g a) b |   % the small amount of slur sticking above staff
is ignored
  c d) g, e( \once \override Score.BarNumber #'outside-staff-priority
= ##f | \once \override Score.BarNumber #'Y-offset = #1.9   % the
distance in Y-offset is measured from the middle staff line!
  f g a) b |
}

Good luck!
Janek

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


Re: nested variables in scheme

2010-12-16 Thread rob
> - Original Message -
> From: 
> To: 
> Sent: Thursday, December 16, 2010 1:10 PM
> Subject: nested variables in scheme
>
>
>> beza #0.4
>>
>> feeding into something like this: (which doesn't work)
>>
>> beza =  #(define-music-function (parser location thickness) (number?)
>>   #{
>> \bezier #'( 0.1  1.0 0.15  1.0 $number )
>> #})
>>
>
>
> Hi Rob,
>
> Should'nt that be... \bezier #'( 0.1  1.0 0.15  1.0 $thickness )
>
thanks phil,
yes a typo in my example - well spotted - however the question remains the
same

cheers

rob





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


Re: bar number printed above the phrase (slur) curve

2010-12-16 Thread MING TSANG
Hi, Janek'

Thank you for your patient.  I thought my sample is simple.  Will remember next 
time.


Here is the tiny example again: (with your suggestion)

\version "2.13.40"
\relative c''{
  \override Score.BarNumber #'break-visibility = #'#(#t #t #t)
  \override BarNumber #'avoid-slur = #'inside
  \override BarNumber #'outside-staff-priority = ##f
  \override BarNumber #'Y-offset = #5.0
  \stemUp \slurUp e e e( e | c d) g, e( | f g a) b 
}

I include your suggestion. However bar #2 is still print outside the phrase 
curve far away from the staff / bar line.  Bar #3 looks good even though it is 
above the phrase curve.  What I hope to do is to make bar numbers pretty much 
line bar#4 all through the score.

Thank you again for your help
Ming.



From: Jan Warchoł 
To: MING TSANG 
Cc: James ; lilypond-user 
Sent: Thu, December 16, 2010 3:34:54 AM
Subject: Re: bar number printed above the phrase (slur) curve

2010/12/16 MING TSANG :
>
> Is it possible to line up all bar number just above the staff / bar line,
> especially bar 2, 4 and 5 which is on top of the phrase curve?
>
> Here is a simpler example.
> [65 lines of code]

Ming, you really miss the point of tiny examples. Have you read
carefully the link about tiny examples that i sent you? (
http://lilypond.org/tiny-examples.html )
The code that you posted now compiles succesfully, but it is horribly
long and compllicated. A proper tiny example for your question would
be something like this (i wrote it in less than a minute):

\version "2.13.40"
\relative c''{
  \override Score.BarNumber #'break-visibility = #'#(#t #t #t)
  \stemUp \slurUp e e e( e | e e) e e
}

If you don't stick to these rules, don't be surprised if no one
answers your questions :( We simply value our time. (And the fact that
i'm answering means that - judging by general standards in places like
this list - i have extraordinary patience).

Now back to the problem. I hoped that adding this

\override BarNumber #'avoid-slur = #'inside
\override BarNumber #'outside-staff-priority = ##f

would solve it (similarly to the example in Learning Manual 4.4.3),
but it doesn't.
I also tried adding some Y-offset, but it doesn't work at all - a bug?
see this, the bar number doesn't move at all:

\version "2.13.40"
\relative c''{
\override BarNumber #'Y-offset = #5.0
c c c c \break c c c c
}

My knowledge ends here. Can anyone wiser than me use my tiny example
of Ming's problem and solve it?

cheers,
Janek


> [Ming's code:]
>
> \version "2.13.40"
>
> \header {
>   title = "Walking in Winter Wonderland"
> }
>
> #(set-global-staff-size 30)
> \include "english.ly"
> TimeKey = { \time 4/4  \key ef  \major  }
> SopMusic   = \relative c' {
> % Draw a box round the following bar number(s)
> \override Score.BarNumber #'stencil
>= #(make-stencil-boxer 0.1 0.25 ly:text-interface::print)
>  \partial 4
>  bf'8.\( bf16 \repeat volta 2 { \bar "|:"  bf2^\markup {E \flat}\)
> r4 bf8.\( bf16 | g8 bf4.\) r4 bf8.\( bf16 |%bar 00-02
>  bf2^\markup {Fm}\) r4^\markup {Fm+5} bf8.\( bf16 | af8^\markup
> {Fm7} bf4.\) r4^\markup {B\flat 7}  bf4\( | d8. d16 d8 c8~ c4\) r8. c16\(
> |%bar 03-05
>  g8.^\markup {E\flat} gf16 f8 e8~^\markup {C7+5} e4\) r4 |
> g8.^\markup {F9}\( g16 g8. g16 f8.^\markup{B\flat 7} f16 f8. f16 | }
> \alternative { { ef2^\markup{E\flat}\) r4 bf'8. bf16 \bar ":|" }
>  %bar 06-08
>  { ef,2^\markup{E\flat} r4 s4 || } }
>\label #'lastPage
> }
> VerseOne   = \lyricmode {
> Sleigh bellsring, are youlist- 'nin? In the
> lane snow isglist- 'nin'. Abeau- ti- ful sight, we're
> hap- py to- night.walk- in' in a win- ter won- der- land! Gone a-
> }
> VerseTwo   = \lyricmode {
> "" "" way is the blue bird, here to  stay is a
> new bird He sings a love song, as  we go a- long
> walk- in' in a win- ter won- der "" "" ""land
> }
>
>
> \score {
>   \new GrandStaff = "GrandStaff_score" <<
> \new ChoirStaff <<
>   \new Staff <<
>  \override Score.BarNumber #'break-visibility = #all-visible
>   \override Score.BarNumber #'self-alignment-X = #0
>   \override Score.BarNumber #'Y-offset = #0
>   \override Score.BarNumber #'extra-offset = #'(0 . 0.1)
> \clef "treble"
> \tempo 4 = 118
> \TimeKey
> \new Voice = "Sop"  {  \voiceOne   \SopMusic  }
>  \new Lyrics \lyricsto "Sop" { \VerseOne   }
>  \new Lyrics \lyricsto "Sop" { \VerseTwo   }
>   >>
> >>
>   >>
>\layout {
> \context {
>  \RemoveEmptyStaffContext
>  \override VerticalAxisGroup #'remove-first = ##t
> }
> \context {
> \Voice
> }
>   }
>   \midi { \context { \Staff \remove "Dynamic_performer" } }
> }
>
>
> 
> From: James 
> To: Jan Warchoł 
> Cc: MING TSANG ; lilypond-user@gnu.org
> Sent: Wed, December 15, 2010 11:18:57 AM
> Su

Re: nested variables in scheme

2010-12-16 Thread David Kastrup
r...@goto10.org writes:

> beza #0.4
>
> feeding into something like this: (which doesn't work)
>
> beza =  #(define-music-function (parser location thickness) (number?)
>#{
> \bezier #'( 0.1  1.0 0.15  1.0 $number )
>  #})

What happens if you write $thickness instead?

-- 
David Kastrup


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


Re: nested variables in scheme

2010-12-16 Thread Phil Burfitt
- Original Message - 
From: 

To: 
Sent: Thursday, December 16, 2010 1:10 PM
Subject: nested variables in scheme



beza #0.4

feeding into something like this: (which doesn't work)

beza =  #(define-music-function (parser location thickness) (number?)
  #{
\bezier #'( 0.1  1.0 0.15  1.0 $number )
#})




Hi Rob,

Should'nt that be... \bezier #'( 0.1  1.0 0.15  1.0 $thickness )


Phil.



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


nested variables in scheme

2010-12-16 Thread rob

sorry about previous untitled mail - knocked the send button by accident :/

hi!

i have a definition that takes a list as an argument

\include "bezier.ly"
beza = {
  \bezier #'( 0.1  1.0 0.15  1.0 0.5 )
}

i would like to be able to assign one of the elements of the list with a
variable like this

beza #0.4

feeding into something like this: (which doesn't work)

beza =  #(define-music-function (parser location thickness) (number?)
   #{
\bezier #'( 0.1  1.0 0.15  1.0 $number )
 #})


so i would like to send a variable into a list which itself as another
variable for another function

not sure how to do this and cant find anything in the docs about it
any clues?

thanks

rob




> hi!
>
> i have a definition that takes a list as an argument
>
> \include "bezier.ly"
> beza = {
>   \bezier #'( 0.1  1.0 0.15  1.0 0.5 )
> }
>
> i would like to be able to assign one of the elements of the list with a
> variable like this
>
> beza #0.4
>
> feeding into something like this
>
> beza =  #(define-music-function (parser location thickness) (number?)
>#{
> \bezier #'( 0.1  1.0 0.15  1.0 $number )
> }
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user
>
>



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


[no subject]

2010-12-16 Thread rob
hi!

i have a definition that takes a list as an argument

\include "bezier.ly"
beza = {
  \bezier #'( 0.1  1.0 0.15  1.0 0.5 )
}

i would like to be able to assign one of the elements of the list with a
variable like this

beza #0.4

feeding into something like this

beza =  #(define-music-function (parser location thickness) (number?)
   #{
\bezier #'( 0.1  1.0 0.15  1.0 $number )
}


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


Re: How to print 2 rehearsal marks above and below same bar line

2010-12-16 Thread James

Hello,

On 15/12/2010 22:35, Neil Puttock wrote:

The image show why using extra-offset as a workaround is a very bad
idea unless you're only tweaking small elements inside a stave: the
ReheasalMark's bounding box doesn't move.


Umm..

Is it easy to display those nice lines around the bounding boxes by
adding a \paper { } variable?

I can only find

\paper { annotate-spacing = ##t }

Which gives the arrows/values.

regards

James


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


Re: How to print 2 rehearsal marks above and below same bar line

2010-12-16 Thread James

Hello

On 15/12/2010 22:35, Neil Puttock wrote:

On 15 December 2010 16:06, Phil Holmes  wrote:


And this is what the LSR preview shows.  By default, I believe the LSR only
outputs a single line, and so that may be why you see more than we get with
the LSR.  It can be set to give a whole page, but then this is a bit bigger
than optimal for this.  As I said - I'm just concerned that this may
indicate that the lower marks aren't properly accounted for in the
sizing/positioning algorithms.


The image show why using extra-offset as a workaround is a very bad
idea unless you're only tweaking small elements inside a stave: the
ReheasalMark's bounding box doesn't move.



WOW!

I suppose I should also add that to the LSR snippet. For the kind of 
music I engrave the method for extra offset is fine pretty much, and 
much less complicated than adding a second voice and then a \layout {} 
function.


Thanks

James


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


Writhing an non vocal letter before the tone in Lyrics

2010-12-16 Thread Stjepan Horvat
Hello, Is there a solution for my problem?! I'm from Croation and am writing a 
song-book for my friend..In Croation language we use consonant's before a word..

An example:

A phrase "s tobom" means "with you" but the letter "s" does not go under the 
tone.
So i tried to do something like s_tobom or "s tobom" but then i would wan't 
the word tobom to be in the center of the tone and not the whole fraze..
it does not look good..
here is an lilypond example:

\version "2.12.3"
\relative { c4 c d4 e }
\addlyrics { i -- dem "s to" -- bom }

or is there a way to write a letter under the \grace tone..maybe that could be 
a 
soultion..

I would want when i write a word under the tone that it defines like that 
"word" 
and than add's s on the left side of the word..so its s+"word" and not "s+word"

Thanks


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


Re: Inner and outer margins

2010-12-16 Thread James

hello,



From:  Paul Scott
Subject:  Re: Inner and outer margins
Date:  Sun, 27 Jun 2010 01:16:01 -0700
User-agent:  Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) 
Gecko/20100619 Icedove/3.0.5


On 06/27/2010 12:24 AM, Nick Payne wrote:
Can't remember if I've previously reported this, but in a score where
I've setup a separate title page using bookpart, and the first page
number therefore set to zero to get the numbering to start at 1 on the
first page of actual music, the inner and outer margins get swapped.
With the lines below in the header section, what I actually get is a
1.5cm outer margin and a 1cm inner margin. I have to swap the values
around to get the inner margin to be the wider. This is with 2.13.25.


first-page-number = 0
print-first-page-number = ##f
outer-margin = 1\cm
inner-margin = 1.5\cm
two-sided = ##t


Not a bug. Odd pages are always on the right. If your first page is on the back 
of the cover page it must be page 2. If you want the music to start on page 1 
you must have blank page on the back of the cover page and have page 1 be a 
right page. In that case


first-page-number = -1


might work but I don't know that.


Paul Scott


Hello, this has been added to the code for the Notation Reference manual 
as a 'warning'.


http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commit;h=36dd3392bcc0462f7d8af5f5a8bf24c544e43cda

Regards

James


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


Re: Line spacing inconsistency

2010-12-16 Thread James

Hello,



From:  Neil Puttock
Subject:  Re: Line spacing inconsistency
Date:  Sat, 25 Sep 2010 16:22:38 +0100



On 22 September 2010 16:27, Phil Holmes  wrote:

Originally posted to .devel in error:

Is it a known feature that using the font sizing commands \teeny, \huge,
etc., leads to inconsistent line spacing when compared with using fontsize?


Yes.  It's implied in the markup command documentation, though it
could be more explicit.

The named sizing commands set absolute font-size (and nothing else),
whereas \fontsize adds an increment to the current font-size, scaling
baseline-skip to match.

It might make sense to redefine the named commands in terms of
\abs-fontsize, since that'll ensure baseline-skip is changed while
retaining the absolute font-size.

Cheers,
Neil




This has been added to the Notation Reference

http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commit;h=36dd3392bcc0462f7d8af5f5a8bf24c544e43cda

Thanks

James


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


Re: bar number printed above the phrase (slur) curve

2010-12-16 Thread -Eluze


Jan Warchoł wrote:
> 
> 
> I also tried adding some Y-offset, but it doesn't work at all - a bug?
> see this, the bar number doesn't move at all:
> 
> \version "2.13.40"
> \relative c''{
> \override BarNumber #'Y-offset = #5.0
> c c c c \break c c c c
> }
> 
> My knowledge ends here. Can anyone wiser than me use my tiny example
> of Ming's problem and solve it?
> 
> 
> 
using Score.BarNumber might help!
-- 
View this message in context: 
http://old.nabble.com/bar-number-printed-above-the-phrase-%28slur%29--curve-tp30449545p30471355.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.


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


Re: Specifying bezier curve for tie across line break collideswithclef symbol

2010-12-16 Thread Nick Payne

Trevor

Thanks. With that I can generalise it a bit further to be used with any 
sort of spanner:


#(define ((grob2-extra-offset offset) grob)
(let* (
(orig (ly:grob-original grob))
(siblings (if (ly:grob? orig)
(ly:spanner-broken-into orig)
'(
(if (and (>= (length siblings) 2)
(eq? (car (last-pair siblings)) grob))
(ly:grob-set-property! grob 'extra-offset offset

albOffset = #(define-music-function (parser location type move) (string? 
pair?) #{
\once \override $type #'after-line-breaking = #(grob2-extra-offset 
$move)

#})

and then pass the name of the spanner as the first parameter - in this 
case, for example:


\albOffset "Tie" #'(0 . 1)

Nick

On 16/12/10 19:37, Trevor Daniels wrote:

Hi Nick

Yes, it's possible to generalise it, although the way
to do it is not easy to guess (nothing in scheme is
easy to guess, I find).  Try:

#(define ((tie2-extra-offset offset) grob)
  (let* (
 (orig (ly:grob-original grob))
 (siblings (if (ly:grob? orig)
   (ly:spanner-broken-into orig)
   '(
(if (and (>= (length siblings) 2)
 (eq? (car (last-pair siblings)) grob))
(ly:grob-set-property! grob 'extra-offset offset

and

 \override Tie #'after-line-breaking = #(tie2-extra-offset '(0 . 1))

Trevor

- Original Message - From: "Nick Payne" 


To: "lilypond-user" 
Sent: Thursday, December 16, 2010 2:41 AM
Subject: Re: Specifying bezier curve for tie across line break 
collideswithclef symbol




Trevor

Thanks for the explanation and Scheme code. I tried to generalise it 
a bit by passing in the x and y offset values as parameters, using:


#(define (tie2-extra-offset grob movex movey)
(let* (
(orig (ly:grob-original grob))
(siblings (if (ly:grob? orig)
(ly:spanner-broken-into orig)
'(
(if (and (>= (length siblings) 2)
(eq? (car (last-pair siblings)) grob))
(ly:grob-set-property! grob 'extra-offset cons (movex movey)

and then calling it as:

\once \override Tie #'after-line-breaking = #(tie2-extra-offset (0 1))

but this gives console log errors:

/home/nick/lilypond/examples/test.ly:48:61: error: GUILE signaled an 
error for the expression beginning here

\once \override Tie #'after-line-breaking = #

(tie2-extra-offset (0 1))
Interpreting music...
warning: type check for `after-line-breaking' failed; value 
`#' must be of type `boolean'


Not knowing Scheme, I'm a bit flummoxed as to how to fix this error. 
Is what I'm trying to do actually possible?


Nick

On 15/12/10 21:46, Trevor Daniels wrote:

Nick

When a spanner such as a tie crosses a line break, the grob
is cloned into two grobs, one to be placed at the end of
the first line and one to be placed at the beginning of the
second.  Overrides to properties made in the usual way are
made to both of these cloned grobs, although the precise
effect they have depends on the code used to generate the
grobs, and in general changes to positioning properties
will not be useful.  For details of this see Extending
LilyPond, section 2.6

http://lilypond.org/doc/v2.13/Documentation/extending/difficult-tweaks

We can modify the example there to suit your particular
problem, using 'extra-offset rather than messing with the
Bezier curve parameters, as follows:

#(set-global-staff-size 24)

#(define (tie2-extra-offset grob)
  (let* (
 (orig (ly:grob-original grob))
 (siblings (if (ly:grob? orig)
   (ly:spanner-broken-into orig)
   '(
(if (and (>= (length siblings) 2)
 (eq? (car (last-pair siblings)) grob))
(ly:grob-set-property! grob 'extra-offset '(0 . 1)

\relative c'' {
\time 6/4
<< {
a'8 g fis e dis e \acciaccatura e d4. c'8 b4 |
c4 r2 s2. |
dis8 b c b a g b2\rest 4 |
} \\ {
fis,,,8 e' dis e fis b, c4. g8 a4 |
dis2 r4 s2. |
b2 r4 r2. |
} \\ {
fis4 s2 s2. |
s8 e'' fis e g fis ~ fis4. gis8 a4 ~ |
a4 c,2\rest s2. |
} \\ {
s1. |
c8\rest b a g a c dis4. e,8
 \override Tie #'after-line-breaking = #tie2-extra-offset
fis4 ~ |
fis4 s2 fis'8 e dis cis dis b |
} >>
}


- Original Message - From: "Nick Payne" 


To: 
Sent: Wednesday, December 15, 2010 1:59 AM
Subject: Re: Specifying bezier curve for tie across line break 
collides withclef symbol



Here's a small example that demonstrates the problem. The lower of the
two ties between bars 2 and 3 appears to go to the wrong note, and if
you uncomment the override for the tie control points to get it
correctly positioned vertically, the continuation of the tie in bar 3
starts at the left of the clef symbol.

\version "2.13.43"

#(set-global-staff-size 24)

\relative c'' {
\time 6/4
<< {
a'8 g fis e dis e \acciaccatura e d4. c'8 b4 |
c4 r2 s2. |
dis8

Re: dynamic alignment

2010-12-16 Thread Jan-Peter Voigt

Thank you Neil,

so I applied this to my little script and will post this to LSR :-)
The question of Ralph Palmer ("Unexpected \markup behavior") made me 
think of this. So my next step is to build this with a whiteout-option.

Simple whiteout is trivial, but with padding, there has to more calculating.

If you use this, there is one thing to mention: 'X-offset is now 
tweaked, so overriding it ([\once] \override DynamicText #'X-offset) 
will have no effect on this dynamic signs anymore!


Regards,
Jan-Peter

--snip--
\version "2.12.3"

% calculate x-alignment based on attribute text + dynamic text
% this has to be a markup-command to get stencil-extent based on 
(interpret-markup layout props ...)
#(define-markup-command (center-dyn layout props atr-text dyn)(markup? 
string?)

  "x-align on center of dynamic"
  (let* (
  (text (string-append atr-text " "))
  (atr-stencil (interpret-markup layout props (markup 
#:normal-text #:italic text)))
  (dyn-stencil (interpret-markup layout props (markup #:dynamic 
dyn)))

  (atr-x-ext (ly:stencil-extent atr-stencil X))
  (dyn-x-ext (ly:stencil-extent dyn-stencil X))
  (atr-x (- (cdr atr-x-ext)(car atr-x-ext)))
  (dyn-x (- (cdr dyn-x-ext)(car dyn-x-ext)))
  (x-align
(* (-
 (/ (+ atr-x (/ dyn-x 2)) (+ atr-x dyn-x) )
 0.5) 2)
  )
)
(interpret-markup layout props (markup #:halign x-align 
#:concat (#:normal-text #:italic text #:dynamic dyn)))

))
% define a 'new' attributed dynamic script
#(define (make-atr-dynamic-script atr dyn)
(let ((dynamic (make-dynamic-script (markup #:center-dyn atr 
dyn
 (ly:music-set-property! dynamic 'tweaks (acons 'X-offset 0 
(ly:music-property dynamic 'tweaks)))

 dynamic))

% define some attributed dynamics
pocof = #(make-atr-dynamic-script "poco" "f")
menof = #(make-atr-dynamic-script "meno" "f")
subp = #(make-atr-dynamic-script "subito" "p")

\paper {
  #(set-paper-size "a5" 'landscape)
  ragged-last = ##f
}
\score {
<<
\new Staff <<
  \relative c'' {
\dynamicUp
r4 c\pocof d e | d\ff d cis eis ~ | eis1\subp | r4 b\menof c\f r4
  }
>>
>>
  \layout {
  }
}
--snip--


On 16.12.2010 01:16, Neil Puttock wrote:

On 13 December 2010 11:21, Jan-Peter Voigt  wrote:


Is it possible to set that value inside the make-dynamic-script or align it
some other way, so that I can simply use my defined \pocof (etc.) without
switching X-offset on and off?

Sure, by overriding X-offset as a tweak:

pocof =
#(let ((dynamic (make-dynamic-script (markup #:center-dyn "poco" "f"
 (set! (ly:music-property dynamic 'tweaks)
(acons 'X-offset 0 (ly:music-property dynamic 'tweaks)))
dynamic)

Cheers,
Neil




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


Re: Specifying bezier curve for tie across line break collideswithclef symbol

2010-12-16 Thread Trevor Daniels

Hi Nick

Yes, it's possible to generalise it, although the way
to do it is not easy to guess (nothing in scheme is
easy to guess, I find).  Try:

#(define ((tie2-extra-offset offset) grob)
  (let* (
 (orig (ly:grob-original grob))
 (siblings (if (ly:grob? orig)
   (ly:spanner-broken-into orig)
   '(
(if (and (>= (length siblings) 2)
 (eq? (car (last-pair siblings)) grob))
(ly:grob-set-property! grob 'extra-offset offset

and

 \override Tie #'after-line-breaking = #(tie2-extra-offset '(0 . 
1))


Trevor

- Original Message - 
From: "Nick Payne" 

To: "lilypond-user" 
Sent: Thursday, December 16, 2010 2:41 AM
Subject: Re: Specifying bezier curve for tie across line break 
collideswithclef symbol




Trevor

Thanks for the explanation and Scheme code. I tried to generalise 
it a bit by passing in the x and y offset values as parameters, 
using:


#(define (tie2-extra-offset grob movex movey)
(let* (
(orig (ly:grob-original grob))
(siblings (if (ly:grob? orig)
(ly:spanner-broken-into orig)
'(
(if (and (>= (length siblings) 2)
(eq? (car (last-pair siblings)) grob))
(ly:grob-set-property! grob 'extra-offset cons (movex 
movey)


and then calling it as:

\once \override Tie #'after-line-breaking = #(tie2-extra-offset (0 
1))


but this gives console log errors:

/home/nick/lilypond/examples/test.ly:48:61: error: GUILE signaled 
an error for the expression beginning here

\once \override Tie #'after-line-breaking = #

(tie2-extra-offset (0 1))
Interpreting music...
warning: type check for `after-line-breaking' failed; value 
`#' must be of type `boolean'


Not knowing Scheme, I'm a bit flummoxed as to how to fix this 
error. Is what I'm trying to do actually possible?


Nick

On 15/12/10 21:46, Trevor Daniels wrote:

Nick

When a spanner such as a tie crosses a line break, the grob
is cloned into two grobs, one to be placed at the end of
the first line and one to be placed at the beginning of the
second.  Overrides to properties made in the usual way are
made to both of these cloned grobs, although the precise
effect they have depends on the code used to generate the
grobs, and in general changes to positioning properties
will not be useful.  For details of this see Extending
LilyPond, section 2.6

http://lilypond.org/doc/v2.13/Documentation/extending/difficult-tweaks

We can modify the example there to suit your particular
problem, using 'extra-offset rather than messing with the
Bezier curve parameters, as follows:

#(set-global-staff-size 24)

#(define (tie2-extra-offset grob)
  (let* (
 (orig (ly:grob-original grob))
 (siblings (if (ly:grob? orig)
   (ly:spanner-broken-into orig)
   '(
(if (and (>= (length siblings) 2)
 (eq? (car (last-pair siblings)) grob))
(ly:grob-set-property! grob 'extra-offset '(0 . 1)

\relative c'' {
\time 6/4
<< {
a'8 g fis e dis e \acciaccatura e d4. c'8 b4 |
c4 r2 s2. |
dis8 b c b a g b2\rest 4 |
} \\ {
fis,,,8 e' dis e fis b, c4. g8 a4 |
dis2 r4 s2. |
b2 r4 r2. |
} \\ {
fis4 s2 s2. |
s8 e'' fis e g fis ~ fis4. gis8 a4 ~ |
a4 c,2\rest s2. |
} \\ {
s1. |
c8\rest b a g a c dis4. e,8
 \override Tie #'after-line-breaking = #tie2-extra-offset
fis4 ~ |
fis4 s2 fis'8 e dis cis dis b |
} >>
}


- Original Message - From: "Nick Payne" 


To: 
Sent: Wednesday, December 15, 2010 1:59 AM
Subject: Re: Specifying bezier curve for tie across line break 
collides withclef symbol


Here's a small example that demonstrates the problem. The lower 
of the
two ties between bars 2 and 3 appears to go to the wrong note, 
and if

you uncomment the override for the tie control points to get it
correctly positioned vertically, the continuation of the tie in 
bar 3

starts at the left of the clef symbol.

\version "2.13.43"

#(set-global-staff-size 24)

\relative c'' {
\time 6/4
<< {
a'8 g fis e dis e \acciaccatura e d4. c'8 b4 |
c4 r2 s2. |
dis8 b c b a g b2\rest 4 |
} \\ {
fis,,,8 e' dis e fis b, c4. g8 a4 |
dis2 r4 s2. |
b2 r4 r2. |
} \\ {
fis4 s2 s2. |
s8 e'' fis e g fis ~ fis4. gis8 a4 ~ |
a4 c,2\rest s2. |
} \\ {
s1. |
c8\rest b a g a c dis4. e,8
%\once \override Tie #'control-points = #'((1 . -2) (2.5 
. -2.5)

(3.5 . -2.5) (5 . -2))
fis4 ~ |
fis4 s2 fis'8 e dis cis dis b |
} >>
}



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






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


Re: bar number printed above the phrase (slur) curve

2010-12-16 Thread Jan Warchoł
2010/12/16 MING TSANG :
>
> Is it possible to line up all bar number just above the staff / bar line,
> especially bar 2, 4 and 5 which is on top of the phrase curve?
>
> Here is a simpler example.
> [65 lines of code]

Ming, you really miss the point of tiny examples. Have you read
carefully the link about tiny examples that i sent you? (
http://lilypond.org/tiny-examples.html )
The code that you posted now compiles succesfully, but it is horribly
long and compllicated. A proper tiny example for your question would
be something like this (i wrote it in less than a minute):

\version "2.13.40"
\relative c''{
  \override Score.BarNumber #'break-visibility = #'#(#t #t #t)
  \stemUp \slurUp e e e( e | e e) e e
}

If you don't stick to these rules, don't be surprised if no one
answers your questions :( We simply value our time. (And the fact that
i'm answering means that - judging by general standards in places like
this list - i have extraordinary patience).

Now back to the problem. I hoped that adding this

\override BarNumber #'avoid-slur = #'inside
\override BarNumber #'outside-staff-priority = ##f

would solve it (similarly to the example in Learning Manual 4.4.3),
but it doesn't.
I also tried adding some Y-offset, but it doesn't work at all - a bug?
see this, the bar number doesn't move at all:

\version "2.13.40"
\relative c''{
\override BarNumber #'Y-offset = #5.0
c c c c \break c c c c
}

My knowledge ends here. Can anyone wiser than me use my tiny example
of Ming's problem and solve it?

cheers,
Janek


> [Ming's code:]
>
> \version "2.13.40"
>
> \header {
>   title = "Walking in Winter Wonderland"
> }
>
> #(set-global-staff-size 30)
> \include "english.ly"
> TimeKey = { \time 4/4  \key ef  \major  }
> SopMusic   = \relative c' {
>     % Draw a box round the following bar number(s)
>     \override Score.BarNumber #'stencil
>    = #(make-stencil-boxer 0.1 0.25 ly:text-interface::print)
>  \partial 4
>  bf'8.\( bf16 \repeat volta 2 { \bar "|:"  bf2^\markup {E \flat}\)
> r4 bf8.\( bf16 | g8 bf4.\) r4 bf8.\( bf16 |                    %bar 00-02
>  bf2^\markup {Fm}\) r4^\markup {Fm+5} bf8.\( bf16 | af8^\markup
> {Fm7} bf4.\) r4^\markup {B\flat 7}  bf4\( | d8. d16 d8 c8~ c4\) r8. c16\(
> |                %bar 03-05
>  g8.^\markup {E\flat} gf16 f8 e8~^\markup {C7+5} e4\) r4 |
> g8.^\markup {F9}\( g16 g8. g16 f8.^\markup{B\flat 7} f16 f8. f16 | }
> \alternative { { ef2^\markup{E\flat}\) r4 bf'8. bf16 \bar ":|" }
>  %bar 06-08
>  { ef,2^\markup{E\flat} r4 s4 || } }
>    \label #'lastPage
> }
> VerseOne   = \lyricmode {
> Sleigh bells    ring, are you    list- 'nin? In the
> lane snow is    glist- 'nin'. A    beau- ti- ful sight, we're
> hap- py to- night.    walk- in' in a win- ter won- der- land! Gone a-
> }
> VerseTwo   = \lyricmode {
> "" "" way is the blue bird, here to  stay is a
> new bird He sings a love song, as  we go a- long
> walk- in' in a win- ter won- der "" "" ""    land
> }
>
>
> \score {
>   \new GrandStaff = "GrandStaff_score" <<
>     \new ChoirStaff <<
>   \new Staff <<
>  \override Score.BarNumber #'break-visibility = #all-visible
>   \override Score.BarNumber #'self-alignment-X = #0
>   \override Score.BarNumber #'Y-offset = #0
>   \override Score.BarNumber #'extra-offset = #'(0 . 0.1)
>     \clef "treble"
>     \tempo 4 = 118
>     \TimeKey
>     \new Voice = "Sop"  {  \voiceOne   \SopMusic  }
>  \new Lyrics \lyricsto "Sop" { \VerseOne   }
>  \new Lyrics \lyricsto "Sop" { \VerseTwo   }
>   >>
>     >>
>   >>
>    \layout {
>     \context {
>  \RemoveEmptyStaffContext
>  \override VerticalAxisGroup #'remove-first = ##t
>     }
>     \context {
>     \Voice
>     }
>   }
>   \midi { \context { \Staff \remove "Dynamic_performer" } }
> }
>
>
> 
> From: James 
> To: Jan Warchoł 
> Cc: MING TSANG ; lilypond-user@gnu.org
> Sent: Wed, December 15, 2010 11:18:57 AM
> Subject: Re: bar number printed above the phrase (slur) curve
>
> Ming
>
> On 15/12/2010 16:09, Jan Warchoł wrote:
>> You need to create a tiny example of your problem (see
>> http://lilypond.org/tiny-examples.html), or else the chance of getting
>> help is (very) small.
>> In my case the file failed to compile at all (i'm running latest
>> development version, 2.13.43) so i don't even know if i can help you (i
>> don't have the time to fix compile errors).
>
> Yes, I get compilation errors too.

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