Re: Need some guidance from a Lilypond Scheme expert

2012-06-14 Thread jakob lund
2012/6/11 Matthew Probst matt...@yak.org:
 I understand the Scheme language at intermediate level, but am not adept at
 processing Lilypond data structures.

 I'm looking into Snippet 465:

 http://lsr.dsi.unimi.it/LSR/Item?id=465

 I have the following in my Lilypond code, for typesetting a common guitar
 strum pattern:

 rhtOne = #(rhythm-template #{ s16 s16 r8 s16 #} )
 \relative c' { r4 \rhtOne f a d1 r2 }

 This works fine.  However, this does not:

 rhtOne = #(rhythm-template #{ s16 s16 r8 s16 #} )
 Dnine = { \relative c' { f a d1 } }
 \relative c' { r4 \rhtOne \Dnine r2 }


 The problem is that the snippet constructs a single chord event to apply the
 rythm to, by walking down the 'elements property of the first parameter, and
 collecting their pitches into a list with (map):

 http://pastebin.com/tSm1tw65

 The data structure this sees from my first Lilypond example is like this:

 http://pastebin.com/Tx8qhz6u


 However, the data structure created by my second Lilypond example looks more
 like this:


 http://pastebin.com/FuCRHDyK


 In the first example, it sees an 'EventChord, so we properly fetch a list of
 all its children's 'pitch properties.  In the second example, it's
 'SequentialMusic, not  an 'EventChord.  What I want to do is walk down the
 data structure and find the first EventChord or NoteEvent.


 That doesn't seem too hard, actually.  Need to define a function
 first-non-sequence, and conditionally drill farther into the data structure
 until I find the first non-sequence.  Understanding that this is pseudocode
 instead of proper syntax,  I'd need to do something roughly like the
 following:


 http://pastebin.com/3eNNYjHE


 Also have to potentially recurse farther into nested levels of
 'SequentialMusic or down each item in the 'elements list, I am comfortable
 fleshing it out to that level.


 What I'm wondering, is what (if any) Lilypond scheme function do I use to
 determine the type of a music data structure?  I could certainly just say
 (car mus) but I'm wondering if there's a function I should use for the sake
 of encapsulation.  I see that one can get properties of a music element with
 (ly:music-property mus 'SYMBOL), the existing snippet code grabs the
 'elements list using (ly:music-property mus 'elements).

try (ly:music-property mus 'name) I think that does it?

Jakob.



 If it's just a matter of use (car mus) and comparing the symbol against a
 given list of options, fine, I just don't know if I'm going the right way.
  I've been looking at the docs for several days now, and have done so at
 several times in the past, and I'm just not quickly finding what I need.


 My goal is to finally immerse myself into the Scheme side of Lilypond, and
 start implementing some fixes to the various rhythm-pitch template snippets
 that I've been wishing for, instead of complaining.


 ___
 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:

2012-06-14 Thread jakob lund
You could try to install QJackctl, which is designed to control the
jack audio server, but also lets you control alsa midi connections.
Then start rumor, and on the qjackctl interface, click Connect and
select the alsa tab. You should then see some midi ports (ideally,
an output from your keyboard controller and and input to rumor, that
you can then manually connect)

(note that you can do the same thing via the command-line aconnect, if
you are into that sort of thing...)

Hope that helps...
Jakob

2012/6/10 Stefan Thomas kontrapunktste...@googlemail.com:
 Dear community,
 I have the following problem, which is more a problem with rumor and linux
 than with lilypond.
 When I type

 rumor --oss

 I get

 Can not open /dev/sequencer

 When I just type rumor
 I get

 ALSA port connection error; do it manually using `aconnect'

 and it doesn't react von midi-input.
 What can I do now to get it working?

 ___
 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


tie-accent collision

2012-06-09 Thread jakob lund
Good evening

In the example below, the tie collides with the accent. It looks a
little messy, is it intentional?

\version 2.15.40
\new Staff {
  f''8.-~f''16-
}


Jakob.

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


Re: Automatic setting custom bar lines

2012-02-13 Thread jakob lund
13. feb. 2012 01.54 skrev Thomas Morley thomasmorle...@googlemail.com:
 Hi again,

 perhaps you may want to use:

 \version 2.14.2
 %\version 2.15.29

 CustomDefaultBarLineEngraver =
 #(lambda (context)
  (let ((glyph |))
    `((acknowledgers
      (bar-line-interface .
        ,(lambda (engraver grob source-engraver)
              (if (equal? glyph (ly:grob-property grob 'glyph))
                (set! (ly:grob-property grob 'bar-extent) '(0 . 2))
                #f)))


 \new Staff \relative c'' {
     % If you don't want to put it in \layout use it like:
     c1 \bar  c1 c c \bar :|: \break
     c1 c1 \bar || c c \bar :|: \break
     \repeat volta 2 {
     c1 c1 c c \bar :|: } \break
     c1 \bar :|S|: c1 \bar S c \bar |.
 }

 \layout {
  \context {
    \Staff
    \consists #CustomDefaultBarLineEngraver
  }
 }

 This is my very first custom-scheme-engraver. I'd appreciate if
 someone more experienced could have a look on it.


This is very nice! A while ago I was trying to shorten every _other_
bar line shorter, but couldn't figure out how to do it automatically.
With your technique it's easy to extract the bar number from
context:

CustomOtherBarLineEngraver =
#(lambda (context)
 (let ((glyph |))
   `((acknowledgers
 (bar-line-interface .
   ,(lambda (engraver grob source-engraver)
 (let ((oddbar (remainder (ly:context-property context
'currentBarNumber) 2)))
 (if (and (eq? oddbar 0)
  (equal? glyph (ly:grob-property grob 'glyph)))
   (set! (ly:grob-property grob 'bar-extent) '(-1 . 1))
   #f

I suppose the code could be parameterized in order to make it more
generally useful...

Cheers
Jakob.

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


Re: override TupletNumber . Custom text

2012-02-10 Thread jakob lund
Sigh.. This is a bit confusing..

9. feb. 2012 23.45 skrev Pavel Roskin pro...@gnu.org:
 On Thu, 9 Feb 2012 22:53:09 +0100
 jakob lund jakob.be...@gmail.com wrote:

 9. feb. 2012 22.12 skrev Pavel Roskin pro...@gnu.org:

  It's weird indeed.  If Default_bar_line_engraver is placed above
  Timing_translator, then the beats are correct.

 You mean placed below? ... I'll go to sleep Now!

 I mean placed above.  This produces wrong output (3 beats in the first
 measure):

 \score {
  
    \new Staff \with {
      \consists Timing_translator
      \consists Default_bar_line_engraver
    } 
      \new Voice \repeat unfold 8 { d'4 }
    
  
  \layout {}
 }

 But this is OK (4 beats everywhere):

 \score {
  
    \new Staff \with {
      \consists Default_bar_line_engraver
      \consists Timing_translator
    } 
      \new Voice \repeat unfold 8 { d'4 }
    
  
  \layout {}
 }

If you add
  \context { \Score \remove Timing_translator }
to your \layout in both of the above snippets, the reverse situation occurs.
It seems to me that the normal thing would be to remove it; somehow
it seems logical that the barline engraver would use the info
generated by the timing translator to decide where to place barlines,
so the barline engraver should be last.

I'm *guessing* that if not explicitly removed from Score, there will
be TWO Timing_translators going in parallel, creating some sort of
race condition?!

Taking the example from the docs and commenting out \remove
Timing_translator also messes things up.



 Thanks for pointing that out... I made a comment there suggesting a
 text to update the docs, it should be in there :-)

 Yes, it would be more useful to post our insights in the bug tracker if
 we can add something valuable to the discussion.

Right now I'm not sure that I *do* have anything valuable to add, at
least not in terms of writing a concise description of the situation
for putting in the documentation :-/ (though I still think there ought
to be one)


 --
 Regards,
 Pavel Roskin

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


Re: the word LilyPond

2012-02-09 Thread jakob lund
9. feb. 2012 17.21 skrev Helge Kruse helge.kruse-nos...@gmx.net:
 Am 09.02.2012 12:45, schrieb Francisco Vila:


 Files attached.


 I dislike the binocles at the right hand side.

I like those ;-)


 Helge


 ___
 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: override TupletNumber . Custom text

2012-02-09 Thread jakob lund
9. feb. 2012 19.25 skrev Pavel Roskin pro...@gnu.org:
 On Thu, 9 Feb 2012 17:15:50 +0100
 Nils l...@nilsgey.de wrote:

 Hello,

 I like to work with full tuplet numbers because it makes it clear
 which version of quintuplet is meant (2:5 or 4:5).

 Since I don't like errors, however 'traditional' they may have
 become, I would like to change the 3:2 of a triplet in a more
 correct 2/3.

 How can I get this format into

 \override TupletNumber #'text = [...]   %old:
 #tuplet-number::calc-fraction-text

The original function is defined in scm/output-lib.scm, and can be
modified easily:

correctFraction = #(lambda (grob)
  (let ((ev (event-cause grob)))
(format #f ~a/~a
(ly:event-property ev 'numerator)
(ly:event-property ev 'denominator

 {
   \override TupletNumber #'text = \correctFraction
   \times 2/3 { c'4 e' g' }
 }


Jakob

 {
  \override TupletNumber #'text = \markup { 2/3 }
  \times 2/3 { c'4 e' g' }
 }

 --
 Regards,
 Pavel Roskin

 ___
 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: override TupletNumber . Custom text

2012-02-09 Thread jakob lund
9. feb. 2012 21.13 skrev Nils l...@nilsgey.de:
 On Thu, 9 Feb 2012 19:50:24 +0100
 jakob lund jakob.be...@gmail.com wrote:

 9. feb. 2012 19.25 skrev Pavel Roskin pro...@gnu.org:
  On Thu, 9 Feb 2012 17:15:50 +0100
  Nils l...@nilsgey.de wrote:
 
  Hello,
 
  I like to work with full tuplet numbers because it makes it clear
  which version of quintuplet is meant (2:5 or 4:5).
 
  Since I don't like errors, however 'traditional' they may have
  become, I would like to change the 3:2 of a triplet in a more
  correct 2/3.
 
  How can I get this format into
 
  \override TupletNumber #'text = [...]   %old:
  #tuplet-number::calc-fraction-text

 The original function is defined in scm/output-lib.scm, and can be
 modified easily:

 Thank you two very much.
 Finally there is no mistunderstanding anymore when seeing something like 
 this: http://lily.sytes.net/v2k2ju/1

All very well. However, in that example, the first bar appears to be
only four beats, and the cause seems to be the
Default_bar_line_engraver
Isn't that wierd?

The same happens here:
http://lily.sytes.net/wi55ub/1

Is it some sort of bug or am I too long past my bedtime :-/

That is one neat web app btw!


Jakob


 Nils

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


Re: duration and pitch in a function

2011-12-10 Thread jakob lund
2011/12/9 Matthew Collett m_coll...@ihug.co.nz:

 On 9/12/2011, at 2:27 pm, David Kastrup wrote:

 On 8/12/2011, at 10:48 pm, David Kastrup wrote:

 Please, *never*, *never*, *never* send a courtesy copy of a public
 answer as a private mail when answering on a mailing list unless you
 have been _explicitly_ asked to provide such a copy.

 Normally I'd agree with you, but in fairness to Paolo I observe that
 this is the only mailing list I am or ever have been a member of in
 which the default behaviour is to reply to the sender (only) rather
 than to the list.  I have in consequence more than once
 unintentionally sent a separate courtesy copy message.

 You arae confusing a _separate_ courtesy copy, namely one for which
 the _only_ recipient in the headers is the person you are replying to,
 with _including_ the intended recipient in the list of recipients of the
 _same_ mail.

 No, I am not: a separate message is what I said, and what I meant.  Because 
 the list reply defaults to the sender _only_, unless I remember explicitly to 
 choose Reply All (which I otherwise rarely use) any message I mean to send 
 to the list goes instead to just the individual.  I then have to send a 
 separate copy to the list (only), making my first reply retrospectively and 
 unintentionally a courtesy copy.  The last occasion that happened was just 
 yesterday.  And as I said, I do not have this problem with any other mailing 
 list.

+1

.. Sorry Matt, I did it again... Jakob.

 Best wishes,
 Matthew



 ___
 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: Wiring up a complex song

2011-12-07 Thread jakob lund
this

 \voiceOne  \global \Sa \Sb  means that those three parts overlap,
as you say...

I'm guessing what you want is

   \new Staff = women 
 \new Voice \global
 \new Voice = S {\Sa \Sb }
 }
   
   \context Lyrics \lyricsto S { \womena \womenc }
   \context Lyrics \lyricsto S { \womenb }

I've completely not tested it and may be wrong but you could try...


Jakob.

2011/12/7 Dirkjan Ochtman dirk...@ochtman.nl:
 On Wed, Dec 7, 2011 at 21:48, Matthew Collett m_coll...@ihug.co.nz wrote:
 Try:
    \new Lyrics \lyricsto S { \womena \womenc }
    \new Lyrics \lyricsto S { \womenb }

 Assuming the variables with the notes and words are correctly defined, I 
 think the only change needed is to the \lyricsto expressions, as indicated.

 Thanks for the suggestion, that seems sensible. It doesn't seem to do
 the trick, however. I now have (simplified to):

 \score {
  \new ChoirStaff 
    \new Staff = women 
      \new Voice = S {
        \voiceOne  \global \Sa \Sb 
      }
    
    \context Lyrics \lyricsto S { \womena \womenb }
    \context Lyrics \lyricsto S \womenc
  
 }

 But this seems to overlap the \Sa and \Sb melodic parts. It also
 starts out with the \womena lyrics, then proceeds to overlap with one
 syllable from \womenb, which then takes over. So it's not that close
 yet.

 Cheers,

 Dirkjan

 ___
 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: How to shift music up/down a semi tone without changing key signature

2011-11-27 Thread jakob lund
You could use \relative for the first entry step... like this

Music = \relative c' {
  a b c d | a b c d |
}

\score {
  \key d \major
  \Music
  \transpose d des \Music
}


 -- Jakob

2011/11/27 James pkx1...@gmail.com:
 Ole,

 On 27 November 2011 01:05, ole m...@oleschmidt.info wrote:

 a b c d | /transpose c b, { a b c d }

 or do I misunderstand it completely?

 ole

 No you didn't :) Thank you for responding to what seemed a _very_ basic
 question.
 What I should have said was
 Take a _lilypond file_ , for example
 %%%
 \version 2.14.1
 Music = {
   \key d \major
   a b c d | a b c d |
 }
 \score {
   \relative c ' { \Music }
 }
 %%%
 It's because of the \relative I think; the Notation Reference does actually
 talk about this - I don't think of 'transposing'  without thinking about the
 changing of the key signature, which I don't want to do. Hence I didn't even
 think to use \transpose!
 So it seems I have to define the transposition within the 'Music' expression
 itself:
 Music = {
   \key d \major
   \transpose b c { a b c d | a b c d | a b c d }
 }
 Which keeps the key signature and does indeed shift the notes, great!
 But then I cannot (seem to) use \relative and this becomes absolute octave
 entry exercise.
 Unless I have misread the NR?
 James


 ___
 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


Is this a bug or am I doing it wrong?

2011-11-05 Thread jakob lund
Hello list

I am setting up a lead sheat with chord names. At one point there is a
descending bassline over a minor chord, and I'd like to display
something like:

Gm/f#/f/e

i.e. don't repeat the Gm with each new bass note.
To do this, I have

#(define (empty-namer pitch lower?) (make-simple-markup ))
rootless = {
  \once \set chordRootNamer = #empty-namer
}

and then

g:m \rootless g:/fis \rootless g:/f \rootless g:/e

(I know these are actually major chords, but it produces the display I want).
Now the problem is that when I use \germanChords, then after I used
the above trick, \germanChords is no longer in effect.

Minimal working example (for 2.14.2) would be

#(define (empty-namer pitch lower?) (make-simple-markup ))
rootless = {
  \once \set chordRootNamer = #empty-namer
}
\score {
\new ChordNames {
\germanChords
\chordmode{
b:m
\once \set chordRootNamer = #empty-namer
b:/a
b:m
}
}
}
---
the first b:m will be Hm, the second will be Bm.

I'd like to know if this is a bug, if yes, is it documented,
otherwise, how to report it :-)

Cheers
Jakob.

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


Re: Help with Section Sequence

2011-04-17 Thread jakob lund
Hola

2011/4/16 Javier Ruiz-Alma jav...@ruiz-alma.com:
 - Original Message -
 From: Javier Ruiz-Alma
 To: LilyPond User Group
 Sent: Friday, April 15, 2011 9:50 AM
 Subject: Help with Section Sequence
 Hi All,
 Please check the attached sample PDF and reply if I need to change
 way these
 sections should be performed.
 This will help me build a correct MIDI block and play this as intended.
 The
 sequence shown sounds a bit weird to me when I listen to the MIDI and I
 suspect I'm just not reading this correctly.
 Thanks, Javier


 
2011/4/15 Phil Holmes:

 That's how I would perform it.
 --
 Phil Holmes


 
Hi Phil

I may be wrong, but:
I don't think the MIDI output includes the repetitions, so the MIDI
will just play sec A, sec B, sec C of this example
As far as I know, you have to use \repeat unfold to get repetitions in the
 MIDI.


Regards

Jakob.


 
 Hi Jakob,
 The command \unfoldRepeats will do this.
 http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Repeats-in-MIDI
 Attached is the .ly file I created for this snippet.

 Javier

Ooh nice, didn't know that one.
And in fact, I think I now understand what your original question was.

To notate the performance sequence you describe, the annotation at the
end should be D.S. al fine (D.C. means da capo, from the top, while
D.S., dal segno, means from the sign)
Also, the segno mark shouldn't be printed over the last bar line.

Finally, I'm purty sure that the custom is to print the word fine in
lowercase italics, and above the system.


Hopefully I'm not making a fool of myself here by stating the obvious...
Cheers

Jakob.

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


Re: Help with Section Sequence

2011-04-16 Thread jakob lund
Hi Phil

I may be wrong, but:
I don't think the MIDI output includes the repetitions, so the MIDI
will just play sec A, sec B, sec C of this example
As far as I know, you have to use \repeat unfold to get repetitions in the MIDI.


Regards

Jakob.


2011/4/15 Phil Holmes m...@philholmes.net:
 That's how I would perform it.
 --
 Phil Holmes



 - Original Message -
 From: Javier Ruiz-Alma
 To: LilyPond User Group
 Sent: Friday, April 15, 2011 9:50 AM
 Subject: Help with Section Sequence
 Hi All,
 Please check the attached sample PDF and reply if I need to change way these
 sections should be performed.
 This will help me build a correct MIDI block and play this as intended.  The
 sequence shown sounds a bit weird to me when I listen to the MIDI and I
 suspect I'm just not reading this correctly.
 Thanks, Javier

 

 ___
 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



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


Re: How to do jazz-style bar repeats

2011-03-04 Thread jakob lund
Hola

 Now, I am not sure how to actually use this in a file.  I tried just using 
 \include in my file and putting the \inlineMMRN R2.*4 where I want it to 
 appear.  I ended up with 3/4 time, five empty bars with rehearsal marks at 
 the top of the score, followed by a repeat and six bars with the desired 
 indication of four bars to be repeated, followed by another repeat.  And the 
 bars where I want the effect to render didn't.  Obviously that was not as you 
 intended it to be used!


R2. is a full bar rest in 3/4 time (a dotted 2/4 rest that is). For
4/4 you just use R1, and multiply with the number of bars, like in
R1*8 for 8 bars.

There's still a problem though -- look at this example

#(define (whiteunder grob) (grob-interpret-markup grob
  (markup #:vcenter #:whiteout #:pad-x 1 (ly:grob-property grob 'text

inlineMMRN = {
  \once \override Score.MultiMeasureRest #'layer = #-2
  \once \override Score.MultiMeasureRestNumber #'layer = #-1
  \once \override Score.MultiMeasureRestNumber #'Y-offset = #0
  \once \override Score.MultiMeasureRestNumber #'stencil = #whiteunder
}

solos = {
  \override Score.MultiMeasureRest #'minimum-length = #20
  \bar |:
  \inlineMMRN R1*4
  \inlineMMRN R1*4
  \bar :|
}

{
  
\new ChordNames \chordmode {
  s1
  a1*4:m7
  b:m7-5
}
\new Staff {
  \time 4/4
  s1
  \set Score.markFormatter = #format-mark-box-alphabet
  \set Score.skipBars = ##t
  \override MultiMeasureRest #'expand-limit = 1
  \solos
}
  
}


How can we center the chord symbols above the inlineMMR's?


Also: Does anybody know how to produce the `fat bracketed' repeat bars
often used in jazz (example in the Real Book exerpt attached to Tim's
first mail in this thread)?



Jakob.

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


Re: error in predefined chord diagram?

2011-02-08 Thread jakob lund
2011/2/6 Carl Sorensen c_soren...@byu.edu:
 I've put together a proposed set of dim and dim7 fretboards.

 You can download it at

 https://sites.google.com/site/cdslilypond/docs/display-dim-fretboards.pdf?a
 ttredirects=0d=1

There's an error in there, the G dim doesn't have a G in it (it should
be the same as Gb dim shifted up a fret)

Jakob.


 or view it at

 https://sites.google.com/site/cdslilypond/docs/display-dim-fretboards.pdf

 Please comment.

 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: expressive marks inside slurs

2011-01-26 Thread jakob lund
2011/1/26 Paul Scott waterho...@ultrasw.com:
 On 01/25/2011 01:48 PM, James Lowe wrote:

 Paul

 -Original Message-
 From: Paul Scottwaterho...@ultrasw.com
 Date: Tue, 25 Jan 2011 11:36:23 -0700
 To: lilypond-user@gnu.orglilypond-user@gnu.org
 Subject: expressive marks inside slurs



 2.13.46:

 I've been searching the documentation and the web for a while trying to
 get accents, etc. inside slurs.

 1.  What draws accents, turns, etc.?



 http://lilypond.org/doc/v2.13/Documentation/notation/expressive-marks-attac
 hed-to-notes

 To get them 'inside' slurs see a few paragraphs down

 'Controlling the vertical ordering of scripts'

 You need to set the priority of the relevant mark - the example should
 give you the hints.


 Ok.  Since a slur doesn't seem to be a script I went back to trying:

 \override Slur #'outside-staff-priority = #-1

 after putting it nearer the relevant music code it did move the expressive
 marks inside but the vertical spacing increased drastically and produced the
 strange result shown by the code below.  Why aren't the accents and portatos
 the same distance from the noteheads as the staccato marks are?  They seem
 to follow the curve of the slur.

 Thanks for your help so far.  I had read that part of the documentation and
 it didn't seem to make sense since it talked about scripts.

I'm not sure why/what happens, but try

\new Staff \with {
  \consists Script_engraver
}
\new Voice \with {
  \remove Script_engraver
} {
 \override  Slur #'outside-staff-priority = #1
 c''4-_( c''-_ c''-_ c''-_) c''4-( c''- c''-. c''-.)
 c''4-_( c''-_ c''-_ c''-_) c''4-( c''- c''-. c''-.)
}

(and then if you remove the override it becomes weird...)


Jakob.


 I would still like to know where in the Internals Reference I can find the
 tweakable properties of accents, etc.

 Thanks,

 Paul

 \version 2.13.46

 {
  c''4-_( c''-_ c''-_ c''-_) c''4-( c''- c''-. c''-.)
  c''4-_( c''-_ c''-_ c''-_) c''4-( c''- c''-. c''-.)
  \break
  \override Slur #'outside-staff-priority = #-1
  c''4-_( c''-_ c''-_ c''-_) c''4-( c''- c''-. c''-.)
  c''4-_( c''-_ c''-_ c''-_) c''4-( c''- c''-. c''-.)
 }


 ___
 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: Extender style

2011-01-25 Thread jakob lund
Hi

customizing these extenders seems like a reasonable feature...
Should a bug- or feature request entry be created ?

Jakob.


2011/1/24 Marc Hohl m...@hohlart.de:
 Am 24.01.2011 21:24, schrieb Marc Hohl:

 [...]
 With text spanners, customized dashed lines are easily created.

 Oops, you needed dotted lines, not dashed ones ... sorry, I have no clue at
 the moment.


 HTH,

 Marc

 Thanks,
 Robert
 www.bostonsing.org http://www.bostonsing.org


 ___
 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



 ___
 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: Using lyrics in a markup

2011-01-24 Thread jakob lund
Hi

2011/1/23 jakob lund jakob.be...@gmail.com:
 2011/1/23 Jan-Peter Voigt jp.vo...@gmx.de:
 Hello and thank you Jakob, hello list,

 this piece is a great work. It compiles well in 2.13(.47 lilybuntu) and adds 
 a very useful function to lily!
 The .ly is attached again, because I think it is good to have it on the 
 devel-list.
 I would like to add it to LSR to have it in the main distro once. But it 
 doesn't compile in 2.12(.3) stable, so it can't be uploaded right now.
 What else should we do now?

 Lilypond 2.12 complains about these lines:
 ...
 #(define-markup-command (verse layout props lyrics) (ly:music?)
 #:properties ((display-nl #f)
 (make-line make-justify-markup))
 ...

 by the way: Is this #:properties(()) notation a new functionality in 2.13? I 
 haven't seen it before?

 You're probably right about the #:properties syntax -- it should be
 easy enough to swap make-line and display-nl with their default values
 (make-justify-markup resp. #f) in the macro code to make it compile in
 2.12 (which I don't have installed so I'm not gonna test it) ... ?

I realized I had 2.12 installed as well..  After removing the
#:properties stuff and adding { } to \addlyrics, the new version
compiles in both 2.12 and 2.13 (the markup looks better in the 2.12
version though; seems that in 2.13, the lines are a little too close?)


Cheers Jakob.

% \version 2.13


#(define linebreakindicator \\)

% \nl command that inserts the placeholder event into a lyrics
nl = #(make-music 'LineBreakEvent)

%% Function to extract strings from lyrics.
%  
#(define (lyrics-list lyrics)
Return only syllables and hyphens from  @code{lyrics}.
 (if (ly:music? lyrics)
 (cond 
   ((eq? (ly:music-property lyrics 'name) 'LyricEvent) 
(ly:music-property lyrics 'text))
   ((eq? (ly:music-property lyrics 'name) 'HyphenEvent) 
(list --))
   ((eq? (ly:music-property lyrics 'name) 'LineBreakEvent)
(list linebreakindicator))
   (else (let ((elt (ly:music-property lyrics 'element))
   (elts (ly:music-property lyrics 'elements)))
   (if (ly:music? elt)
   (lyrics-list elt)
   (if (null? elts)
   '()
   (map (lambda(x)
   (lyrics-list x))
elts)
 )
 '()))

#(define (flatten-nonmarkup-list x)
  Unnest list, but don't flatten markup constructs!
  (cond ((null? x) '())
((not (pair? x)) (list x))
(else (append (if (markup? (car x)) 
  (list (car x)) 
  (flatten-nonmarkup-list (car x)))
  (flatten-nonmarkup-list (cdr x))

#(define (reduce-hyphens text) 
 (let eat ((wd (car text)) (wds (cdr text)))
 (cond 
   ((null? wds) (list wd))
   ((and (equal? -- (car wds)) (not (null? (cdr wds
(eat (markup #:concat (wd (cadr wds)))
 (cddr wds)))
   (else (cons (markup wd) (eat (car wds) (cdr wds)))

#(define (split-on predicate? l) 
(let loop ((h '()) (r l))
  (cond 
((null? r)
 (if (null? h) h (list (reverse h
((predicate? (car r)) 
 (if (null? h)
 (loop h (cdr r))
 (cons (reverse h) (loop '() (cdr r)
(else 
  (loop (cons (car r) h) (cdr r))

#(define-markup-command (verse layout props lyrics) (ly:music?)
;  #:properties ((display-nl #f)
;(make-line make-justify-markup))
  Verse command that marks up a column of \\nl-separated lines
  (let* (
  ;; The first three associations replace the two commented
  ;; lines above in a (presumably?) 2.12-compatible way...
 (property (lambda (key default) 
   (let ((a (assoc key (apply append props
(if (-bool a) (cdr a) default
 (display-nl (property 'display-nl #f))
 (make-line (property 'make-line make-justify-markup))
 (split-cond? (lambda (a) 
(and (not display-nl)
 (equal? a linebreakindicator
 (list-of-lines (map 
 (lambda (l) (make-line (reduce-hyphens l)))   
 (split-on split-cond? (flatten-nonmarkup-list (lyrics-list lyrics)
)
(interpret-markup layout props (make-column-markup list-of-lines)))
)


test = \lyricmode{ 
  Du lil -- le \markup \italic fis -- \markup \italic ker \nl 
  Du \markup \italic lil -- \markup \italic le fis -- ker }

%{

  \new Voice = mel \relative c'' { \partial 4. g8 a g e c r4 r8 g' a g | f d}
  \new Lyrics \lyricsto mel \test

Re: Using lyrics in a markup

2011-01-24 Thread jakob lund
Hi

2011/1/24 Jan-Peter Voigt jp.vo...@gmx.de:
 Hi Jakob, hello list,

 I was about to answer with my 2.12-version ;-)
 It is essentially like your version (using let and assoc props ...) but
 yours is open for override extension ...

Why? The only difference (AFAICT) is that you did the clever thing and
used chain-assoc-get instead of reinventing the wheel like I did... I
oughtta have guessed there was already a function to do that :-)


 another question: This snippet is mostly your work, but I posted it to LSR 
 with my name. Shall I add a text:
 created by Jakob Lund or something similar?

No, never mind... And in fact, Marc wrote the first bit, if you look
up the thread :-)


Cheers

Jakob.

 Now its posted to LSR and has to be approved.

 Best regards and cheers!
 Jan-Peter

 On 24.01.2011 10:35, jakob lund wrote:

 Hi

 ...

 I realized I had 2.12 installed as well..  After removing the
 #:properties stuff and adding { } to \addlyrics, the new version
 compiles in both 2.12 and 2.13 (the markup looks better in the 2.12
 version though; seems that in 2.13, the lines are a little too close?)


 Cheers Jakob.



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


Re: Using lyrics in a markup

2011-01-23 Thread jakob lund
oops, forgot to reply to list (sorry about the extra spam Jan-Peter)

2011/1/23 jakob lund jakob.be...@gmail.com:
 Hi again

 After fiddling some more with this, I came up with a simple solution.
 Instead of a string, a LineBreakEvent is inserted into the lyric --
 neither \lyricmode or \addlyrics complain about this, and the events
 doesn't seem to appear in the music output. This removes the need for
 the filter function.

 The lyrics-list function then recognizes the placeholders and
 replaces them with occurrences of the indicator string, which the
 verse command then uses to split the lines.

 It seems to work well, try it out.

 2011/1/21 Jan-Peter Voigt jp.vo...@gmx.de:
 Hello again,

 so you would have to check (pseudo-scheme):
 ...
 (if (and (string? x)(string=? x 
 someIndicatorStringNooneWouldEverUseInARealLyric))
        (introduceNewLine ...))

 There is no \linebreak or equivalent command in \markup, so what
 happens is that the list of syllables is cut at every occurrence of
 the indicator string, producing a list of lists. Then, a markup
 function is mapped over this list of lists, producing a list of
 markups; the resulting list of markups is then passed to
 make-column-markup, which produces the line breaks :-)

 :-)

 Jakob.

 ...

 and this would probably be done in the (reduce-hyphens text)-method/function.

 If this works one could define a variable with the lyrics including the 
 newlines. Then use it filtered with \lyricsto and markedup with \verse.

 Best regards,
 Jan-Peter.


 Am 20.01.2011 um 16:35 schrieb jakob lund:

 2011/1/20 Jan-Peter Voigt jp.vo...@gmx.de:
 What do you think of allowing to define a additional line break 
 character,
 for example ¶, which could be filtered out within \lyricsmode, and used 
 as a
 newline in the \verse?
 Thats a good idea!
 So your input will look like
 \override Lyrics #'ignore-chars= #'(¶) % this is pseudo code!

 I guess this would mean that the Lyrics context would have to filter
 out the ¶ as it goes. A simpler version of the same idea could be

  nl = \lyricmode { someIndicatorStringNooneWouldEverUseInARealLyric }

 and then use

  words = \lyricmode { Toch -- ter \nl Zi -- on }

 then add a filter (a music function that calls music-filter) to use
 with addlyrics, like this

  \addlyrics \removeLineBreakIndicators \words

 and then update the \verse macro to produce a new line for every
 occurence of the indicator.
 that should be doable...

 Jakob.





\version 2.13


#(define linebreakindicator \\)

% \nl command that inserts the placeholder event into a lyrics
nl = #(make-music 'LineBreakEvent)

%% Function to extract strings from lyrics.
%  
#(define (lyrics-list lyrics)
Return only syllables and hyphens from  @code{lyrics}.
 (if (ly:music? lyrics)
 (cond 
   ((eq? (ly:music-property lyrics 'name) 'LyricEvent) 
(ly:music-property lyrics 'text))
   ((eq? (ly:music-property lyrics 'name) 'HyphenEvent) 
(list --))
   ((eq? (ly:music-property lyrics 'name) 'LineBreakEvent)
(list linebreakindicator))
   (else (let ((elt (ly:music-property lyrics 'element))
   (elts (ly:music-property lyrics 'elements)))
   (if (ly:music? elt)
   (lyrics-list elt)
   (if (null? elts)
   '()
   (map (lambda(x)
   (lyrics-list x))
elts)
 )
 '()))

#(define (flatten-nonmarkup-list x)
  Unnest list, but don't flatten markup constructs!
  (cond ((null? x) '())
((not (pair? x)) (list x))
(else (append (if (markup? (car x)) 
  (list (car x)) 
  (flatten-nonmarkup-list (car x)))
  (flatten-nonmarkup-list (cdr x))

#(define (reduce-hyphens text) 
 (let eat ((wd (car text)) (wds (cdr text)))
 (cond 
   ((null? wds) (list wd))
   ((and (equal? -- (car wds)) (not (null? (cdr wds
(eat (markup #:concat (wd (cadr wds)))
 (cddr wds)))
   (else (cons (markup wd) (eat (car wds) (cdr wds)))

#(define (split-on predicate? l) 
(let loop ((h '()) (r l))
  (cond 
((null? r)
 (if (null? h) h (list (reverse h
((predicate? (car r)) 
 (if (null? h)
 (loop h (cdr r))
 (cons (reverse h) (loop '() (cdr r)
(else 
  (loop (cons (car r) h) (cdr r))


#(define-markup-command (verse layout props lyrics) (ly:music?)
  #:properties ((display-nl #f)
(make-line make-justify-markup))
  Verse command that marks up a column of \\nl-separated

Re: Using lyrics in a markup

2011-01-23 Thread jakob lund
2011/1/23 Jan-Peter Voigt jp.vo...@gmx.de:
 Hello and thank you Jakob, hello list,

 this piece is a great work. It compiles well in 2.13(.47 lilybuntu) and adds 
 a very useful function to lily!
 The .ly is attached again, because I think it is good to have it on the 
 devel-list.
 I would like to add it to LSR to have it in the main distro once. But it 
 doesn't compile in 2.12(.3) stable, so it can't be uploaded right now.
 What else should we do now?

 Lilypond 2.12 complains about these lines:
 ...
 #(define-markup-command (verse layout props lyrics) (ly:music?)
 #:properties ((display-nl #f)
 (make-line make-justify-markup))
 ...

 by the way: Is this #:properties(()) notation a new functionality in 2.13? I 
 haven't seen it before?

You're probably right about the #:properties syntax -- it should be
easy enough to swap make-line and display-nl with their default values
(make-justify-markup resp. #f) in the macro code to make it compile in
2.12 (which I don't have installed so I'm not gonna test it) ... ?

 And is there a tutorial on all those comma- and accent-notations like in 
 \override #`(make-line . ,make-wordwrap-markup) ?
 I haven't found it in my scheme-tutorials.

I  think it's mostly connected to macro definitions, as a shortcut to
insert references into lists. If you write
  \override #'(make-line . make-wordwrap-markup)
you get en error:
  Wrong type to apply: make-wordwrap-markup
because then the value of the property is set to the SYMBOL
make-wordwrap-markup rather than FUNCTION referred to by that symbol.

As far as I know, `(make-line . ,make-wordwrap-markup) is the same as
(cons 'make-line make-wordwrap-markup), just like '(this that
the-other) is the same as (list 'this 'that 'the-other). The backtick
` is called quasiquote an the comma is unquote.


Btw in that last comment in the file, it should read \verse #words
instead of \verse \words of course, please correct that if you put
it on LSR


Regards
 Jakob.


 Best regards,
 Jan-Peter.

 Am 23.01.2011 um 14:15 schrieb jakob lund:

 oops, forgot to reply to list (sorry about the extra spam Jan-Peter)
 I don't mind ;-)
 2011/1/23 jakob lund jakob.be...@gmail.com:
 Hi again

 After fiddling some more with this, I came up with a simple solution.
 Instead of a string, a LineBreakEvent is inserted into the lyric --
 neither \lyricmode or \addlyrics complain about this, and the events
 doesn't seem to appear in the music output. This removes the need for
 the filter function.

 The lyrics-list function then recognizes the placeholders and
 replaces them with occurrences of the indicator string, which the
 verse command then uses to split the lines.

 It seems to work well, try it out.



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


Re: Using lyrics in a markup

2011-01-20 Thread jakob lund
2011/1/19 Jan-Peter Voigt jp.vo...@gmx.de:
 Hello scheme-gurus,
 nr. 744 is bookmarked ;-)
 There's one more thing. I tried the verse-command and it works nicely, but
 it will wrap lines:
 say you have a stanza like this
 --snip--
 strI = \lyricmode
 {
   \set stanza = 1.
   Toch -- ter Zi -- on, freu -- e dich,
   jauch -- ze laut, Je -- ru -- sa -- lem.
   Sieh, __ dein Kö -- nig kommt zu dir,
   ja, __ er kommt, der Frie -- de -- fürst.
   Toch -- ter Zi -- on, freu -- e dich,
   jauch -- ze laut, Je -- ru -- sa -- lem.
 }
 \markup \column{ \wordwrap { \verse #strI } }
 \markuplines \justified-lines { \verse #strI }
 --snip--
 it will not wrap lines but cross the page margin. Do have an idea how to
 deal with that?

That's a good point.. After experimenting a bit I think that replacing
make-line-markup with make-justify-markup in the macro definition (the
define-markup-command part) does what you want.

However, I am guessing that the desired output is actually

  Tochter Zion, freue dich,
  jauchze laut, Jerusalem.
  Sieh, dein König kommt zu dir,
  ja, er kommt, der Friedefürst.
  Tochter Zion, freue dich,
  jauchze laut, Jerusalem.

rather than

  Tochter Zion, freue dich, jauchze laut, Jerusalem. Sieh, dein König
kommt zu dir, ja, er kommt, der Friedefürst. Tochter Zion, freue dich,
jauchze laut, Jerusalem.

where the line breaking depends on column width, font size etc.? I
can't think of way to control the line breaks, except to enter each
line individually, like

strIa = \lyricmode { Toch -- ter Zi -- on, freu -- e dich, }
strIb = \lyricmode {  jauch -- ze laut, Je -- ru -- sa -- lem.}
strIc = \lyricmode { Sieh, __ dein Kö -- nig kommt zu dir, }
strId = \lyricmode {  ja, __ er kommt, der Frie -- de -- fürst. }

.. etc, and then eventually

\markup \column { \verse #strIa \verse #strIb \verse #strIc \verse #strId }


Regards
 -- Jakob.

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


Re: Using lyrics in a markup

2011-01-19 Thread jakob lund
2011/1/18 Marc Hohl m...@hohlart.de:
 Am 18.01.2011 18:56, schrieb Graham Percival:

 On Tue, Jan 18, 2011 at 05:24:11PM +0100, Marc Hohl wrote:

 These functions should be bundled in a snippet, or perhaps included in
 the
 lilypond distribution?

 Start by adding it to LSR.

 Done.

 http://lsr.dsi.unimi.it/LSR/Snippet?id=744

Great... I managed to create a \markup macro in order to make it
easier to use. I chose the name \verse for the macro because I thought
it would be nice with a short name if you're going to type it multiple
times, e.g. to handle line breaks, like the example.


Cheers, Jakob.


#(define-markup-command (verse layout props lyrics) (ly:music?)
Transform a \\lyricmode lyric into a \\markup \\line
  (interpret-markup layout props
(make-line-markup (reduce-hyphens (flatten-nonmarkup-list
(lyrics-list lyrics))

#(define (lyrics-list lyrics)
Return only syllables and hyphens from  @code{lyrics}.
 (if (ly:music? lyrics)
 (if (memq (ly:music-property lyrics 'name) '(LyricEvent
HyphenEvent))
 (begin (if (eq? (ly:music-property lyrics 'name) 'LyricEvent)
(list (ly:music-property lyrics 'text))
(list --)))
 (let ((elt (ly:music-property lyrics 'element))
   (elts (ly:music-property lyrics 'elements)))
   (if (ly:music? elt)
   (lyrics-list elt)
   (if (null? elts)
   '()
   (map (lambda(x)
   (lyrics-list x))
elts)
 '()))

#(define (flatten-nonmarkup-list x)
  Unnest list, but don't flatten markup constructs!
  (cond ((null? x) '())
((not (pair? x)) (list x))
(else (append (if (markup? (car x))
  (list (car x))
  (flatten-nonmarkup-list (car x)))
  (flatten-nonmarkup-list (cdr x))

#(define (reduce-hyphens text)
 (let eat ((wd (car text)) (wds (cdr text)))
 (cond
   ((null? wds) (list wd))
   ((and (equal? -- (car wds)) (not (null? (cdr wds
(eat (markup #:concat (wd (cadr wds)))
 (cddr wds)))
   (else (cons wd (eat (car wds) (cdr wds)))

%% 

wordsOne = \lyricmode { This is my ex --  \markup { \italic am }  -- ple text. }
wordsTwo = \lyricmode { Here goes the se -- cond line then. }
melody = \relative c' { c4 d e f | g a c2 }

\new Voice { \melody \melody }
\addlyrics { \words \wordsTwo }

\markup \column{ \verse #words \verse #wordsTwo }



 Regards,

 Marc

 Cheers,
 - Graham




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


Re: Using lyrics in a markup

2011-01-18 Thread jakob lund
2011/1/18 Marc Hohl m...@hohlart.de:
 Am 15.01.2011 21:51, schrieb Neil Puttock:

 On 15 January 2011 19:01, Marc Hohlm...@hohlart.de  wrote:

 Now I wonder whether it is possible to create a kind of text book by
 including the lyrics in a markup, perhaps with a scheme function which
 replaces the  --  by .

 Is it possible to store the text in a variable?

 [...]

 For simplicity I've ignored hyphens, but it shouldn't be too difficult
 to add them (or use their position in the list of strings to restore
 the hyphenated words).

 This is what I got so far:

 \version 2.13.46

 words = \lyricmode { This is my ex -- am -- ple text }

 #(define (lyrics-list lyrics)
 Return a flat list containing all syllables and hyphens from
  @code{lyrics}.
   (let ((extracted-list
          (if (ly:music? lyrics)
              (if (memq (ly:music-property lyrics 'name) '(LyricEvent
 HyphenEvent))
                  (begin (if (eq? (ly:music-property lyrics 'name)
 'LyricEvent)
                             (list (ly:music-property lyrics 'text))
                             (list --)))
                  (let ((elt (ly:music-property lyrics 'element))
                        (elts (ly:music-property lyrics 'elements)))
                    (if (ly:music? elt)
                        (lyrics-list elt)
                        (if (null? elts)
                            '()
                            (map (lambda(x)
                                    (lyrics-list x))
                             elts)
              '(
     (flatten-list extracted-list)))


 text = #(lyrics-list words)

 melody = \relative c' { c4 d e f | g a c2 }

 \new Voice { \melody }
 \addlyrics { \words }

 #(markup* (make-line-markup text))

 The function liyrics-list extracts the syllables and the hyphens.


Cool!


 The second part (eliminating the hyphens in the list and concatenate the
 surrounding
 syllables) seems a bit harder, but I try to find a solution.

That's a nice scheme exercise... The following would work (but not if
there are consecutive hyphens)

#(define (reduce-hyphens text)
 ;; Define initial first-word 'wd' and remaining-words 'wds'
 (let eat ((wd (car text)) (wds (cdr text)))
 (cond
   ;; Last syllable reached: Terminate recursion
   ((null? wds) (list wd))
   ((and (equal? -- (car wds)) (not (null? (cdr wds
;; The first remaining word is a hyphen AND there
is a syllable after that
;; Concatenate that syllable onto wd, and recurse
(eat (string-concatenate (list wd (cadr wds))) (cddr wds)))
   ;; Not a hyphen, just use wd as the first word on
the list, and then recurse.
   (else (cons wd (eat (car wds) (cdr wds)))

#(define (lyrics-text lyrics) (reduce-hyphens (lyrics-list lyrics)))

text = #(lyrics-text words)

Cheers
Jakob.


 Regards,

 Marc

 ___
 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: Using lyrics in a markup

2011-01-18 Thread jakob lund
2011/1/18 Jan-Peter Voigt jp.vo...@gmx.de:
 Hello List,

 this is a very cool snippet! I also thought of trying this excersize ...
 perhaps tomorrow ;-)
 I think it should be posted to LSR!
 There is one thing I tried: If you have markups in your lyrics:

 words = \lyricmode { This is my ex -- am -- ple \markup { \italic text } }

 this function will fail.
 Perhaps someone is willing to play this scheme-game a bit further?



Sure... You have to play the game, right?

To allow markups, we have to use (markup #:concat ( . . )) instead of
string-concatenate. The flatten-list function also has to be adjusted
to leave the markups intact.

There is no need to call flatten-list from inside the recursion in
lyrics-list. It probably doesn't do any harm in this case, but I
wonder if the original function (extract-named-music) is ever used on
any `heavy' nested music structures, because if so, it might be a good
idea to redefine it? (Theoretically, calling flatten-list from inside
the recursion may result in N^2 calls to flatten-list when returning N
elements from extract-named-music...)

#(define (lyrics-list lyrics)
Return only syllables and hyphens from  @code{lyrics}.
 (if (ly:music? lyrics)
 (if (memq (ly:music-property lyrics 'name) '(LyricEvent
HyphenEvent))
 (begin (if (eq? (ly:music-property lyrics 'name) 'LyricEvent)
(list (ly:music-property lyrics 'text))
(list --)))
 (let ((elt (ly:music-property lyrics 'element))
   (elts (ly:music-property lyrics 'elements)))
   (if (ly:music? elt)
   (lyrics-list elt)
   (if (null? elts)
   '()
   (map (lambda(x)
   (lyrics-list x))
elts)
 '()))

#(define (flatten-nonmarkup-list x)
  Unnest list, but don't flatten markup constructs!
  (cond ((null? x) '())
((not (pair? x)) (list x))
(else (append (if (markup? (car x))
  (list (car x))
  (flatten-nonmarkup-list (car x)))
  (flatten-nonmarkup-list (cdr x))

#(define (reduce-hyphens text)
 ;; Define initial first-word 'wd' and remaining-words 'wds'
 (let eat ((wd (car text)) (wds (cdr text)))
 (cond
   ;; Last syllable reached: Terminate recursion
   ((null? wds) (list wd))
   ((and (equal? -- (car wds)) (not (null? (cdr wds
;; The next word is a hyphen AND there is a
syllable after that hyphen
;; Concatenate the syllable after the hyphen onto
wd, and recurse
(eat (markup #:concat ((markup wd) (markup (cadr wds
 (cddr wds)))
   ;; Not a hyphen, just use wd as the first word on
the list, and then recurse.
   (else (cons wd (eat (car wds) (cdr wds)))

#(define (lyrics-text lyrics)
 (reduce-hyphens (flatten-nonmarkup-list (lyrics-list lyrics


snip

Jakob

 Best regards,
 Jan-Peter


 On 18.01.2011 12:56, jakob lund wrote:

 2011/1/18 Marc Hohlm...@hohlart.de:

 Am 15.01.2011 21:51, schrieb Neil Puttock:

 On 15 January 2011 19:01, Marc Hohlm...@hohlart.de    wrote:

 Now I wonder whether it is possible to create a kind of text book by
 including the lyrics in a markup, perhaps with a scheme function which
 replaces the  --  by .

 Is it possible to store the text in a variable?

 [...]

 For simplicity I've ignored hyphens, but it shouldn't be too difficult
 to add them (or use their position in the list of strings to restore
 the hyphenated words).

 This is what I got so far:

 \version 2.13.46

 words = \lyricmode { This is my ex -- am -- ple text }

 #(define (lyrics-list lyrics)
 Return a flat list containing all syllables and hyphens from
  @code{lyrics}.
   (let ((extracted-list
          (if (ly:music? lyrics)
              (if (memq (ly:music-property lyrics 'name) '(LyricEvent
 HyphenEvent))
                  (begin (if (eq? (ly:music-property lyrics 'name)
 'LyricEvent)
                             (list (ly:music-property lyrics 'text))
                             (list --)))
                  (let ((elt (ly:music-property lyrics 'element))
                        (elts (ly:music-property lyrics 'elements)))
                    (if (ly:music? elt)
                        (lyrics-list elt)
                        (if (null? elts)
                            '()
                            (map (lambda(x)
                                    (lyrics-list x))
                             elts)
              '(
     (flatten-list extracted-list)))


 text = #(lyrics-list words)

 melody = \relative c' { c4 d e f | g a c2 }

 \new Voice { \melody }
 \addlyrics { \words }

 #(markup* (make-line-markup

Re: How to do simple arithmetic on bar numbers?

2011-01-16 Thread jakob lund
2011/1/16 James Lowe james.l...@datacore.com:
 Hello,

 -Original Message-
 From: Graham King lilyp...@tremagi.org.uk
 Date: Sun, 16 Jan 2011 21:11:25 +
 To: lilypond-user@gnu.org lilypond-user@gnu.org
 Subject: How to do simple arithmetic on bar numbers?

I'm preparing a modern-notation edition of a piece of choral renaissance
polyphony, in which the maxima at the end of each section is notated as
a neomensural \maxima*n/m (where, for each part, n,m are chosen to
cause all the parts to end the section together).

Example lilypond code and the result are attached.

Bar-numbering is attached to the top part in the score so, when that
part's maxima starts early and other parts are still moving, the other
parts sometimes have extra bars of music.  As a result, I have to
reset the bar numbering manually afterwards (see line 27 of the example
attached):

       \set Staff.currentBarNumber = #4

Rather than specifying a static bar number, how could the following
pseudocode be programmed?

       \set Staff.currentBarNumber = Staff.currentBarNumber + x

where, in this example, x = 1

As you can tell, I'm not a Scheme programmer!  Thanks for any help you
can offer.
-


 I'm not a scheme programmer either but we do have a snippet

 http://lsr.dsi.unimi.it/LSR/Snippet?id=333

 That might give you some clues.

 I am also guessing that you could use a similar method that we document
 for 'Upbeats' (see Notation Reference) where we can use

 \set Timing.measurePosition blahblahblah (instead of \partial X)

 to denote a position in a single measure but for your specific case use

 \set Timing.internalBarNumber or \set Timing.currentlBarNumber somehow.

 Look in the Internal reference for Timing_translator.

 I'm throwing these ideas out so that if you cannot figure something out,
 someone else more knowledgeable that I in the internals might.

 James



the same thing that the snippet does, but only for bar number, and
with a parameter (the number to add, in case it isn't 1) could look
like this

addtobarnumber = #(define-music-function (P L m) (integer?)
 #{
  \applyContext
  #(lambda (voice)
(let ((staff (ly:context-property-where-defined voice 'currentBarNumber))
(n (ly:context-property voice 'currentBarNumber)))
(ly:context-set-property! staff 'currentBarNumber
 (+ $m n
 #})

%% example
{ \override Score.BarNumber #'break-visibility = #'#(#t #t #t)
  \key c \major
  c''1
  c'1
  \addtobarnumber #3
  c''1
 c'1
}


I don't know how it will work but try it out.

Jakob



 internalBarNumber






 ___
 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: Spurious Repeat Symbol

2011-01-09 Thread jakob lund
Hi Ted

You don't want the \repeat info inside the lyrics, just remove it:

words = \lyricmode  {
  do re mi fa
do re me
fa  sol
  }


Jakob.


2011/1/9 Ted Stanion ibn...@gmail.com:
 How can I get rid of the extra repeat symbol in this example? I'm sure it is
 caused by the rest at the beginning of the repeat. I've tried hiding an
 extra note along with a skip, but I can't figure out how to do this and get
 the rest back.
 Ted
 %%% Begin example.
 \version 2.12.0
 melody = \relative c' {
   c4 d e f
   \repeat volta 2 {
    r c d e
   } \alternative {
     { f1 }
     { g1 }
   }
 }
 words = \lyricmode  {
   do re mi fa
   \repeat volta 2
   {
     do re me
   } \alternative {
     { fa } { sol }
   }
 }
 \score {
   
   \new Staff { \melody }
   \addlyrics { \words }
   
 }
 %%% End example.
 ___
 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


quoteDuring at the beginning of voice doesn't work

2011-01-01 Thread jakob lund
In the example below, the quoted note doesn't get printed
if the (otherwise useless) line marked %workaround% is
removed. Is this a (known?) bug, or am I making a mistake


Jakob

-

\version 2.13.44

altoPart = { c''4 }

\addQuote alto \altoPart
tenorPart = {
  s1*0  % workaround %
  \quoteDuring #alto { s4 }
  a'
}

{
  \tenorPart
}

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


Re: Staff change in piano music - a general approach?

2010-12-31 Thread jakob lund
2010/12/31 Phil Holmes m...@philholmes.net:
 Strictly, the ignore-collision override doesn't just suppress warnings - it
 stops LilyPond trying to avoid them.  Shane has given you one option for
 avoiding the double flag in your final note.  An alternative would be to use
 \once \override Stem #'length = #n to adjust the stem lengths.  Another
 option would be to typeset the final alto note as voiceTwo, to make its stem
 face downwards.

 As Shane has said, I'm not sure there's a general solution, because what you
 want isn't something that's generally done - effectively to make chords out
 of different voices.

 --
 Phil Holmes


 - Original Message - From: Tobias Braun
 tob...@braun-oberkochen.de
 To: Phil Holmes m...@philholmes.net
 Cc: LilyPond User Group lilypond-user@gnu.org
 Sent: Friday, December 31, 2010 2:46 AM
 Subject: Re: Staff change in piano music - a general approach?


 Yes, you perfectly understood me. But using chords is totally impractical
 for me as I already have the individual voices as LilyPond code.

 I tried as you described below and I'm getting a little closer. However,
 there are still some problems, one of which you can see in the attached
 example: the final chord consisting of two eighth notes actually looks like
 a sixteenth note chord.

 \override NoteColumn #'ignore-collision = ##t
 is just to suppress the collision warnings, right?

 Regards,
 Tobias


 % example

 \version 2.12.3

 global = {
 \clef treble
 \time 2/2
 \key g \dorian
 }

 soprano = \relative c''' {
 \voiceOne
 g4 g d4. e8 |
 }

 alto = \relative c'' {
 \voiceOne
 b4 c b4. c8 |
 }

 tenor = \relative c'' {
 \voiceTwo
 g4 g g2 |
 }

 \score {
 \new Staff 
 \global
 \override NoteColumn #'ignore-collision = ##t
 \new Voice { \soprano }
 \new Voice { \alto }
 \new Voice { \tenor }

 }



I'm probably missing something here, but in your example it seems that

\score {
   \new Staff 
   \global
   \new Voice  \soprano  \alto 
   \new Voice \tenor
   
}

does what you want ?

Sorry if I'm being completely ignorant...
Jakob.



 




 Am 30.12.2010 um 11:21 schrieb Phil Holmes:

 Just checking - you can obviously do what you want from a presentation
 perspective, since you've provided an example that looks like it came from
 LilyPond.  I presume you did this using chords, but you want to avoid using
 chords in your application?

 The way I would do this would be to use:

 \override NoteColumn #'ignore-collision = ##t

 and then set the alto and soprano parts in voiceOne, and the tenor part in
 voiceTwo.  You do not need to set these for the duration of the piece, so
 when you cross the tenor part to the other stave, you can put the command
 \voiceTwo in the alto part and it will now be set into the second voice. You
 can also set \voiceOne for the tenor part.  You may also want to do:

 \override NoteColumn #'ignore-collision = ##f

 at the same point.

 Let us know how you get on.

 --
 Phil Holmes


 - Original Message - From: Tobias Braun
 tob...@braun-oberkochen.de
 To: Phil Holmes m...@philholmes.net
 Cc: tob...@braun-abstatt.de; LilyPond User Group
 lilypond-user@gnu.org
 Sent: Thursday, December 30, 2010 1:50 AM
 Subject: Re: Staff change in piano music - a general approach?


 Sorry about the reply all thing, I forgot that.

 I wasn't aware I was sending an HTML e-mail, sorry. That must have been my
 webmail client.

 What I actually want to achieve is to have it look as uncluttered as
 possible. It should be easy to read when playing it on the piano. I'd
 basically like to merge all three voices into as few stems as possible. E.g.
 the notes of the first beat in measure 1 which basically form a chord
 consisting of three notes of the same duration played at the same time
 should appear as stacked, not next to each other. There is no need to be
 able to distinguish the individual voices.

 As this is kind of hard to describe, please have a look at the attached
 PDF. I guess I'd prefer the first measure to look like Variant 1, but
 Variant 2 would be acceptable as well. (I achieved this sample PDF through
  chord syntax, which is not of much use to me as I already have the
 individual voices in continuous form.)

 Regards,
 Tobias



 ___
 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: Can't use NoteNames twice in score block ??

2010-12-23 Thread jakob lund
2010/12/23 Michael Ellis michael.f.el...@gmail.com:
 I'm clearly Scheme challenged. I've spent several hours trying different
 variations of the following.
 #(define (note? x)
      (eq? 'EventChord (ly:music-property x 'name)))
 #(define notesOnly
 ;; Remove anything that is not a note.
   (define-music-function (parser location music) (ly:music?)
         (music-filter (lambda (x)  (if (note? x) x #f) )  music)))
 If I run different versions \notesOnly  on music containing notes plus other
 things, I get either everything passing through unchanged or everything
 removed.  What's the right way to construct  a music filter that returns
 only the pitch-carrying elements?

You have to permit more types of music, that act as containers, as
well as the actual 'NoteEvent objects:

#(define (filterEvent event)
 (let ((name (ly:music-property event 'name)))
  (or
(eq? name 'EventChord)
(eq? name 'NoteEvent)
(eq? name 'RelativeOctaveMusic)
(eq? name 'SequentialMusic

onlynotes = #(define-music-function (P L M) (ly:music?)
(music-filter filterEvent M))

{ %\displayMusic
  \onlynotes
  \relative c'' { \key a \major cis d16 } }
-
the \displayMusic command is only for debugging your function - if
your music disappears you uncomment it and comment out \onlynotes, so
you get a text representation of the unfiltered music. For example,
adding  \relative c'' caused the music to be wrapped in a
'RelativeOctaveMusic

Jakob.



 Cheers,
 Mike


 On Wed, Dec 22, 2010 at 2:14 PM, Michael Ellis michael.f.el...@gmail.com
 wrote:

 Thanks, Carl.  This looks promising ...
 Cheers,
 Mike


 On Wed, Dec 22, 2010 at 10:46 AM, Carl Sorensen c_soren...@byu.edu
 wrote:

 On 12/22/10 8:08 AM, Michael Ellis michael.f.el...@gmail.com wrote:
 
 
  Putting this together with your workaround produces the code and output
  shown
  below.  This works quite well.  So the issue I'm wrestling with now is
  whether
  it's feasible to automate the editing of 400+ files to separate the
  clef and
  instrument names from the notation, detect the original key, and
  rewrite the
  score block to produce the desired results.
 
  Thanks again for your help and any suggestions for how proceed with the
  automation are more than welcome.

 You might try using music-filter to help you.  Since you already have
 blocks
 by voice, you could filter the full block to keep only EventChords (every
 note, whether or not it's in a chord, is in an EventChord) and used the
 filtered music for your NoteNames context.

 Note that I haven't tried this, and won't have time to try it today.

 You can see an example of how Valentin has done this here:

 http://repo.or.cz/w/opus_libre.git/blob/HEAD:/lib/libdynamic.scm#l58

 HTH,

 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: Can't use NoteNames twice in score block ??

2010-12-23 Thread jakob lund
2010/12/23 Michael Ellis michael.f.el...@gmail.com:
 Thanks, Jakob! I didn't understand that a music-filter acts recursively on
 containers and their contents.  I had some vague notion that it simply
 passed or rejected elements at the top  level of a list.  Your example is
 what I needed.  For my purposes I needed to add RestEvent and
 TransposedMusic to the list of types but that was a logical extension once I
 saw the pattern.
 #(define (filterEvent event)
         (let ((name (ly:music-property event 'name)))
              (or
                (eq? name 'EventChord)
                (eq? name 'NoteEvent)
                (eq? name 'RestEvent)
                (eq? name 'RelativeOctaveMusic)
                (eq? name 'TransposedMusic)
                (eq? name 'SequentialMusic
 With this, I can now create multiple staff scores with solfege symbols under
 each staff.  The only problem remaining is that the page layout is
 apparently not taking into account the extra vertical space needed for the
 solfege text, so I get incomplete systems at the bottom of the page. The
 layout has no problems if I remove the NoteNames contexts that generate the
 solfege.

that sounds strange -- from what you write, it sounds like a problem
with the NoteNames context rather than with what you feed into it...
Can you give a simple example where that happens? Have you tried if
something simple like
  \context NoteNames { \repeat unfold 40 c'4 }
can provoke the same problem?

 Do I need to add some other types to my filter or is this another problem
 altogether?
 Cheers,
 Mike


 On Thu, Dec 23, 2010 at 5:15 AM, jakob lund jakob.be...@gmail.com wrote:

 #(define (filterEvent event)
         (let ((name (ly:music-property event 'name)))
              (or
                (eq? name 'EventChord)
                (eq? name 'NoteEvent)
                (eq? name 'RelativeOctaveMusic)
                (eq? name 'SequentialMusic

 onlynotes = #(define-music-function (P L M) (ly:music?)
                                    (music-filter filterEvent M))

 { %\displayMusic
  \onlynotes
  \relative c'' { \key a \major cis d16 } }
 -


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


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

2010-12-19 Thread jakob lund
I

2010/12/19 Marc Hohl m...@hohlart.de:
 Am 16.12.2010 17:04, schrieb Patrick Schmidt:

 [...]
 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-devel@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?

 Hm, I don't know what's wrong - I tried something like

 slide =
 #(define-music-function (parser location len thick beg end) (number? number?
 ly:music? ly:music?)
  #{
     \once \override Glissando #'minimum-length = $len
     \once \override Glissando #'thickness = $thick
     \once \override Glissando #'springs-and-rods =
 #ly:spanner::set-spacing-rods
      $beg \glissando $end
  #})


 myMusic = \relative c' {
  \slide #10 #5 a4 b4\3
 }

 \score {
 
  \new Staff {
   \new Voice {
     \clef treble_8
     \myMusic
   }
  }
  \new TabStaff {
   \new TabVoice {
     \myMusic
   }
  }

 }

 and that doesn't work either. I don't understand why ...


I think what happens is that the start note, passed to your function,
is already wrapped up in an object. \glissando is meant for use with a
single note, rather than with a music object.

You can use scheme to add the `start glissando' property to the object though:

\version 2.13.40

slide = #(define-music-function (parser location length startnote)
   (number? ly:music?)
   #{
 \once\override Voice.Glissando #'minimum-length = $length
 \once\override Voice.Glissando #'springs-and-rods =
#ly:spanner::set-spacing-rods
 #(begin
   (set! (ly:music-property $startnote 'elements)
 (cons (make-music (quote GlissandoEvent))
   (ly:music-property $startnote 'elements)
   ))
  (ly:export $startnote))
#})

{ \slide #7 a'' e'' }

this page contains a similar example
http://lilypond.org/doc/v2.13/Documentation/extending/adding-articulation-to-notes-_0028example_0029

Jakob

___
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 r...@goto10.org:
 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: ChordName Font [was: lilypond cameo]

2010-12-14 Thread jakob lund
2010/12/14 Marc Hohl m...@hohlart.de:
 Am 14.12.2010 19:38, schrieb Graham Percival:

 Jean-Pierre G writes that the font is free to use, but he doesn't leave a
 contact
 mail address on the page (or I have overlooked it - my french is very rusty)
 so it is difficult to ask him...

You did, in fact it is there: jpc...@gmail.com

Jakob.

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


Re: Adding Staves

2010-12-06 Thread jakob lund
if you create more staves inside  , they run in parallel for the
length of the piece, rather than starting after one another. Maybe you
need something like this? (you still have to fix the alignment
properly)

\score {
  
\new Staff { \oneTwo \three \four }
\addlyrics { \verseOne \verseThree \verseFour}
\addlyrics { \verseTwo }
  

  \layout {
indent = 0.0
\context {
  \Score
  \remove Bar_number_engraver
}
  }
}

Jakob
2010/12/6 Br. Athanasius Pelletier athp...@gmail.com:
 Apologies!  I need help I think, straightening out the \score block because
 it's not coming out how I want it to.  First off, I want the staff with
 verse one and two to be separate from three and four which each have their
 own music.  I am not understanding how to to that from the documentation.

 -- Forwarded message --
 From: James Bailey derhindem...@googlemail.com
 Date: Mon, Dec 6, 2010 at 2:13 PM
 Subject: Re: Adding Staves
 To: Br. Athanasius Pelletier athp...@gmail.com
 Cc: lilypond-user@gnu.org



 On Dec 6, 2010, at 7:31 PM, Br. Athanasius Pelletier wrote:

 I fixed up the input, there were alot of errors before.    I am not sure
 about the use of     and     in the \score section.
 Verses one and two have the same music but three and four each have
 different music.

 What exactly is your question?





 I fixed up the input, there were alot of errors before.    I am not sure
 about the use of     and     in the \score section.
 Verses one and two have the same music but three and four each have
 different music.


 \version 2.13.35

 \include english.ly

 \header {
   subtitle = Peace Prayer of St. Francis
   composer = Sebastian Temple
   % Remove default LilyPond tagline
   tagline = ##f
 }

 \paper {
   #(set-paper-size letter)
 }

 global = {
   \key c \major
   \time 2/2
 }

 oneTwo = \relative c'' {
   \global
   \dynamicUp
   \repeat volta 2 {
   r4 e,4 e e e e f g e1 ( e2)
   r4 g,4 e' e e e e e f g d1 ( d2)
   r4 g,4 f' f f f f f g a f1 ( f2)
   r4 g,4 f' f f f e2 d }
   %\repeat volta 2
   \alternative  { {e1 ( e)} { e1 ( e2) } }
 }

 three = \relative c'' {
   \global
   \dynamicUp
   r4 c,4 a a a a a a f b c f1 ( f2)
   r4 g4 f f f f f f g a e2 ( f g)
   r4 c4 c a a a r4 a a b c g1 ( g2)
   r4 e4 e d2 d4 fs4 a a g fs g2 ( a b1)
 }

 four = \relative c'' {
   \global
   \dynamicUp
   r4 e,4 e e e e f g e1 ( e2)
   r4 g,4 e' e e e e e f g d4 d2.( d2)
   r4 g,4 f' f f f f f g a f1 ( f2)
   r4 g4 g f f f f f f8 f e4 d c1
 }

 verseOne = \lyricmode {
   \set stanza = 1.
   Make me a chan -- nel of your peace. __
   Where there is hat -- red, let me bring your love. __
   Where there is in -- ju -- ry, your par -- don, Lord. __
   And where there's doubt, true faith in you. __
 }

 verseTwo = \lyricmode {
   \set stanza = 2.
   Make me a chan -- nel of your peace. __
   Where there's de -- spair in life, let me bring hope __
   Where there is darkness \skip 4 \skip 4 \skip 4  on -- ly light, __
   And where there's sad -- ness, ev -- er \skip 1 joy. __
 }

 verseThree = \lyricmode {
   \set stanza = 3.
   O Mas -- ter, grant that I may nev -- er seek __
   So much to be con -- soled as to con -- sole. __
   To be un -- der -- stood as to un -- der -- stand. __
   To be loved, as to love, with all my soul. __
 }

 verseFour = \lyricmode {
   \set stanza = 4.
   Make me a chan -- nel of your peace. __
   It is in par -- don -- ing that we are par -- doned. __
   In giv -- ing to all men that we re -- ceive, --
   And in dy -- ing that we're bor to e -- ter -- nal life.
 }

 \score {
   
     \new Staff { \oneTwo }
     \addlyrics { \verseOne }
     \addlyrics { \verseTwo }

     \new Staff { \three }
     \addlyrics { \verseThree }

     \new Staff { \four }
     \addlyrics { \verseFour }
   

   \layout {
     indent = 0.0
     \context {
   \Score
   \remove Bar_number_engraver
     }
   }
 }
 ___
 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: How to print 2 rehearsal marks above and below same bar line

2010-11-29 Thread jakob lund
Hi

I've been trying to do something like that
my conclusion was that I couldn't because adding two marks to the same
bar line would just cause one of them to be deleted.
there is an example here that circumvents this by adding an invisible bar line:


http://www.kainhofer.com/~lilypond/Documentation/snippets/expressive-marks.html#creating-simultaneous-rehearsal-marks


Jakob.


2010/11/29 James Lowe james.l...@datacore.com:
 Hello,

 Consider these two 'contrived' examples

 --
 \version 2.13.40

 \relative c'' {
  c4 c8 c c4 bes | a2 a \bar ||
  \once \override Score.RehearsalMark #'break-visibility = 
 #begin-of-line-invisible
  \once \override Score.RehearsalMark #'self-alignment-X = #RIGHT
  \once \override Score.RehearsalMark #'direction = #DOWN
  \mark \markup { \small \bold \italic Fine.}
  f4 f8 f f4 f | g2 g4 g |
 }

 \relative c'' {
  c4 c8 c c4 bes | a2 a \bar ||
  \mark #1
  f4 f8 f f4 f | g2 g4 g |
 }

 --

 In the first {}  example the 'fine.' is aligned with the bar line and in the 
 second the \mark is also aligned on the same bar line, I'd like to be able to 
 have a single system with the fine. 'text' \mark and a 'rehearsal mark' \mark 
 below and above respectively. I say this example is contrived because this 
 would be a nice *and simple* method (for me anyway) generally to align items 
 without having to worry about \tweaking each time I ever transpose or add 
 more bars/notes.

 While I realise I could 'tweak' a markup and move it horizontally, the 
 align/break-visibility alignment method is a nice way of aligning to a given 
 bar without trial and error and using \mark 'rehearsal.mark' is very simple.

 While we have an LSR example

 http://lsr.dsi.unimi.it/LSR/Item?id=10

 This uses two staves. Using a  \\  construct with just explicit \marks 
 doesn't seem to work, and I wondered if this was possible?

 I hope that makes sense.

 James



 ___
 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: Lyric tie

2010-11-23 Thread jakob lund
Hi

you can change the font for a single character in \markup:

\addlyrics {
  Buon gior --
  \markup\concat{no \override #'(font-name . DejaVu Sans Bold){‿} al}
  mon -- do.
}

(I tested with DejaVu Sans Bold because I'm not sure if the other
one exists on my computer)


Jakob.




2010/11/23 Francisco Vila paconet@gmail.com:
 2010/11/22 Federico Bruni fedel...@gmail.com:
 Il giorno lun, 22/11/2010 alle 22.46 +0100, Francisco Vila ha scritto:
  \addlyrics {
   \override LyricText #'font-name = #DejaVuLGC
   Buon gior -- no~al mon -- do.
  }
 

 Thank you, that works, but I like the default font for the lyrics and
 I'd prefer to change only that of the lyric tie if necessary.

 What about using the undertie directly in your (utf-8) source file?

 Buon gior -- no‿al mon -- do.

 Does it look better?

 Unfortunately not, see image.  I think this produces the same output
 as the usual '~'.  Do you know a way of figuring out which font does a
 glyph of the PDF belong to?

 --
 Francisco Vila. Badajoz (Spain)
 www.paconet.org , www.csmbadajoz.com

 ___
 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: how to get half-bar used in Bach Music?

2010-11-22 Thread jakob lund
Ok here's another ugly hack:

example

#(define __x 1)

{
\override Staff . BarLine #'bar-size = #(lambda (G) (set! __x (1+
__x)) (+ 2 (* 2 (modulo __x 2

\relative c'' { c1 c c c c }
}

/example

It's ugly because it uses a `global' variable __x to count the bars
and set the bar size to 2 only after an odd number of bars. It screws
up if you try to use it with more staffs.

If someone who knows the inner workings of scheme in Lilypond reads
this, I would like to know
 how to properly access the current bar number in the callback!???


Jakob.


2010/11/22 Alexander Kobel n...@a-kobel.de:
 [ with cc to lilypond-user; please keep the discussions on the mailing list,
 others might have the same problems and can find the solutions in the
 mailing list archives ]

 On 2010-11-22 12:38, Martin Kemp wrote:

 I've just been struggling with this too. All else having failed, I faked
 it by using an invisible bar line and adding:

 \once \override TextScript #'extra-offset = #'(-1 . 3.5) c8_\markup {
 \musicglyph #rests.M2mensural }

 Woah, that's some ugly hack...
 Again, I don't see the need for this - I just tested the following, and it
 works just perfect for me (use \halfBar to make a real bar line at the end
 of a measure appear smaller, and \halfAddBar to insert a fake barline of
 half the usual extent).  If it doesn't in your setting, could you give a
 small compiling example to show the problem?

 halfBar = \once \override Staff . BarLine #'bar-size = #2
 halfAddBar = { \halfBar \bar | }

 \relative c' {
  c4 c \halfAddBar c c \halfBar |
  c c c c |
 }


 Cheers,
 Alexander

 ___
 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: Howto have the number of volte printed out above an end-repeat bar?

2010-11-18 Thread Jakob Lund
I've been messing with the same idea, and after reading this thread I came up
with something similar but a little different. I posted it on my blog here

http://krimskrams.dk/node/3




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


music function

2010-11-17 Thread jakob lund
Hi


I have two questions that I hope someone here can answer.
I have something like this

\repeat volta 4 { ... music ... }

There are no alternative endings, so the number 4 doesn't show up in the output.
I would like the text ×4 to appear below the closing repeat mark
(dotted bar line). Is there already a way
to do that? (there ought to be but I can't seem to find it...)

Using \mark is no good, because I already have a mark on that bar
line. Thus far I came up with:

repeatTimes = #(define-music-function (parser location r) (integer?)
#{
\bar 
\once \override Score.TimeSignature #'stencil = ##f
\time 1/32
s32-\markup{\concat{ $(markup (number-string r)) × } }
\once \override Score.TimeSignature #'stencil = ##f
\time 4/4
#})

(the technique is adapted from the snippet titled Creating
simultaneous rehearsal marks
from the lilypond documentation.) So now I write

\repeat volta 4 { ... music ... \repeatTimes #4 }

which gives sort of the desired result. My second question is: Can I,
perhaps using the 'parser' argument, access
(a) the `current time signature' (so I can get rid of the
hard-coded 4/4 at the end) and
(b) the argument to `\repeat volta' (so I won't have to supply the
argument #4, which is redundant 'cause I already put `volta 4') ?


Regards
Jakob Lund.

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


Re: transposition question

2010-11-17 Thread jakob lund
why not just \transpose es des instead of es cis? (say if you're
transposing from e-flat?)


Jakob.


2010/11/17 Christopher Meredith chmered...@gmail.com:
 On Wed, Nov 17, 2010 at 1:21 PM, Alex Jones akj...@gmail.com wrote:

 I am using lilypond for a transposition solution.  Unfortunately, when
 doing the transposition, the shift is to keys where it would make sense to
 write the notation in the enharmonic key.

 E.g. the new key is c-sharp major and it would be nicer to actually write
 it in d-flat major, is there a way to tell lilypond to use the enharmonic
 key in this circumstance?

 Thanks!

 Sure, just transpose it to des instead of cis and set the key accordingly.


 ___
 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: Inserting comments into the log file

2010-11-17 Thread jakob lund
Hi Paul

Not sure about the log file, but you can print to the standard output like
this:

#(display ...some text...)

(space after display is mandatory)


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