Re: How does \RemoveEmptyStaffContext work in ly 2.14.1?

2011-06-19 Thread James Harkins
At Sun, 19 Jun 2011 13:56:44 +0800,
James Harkins wrote:
 What's the best way to do it? This instrument[1] is most commonly notated 
 with one staff, but when the writing gets more complicated, it can expand to 
 two. It's not like a piano where both staves should be visible all the time, 
 even if one or the other has only rests for a complete system.
 
 Maybe PianoStaff overrides \RemoveEmptyStaffContext? New behavior in 2.14?

Note to self... read the manual before posting :)

I should have used GrandStaff instead of PianoStaff... other note to self... 
don't rely on Frescobaldi's new score wizard too much...

James


--
James Harkins /// dewdrop world
jamshar...@dewdrop-world.net
http://www.dewdrop-world.net

Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal.  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks

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


Re: install latest stable lilypond 2.14.1 on Fedora

2011-06-19 Thread Federico Bruni
Il giorno dom, 19/06/2011 alle 08.51 +1200, Steve Taylor ha scritto:
 I'd like to install lilypond 2.14.1 on Fedora 14 (using Gnome).
 
 Following the method on the lilypond website (downloading and running
 the sh script as su) gives the following message when I run the
 installed lilypond command:
 /usr/local/lilypond/usr/bin/lilypond: error while loading shared
 libraries: libgmp.so.3: cannot enable executable stack as shared
 object requires: Permission denied 

It may be related with selinux, see this thread:
http://forums.fedoraforum.org/showthread.php?t=253870 

But I don't use Fedora so I can't help much.

Cheers,
Federico


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


Pitch-bent note's release-phase

2011-06-19 Thread Richard Sabey

I notice that, if a note is not a whole number of semitones from c (so a MIDI 
pitch bend message must be sent), then the release phase of the sound is not 
pitch bent. Is this unavoidable behaviour of MIDI or a deficiency in Lilypond?

See the example below. The first note and rest show the whole 
attack-decay-sustain-release sequence. Now compare that with the second note. 
Its attack-decay-sustain are pitch bent but the release phase (audible during 
the second rest) is not. There is an audible drop in pitch.

I acknowledge that MIDI has deficiencies in this area: if a legato line 
contains notes that are pitch bent by different amounts, then either Lilypond 
must allocate notes to two channels alternately (thus consuming a resource - 
channels - that is in short supply), or else each note's release phase would 
get pitch bent by the following note's pitch bend instead of its own, which 
creates the original problem.

But you don't need this problem when a note allocated to a channel is followed 
by a rest in that channel. Is Lilypond writing a MIDI pitch wheel change 
message to take effect at the same instant as the MIDI note off message? If 
I'm right (I don't know of any app which converts a .mid file into a form I 
could understand - perhaps I'll have to write a C program myself!) then I think 
that Lilypond could produce better MIDI if it sent pitch wheel change 
messages only on demand, i.e. together with note on messages, but not also 
with note off messages.

%%% begin example
\version 2.14.0
\language english
\score
{
\new Staff { b'4 r bqs' r b' }
\midi { }
}
%%% end example

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


Re: Dilemma with spacer rest and cross-staff polyphony.

2011-06-19 Thread Xavier Scheuer
On 19 June 2011 07:01, Hwaen Ch'uqi hwaench...@gmail.com wrote:

 Greetings:
 As you will see from the attached pdf file, the center two
 measures differ from the intention of the code shown below. The upper
 voice is treated as if it is in bass clef. I would be grateful for any
 advice. Has it possibly something to do with the interaction of the
 preceding spacer rests with the corresponding cross-staff activity?
 Many thanks.

Hi,

That's because you use a   { ... } \\ { ... }   construct, which
create implicitely voices called respectively one and two.

Since you use the same type of construct in the lower Staff (and use
this construct there at first), the voices one and two that you
want in the upper Staff are considered as the same as the ones in the
lower Staff and are then printed in the lower Staff since you did not
mention some  \change Staff  for these voices one and two.

The best solution would be to simply explicit the voices!

I have also rearranged the voices (the whole changing Staff voice is
the one called medium) and used variables.  Here is a proposal:

\version 2.12.3

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

upper = \relative c'' {  % XS: you should mention a start pitch for  \relative !
  s1*2
  d4. e!8 fis4 gis8 a!
  b4 e, s2
}

medium = \relative c {
  \change Staff = down \stemUp
  dis8*2/3 cis' \change Staff = up \stemDown fis eis' cis fis
  \change Staff = down \stemUp a,, bis \change Staff = up \stemDown fis'
  a' bis, gis'
  \change Staff = down \stemUp gis,, bis \change Staff = up
  \stemDown a' fis' gis, eis' \change Staff = down \stemUp gis,, cis
  \change Staff = up \stemDown fis dis' eis, cis'
  cis,8*2/3 \change Staff = down \stemUp fis, ais b cis d \change
  Staff = up \stemDown e \change Staff = down \stemUp eis fis \change
  Staff = up \stemDown d' e cis
  d e cis cis d b b dis, e e \change Staff = down \stemUp dis, e
  d!8*2/3 b' \change Staff = up \stemDown a' a' b, g' \change
  Staff = down \stemUp d,, b' \change Staff = up \stemDown g' g' a,
  fis'!
  \change Staff = down \stemUp b,,, g' \change Staff = up \stemDown
  fis' fis' g, e' \change Staff = down \stemUp a,,, g' \change Staff =
  up \stemDown a b' e, a
}

lowerUp = \relative c' {
  s1*3
  b4 cis d2
}

lower = \relative c {
  a2 gis
  cis, cis'4 bis
  b2 ais
  a! f' gis e'
  fis! e
  d cis
}

\score {
  \new PianoStaff 
\new Staff = up {
  \clef treble
  \key a \major
  \time 4/4
  
\new Voice = upper {
  \voiceOne  % XS: stems, slurs, etc. UP!
  \upper
}
\new Voice = medium {  % XS: this is the voice changing Staff
  \medium
}
  
}
\new Staff = down {
  \clef bass
  \key a \major
  \time 4/4
  
\new Voice = lowerUp {
  \voiceOne
  \lowerUp
}
\new Voice = lower {
  \voiceTwo  % XS: stems, slurs, etc. DOWN!
  \lower
}
  
}
  
  \layout{
\context {
  \Score
  \remove Bar_number_engraver
}
  }
}


Cheers,
Xavier

-- 
Xavier Scheuer x.sche...@gmail.com

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


Sub-music

2011-06-19 Thread Johan Vromans
Hi,

Given:

melody = \relative c' {
  ... several measures of notes ...
}

It is possible to extract a section from this melody, e.g. measure 4 or
measures 3..15 or something?

-- Johan

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


Re: Sub-music

2011-06-19 Thread Kieren MacMillan
Hi Johan,

 Given:
 
 melody = \relative c' {
  ... several measures of notes ...
 }
 
 It is possible to extract a section from this melody, e.g. measure 4 or
 measures 3..15 or something?

http://lsr.dsi.unimi.it/LSR/Search?q=extract

Cheers,
Kieren.

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


Re: trying to add a new \language

2011-06-19 Thread -Eluze


R. Mattes wrote:
 
   \version 2.15
 
 Most likely: the language needs to be put in quotes:
 
 \language myLanguage
 
no, with or without quotes works with all languages!


 Better to put the langauge definition into a separate .ly-file and include
 it.
 Production code should also check whether the language is already defined,
 otherwise 
 language-pitch-names will grow.
 Something like this (save it in a file called myLanguage.ly):
 
 #(let ((new-lang 
`(myLanguage . ((ceses . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
   
   (if (not (assoc 'myLanguage language-pitch-names))
   (set! language-pitch-names (cons  new-lang language-pitch-names
 
 \language myLanguage
 
 If you put this file somewhere where lilypond searches for includes and
 add
 \inlcude myLanguage.ly to your file.
 
now this works - thanks!

maybe others are interested in what you can do with this:

as i mentioned in a previous post with the snippet
http://lsr.dsi.unimi.it/LSR/Item?u=1id=768 you can easily add fingerings to
a voice. these consist of a string which is associated with the notes so
that the first element of the string is related to the first note, the 2nd
element to the 2nd note and so forth. to omit a fingering for one note you
simply (have to) write a letter iso a digit.

now you can imagine such a string for even a little piece would become
immense and nearly not manageable. therefor Gilles Thibault, the author of
this snippet, has arranged that you can structure this string, putting it on
several lines and adding special characters which will not be counted in
associating the strings' elements to the notes. among these special
characters are the wellknown Lilypond characters for chords  the comma,
the barcheck |, the dot... a special case is the apostrophe which is used to
enter whole strings to be associated with one note.

my approach now was to make a copy of the music with \displayLilyMusic - if
you consequently add barchecks after each measure you get a nicely
structured voice with each measure starting on a new line. using my new
language, e.g., for a d major scale  i get  d' e' f♯' g' a' h' c♯'' d'' in
which i just have to replace the note name - i can leave the sharp or flat
sign. (the apostrophs must be removed or replaced - i recommend to use ^ for
that purpose).

an example: the fingering string for just the 1st measure of Sor's étude op.
6 no. 9 for guitar looks so:
341234002134  or 341234002134afge  

with my fingering language it is:
 3^ 4^^   1^ 2♯^^   3^ 4^^   0^ 0^^   2^ 1^^   3^ 4^^   a^ f^^
  g^ e^^ 

or - omitting the octave information:  3 4   1 2♯   3 4   0 0   2 1
  3 4   a f   g e 

the code for these examples and the language definition (to view the special
characters you need a special font to display them; i've been using DejaVu
Sans Mono) : 
http://old.nabble.com/file/p31878853/test2.ly test2.ly 
http://old.nabble.com/file/p31878853/_language%2Bdefs.ly _language+defs.ly 

hope this is useful for others, too, and many thanks, Ralf, for your
(tele-)patience+support!
Eluze




 
 



-- 
View this message in context: 
http://old.nabble.com/trying-to-add-a-new-%5Clanguage-tp31855111p31878853.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.


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


Re: Sub-music

2011-06-19 Thread Reinhold Kainhofer
Am Sonntag 19 Juni 2011, 12:03:14 schrieb Johan Vromans:
 melody = \relative c' {
   ... several measures of notes ...
 }
 
 It is possible to extract a section from this melody, e.g. measure 4 or
 measures 3..15 or something?

The solution really depends on what you want to do with it.

-) If you want to use them as cue notes or quote them in another instrument  
at the same position (e.g. quote the flute solo in the violin, so that the 
violin can play the solo if no flute is available), then you should use 
\addQuote and \cueDuring or \quoteDuring

-) If you want to modify it with scheme or duplicate it or output it at some 
other point, then Kieren already sent you the link to the LSR snippet:
 http://lsr.dsi.unimi.it/LSR/Item?id=542

-) If you want to generate many small PDF or EPS excerpts to include e.g. as 
examples in a publication, you can use clip-regions and the command-line 
option -dclip-systems. See the notation reference, section 3.4.1:
http://kainhofer.com/~lilypond/Documentation/notation/extracting-
fragments-of-music.html

Of course, there are probably other solutions as well, so it would really help 
to know how you want to use the extracted sections.

Cheers,
Reinhold

-- 
--
Reinhold Kainhofer, Vienna University of Technology, Austria
email: reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
 * Edition Kainhofer Music Publishing, http://www.edition-kainhofer.com/
 * LilyPond music typesetting software, http://www.lilypond.org/

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


Re: problem with converting a file to 2.14.1

2011-06-19 Thread Stefan Thomas
Dear Neil, dear david,
thanks very much for Your help.
It works perfectly now!

2011/6/19 Neil Puttock n.putt...@gmail.com

 On 18 June 2011 22:12, Stefan Thomas kontrapunktste...@googlemail.com
 wrote:

  Unfortunately I couldn't convert this file with convert.ly and I don't
 know,
  why it doesn't work.

 There's a clue in the file:

 (beam-width (ly:grob-property beam 'thickness)) ; 'beam-thickness from
 version 2_13_4

 Change 'thickness to 'beam-thickness then it'll work.

 Cheers,
 Neil

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


Custom dynamic text spanner without dashed line

2011-06-19 Thread Xavier Scheuer
Hi,

Again, many thanks to Reinhold for implementing the possibility to use
custom dynamic text spanners with a POSTFIX syntax.
I'm trying to adapt snippets Dynamics custom text spanner postfix and
Dynamics text spanner postfix
http://lilypond.org/doc/v2.14/Documentation/snippets/expressive-marks
but _without_ the dashed line ( 'style = 'none ).

Unfortunately for now I have been unable to achieve it with a POSTFIX
syntax only (please, I hate when I have to use many  \override  before
the note PLUS a command after the note).

I tried the following but it either gives an error, or simply does not
work.

myCustomCresc = -\tweak #'style #'none #(make-music 'CrescendoEvent
   'span-direction START
   'span-type 'text
   'span-text cresc.)

myCustomCrescII = #(make-music 'CrescendoEvent
   'style 'none; does not work
   'span-direction START
   'span-type 'text
   'span-text cresc.)

{
  c1\myCustomCresc c\mf c\myCustomCrescII c\f
}


Ideas would be greatly appreciated.
Thanks in advance!

Cheers,
Xavier

-- 
Xavier Scheuer x.sche...@gmail.com

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


Re: Sub-music

2011-06-19 Thread Johan Vromans
Reinhold Kainhofer reinh...@kainhofer.com writes:

 The solution really depends on what you want to do with it.

For a piece of music, I want to generate score and midi.

Score is no problem.

The midi needs to be fold out w.r.t. repeats (unfoldRepeats can do that)
but there are also Segno / D.S. and D.C. sections.

Fold out, the piece becomes the following measures:

1, 2…36, 37, 22…36, 38, 2…20, 39…89

The current approach that I have works, but is rather tedious:

For each voice:

highMusic = {
  \tag #'scoreOnly {
\highMusicPartOne
\bar || \mark \markup { \musicglyph #scripts.segno }
\highMusicPartTwoA
\bar ||
\override Score.RehearsalMark #'self-alignment-X = #RIGHT
\mark \markup { \left-align \vcenter \bold To Coda   \musicglyph 
#scripts.coda }
\highMusicPartTwoB
\repeat volta 2 {
  \highMusicPartThree
}
\alternative {
  { \highMusicPartFourA }
  { \highMusicPartFourB }
}
\bar ||
\override Score.RehearsalMark #'self-alignment-X = #LEFT
\mark \markup { \vcenter { \musicglyph #scripts.coda \bold  Coda } }
\highMusicPartFive
  }
  \tag #'midiOnly {
\highMusicPartOne
\highMusicPartTwoA
\highMusicPartTwoB
\highMusicPartThree
\highMusicPartFourA
\highMusicPartTwoA
\highMusicPartTwoB
\highMusicPartThree
\highMusicPartFourB
\highMusicPartTwoA
\highMusicPartFive
  }
}

So, instead of splitting all voices, I'd like to write the voices in one
piece, and the use measure extraction to create the parts for the midi.

highMusicScore = \relative c' {
  ...
}

highMusic = {
  \tag #'scoreOnly {
\highMusicScore
  }
  \tag #'midiOnly {
\extractMusic \highMusicScore s1*0  s1*1% 1
\extractMusic \highMusicScore s1*1  s1*19   % 2..20
\extractMusic \highMusicScore s1*20 s1  % 21
\extractMusic \highMusicScore s1*21 s1*15   % 22..36
\extractMusic \highMusicScore s1*36 s1  % 37
\extractMusic \highMusicScore s1*21 s1*15   % 22..36
\extractMusic \highMusicScore s1*37 s1  % 38
\extractMusic \highMusicScore s1*1  s1*19   % 2..20
\extractMusic \highMusicScore s1*38 s1*51   % 39..89
  }
}

-- Johan

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


Re: Sub-music

2011-06-19 Thread Reinhold Kainhofer
Am Sonntag, 19. Juni 2011, 16:17:26 schrieb Johan Vromans:
 Reinhold Kainhofer reinh...@kainhofer.com writes:
  The solution really depends on what you want to do with it.
 
 For a piece of music, I want to generate score and midi.

 The midi needs to be fold out w.r.t. repeats (unfoldRepeats can do that)
 but there are also Segno / D.S. and D.C. sections.

Ah, okay. The main problem here is lilypond does not have any native support 
for D.C./D.S./Fine structures...

 Fold out, the piece becomes the following measures:
 
 1, 2…36, 37, 22…36, 38, 2…20, 39…89
 
 The current approach that I have works, but is rather tedious:

I would recommend to use \unfoldRepeats for unfolding all \repeat structures 
(also correctly expands tremolo repeats!) and use \extractMusic only for D.C. 
and D.S. That saves you several \extractMusic calls.

Chers,
Reinhold

-- 
--
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial  Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org

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


RE: Adding line breaks within lyrics

2011-06-19 Thread James Lowe
Hello,

From: lilypond-user-bounces+james.lowe=datacore@gnu.org 
[lilypond-user-bounces+james.lowe=datacore@gnu.org] on behalf of Andrew C. 
Smith [andrewchristophersm...@gmail.com]
Sent: 18 June 2011 20:01
To: LilyPond User Group
Subject: Adding line breaks within lyrics

Hi everyone,

I'm writing a piece where the rhythms of the sung words are free, so a whole 
phrase is attached to a single note. I'm putting my lyrics in   for each 
note, but they appear on one long line, when I actually want them wrapped to 
the width of the bar. Is there a way to add a line break within the quoted 
lyric, or to set the max width and tell lilypond to wrap the text?

\partI = \lyricmode {
...
\override LyricText #'font-shape = #'italic
\override LyricText #'self-alignment-X = #LEFT
world's chaos when we seek it water's drifting as slowly out tides toward land 
twice daily
...
}

later on,


\voice
\new Lyrics \lyricsto soprano { \partI }
\violin


Let me know if maybe there's a better way to do this. I'd like to keep it as 
clean as possible, and also to be able to keep all my lyrics in one variable in 
case I want to split up the file later. Thanks.

---

I will start by saying that I have not done any setting using lyrics, so there 
may be others out there who know better.

However after a quick look in the internals reference '3.1.63 LyricText'

It might be possible to use the 'text (markup)' option   ( '#procedure #f 
(grob)' )

Is one of the options in the Notation Reference  “Formatting text” ...

Scanning down you could perhaps use the '\wordwrap-string arg (string)' option?

I realise that probably isn't much help if you aren't comfortable with the 
syntax for overrides, and I am not competent enough to use set Lyrics to give 
you a 'quick and dirty' test, but it *might* be a way round this. Hopefully if 
this is a way to use it someone can come up with a valid syntax. What I am 
seeing though is that there would still need to be some 'arbitrary' line width 
that you'd need to put in - i.e. I cannot see a way to say 'line-wdith = length 
of measure' to create breaks easily.

But I hope this does help.

james


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


RE: Adding line breaks within lyrics

2011-06-19 Thread James Lowe
Hello,

From: lilypond-user-bounces+james.lowe=datacore@gnu.org 
[lilypond-user-bounces+james.lowe=datacore@gnu.org] on behalf of Kieren 
MacMillan [kieren_macmil...@sympatico.ca]
Sent: 18 June 2011 23:08
To: Andrew C.Smith
Cc: LilyPond User Group
Subject: Re: Adding line breaks within lyrics

Hi Andrew,

 or to set the max width and tell lilypond to wrap the text?

In markup, I used

^\markup \override #'(line-width . 62) \column { \wordwrap-lines { Lorem 
ipso dolor yadda yadda … } }

I'm assuming you could do the same with LyricText.

--

Ah, I saw this after I wrote my response.

Yes that was the kind of thing I was looking at, but you can (it seems) 
incorporate it directly in LyricText object rather that just using it as a 
markup (which may be more convenient).

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


Re: Adding line breaks within lyrics

2011-06-19 Thread Andrew C. Smith
Thanks Kieren  James,

This helped a lot. I actually found a lesser workaround later last night, but 
your solutions were way better.

Continuing this conversation: I'm trying to now make a markup function, and 
running into trouble. Here's the function:

---

#(define-markup-command (wrap-lyrics layout props line) (markup?)
#:properties ((line-wrap-width 40))
Allow lyrics to wrap at the end of the line
(interpret-markup layout props
(markup #:override '(line-width . ,line-wrap-width) #:column 
(#:wordwrap-lines (line)

...

\markup { \wrap-lyrics {sky's bluer than it seems sky's blue all seeming yet 
feeling is first yet syntax seems clear} }

---

However, I get this error:

error: Not a markup command: wordwrap-lines

Any ideas? Running \displayLilyMusic shows that \wordwrap-lines is replaced by:

 #procedure wordwrap-lines-markup-list (layout props args) (world's chaos 
when we seek it water's drifting as slowly out tides 
toward land twice daily)

But is there a workaround to let me use this same built-in procedure in my 
scheme function?

Thanks, and sorry for the gobs of code. Hopefully we'll end up with a snippet 
in the end.

Best,

Andrew

On Jun 19, 2011, at 10:32 AM, James Lowe wrote:

 Hello,
 
 From: lilypond-user-bounces+james.lowe=datacore@gnu.org 
 [lilypond-user-bounces+james.lowe=datacore@gnu.org] on behalf of Kieren 
 MacMillan [kieren_macmil...@sympatico.ca]
 Sent: 18 June 2011 23:08
 To: Andrew C.Smith
 Cc: LilyPond User Group
 Subject: Re: Adding line breaks within lyrics
 
 Hi Andrew,
 
 or to set the max width and tell lilypond to wrap the text?
 
 In markup, I used
 
^\markup \override #'(line-width . 62) \column { \wordwrap-lines { Lorem 
 ipso dolor yadda yadda … } }
 
 I'm assuming you could do the same with LyricText.
 
 --
 
 Ah, I saw this after I wrote my response.
 
 Yes that was the kind of thing I was looking at, but you can (it seems) 
 incorporate it directly in LyricText object rather that just using it as a 
 markup (which may be more convenient).
 
 James

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


Re: Adding line breaks within lyrics

2011-06-19 Thread Andrew C. Smith
Sorry, made more progress than I thought I would. My full explanation is below. 
Any simplifications (particularly ways to do away with the \markup \column 
redundancy) would be welcome.

Wrapping lyrics in LilyPond

Markup command:

#(define-markup-list-command (wrap-lyrics layout props line) (markup-list?)
#:properties ((line-width 40))
Lyric wrapping
(interpret-markup-list layout props
(make-override-lines-markup-list (cons 'line-width line-width)
(make-wordwrap-lines-markup-list line

and invocation:

\lyricmode { 
\markup \column { \wrap-lyrics {these lyrics will be wrapped as if they 
all belong to the same syllable} }
}

There is also the possbiility of changing the line width (default is 40) using 
the following example (line-width changed to 20):

\markup \column { \override-lines #'(line-width . 20) \wrap-lyrics {these 
lyrics will be wrapped with a narrower line width} }

On Jun 19, 2011, at 12:18 PM, Andrew C. Smith wrote:

 Thanks Kieren  James,
 
 This helped a lot. I actually found a lesser workaround later last night, but 
 your solutions were way better.
 
 Continuing this conversation: I'm trying to now make a markup function, and 
 running into trouble. Here's the function:
 
 ---
 
 #(define-markup-command (wrap-lyrics layout props line) (markup?)
   #:properties ((line-wrap-width 40))
   Allow lyrics to wrap at the end of the line
   (interpret-markup layout props
   (markup #:override '(line-width . ,line-wrap-width) #:column 
   (#:wordwrap-lines (line)
 
 ...
 
 \markup { \wrap-lyrics {sky's bluer than it seems sky's blue all seeming yet 
 feeling is first yet syntax seems clear} }
 
 ---
 
 However, I get this error:
 
 error: Not a markup command: wordwrap-lines
 
 Any ideas? Running \displayLilyMusic shows that \wordwrap-lines is replaced 
 by:
 
  #procedure wordwrap-lines-markup-list (layout props args) (world's 
 chaos when we seek it water's drifting as slowly out 
 tides toward land twice daily)
 
 But is there a workaround to let me use this same built-in procedure in my 
 scheme function?
 
 Thanks, and sorry for the gobs of code. Hopefully we'll end up with a snippet 
 in the end.
 
 Best,
 
 Andrew
 
 On Jun 19, 2011, at 10:32 AM, James Lowe wrote:
 
 Hello,
 
 From: lilypond-user-bounces+james.lowe=datacore@gnu.org 
 [lilypond-user-bounces+james.lowe=datacore@gnu.org] on behalf of Kieren 
 MacMillan [kieren_macmil...@sympatico.ca]
 Sent: 18 June 2011 23:08
 To: Andrew C.Smith
 Cc: LilyPond User Group
 Subject: Re: Adding line breaks within lyrics
 
 Hi Andrew,
 
 or to set the max width and tell lilypond to wrap the text?
 
 In markup, I used
 
^\markup \override #'(line-width . 62) \column { \wordwrap-lines { Lorem 
 ipso dolor yadda yadda … } }
 
 I'm assuming you could do the same with LyricText.
 
 --
 
 Ah, I saw this after I wrote my response.
 
 Yes that was the kind of thing I was looking at, but you can (it seems) 
 incorporate it directly in LyricText object rather that just using it as a 
 markup (which may be more convenient).
 
 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


Re: Custom dynamic text spanner without dashed line

2011-06-19 Thread Jay Anderson
On Sun, Jun 19, 2011 at 7:06 AM, Xavier Scheuer x.sche...@gmail.com wrote:
 Hi,

 Again, many thanks to Reinhold for implementing the possibility to use
 custom dynamic text spanners with a POSTFIX syntax.
 I'm trying to adapt snippets Dynamics custom text spanner postfix and
 Dynamics text spanner postfix
 http://lilypond.org/doc/v2.14/Documentation/snippets/expressive-marks
 but _without_ the dashed line ( 'style = 'none ).

 Unfortunately for now I have been unable to achieve it with a POSTFIX
 syntax only (please, I hate when I have to use many  \override  before
 the note PLUS a command after the note).

 I tried the following but it either gives an error, or simply does not
 work.

 myCustomCresc = -\tweak #'style #'none #(make-music 'CrescendoEvent
                               'span-direction START
                               'span-type 'text
                               'span-text cresc.)

 myCustomCrescII = #(make-music 'CrescendoEvent
                               'style 'none    ; does not work
                               'span-direction START
                               'span-type 'text
                               'span-text cresc.)

 {
  c1\myCustomCresc c\mf c\myCustomCrescII c\f
 }


 Ideas would be greatly appreciated.
 Thanks in advance!

I use this:

justDim = #(make-music 'DecrescendoEvent 'span-direction START
'span-type 'text 'span-text dim. 'tweaks '((dash-period . -1)))
justCresc = #(make-music 'CrescendoEvent 'span-direction START
'span-type 'text 'span-text cresc. 'tweaks '((dash-period . -1)))

Despite its advantages, I don't use the style none just yet because of
this issue: http://code.google.com/p/lilypond/issues/detail?id=1259.

-Jay

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


Re: Pitch-bent note's release-phase

2011-06-19 Thread Graham Breed
Richard Sabey richardsa...@hotmail.co.uk wrote:

 But you don't need this problem when a note allocated to
 a channel is followed by a rest in that channel. Is
 Lilypond writing a MIDI pitch wheel change message to
 take effect at the same instant as the MIDI note off
 message? If I'm right (I don't know of any app which
 converts a .mid file into a form I could understand -
 perhaps I'll have to write a C program myself!) then I
 think that Lilypond could produce better MIDI if it sent
 pitch wheel change messages only on demand, i.e.
 together with note on messages, but not also with note
 off messages.

Yes, it does what you say.  It makes the implementation
simpler, on the assumption that pitch bends are going to be
rare.

What I have, hot of the presses, is a script that can take
a MIDI file produced by Lilypond and convert the pitch
bends into MIDI Tuning Standard messages.  It's a widely
ignored standard, but it works with Timidity at least.
Then there's no problem with the tails, and no need to
split chords into independent polyphonic lines.  You can
get it for your favorite version of Python.

Python 2.6+:

http://x31eq.com/addmts.py

Python 3:

http://x31eq.com/addmts.py3

It's a hack, but it works with what I've thrown at it.
There is a problem, in that if two notes are assigned to
the same MIDI key (even in different voices) they'll have
the same tuning.  That makes it possible for C and C# to
become confused.

This highlights an interesting feature of Lilypond's pitch
bend support.  The pitch is always rounded *down* to the
next lowest equally tempered value, and then the pitch bend
applied *upwards*.  That means, for meantone temperaments
where C-C# is less than 100 cents, C and C# will, indeed,
end up with the same key number.  It would make sense if
the pitch were rounded to the *nearest* equally tempered
value instead.  I don't know if this is in the issue
tracker.

If you want to keep pitch bends, it would be fairly easy to
hack my script to write one before every note-on instead of
the MTS message.


   Graham (not that one)

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


Re: Sub-music

2011-06-19 Thread Gilles



http://lsr.dsi.unimi.it/LSR/Search?q=extract



To get the last version and get documentations about the function
extractMusic, please follow this link :
http://lsr.dsi.unimi.it/LSR/Item?u=1id=764

[This snippet is still not approved]

Gilles


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


Re: Sub-music

2011-06-19 Thread Phil Holmes
- Original Message - 
From: Gilles gilles.thiba...@free.fr

To: lilypond-user@gnu.org
Sent: Sunday, June 19, 2011 9:14 PM
Subject: Re: Sub-music





http://lsr.dsi.unimi.it/LSR/Search?q=extract



To get the last version and get documentations about the function
extractMusic, please follow this link :
http://lsr.dsi.unimi.it/LSR/Item?u=1id=764

[This snippet is still not approved]

Gilles



Could you summarise the difference from the previous version for me, please?

--
Phil Holmes 



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


Re: Custom dynamic text spanner without dashed line

2011-06-19 Thread Xavier Scheuer
On 19 June 2011 21:47, Jay Anderson horndud...@gmail.com wrote:

 I use this:

 justDim = #(make-music 'DecrescendoEvent 'span-direction START
 'span-type 'text 'span-text dim. 'tweaks '((dash-period . -1)))
 justCresc = #(make-music 'CrescendoEvent 'span-direction START
 'span-type 'text 'span-text cresc. 'tweaks '((dash-period . -1)))

Great, thanks!

I know how to use tweaks with this event stuff now, thank you.


 Despite its advantages, I don't use the style none just yet because of
 this issue: http://code.google.com/p/lilypond/issues/detail?id=1259.

Funny.
I made a report because I had issues with
  DynamicTextSpanner #'dash-period = #-1
which finally lead to  DynamicTextSpanner #'style = #'none .
http://lists.gnu.org/archive/html/lilypond-user/2010-05/msg00171.html

Issue #1259 is really an issue in this case (rhaa, I don't understand
people rating issues' priority!), but  'dash-period = #-1  has also
some severe drawbacks.
I think I will use a simple  DynamicText  (or even a simple
TextScript !) for now, and then switch when  #1259  will be solved.

Since  DynamicTextSpanner #'dash-period = #-1  is not affected by
#1259 , maybe a talented developer like Neil or Reinhold could solve it
within a not too long future (let's hope).

But thanks again Jay, your answer will help me for tweaking events in
other circumstances.

Cheers,
Xavier

-- 
Xavier Scheuer x.sche...@gmail.com

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


Dynamic + text aligned: BEST solution?

2011-06-19 Thread Xavier Scheuer
Hi,

There are currently different tricks in order to align text and a
dynamic (with the dynamic correctly aligned centered below the attached
note).

The following snippets are providing different solutions (some with
important drawbacks) to this issue/request (useful in many cases!):
http://lsr.dsi.unimi.it/LSR/Item?id=393
http://lsr.dsi.unimi.it/LSR/Item?id=739

but there is also Graham's make-dynamic-extra (see below) and IIRC
Valentin has a pending PATCH for implementing this.

I do not understand what means the Scheme code in each of these, could
someone have a look and tell me which one seems the best (i.e. with
the least possible drawbacks for an implementation)?

Many thanks in advance!

%%% This function was provided by Graham Percival.
#(define (make-dynamic-extra dynamic string)
 (make-music
   'AbsoluteDynamicEvent
   'tweaks
 ;; calculate centering for text
 (list (cons (quote X-offset)
   (+ -0.5 (* -0.5 (string-length dynamic)
   'text
 (markup #:whiteout
   #:line (
   dynamic
   #:hspace -0.3
   #:normal-text #:italic string))
  ))

ffdolce = #(make-dynamic-extra ff dolce)

{ a1 a\ffdolce a }
%%

Cheers,
Xavier

-- 
Xavier Scheuer x.sche...@gmail.com

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


Music running off the page

2011-06-19 Thread Michael Dykes
I have an attached piece of music, and some of the measures are, for lack of
a better term, running off the page. Any help will be appreciated.

-- 
In Christ,
Michael D
\version 2.12.3
\include english.ly
\include gregorian.ly

\header {
  title = Anaphora
  poet = Znamenny Chant
  composer =  Arranged by Michael Dykes
 footer = anap_zn[3]
ponomarname = Anaphora
ponomartype = OwnWork
ponomarsubtype = Arrangement
ponomarsource = Unknown
ponomarauthor = Michael Dykes
maintainer = Michael Dykes
maintaineremail = thedoctor81...@gmail.com
lastupdated = 2011/06/18
ponomarlang = en
ponomarcomments = 
copyright = This score is part of the Ponomar OpenMusic Project
tagline = \markup {
\override #'(box-padding . 1.0) \override #'(baseline-skip . 2.7)
\box \center-column {
  \line { \with-url #http://www.ponomar.net; \line { www. \hspace #-1.0 ponomar \hspace #-1.0 .net \hspace #0.5 } • Orthodox Liturgical music that is \italic free to download, use, modify and distribute. }
  \line { Typeset using \with-url #http://www.LilyPond.org; \line { LilyPond } by \maintainer \hspace #-1.0 . \hspace #0.5 Copyright © 2011. \hspace #0.5 Reference: \footer }
  \line { \teeny \line { Licensed under the Creative Commons Attribution-ShareAlike 3.0 (Unported) License, for details see: \hspace #-0.5 \with-url #http://creativecommons.org/licenses/by-sa/3.0; http://creativecommons.org/licenses/by-sa/3.0 } }
}
  }
}

% #(set-global-staff-size 22)
global = {
  \key f \major
  \time 5/4
  \revert Score.SpacingSpanner #'packed-spacing
  \override Staff.NoteHead #'style = #'altdefault
  \override Staff.TimeSignature #'stencil = ##f
  \override Staff.BarLine #'stencil = ##f
}
move = { \bar  \break }

soprano = \relative c'' {
  \global
  % Music follows here.
  g4 bf(a8 bf c2) bf4 bf bf(a) bf c2 bf8(a) bf4 bf a2(g1) \finalis
  bf4 bf8(g) a(bf) c2(bf8 a bf4 a2) g1 \finalis
  bf4 bf8(g) a(bf) c4 c bf8(a) bf4 a2(g1) \finalis
  
  a8(bf) c4 bf2(a4) g8(f) g4. \divisioMinima
  g8 bf4 bf8 a bf bf bf a bf4 bf8 a bf bf a2 g2 \divisioMaior
  g8 bf4 bf8 bf a bf c4 c \divisioMinima
  c8(bf) a(bf) c4 bf2(a) g1 \finalis
  
  g4.(a8 bf4) bf bf bf bf2 g \divisioMinima
  bf4. bf8 bf a bf2 \divisioMaior
  bf4 bf8 bf bf a bf4 a8 a g4 g4. \divisioMinima
  g8 g4 g a bf c bf2 \divisioMaior
  
  bf8 a bf c4. bf8 c bf a bf2(a4) a8 a g4(a g8 f g2) \divisioMinima
  g4 a(bf c bf a8 bf c4) bf4 a8 bf c2(a8 bf a4) g1 \finalis
  
  g4(a) bf1 \finalis
  g4(a bf2 a4 g8 a bf2 a8 bf a4) g1 \finalis
  
  g4 bf(c) bf4. g8 bf4.(a8) bf2 \divisioMinima
  g8 a bf4 bf8 a bf4. bf8 c2(bf8 a g1) \divisioMaior
  
  g4 a8(bf) c2 c8(bf) a4 bf2 \divisioMinima
  a4 a g8(a bf a bf2 a g\breve \finalis
}

tenor = \relative c' {
  \global
  % Music follows here.
  g4 d'(c8 d ef2) d4 d d(c) d ef2 d8(c) bf4 bf c2(g1) \finalis
  d'4 d8(bf) c(d) ef2(d8 c bf4 c a) bf1 \finalis
  d4 d8(bf) c(d) ef4 ef d8(c) bf4 c2(g1) \finalis
  
  c8(d) ef4 d2(c4) bf8(a) bf4.\divisioMinima
  bf8 d4 d8 c d8 d d c d4 d8 c bf bf c2 g2 \divisioMaior
  g8 d'4 d8 d c d ef4 ef \divisioMinima
  ef8(d) c(d) ef4 d2(c4 a) g1 \finalis
  
  d'2. d4 d d d2 d \divisioMinima
  d4. d8 d c d2 \divisioMaior
  d4 d8 d d c bf4 c8 c g4 g4. \divisioMinima
  bf8 bf4 bf c d ef d2 \divisioMaior
  
  d8 c d ef4. d8 ef d c d2(c4) c8 c bf4(c bf8 a bf2) \divisioMinima
  bf4 c(d ef d c8 d ef4) d c8 d ef2(c8 bf c4) g1 \finalis
  
  bf4(c) d1 \finalis
  bf4(c d2 c4 bf8 c d4 bf c8 bf c4) g1 \finalis
  
  g4 g2 g4. g8 g2 g2 \divisioMinima
  g8 g g4 g8 g g4. g8 g2.~g1 \divisioMaior
  
  bf4 c8(d) ef2 ef8(d) c4 bf2 \divisioMinima
  c4 c bf8(c d c d2 c bf\breve) \finalis
}

bass = \relative c {
  \global
  % Music follows here.
  g'4 g1 g4 g g2 g4 g2 g4 d d f2(g1) \finalis
  g4 g g g2.(d4 c2) g' g1\finalis
  g4 g g g g d d f2(g1) \finalis
  
  g4 g g2. d4 g4. \divisioMinima
  g8 g4 g8 g g g g g g4 g8 g d d f2 g2 \divisioMaior
  g8 g4 g8 g g g g4 g \divisioMinima
  g g g8(a) bf4(g c,2) g1 \finalis
  
  g'4.(a8 bf4) bf4 bf bf bf2 bf \divisioMinima
  g4. g8 g g g2 \divisioMaior
  g4 g8 g g g d4 f8 f g4 g4. \divisioMinima
  g8 g4 g g g g g2 \divisioMaior
  
  g8 g g g4. g8 g g g g2. g8 g g2.(g2) \divisioMinima
  g4 g1~g2 g4 g8 f ef2(f) g1 \finalis
  
  g2 g1 \finalis
  g1(~g2 g4 d f2) g,1 \finalis
  
  g'4 g2 g4. g8 g2 g2 \divisioMinima
  g8 g g4 g8 g g4. g8 g2(d4 g1) \divisioMaior
  
  g4 g g2 g4 g d2 \divisioMinima
  c4 c g1(~g2~g\breve) \finalis
}

verse = \lyricmode {
  \override LyricSpace #'minimum-distance = #1.0
  \override LyricText #'font-size = #+1
  % Lyrics follow here.
  A mer -- cy of peace! A sac -- ri -- fice of praise!
  and with thy spir -- it.
  We lift them up un -- to the Lord.__
  
  It is meet __ and right
  to wor -- ship the Fath -- er, and the Son, and the 
Ho -- ly Spir -- it:
  the Tri -- ni -- ty, One in Es -- sence, and 
un -- di -- vi -- ded.
  
  Ho -- ly! Ho -- ly! Ho -- ly! Lord of Sa -- ba -- oth!
  Heav -- en and Earth are full of Thy 

Re: Sub-music

2011-06-19 Thread Gilles




To get the last version and get documentations about the function
extractMusic, please follow this link :
http://lsr.dsi.unimi.it/LSR/Item?u=1id=764

[This snippet is still not approved]

Gilles



Could you summarise the difference from the previous version for me,  
please?




If you just click on the image of the old and new snippet, you'll see the  
same code, but in the LSR 764, there is a link to a directory where you  
can download the last version.

( http://gillesth.free.fr/Lilypond/extractMusic/ )
A lot of features have been added, and they are all shortly explained in a  
doc.

( http://gillesth.free.fr/Lilypond/extractMusic/extractMusic-doc.pdf ).

Gilles

NB
Well, let me know is something is not clear in the doc, or if some  
sentences are not correct (my english is not as good i would wish).



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


Re: Music running off the page

2011-06-19 Thread Graham Percival
On Sun, Jun 19, 2011 at 06:18:04PM -0400, Michael Dykes wrote:
I have an attached piece of music, and some of the measures are, for lack
of a better term, running off the page. Any help will be appreciated.

Use bar checks |  and you'll find the problem.

Cheers,
- Graham

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


Re: Music running off the page

2011-06-19 Thread Matthew Collett
On 20/06/2011, at 10:18 am, Michael Dykes wrote:

 I have an attached piece of music, and some of the measures are, for lack of 
 a better term, running off the page. Any help will be appreciated.

You need to give it more opportunity to find breaks.  A quick fix, since you 
are not actually using bars, would be to change your time from 5/4 to 1/4.  
Alternatively, for more control, you could sprinkle '\bar' at lots of 
sensible break points (every _divisio_, for a start); to reduce the clutter, 
you could do this by defining 'pipeSymbol = \bar', and then inserting '|'.

(Personally, I would prefer Lilypond to treat _divisiones_ as barlines anyway.  
From a performance point of view they may have a different meaning, but from a 
music formatting point of view they are largely equivalent, including their 
implications for such things as note spacing, the possibility or desirability 
of line breaks and the termination of the effect of accidentals.)

Best wishes,
Matthew


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


Re: Music running off the page

2011-06-19 Thread Carl Sorensen



On 6/19/11 4:18 PM, Michael Dykes thedoctor81...@gmail.com wrote:

 I have an attached piece of music, and some of the measures are, for lack of a
 better term, running off the page. Any help will be appreciated.


I haven't read your .ly file, but whenever measures run off a page, it
generally means that not all the staves have the same rhythm, so there's no
place for lilypond to break a line (at a measure break).  Typically what
will happen is an 8th or 16th note is left out of a measure.

You can usually find these problems easily with bar checks.

HTH,

Carl


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