Back to the drawing board (Sib->Ly)! And question about voices

2006-10-14 Thread Kirill
Ok, gentlemen. Summer is over, back to the drawing board (for those who still
remember, the Sibelius->LyliPond plugin is in works).

The following question might seem a bit unusual, but I'll ask anyway.

Suppose I have a Staff, and two explicitly instantiated Voices in this Staff.
These voices are marked \voiceOne and \voiceTwo, which, in particular, controls
the stem directions. Both voices span for the whole duration of the music,
regardless of whether one of them is actually necessary or not. When there is no
music in one of the voices -- it is padded with hidden rests (like s1*1/2).

Now, the question. Is there a way to make LilyPond automatically choose the
correct stem directions in the first voice based on whether there is something
in the second? For example: imagine a bar where voice 1 has some music, voice 2
is not being used (but exists) and is padded with "s1*...". I want the stems and
everything to behave like there is no voice 2 in this bar. Is it possible?






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


Re: lilypond-book shifts music right relative to text

2006-10-14 Thread Laura Conrad
> "Laura" == Laura Conrad <[EMAIL PROTECTED]> writes:

Laura> I believe this has been discussed before, but I can't
Laura> remember that anyone has figured out a solution.

Laura> If you look at the output of the attached .lytex file,
Laura> after running the commands:

Laura>   lilypond-book --output=out --psfonts test.lytex
Laura>   cd out
Laura>  latex test.tex
Laura>  dvips $(DVIPSOPTS) -h
Laura>   test.psfonts -o ../test.ps test.dvi
Laura>  cd ..
Laura>   ps2pdf test.ps test.pdf

Laura> you can see that the music is shifted right relative to the
Laura> text.

I have played with this problem, and this description is incorrect --
the left margin of the .eps files is in fact the same as the left
margin of the text.  The right margin is different because the eps
file is actually too long.  

The impression of right shifting on first glance is because the
measure numbers in the music take up some space inside the right
margin. 

In any case, this more accurate description of the problem does
suggest a workaround, demonstrated in the attached file.  If you
measure the amount the music sticks out into the right margin, and set
the lilypond line-width to that amount less than the latex line width,
you get a much better looking page.  

2.8.7 and 2.9.23 are bug-compatible with respect to this problem, so
it isn't release-critical, but it is a pretty serious problem for
those of us trying to use lilypond-book for printing books.



bookalign.lytex
Description: Binary data

-- 
Laura (mailto:[EMAIL PROTECTED] , http://www.laymusic.org/ )
(617) 661-8097  fax: (501) 641-5011
233 Broadway, Cambridge, MA 02139
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Setting line width from the command line?

2006-10-14 Thread Laura Conrad

I tried a bunch of variations on the -d option, and haven't found one
that works yet:

$ lilypond -dline-width=\"3\in\" essex-cantus.ly
GNU LilyPond 2.9.23
warning: no such internal option: line-width


And the lilypond process continues, but doesn't set the line width to
3 inches.

-- 
Laura (mailto:[EMAIL PROTECTED] , http://www.laymusic.org/ )
(617) 661-8097  fax: (501) 641-5011
233 Broadway, Cambridge, MA 02139


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


question about your application

2006-10-14 Thread david
One of the main uses of a notation application for me is transposing music 
between keys (playing tenor sax in piano notation for instance)

Is your application able to transpose music to differen keys?

Thanks



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


Re: Connected arpeggios up-down

2006-10-14 Thread Mehmet Okonsar
It works! lots of thanks!
On Thursday 12 October 2006 22:17, Mats Bengtsson wrote:
> My fault! Since you connect arpeggios between the two
> staves of a PianoStaff context, the setting has to be done
> on the PianoStaff level. Just replace Staff with PianoStaff
> in the macro definitions.
> (You can also remove the "\sequential" which is redundant.

-- 
Mehmet Okonsar,
pianist-composer-conductor
www.okonsar.com


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


Why No Page Numbers?

2006-10-14 Thread Mehmet Okonsar
Why don't I get page numbers (on the first page) here?
=
\version "2.9.22"
\include "english.ly"

\paper
{
first-page-number = 1
print-first-page-number = ##t
}
\score {
\new Staff {
c''1
}

}
=
-- 
Mehmet Okonsar,
pianist-composer-conductor
www.okonsar.com


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


Re: question about your application

2006-10-14 Thread Mats Bengtsson

Quoting david <[EMAIL PROTECTED]>:


One of the main uses of a notation application for me is transposing music
between keys (playing tenor sax in piano notation for instance)

Is your application able to transpose music to differen keys?


Of course, as a quick look in the manual reveals.

  /Mats



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


Re: Setting line width from the command line?

2006-10-14 Thread Mats Bengtsson

Run lilypond -dhelp
to see a full list of the options that can be set this way.
(Run lilypond --help or lilypond -h to find out about the -dhelp option).

  /Mats

Quoting Laura Conrad <[EMAIL PROTECTED]>:



I tried a bunch of variations on the -d option, and haven't found one
that works yet:

$ lilypond -dline-width=\"3\in\" essex-cantus.ly
GNU LilyPond 2.9.23
warning: no such internal option: line-width


And the lilypond process continues, but doesn't set the line width to
3 inches.

--
Laura (mailto:[EMAIL PROTECTED] , http://www.laymusic.org/ )
(617) 661-8097  fax: (501) 641-5011
233 Broadway, Cambridge, MA 02139


___
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: spacing in copyright-footer

2006-10-14 Thread Mats Bengtsson

Quoting Ole Hesprich <[EMAIL PROTECTED]>:


Rick Hansen (aka RickH) wrote:


Try inserting the statement shown below immediately prior to your
\column statement.  Then adjust the value of baseline-skip until it
suits your taste:

\override #'(baseline-skip . .5)



Thanks, that works perfect!

Where can I find such information in the manual? Or are there other
places where I have to look at?


In the "Overview of Markup Commands" section, the description of \column
refers to the baseline-skip property. Then you have to scroll down to 
\override to find out how to actually do the setting.


  /Mats



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


Re: Setting line width from the command line?

2006-10-14 Thread Laura Conrad
> "Mats" == Mats Bengtsson <[EMAIL PROTECTED]> writes:

Mats> Run lilypond -dhelp to see a full list of the options that
Mats> can be set this way.  (Run lilypond --help or lilypond -h to
Mats> find out about the -dhelp option).


Would it be possible to add line-width to that list?  Especially if
that's easier than fixing lilypond-book to pick the right line-width?


-- 
Laura (mailto:[EMAIL PROTECTED] , http://www.laymusic.org/ )
(617) 661-8097  fax: (501) 641-5011
233 Broadway, Cambridge, MA 02139


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


Trying to set next-padding to 0

2006-10-14 Thread Stephen Torri
Below is my attempt at setting the next-padding value to 0 in a score so
that the individual measure lines are moving closer to each other. With
the annotate-spacing set to true I don't see next-padding changing to
zero.

What is the proper way to set next-padding?

Stephen

\score {
<<
\overrideProperty #"Score.NonMusicalPaperColumn"
#'line-break-system-details
#'((next-padding . 0))

\chords { \global \harmonies }
\new Voice { << \global \voices >> }
\lyricsto "People" \new Lyrics \firstVerse
\lyricsto "People" \new Lyrics \secondVerse
\lyricsto "People" \new Lyrics \thirdVerse
\lyricsto "Chorus" \new Lyrics \chorusVerse
>>
}

Full lilypond project attached.

Stephen


Victory_in_Jesus.tar.gz
Description: application/compressed-tar
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Making notes in Scheme?

2006-10-14 Thread Marcus Macauley
I see that there are basically two ways to make notes (music) from within  
a Scheme block. As far as I can tell, one way is powerful but cumbersome,  
and the other way is simple but not very powerful. I'm hoping maybe  
there's a third way that I haven't discovered yet, or that the second way  
is more powerful than I know.


Here's an example of the first way:
(from http://lsr.dsi.unimi.it/LSR/Item?id=122 )

% FIRST WAY: %%
#(define (make-note-req p d)
   (make-music 'NoteEvent
'duration d
'pitch p))

#(define (make-note elts)
   (make-music 'EventChord
'elements elts))

#(define (seq-music-list elts)
   (make-music 'SequentialMusic
'elements elts))

fooMusic = #(seq-music-list
 (list (make-note (list (make-note-req (ly:make-pitch 1 0 0)  
(ly:make-duration 2 0
   (make-note (list (make-note-req (ly:make-pitch 1 1 0)  
(ly:make-duration 2 0))


\score { \fooMusic
}

(This is actually a simplification of the full Scheme code. It works, but  
the (make-note) block is still still a lot to type for each note.)




Here's an example of the second way, based on chapter 12.1.1 in the  
documentation:


 SECOND WAY: 
function =
#(define-music-function (parser location string1 string2 firstnote)
(string? string? ly:music?)
#{
  $firstnote d'_\markup { $string1 $string2 }
#})

\score { \function #"foo" #"bar" c'4
\layout { ragged-right = ##t }
}



What the second way is missing (or I haven't figured out how to use it) is  
the ability to choose pitches, durations, etc. using Scheme code. As far  
as I can tell, they must be manually typed within the #{ #} block (e.g.  
"d'") or provided as an argument to the music-function (e.g. "c'4"); they  
can't be generated from Scheme code, without resorting to the long and  
cumbersome (make-music) block demonstrated in way one.


Am I wrong? Is there a way to, for example, define a "ly:music" variable  
in Scheme, or convert a "string" variable to a "ly:music" variable, and  
then use that "ly:music" variable either within a the #{ #} block of a  
music function, or within the main \score block? And if so, is this  
documented somewhere?


Below is an example of the closest I've come to maybe figuring this out,  
but I'd appreciate any help.


Marcus


 Perhaps I'm getting warm here: %%
\version "2.9.23"

thirdnote = { e' }

SomehowThisIdentifierMakesTheNextLineErrorFree = #(ly:export thirdnote)

#(define fourthnote thirdnote)

% This next line doesn't cause an error, but it doesn't seem to do  
anything either:

#(define fifthnote (ly:export #{ g' #}))

function =
#(define-music-function (parser location string1 string2 firstnote)
(string? string? ly:music?)
#{
	  $firstnote d'_\markup { $string1 $string2 } $thirdnote $fourthnote  
$fifthnote

#})

\score { \function #"foo" #"bar" c'4
\layout { ragged-right = ##t }
}
%


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


Re: Trying to set next-padding to 0

2006-10-14 Thread Marcus Macauley

Stephen Torri wrote:

Below is my attempt at setting the next-padding value to 0 in a score so
that the individual measure lines are moving closer to each other. With
the annotate-spacing set to true I don't see next-padding changing to
zero.

What is the proper way to set next-padding?

Stephen

\score {
<<
\overrideProperty #"Score.NonMusicalPaperColumn"
#'line-break-system-details
#'((next-padding . 0))

\chords { \global \harmonies }
\new Voice { << \global \voices >> }
\lyricsto "People" \new Lyrics \firstVerse
\lyricsto "People" \new Lyrics \secondVerse
\lyricsto "People" \new Lyrics \thirdVerse
\lyricsto "Chorus" \new Lyrics \chorusVerse
>>
}


I think I spot a typo:

\overrideProperty should be \outputProperty

(based on  
http://lilypond.org/doc/v2.8/Documentation/user/lilypond/Difficult-tweaks.html  
)


Marcus


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


Re: Trying to set next-padding to 0

2006-10-14 Thread Stephen Torri
Changing the \overrideProperty to \outputProperty at in the master.ly
does not work as the error report below shows.

Stephen

--

Parsing...
master.ly:10:4: error: unknown escaped string: `\outputProperty'

\outputProperty #"Score.NonMusicalPaperColumn"
master.ly:10:4: error: syntax error, unexpected STRING

\outputProperty #"Score.NonMusicalPaperColumn"
master.ly:9:0: error: errors found, ignoring music expression


On Sat, 2006-10-14 at 23:29 -0400, Marcus Macauley wrote:
> > \overrideProperty #"Score.NonMusicalPaperColumn"
> > #'line-break-system-details
> > #'((next-padding . 0))
> >
> > \chords { \global \harmonies }
> > \new Voice { << \global \voices >> }
> > \lyricsto "People" \new Lyrics \firstVerse
> > \lyricsto "People" \new Lyrics \secondVerse
> > \lyricsto "People" \new Lyrics \thirdVerse
> > \lyricsto "Chorus" \new Lyrics \chorusVerse
> > >>
> > }
> 
> I think I spot a typo:
> 
> \overrideProperty should be \outputProperty
> 
> (based on  
> http://lilypond.org/doc/v2.8/Documentation/user/lilypond/Difficult-tweaks.html
>   
> )
> 
> Marcus



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


Re: Setting line width from the command line?

2006-10-14 Thread Mats Bengtsson

With lilypond-book, you can easily override the line width
using
\begin[line-width=10\cm]{lilypond}
...
\end{lilypond}

 /Mats

Laura Conrad wrote:


"Mats" == Mats Bengtsson <[EMAIL PROTECTED]> writes:
   



   Mats> Run lilypond -dhelp to see a full list of the options that
   Mats> can be set this way.  (Run lilypond --help or lilypond -h to
   Mats> find out about the -dhelp option).


Would it be possible to add line-width to that list?  Especially if
that's easier than fixing lilypond-book to pick the right line-width?


 




--
=
Mats Bengtsson
Signal Processing
Signals, Sensors and Systems
Royal Institute of Technology
SE-100 44  STOCKHOLM
Sweden
Phone: (+46) 8 790 8463 
   Fax:   (+46) 8 790 7260
Email: [EMAIL PROTECTED]
WWW: http://www.s3.kth.se/~mabe
=



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


Re: Back to the drawing board (Sib->Ly)! And question about voices

2006-10-14 Thread Mats Bengtsson

Possibly, \partcombine can handle this, otherwise I'm afraid
the best solution is to implement a music function in Scheme
that goes through the music and adds \voiceOne and \oneVoice
at the appropriate places.

At second thought, I guess you generate the .ly file from your
program, so what you really want is to be able to specify
\voiceOne / \oneVoice for the upper Voice context while
generating the .ly code for the lower Voice. In that case, one
possible solution would be to define your own macros that do
the same as \voiceOne and \oneVoice but do the settings at the
Staff context level instead of Voice level. Then, for the lower voice,
you can still use \voiceTwo, since settings at the Voice level will
override those from the Staff level. Then you can generate code like
lower_voice = {\voiceTwo some music \oneVoiceInStaff s1*5
\twoVoicesInStaff more music ...}

  /Mats

Kirill wrote:


Ok, gentlemen. Summer is over, back to the drawing board (for those who still
remember, the Sibelius->LyliPond plugin is in works).

The following question might seem a bit unusual, but I'll ask anyway.

Suppose I have a Staff, and two explicitly instantiated Voices in this Staff.
These voices are marked \voiceOne and \voiceTwo, which, in particular, controls
the stem directions. Both voices span for the whole duration of the music,
regardless of whether one of them is actually necessary or not. When there is no
music in one of the voices -- it is padded with hidden rests (like s1*1/2).

Now, the question. Is there a way to make LilyPond automatically choose the
correct stem directions in the first voice based on whether there is something
in the second? For example: imagine a bar where voice 1 has some music, voice 2
is not being used (but exists) and is padded with "s1*...". I want the stems and
everything to behave like there is no voice 2 in this bar. Is it possible?






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




--
=
Mats Bengtsson
Signal Processing
Signals, Sensors and Systems
Royal Institute of Technology
SE-100 44  STOCKHOLM
Sweden
Phone: (+46) 8 790 8463 
   Fax:   (+46) 8 790 7260
Email: [EMAIL PROTECTED]
WWW: http://www.s3.kth.se/~mabe
=



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


Re: Back to the drawing board (Sib->Ly)! And question about voices

2006-10-14 Thread Kirill
Mats Bengtsson  ee.kth.se> writes:

> 
> Possibly, \partcombine can handle this, otherwise I'm afraid
> the best solution is to implement a music function in Scheme
> that goes through the music and adds \voiceOne and \oneVoice
> at the appropriate places.
> 
> At second thought, I guess you generate the .ly file from your
> program, so what you really want is to be able to specify
> \voiceOne / \oneVoice for the upper Voice context while
> generating the .ly code for the lower Voice. In that case, one
> possible solution would be to define your own macros that do
> the same as \voiceOne and \oneVoice but do the settings at the
> Staff context level instead of Voice level. Then, for the lower voice,
> you can still use \voiceTwo, since settings at the Voice level will
> override those from the Staff level. Then you can generate code like
> lower_voice = {\voiceTwo some music \oneVoiceInStaff s1*5
> \twoVoicesInStaff more music ...}
> 
>/Mats
> 


Thanks, Mats.

That's exactly what I have done yesterday.
Now, the script generates the voices as before, except:
1) Voice 2 has always \voiceTwo command in the beginning.
2) Voice 1 has \voiceOne when some music appears in voice 2, and \oneVoice
command is generated whenever voice 2 disappears (i.e. has s1 rests).

This works fine.

(Now I do not understand the rest of your message: why do I need
"\oneVoiceInStaff" in the second voice?)






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


Re: Back to the drawing board (Sib->Ly)! And question about voices

2006-10-14 Thread Mats Bengtsson

Quoting Kirill <[EMAIL PROTECTED]>:


Mats Bengtsson  ee.kth.se> writes:



Possibly, \partcombine can handle this, otherwise I'm afraid
the best solution is to implement a music function in Scheme
that goes through the music and adds \voiceOne and \oneVoice
at the appropriate places.

At second thought, I guess you generate the .ly file from your
program, so what you really want is to be able to specify
\voiceOne / \oneVoice for the upper Voice context while
generating the .ly code for the lower Voice. In that case, one
possible solution would be to define your own macros that do
the same as \voiceOne and \oneVoice but do the settings at the
Staff context level instead of Voice level. Then, for the lower voice,
you can still use \voiceTwo, since settings at the Voice level will
override those from the Staff level. Then you can generate code like
lower_voice = {\voiceTwo some music \oneVoiceInStaff s1*5
\twoVoicesInStaff more music ...}

   /Mats




Thanks, Mats.

That's exactly what I have done yesterday.
Now, the script generates the voices as before, except:
1) Voice 2 has always \voiceTwo command in the beginning.
2) Voice 1 has \voiceOne when some music appears in voice 2, and \oneVoice
command is generated whenever voice 2 disappears (i.e. has s1 rests).

This works fine.

(Now I do not understand the rest of your message: why do I need
"\oneVoiceInStaff" in the second voice?)


Just if you had some program and data structure so that voice 1 was 
already generated and forgotten at the time when you generated the .ly

code for voice 2, but apparently that's not the case.

   /Mats



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