Re: showLastLength as a command-line option?

2008-09-27 Thread Jonathan Kulp
Well, I didn't get enough info from this posting to do what I originally 
wanted to do (i.e. hack Lilypond itself to add this option--it would 
have been enough if I knew anything about programming, I guess), but 
I've come up with a way to specify showLastLength at the command line 
using the script that I normally use to invoke lilypond.  This works 
equally well on Mac and Linux.  I guess it would take something 
completely different to work on Windows, though.  Don't really know 
about that.


So I've added some code that allows use of an argument that is captured 
and passed to a temporary file so it can be used by a lilypond source 
file.  To make use of this function, add the following line near the top 
of your source file:


\include showlast.ly

You don't actually have to *have* the showlast.ly file anywhere on your 
system, as it's created on the fly by the script, so that it's present 
when lilypond is called, and then when the script is done, the 
showlast.ly file is deleted.  Specify the duration of the last length 
the same way you would if you were putting it in your source file.  R1*8 
is eight whole-rest bars.  R2.*8 would be 8 bars of dotted-half-rests. 
Here's an example of how to run it:


lily -l=R1*12 filename.ly

The R1*12 value is passed to the temporary file, and when lilypond is 
called, it only renders the last 12 bars.


If you just do lily filename.ly, then the script creates an empty 
showlast.ly file so that no showLastLength variable is set and the 
source file is run normally.


Now, I've specified acrobat reader for previewing the file in Linux so 
if you prefer another viewer you can say xdg-open or evince in its 
place.  On Mac I use the default Preview app.


Give it a try!

Jon

Jonathan Kulp wrote:
Thanks for replying, Han-Wen.  I can't find showLastLength anywhere in 
that file, though.  Searches for showlast and show-last came up empty. 
It looks like the file is inside the SCM directory but I can't tell 
where.  Here's the search I did:


[EMAIL PROTECTED]:/usr/local/share/lilypond/2.11.59/scm$ cat *.scm | grep 
-i showlast

 LENGTHOF(\\showLastLength)
  ((show-last  (ly:parser-lookup parser 'showLastLength)))

So it shows that showLastLength is there, but it doesn't say which file 
it's in (my skills at the shell are such that I don't know how to make 
it tell me this.  Sigh...).  Can you tell from this output where it is?


Jon

Han-Wen Nienhuys wrote:
Can anyone point me in the right direction to accomplish this great 
idea?!

;)




Would it be possible technically to specify the showLastLength value
when
invoking lilypond instead of putting it in the .ly file?  
Something like



look at lily.scm to see where the -d options are defined.  At some
point showLastLength is initialized; that's where you should do

  (ly:get-option 'show-last-length)






--
Jonathan Kulp
http://www.jonathankulp.com
#!/bin/bash

##
# This script runs lilypond on a specified file, keeping all #
# output files in the same directory as the source file  #
##
# Usage: This script allows for the use of the showLastLength
# function of Lilypond, where it only runs the last x number of
# measures instead of the whole thing.  To take advantage of this,
# YOU MUST PUT THE FOLLOWING LINE NEAR THE TOP OF YOUR SOURCE FILE:
#
#   \include showlast.ly
#
# Then use the -l flag with an argument in the following format:
#
#   lily -l=R1*12 filename.ly   (12 whole-rest bars)
#   lily -l=R2.*12 filename.ly  (12 dotted-half-rest bars)
#
# Without the -l option, the file should run as usual.
#~~
# getopt_simple - Orig by Chris Morgan, stolen from
# the ABS Guide and modified a bit
#~~
getopt_simple()
{
until [ -z $1 ] ; do
if [ ${1:0:1} = '-' ] ; then
tmp=${1:1}   # Strip off leading '-' . . .
if [ ${tmp:0:1} = '-' ] ; then
tmp=${tmp:1} # Allow double -
fi
parameter=${tmp%%=*} # Extract name.
value=${tmp##*=} # Extract value.
eval $parameter=$value
else
filename=$1
fi
shift
done
}

length='no'
l='no'

quiet='no'
q='no'

getopt_simple $@

if [ $q != 'no' ] ; then
quiet=$q
fi
if [ $quiet != 'no' ] ; then
quiet='Y'
exec  /dev/null
fi

# determine whether the flag is there.  If not then dump
# a % into the showlast.ly file.  If so, then dump the
# showLastLength variable into it.

if [ $l == no ] ; then
echo %  ~/showlast.ly
  elif [ $value != no ] ; then
LENGTH=$value
echo showLastLength=$LENGTH  ~/showlast.ly 
fi

#*#
# Get all the filename info here  #
#*#

# determines the source filename
srcfile=$(basename

Re: setting --png in an .ly file (without using command line)?

2008-09-27 Thread Jonathan Kulp
Well, I'm not sure if this will do exactly what you want, but you might 
be able to tweak it where it will.  Patrick Horgan has been helping me 
write a program that converts lilypond files into image files (many 
formats supported), and I think I'm ready to share it with the userlist 
again. One of its key functions is cropping images to remove all the 
excess white space if you want to put the images into a web page or 
document or something like that.  If you don't want it cropped, though, 
you can probably just comment out the relevant lines in the script. 
With this tool, your command can be as simple as this:


lily2image -q filename.ly

The -q flag (quiet mode) makes it default to png format at 150 DPI 
resolution.  You can specify different formats (gif, jpeg, tiff, pcx, 
bmp, and many others) and resolutions (pretty much any res you want) 
with -f and -r flags, and you can even make it have a transparent 
background.  It relies on the netpbm package of image tools, which you 
can get from Linux repositories, or from MacPorts if you're a Mac user. 
 This script runs equally well on Linux or Mac OSX.


I'll attach the script and the html version of the manpage.

Jon

Mark Polesky wrote:

When I want .png output, I usually type something like this
in the command line:

lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts
--png my_file.ly

Is it possible to do all of this from inside the .ly file?
Using the ly:set-option command, I can do most of it:

#(ly:set-option 'backend 'eps)
#(ly:set-option 'gs-load-fonts #f)
#(ly:set-option 'include-eps-fonts #t)

But I can't figure out how to set --png from within the file.
Can I?

Thanks,
Mark



  



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



--
Jonathan Kulp
http://www.jonathankulp.com
#!/bin/bash
#**#
# Script for making image files from lilypond source suitable for use as   #
# musical examples to insert in a document or web page.#
# Creator   - Jonathan Kulp#
# Scripting Guru- Patrick Horgan   #
#**#
# Change log
#
# 1.2   Added loop to image conversion to accommodate lilypond files that 
#   have more than one page. It loops until it has converted each of 
the 
#   png files output by Lilypond.  
# 1.1.1.12  Added final exit 0 status at end of file; updated manpage
# 1.1.1.11  Added jpg=jpeg, tif=tiff when values set at command line; added
#   echoes of netpbm activity and echoes at end of process.
# 1.1.1.10  -V implies -p ph
# 1.1.1.9   Added range check to getnumval ph
# 1.1.1.8   -p flag is now necessary for preview--image is not opened in 
#   viewer by default. jk
#   Quiet mode is really quiet as long as sufficient parameters are
#   set at command line for process to succeed. jk
# 1.1.1.7   Added -p flag: allows forced preview even in quiet mode. jk
#   Made quiet mode more quiet. jk
# 1.1.1.6   Changed the call to Lilypond on OSX by defining $PATH
#   early in the script. Changed Patrick's Johnny Come Lately to
#   Major Contributor :) and added a few echoes when formats,
#   resolutions, and so forth are set. We could remove these if you 
#   they're too much. jk
# 1.1.1.5   Added -w option to specify white background and avoid prompt for
#   transparency jk
# 1.1.1.4   Added lines to clean up png file if desired format is not png. jk
# 1.1.1.3   Changed list of Darwin viewers--Darwin doesn't have eog and evince
#   Added quiet mode -q (I think it works!) jk
# 1.1.1.2   Fixed handling of dirs and files with spaces ph
# 1.1.1.1   Added search for default list of viewers ph
# 1.1.1 Added -a, -V and much comments changed default viewer to xdg-open ph
# 1.1   Added checking of return codes so we could
#   abort if something failed. ph
# 1.0   Initial beta release jk
#~~~
# in quiet mode exits with various return codes from
# failures
# 40 - transparency not set and no default
# 41 - format not set and no default
# 42 - resolution not set and no default
# 43 - netpbm utilities not installed
# 44 - unable to find conversion program for desired output
# 45 - resolution from command line not positive numeric
# 46 - format from command line invalid
# various - if any of the programs we call fail, we
#   exit with whatever error code they returned
#~~~
# setformatlist - gets the list of all the things that # you can convert

Re: showLastLength as a command-line option?

2008-09-27 Thread Jonathan Kulp
Thanks Valentin.  The script will serve me for the time being, but it'd 
be great to have this available without a script :)


Jon

Valentin Villenave wrote:

2008/9/27 Jonathan Kulp [EMAIL PROTECTED]:

Well, I didn't get enough info from this posting to do what I originally
wanted to do (i.e. hack Lilypond itself to add this option--it would have
been enough if I knew anything about programming, I guess)


Well, sooner or later someone will find a way to implement this.

Anyway, I'm adding this to the tracker to make sure it isn't forgotten.

http://code.google.com/p/lilypond/issues/detail?id=686

Cheers,
Valentin



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: [Fwd: Re: insert blanc first page with page-turn-breaking]

2008-09-26 Thread Jonathan Kulp
Whoa!!  That is an awesome tool!!!  I just tried the burst function to 
break up a pdf into individual pages and it's great!  Many thanks for 
the heads-up about this tool, Alexander.  I'd never heard of it before.


Jon

Alexander Kobel wrote:

Uh, wanted to give this to the list, too.

Besides, you might want to change the first page number:
http://lilypond.org/doc/v2.11/Documentation/user/lilypond/Page-formatting#Other-layout-variables

(Not sure whether this is done automatically; I never had to use this
feature so far...)




Subject:
Re: insert blanc first page with page-turn-breaking
From:
Alexander Kobel [EMAIL PROTECTED]
Date:
Fri, 26 Sep 2008 17:29:09 +0200
To:
[EMAIL PROTECTED]

To:
[EMAIL PROTECTED]


Toine Schreurs wrote:

The page-turn-breaking does a marvellous job. If necessary, the output
starts at page 2. 
Is it possible to insert a blanc first page in that case?

I want to print the results with a duplex printer, and without
the first blanc page, all page turns turn out to be wrong.

Toine Schreurs


As far as I know there is no option offered by LilyPond to do so, but
you might want to look at pdftk: http://www.accesspdf.com/pdftk/
You need a document with a blank page in the size of your sheets
(OpenOffice is your friend), then run
pdftk blank.pdf music.pdf cat output music-with-blank.pdf

Besides, you can also extract parts of PDFs, for example to manually
duplex and want to split your document in odd and even pages, or edit
the meta tags of the file. It's just a great tool.


HTH
Alexander





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


--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Printing problem with Evince

2008-09-24 Thread Jonathan Kulp
I have only a couple of non-free apps on my Ubuntu machines, and Acrobat 
Reader is one of them because of this problem.  :(


Jon

p.s. BTW, Apple's Preview also seems to render lilypond-generated .pdf 
files badly compared to Acrobat Reader.  At least when I print them they 
look terrible from Preview.


Francisco Vila wrote:

2008/9/24 Johan Vromans [EMAIL PROTECTED]:

I noticed that Evince (I have Fedora 8 with Evince 2.20.2) does a
lousy job on printing LilyPond scores. It may do a bad job on other
prints as well, but the effect on LilyPond scores is dramatic.

See for yourself: http://www.squirrel.nl/pub/xfer/lpev.png .

Image left is scanned from a print by Acrobat, the image right is a
scan from a print produced by Evince. Both programs printed to the
same 600dpi HP Laserjet which involves a Ghostscript filter.

This may be a known issue, though I could not find any references to
it.

-- Johan
  Chord is alive! http://chordii.sourceforge.net


I reported the same problem with very similar pictures. This seems to
be a fault of the bad rendering Evince does from the thin rounded
rectangles that LilyPond makes for barlines. Use kpdf. :-(


--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Removing bundled LilyPond

2008-09-24 Thread Jonathan Kulp

This came up in a thread a little while back.  Read here:

http://www.archivum.info/lilypond-user@gnu.org/2008-08/msg00725.html

Hope it helps...

Jon

notesetter wrote:

I'd like to remove LilyPond 2.10.33, which came bundled with Ubuntu Studio
8.04 and then install 2.11.59. I ran the install shell script and 2.11.59
installed in my home directory fine. However, when I go to use it, the
'lilypond' command still invokes version 2.10.33. I started to remove the
old version through synaptic, but it also tries to remove other packages
that I want to keep like rosegarden and some others that I think I shouldn't
remove.

This appears to present me 3 options:

1) Install 2.11.59 via shell script and alter my system so that the command
'lilypond' points to the new installation in my home directory.

2) Uninstall the packages lilypond, rosegarden, ubuntu-studio audio and the
others it synaptic says I have to remove if I remove LilyPond so that I may
install and use 2.11.59.

3) Continue to use version 2.10.33.

The first option seems workable, if there's a way to do it. The latter two
options are really not viable, since I may want to use Rosegarden in the
future and I would like to take advantage of the newer version of LilyPond.
Are there other options that I'm missing? Is there a more correct way to
go about this?

Also, someone on the Ubuntu Studio user list mentioned making a .deb package
for LilyPond that would presumably solve this problem. I've also asked about
that in the past on this forum. It would be convenient if one could install
LilyPond through a package manager like a lot of other Debian/Ubuntu
applications. If I have the time (and I think I do), I would be willing to
learn to do this work myself, provided it's within my limited (but hopefully
expaning) scope. I would probably only commit to making a package for stable
releases though.

Does anyone else think this is a good idea?

Thanks,

Dave

-
David Stocker
[EMAIL PROTECTED]
www.thenotesetter.com


--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Printing problem with Evince

2008-09-24 Thread Jonathan Kulp
Hmm.  I changed the print driver to a ps one.  That driver wasn't 
available when I was using the cups interface to hook up to the 
printer--very limited options for drivers on Mac's cups system--but once 
the printer was installed that way I was able to reconfigure using the 
regular OSX interface.  I printed a page from Preview and it looks 
great.  :)


I know I was using a ps driver when I got fuzzy edges, though, because I 
printed an orchestral score on 11x17 paper, and I'm certain that I set 
that printer up using a ps driver--it's the only one in our dept. that 
handles 11x17 paper, and I always set it up with care.  I don't even 
recall now whether I was using Preview or Acrobat when I printed the big 
score, but you can see all kinds of fuzzy edges if you look closely. 
Maybe I need to specify a higher resolution when running Lilypond on 
this file?  The global staff size is set to 16.  Do you think this is 
why it could be printing with fuzzy edges?  Doesn't seem likely but I 
suppose it's possible...


Jon

Alexander Kobel wrote:

Jonathan Kulp wrote:

I haven't looked very far into it.  I use Preview for previewing things,
because as you say it's very fast, but if I have to print it and make it
look good, I use Adobe Reader.  It's probably the print driver, because
when I zoom in on-screen everything looks great on Preview.  Maybe I'll
redo the printer setup.


Well, than it is strange that the Adobe reader does a better job. Does
Adobe rasterize everything before printing by default?



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Printing problem with Evince

2008-09-24 Thread Jonathan Kulp
Well, I've figured out my problem on Mac, anyway.  I had the same 
printer installed twice but with different drivers (one bad) and I had 
chosen the wrong instance from the dropdown menu.  I've deleted the bad 
one and now printouts look lovely from either Preview or Acrobat. :)


Jon

Francisco Vila wrote:

Please note that this has nothing to do with actual printing, Evince
shows this problem in preview too.

I'll pass you an URL of the bug.


--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: same pages in a4 and letter

2008-09-22 Thread Jonathan Kulp
Awesome!!  I like it, Graham!  Worked perfectly with that command. 
Thanks for sharing.


Jon

Graham Percival wrote:

Sorry!  I've added
% run with
%   lilypond -d letter spacing-a4-letter.ly
% for letter size
to the top of the file.

This produces a warning that no such internal option: letter, which
I'd like to get rid of, but it works all the same.

Cheers,
- Graham


On Mon, 22 Sep 2008 07:40:10 -0500
Jonathan Kulp [EMAIL PROTECTED] wrote:


Hi Graham,

This is a really good idea.  I'm not sure if I'm doing it right,
though. No matter whether I just run the file without options or if I
use

lilypond -dpaper-size=\letter\ spacing-a4-letter.ly

the file info says the paper is A4 Portrait size.  Did I invoke it 
correctly to get letter size?


Jon

Graham Percival wrote:

I'm preparing my old scores for online publication, but I'm
extremely fussy about engraving.  I want users on both sides of
the Atlantic to be able to print my music easily, but this only
works if the music looks in the same in A4 and Letter paper.
(having page turns in random places is *not* acceptable to me :)

The attached file achieves this:
- creates A4 (default) or letter (from a command-line option)
// shamelessly stolen from Nicholas Sceaux's scores

- automatically adjusts the margins such that there's at least a
  1cm margin.  A4 has smaller horizontal margins, letter has
  smaller vertical margins.

- produces a usable area (for headers, music, text) of 190mm by
  259mm.

Let me know if you can think of any improvements; I'll add it to
LSR when I'm reasonably confident that this is the best way to go
about this.

Cheers,
- Graham





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

--
Jonathan Kulp
http://www.jonathankulp.com




--
Jonathan Kulp
http://www.jonathankulp.com


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


showLastLength as a command-line option?

2008-09-22 Thread Jonathan Kulp
Would it be possible technically to specify the showLastLength value 
when invoking lilypond instead of putting it in the .ly file?  Something 
like


lilypond --lastlength=20 filename.ly

to process only the last 20 bars?  The problem with this particular 
example (and maybe with trying to do this at all) is that it doesn't 
specify the length of each bar, but it could be set to a default of R1 I 
guess.


My original idea was to try to put this into a shell script, but I don't 
have the slightest idea how to go about it.  I'm not a programmer but am 
starting to get some basic scripting chops and I'd like to learn how to 
customize my lilypond experience a bit further.  This is a feature I'd 
LOVE to have.  I'd appreciate any advice or suggestions.


Jon
--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: same pages in a4 and letter

2008-09-22 Thread Jonathan Kulp
Wasn't it a scheme to preserve page-turns and other important formatting 
when switching from A4 to Letter?


Jon

Patrick Horgan wrote:

Neil Puttock wrote:

...some stuff elided...
This is rather nifty, but you're reinventing the wheel. :)

Why not use the built-in option instead, i.e., run with 
-dpaper-size=letter?
  
because he wanted to be able to switch back and forth via command line 
argument without editing the file.


Patrick


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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: showLastLength as a command-line option?

2008-09-22 Thread Jonathan Kulp
Can anyone point me in the right direction to accomplish this great 
idea?! ;)


Jon

Patrick Horgan wrote:

Valentin Villenave wrote:

2008/9/22 Jonathan Kulp [EMAIL PROTECTED]:
  

Would it be possible technically to specify the showLastLength value when
invoking lilypond instead of putting it in the .ly file?  Something like



Yes! Great idea!

(my useless post du jour :-)
  

Wow!!!  Exceptional response to a great idea!

(my contentless reply to your useless post du jour ;-)

regards,

Patrick


--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: showLastLength as a command-line option?

2008-09-22 Thread Jonathan Kulp
Thanks for replying, Han-Wen.  I can't find showLastLength anywhere in 
that file, though.  Searches for showlast and show-last came up empty. 
It looks like the file is inside the SCM directory but I can't tell 
where.  Here's the search I did:


[EMAIL PROTECTED]:/usr/local/share/lilypond/2.11.59/scm$ cat *.scm | grep 
-i showlast

 LENGTHOF(\\showLastLength)
  ((show-last  (ly:parser-lookup parser 'showLastLength)))

So it shows that showLastLength is there, but it doesn't say which file 
it's in (my skills at the shell are such that I don't know how to make 
it tell me this.  Sigh...).  Can you tell from this output where it is?


Jon

Han-Wen Nienhuys wrote:

Can anyone point me in the right direction to accomplish this great idea?!
;)




Would it be possible technically to specify the showLastLength value
when
invoking lilypond instead of putting it in the .ly file?  Something like



look at lily.scm to see where the -d options are defined.  At some
point showLastLength is initialized; that's where you should do

  (ly:get-option 'show-last-length)




--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: png cropping

2008-09-19 Thread Jonathan Kulp
This is a good idea.  I tried it and it behaves exactly the same as 
before.  I had wondered about this, not with respect to the different 
file formats, but with different desktop environments.  I imagine eog 
wouldn't behave properly in KDE, for example.  Does xdg-open work for 
KDE?  Or does that little g stand for gnome still?  The next thing I 
want to do with the script is make it check to see whether the user is 
running Linux or Mac OSX and execute the proper command.  I should also 
make a condition for different desktop environments I guess.  Thanks,


Jon

Mark Knoop wrote:

On Thu, 2008-09-18 at 17:41 -0700, Patrick Horgan wrote:
Of course if you pick one that eog doesn't know how to display it 
will complain. 


Perhaps replace eog with xdg-open for better portability?

xdg-open - opens a file or URL in the user’s preferred application




--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: png cropping

2008-09-19 Thread Jonathan Kulp
Ok I've caught on to your version-control comments at the top and have 
started adding to them.  This time I added two things to the script:


1) recognition of the computer's OS (only Linux or Mac at this point), 
and appropriate changes to the commands to accommodate.  After this 
change, the script works exactly the same (from user's perspective) on 
both my Ubuntu and Mac OSX 10.4 systems :)  I used to have to keep 
separate versions of the script for each one.


2) added a known issue comment that the script doesn't handle spaces 
in directory names.  It fails at line 43 (cd $currentdir) if the 
directory of the lilypond source file has a space in the name.


Patrick Horgan wrote:

Jonathan Kulp wrote:

Patrick!  It's all working beautifully now.
I must say that you are most awesomely cool.  How wonderful to find someone that 
digs in in the best linux/Unix tradition and puts together a string of programs 
to achieve a desired result.  Hats off to you.


Working on this script is making me understand the genius of the Unix 
model.  Someone with no programming experience like me can make 
something that gets a job done using a bunch of tiny tools.  Really fun!



... much cool stuff elided...
p.s. now that we have a tool with a version number, I might try learning how 
to write a brief manpage for it.  Good idea?
A most excellent idea!  manedit is your friend.  Complete wysiwyg man editor.  
Its help has a complete and easy tutorial.  On ubuntu it's just *sudo apt-get 
install manedit*.  Since you're doing that I'm adding a -a (about) with your 
name and mine, some more comments so others can modify it more easily, and will 
call it version 1.1.1.  I also added a -V=viewer, so I could use, for example 
evince if the output format was ps.  N.B. evince doesn't display transparency so 
if you use it with transparent gifs or pngs you might think the transparency 
gone, but it's not.



Cool.  I'll try this after the kids are in bed tonight.

One feature it really needs is an ability to handle the situation where the 
output for file.ly is for example, file-page1.png and file-page2.png.  You'd 
have to get a wildcard list of things that matched $STEM*.png and loop over them 
to do the conversions, then something like $viewer $STEM*.$FORMAT  at the end.  
That would make it work as it currently does for most things, there'd just be 
one thing in the list, but still work for the case where there's something 
there.  A generic wildcard is best because someone might have done a #(define 
output-suffix blablabla) and we want to support that case too.  eog will bring 
up all the pages and let you page up and page down through them, and evince will 
bring a a window for each file.  There's enough examples in the script so that 
you could figure out how to do it if you would.  We could call it 1.1.2;)  If 
you don't have time let me know and I'll get to it sometime.  If you do, change 
the version in the script, add to the changelog at the top and send me a copy:)  
Maybe we could donate it to the lilypond project.


Patrick

Yes.  I haven't thought much about multiple-page documents yet because 
for me the object of the script is to produce small images of musical 
examples to use in a research paper or on a website.  Are there 
situations where you want multiple-page examples with whitespace cropped 
like this?  I could see where it'd be nice to make a longer document's 
background transparent.  It's certainly worth a try to deal with a 
longer file.  The more flexible the script is, the better, after all. 
I'll poke around with it this weekend, perhaps.


Most recent version attached.

Jon

--
Jonathan Kulp
http://www.jonathankulp.com
#!/bin/bash
#*#
# Script for making image files from lilypond source  #
# suitable for use as musical examples to insert in a #
# document or web page.   #
# Creator  - Jonathan Kulp#
# Johnny come lately assistant - Patrick Horgan   #
#*#
# Change log
#
# 1.1.2 Added platform recognition--Darwin or Linux
#   Known issue: does not handle spaces in directory names
# 1.1.1 Added -a, -V and much comments
# 1.1   Added checking of return codes so we could
#   abort if something failed.
# 1.0   Initial release
# 
#~~
# setformatlist - gets the list of all the things that
# you can convert to
#~~
setformatlist()
{
currentdir=`pwd`# Remember our current directory
examp=`which ppmtojpeg` # find out where the progs are
returnstatus=$?
if [ $returnstatus -eq 0 ] ; then
OUTDIR=`dirname $examp` #grab the directory
cd $OUTDIR  # change to it so we can
# find all the programs starting with ppmto
# and remove the initial part so that we can 
# figure out

Re: png cropping

2008-09-19 Thread Jonathan Kulp
Thanks for trying it out, Josh!  Glad to hear it worked for you on OSX. 
  Patrick has been dealing with the flags, and I don't really 
understand how to do them, so my very dirty solution would be simply to 
comment out the last bit of the script that opens the file :).  I can 
see how this would be tiresome if you were running it on a bunch of files.


Jon

Josh Parmenter wrote:
I've been following this, and just tested the latest version on OSX... 
quite nice guys!


Perhaps the -V flag can be set to not open the image after it is done? 
This utility will be great for mass creating images (as most command 
line tools are), but having Preview open each one up will get very 
tiring... perhaps if the is no -V passed in, that step can be skipped?


Again - quite nice!

Josh


--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: png cropping

2008-09-18 Thread Jonathan Kulp

Hi Patrick,

I've been running your script trying to use the command-line arguments, 
and something's happening with the format argument.  I specify it with 
an argument, but then I still get prompted for format.  I might not be 
doing the flag right.  I've tried it with -f=jpeg, -f=JPEG, -fJPEG, and 
I think that's it.  I'll copy the terminal output below so you can see. 
 On this example I use -fGIF and while it doesn't make the script fail, 
it does still ask me for a format.  Am I specifying the format wrong?


BTW, in the script I attached to the last email, you'll notice that with 
transparent background you have a choice between either png or gif--it's 
not forced to png.  Is there a way to work this option into your version?


Jon

[EMAIL PROTECTED]:~/Documents/Composition/Guitar$ lilytoimage 
dc1-passage.ly -r=300 -fGIF

Resolution set to 300 dots per inch.
Transparency? y/N  n
Enter desired output format (jpeg, png, tiff, gif, pcx, bmp):  gif
GNU LilyPond 2.11.59
Processing `dc1-passage.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Interpreting music...
MIDI output to `dc1-passage.midi'...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `dc1-passage.ps'...
Converting to PNG...
ppmtogif: computing colormap...
ppmtogif: 79 colors found
[EMAIL PROTECTED]:~/Documents/Composition/Guitar$


Patrick Horgan wrote:

Jonathan Kulp wrote:


I'm attaching a new version of my version of your script with that change and a 
new routine, getval,  that validates input, you use it like:


 prompt= Enter desired output format (jpeg, png, tiff, gif, pcx, bmp): 

 goodvals=(jpeg png tiff gif pcx bmp)

 getval

 FORMAT=$outval


If the user enters something that's not on the goodvals list, for example joe, 
it reprompts them after telling them what they might have entered:


Enter desired output format (jpeg, png, tiff, gif, pcx, bmp):  joe

Expecting one of : jpeg  png  tiff  gif  pcx  bmp  

Enter desired output format (jpeg, png, tiff, gif, pcx, bmp):  


 Cool, no?  I suppose I should add validation to the command line arguments as 
well.
Ok, just did that, resolution checked for numeric both on input and from the 
command line, format checked for one of the allowable things, and check to make 
sure there's a filename, and print meaningful error message and a usage 
statement.  Try it and see if it works for you.

--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: png cropping

2008-09-18 Thread Jonathan Kulp
Patrick!  It's all working beautifully now.  I've tried about 10 
different configurations of options using both the flags and the 
prompts, and everything worked just as expected.  This is a really great 
tool! I like being able to use either the command-line arguments or the 
prompts. The arguments are especially useful if you just want to run 
exactly the same process again after editing the lilypond file, because 
you can just hit the up arrow to get the previous command and not have 
to go through all the prompts again.  I also like the prompts because 
sometimes I forget the command-line options.  But then you've added the 
usage thing, too.  And now a version number 1.1! I never dreamed I'd 
contribute code to something with a version number ;-)


I think we've officially beat this thread to death and now have a nice 
script to show for it.  Thanks for the collaboration!  It's the most fun 
I've had in a while.  Now if I can just get my head around the code you 
wrote I'll be doing something...


Best,

Jonathan

p.s. now that we have a tool with a version number, I might try learning 
how to write a brief manpage for it.  Good idea?


Patrick Horgan wrote:

Jonathan Kulp wrote:

Hi Patrick,

I've been running your script trying to use the command-line 
arguments, and something's happening with the format argument.  I 
specify it with an argument, but then I still get prompted for 
format.  I might not be doing the flag right.  I've tried it with 
-f=jpeg, -f=JPEG, -fJPEG, and I think that's it.  I'll copy the 
terminal output below so you can see.  On this example I use -fGIF and 
while it doesn't make the script fail, it does still ask me for a 
format.  Am I specifying the format wrong?
it would have to be the same as the input from the command line, i.e. 
-f=jpeg or -f=gif---I don't have a clue why it would fail, though with 
our weird crossing of versions I don't know which version you're using.  
I put a version in this one, and if you specify -v it will tell you the 
version and quit.  I fixed the defaults as you asked, and put in 
defaults for N 72 and png, (and if they pick transparency a default of 
png as well).  If the command line args still don't work please let me 
know.  They work here. My experience is that whenever I'm sure I've 
tested everything there are still many bugs, so please let me know:)
BTW, in the script I attached to the last email, you'll notice that 
with transparent background you have a choice between either png or 
gif--it's not forced to png. Is there a way to work this option into 
your version?

Yep, fixed.

Patrick



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: png cropping

2008-09-17 Thread Jonathan Kulp
preference, a PNG closely cropped so that she can then position this
graphic under some introductory text about the piece.  I have been
unsuccessful at finding information about this in the docs.


If it's a single line of music,
  -dpreview
could do the job.  (that's what I use)

The info in AU about lilypond-book might help (inserting lilypond
output into other program), but probably won't, since it's aimed
at producing eps images.  Actually, you might be able to convert
the eps to png using an external program.

Finally, you could play with clip-example, which I believe is now
in NR 3.  But I'm not certain if anybody's rewritten the docs for
them -- I certainly haven't.

Cheers,
- Graham


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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: png cropping

2008-09-17 Thread Jonathan Kulp
I'm guessing that one of the netpbm tools will handle transparency, it's 
just a matter of figuring out which one.  Didn't this come up on a 
recent thread?  I seem to remember trying it out on something and 
getting a transparent background.  When I get some time later I'll look 
into it.  It would be simple enough to add a prompt asking if you'd like 
a transparent background, I guess.


Re: the footers: are you talking about the engraving by Lilypond 
footer or some other thing?  In the examples I've run with this, there 
have been no footers, but I've only been doing my own files.


Jon


Patrick Horgan wrote:

Jonathan Kulp wrote:
This is an old thread but I found it in my email box and thought I'd 
respond because I've recently written a script to handle this sort of 
thing.  I share with some trepidation since last time I shared a 
script, someone pointed out to me that there was already a lilypond 
command-line option that performed exactly the same thing :)


I'd like a version that had an option to change the remaining white 
space to transparent.  I can add the option to the script, do you know 
the command to translate the white space?


Patrick





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


Re: png cropping

2008-09-17 Thread Jonathan Kulp
Ok I rewrote it a bit to allow for transparent background and I think it 
works nicely.  I changed it to ask whether the user wants a transparent 
background right after entering the output resolution.  If transparent = 
yes, then it does not prompt for an output format but instead uses png 
by default.  (It would be easy enough to add a prompt inside the if -- 
fi construct asking whether the transparent format should be png or gif, 
I guess.)  If transparent = no, then it asks what the final image format 
should be and then continues normally and outputs jpeg, tiff, or png.


Here's the revised script:

#!/bin/bash

#*#
# Script for making image files from lilypond source  #
# suitable for use as musical examples to insert in a #
# document or web page.   #
#*#

# get filename from first argument
srcfile=`basename $1`   

# get filename without .ly extension
STEM=`basename $1 .ly`

# determine output directory
OUTDIR=`dirname $1`

# ask for output resolution
echo -n Enter output resolution in DPI (72, 100, 300, 600, etc.): 
# gather resolution input
read RES

echo -n Would you like a transparent background? (yes or no): 
read TRANSPARENCY

if [ $TRANSPARENCY == yes ]
  then
cd $OUTDIR
lilypond --format=png -dresolution=$RES $srcfile
pngtopnm $STEM.png  $STEM.pnm
pnmcrop -white $STEM.pnm  $STEM-cropped.pnm
pnmtopng -transparent '#ff' $STEM-cropped.pnm  $STEM.png
eog $STEM.png

  else

# ask for desired final output format
echo -n Enter desired output format (jpeg, png, tiff): 
# gather format input
read FORMAT

cd $OUTDIR
lilypond --format=png -dresolution=$RES $srcfile
pngtopnm $STEM.png  $STEM.pnm
pnmcrop -white $STEM.pnm  $STEM-cropped.pnm
pnmto$FORMAT $STEM-cropped.pnm  $STEM.$FORMAT
# open final image as background process in Eye of Gnome Image Viewer
eog $STEM.$FORMAT 
fi


# removes pnm and ps files
rm *.pnm $STEM.ps




Patrick Horgan wrote:


pnmtopng has the transparent argument, but pnmtotiff and jpeg don't 
since they don't support transparency...so, using your script, if you 
want transparency, you have to choose png for the output, then on the 
translation step from ppm just add the appropriate flags.  I just tried 
it adding a quick -transparent '#ff' to the command line and then 
selecting png so it would work.  It worked like a charm:)


Patrick



Re: the footers: are you talking about the engraving by Lilypond 
footer or some other thing?  

Yep. Or the copyright statement, or the typesetter statement, et.al.

Patrick



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: arpeggios as barre indicators

2008-09-17 Thread Jonathan Kulp
Nice!!  I had made a mental note to try this a long time ago when 
browsing the learning manual, but had yet to try it in any of my guitar 
scores.  I'll keep this snippet handy. Thanks :)


Jon

Eluze wrote:

based on the snippet Cross-staff arpeggio brackets in the LSR I found a
nice way to mis-use arpeggios as barre indicators

hilites:
- you don't even need chords for the arpeggio and
- you can combine notes/chords with different durations!

arpeggioAsBarre = \once \override Staff.Arpeggio #'stencil =
#ly:arpeggio::brew-chord-bracket

\markup { 6 or 3 voices/notes with a barre on the 3rd fret}
\score {
  \context Staff {
\set Staff.connectArpeggios = ##t

  \context Voice=1 { \voiceOne   \arpeggioAsBarre g'' \arpeggio s
\arpeggioAsBarre g'' \arpeggio }
  \context Voice=2 { \voiceOne   \arpeggioAsBarre d''   s
\arpeggioAsBarre d''   }
  \context Voice=3 { \voiceTwo   \arpeggioAsBarre b's
\arpeggioAsBarre bes'  \arpeggio }
  \context Voice=4 { \voiceTwo   \arpeggioAsBarre g'  \arpeggio r  g'
}
  \context Voice=5 { \voiceTwo   \arpeggioAsBarre d'  \arpeggio s  d'
} 
  \context Voice=6 { \voiceTwo   \arpeggioAsBarre g   \arpeggio s  s 
}
			\context Voice=1 { s -III	}   
			\context Voice=6 { s -hurray!	}


}
  \layout { \context { \Staff \consists Span_arpeggio_engraver} }
}


\markup { combining chords with different durations }
\context Staff \with { \consists Span_arpeggio_engraver}
	{ \clef treble_8 \key c \major 
	  \set Staff.connectArpeggios = ##t

\arpeggioAsBarre
  
{  e' g' 4 \arpeggio r r 2 }
\\
{  c g~ c' 2 \arpeggio g }

}
http://www.nabble.com/file/p19542121/arpeggio%2Bas%2Bbarre.png 


--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: png cropping

2008-09-17 Thread Jonathan Kulp
Ok I changed a couple of things to make it even more flexible.  I 
changed pnmto__ to ppmto__, giving quite a few more output options. 
I've suggested a few in the script.  Also added an option to choose 
either gif or png when choosing transparent background.  this is fun :)


Jon

script attached this time...

Patrick Horgan wrote:

Jonathan Kulp wrote:
I'm guessing that one of the netpbm tools will handle transparency, 
it's just a matter of figuring out which one.  Didn't this come up on 
a recent thread?  I seem to remember trying it out on something and 
getting a transparent background.  When I get some time later I'll 
look into it.  It would be simple enough to add a prompt asking if 
you'd like a transparent background, I guess.
Now that you mention it that rings a bell with me too!   I'll have to 
search---


giftoppm foobar.gif | ppmtogif -transparent '#rgb'  fooquux.gif


works if you want gif.  First translate to ppm, then translate back to 
gif  with the -transparent flag specifying which color, (in this case 
#fff) will be transparent.


pnmtopng has the transparent argument, but pnmtotiff and jpeg don't 
since they don't support transparency...so, using your script, if you 
want transparency, you have to choose png for the output, then on the 
translation step from ppm just add the appropriate flags.  I just tried 
it adding a quick -transparent '#ff' to the command line and then 
selecting png so it would work.  It worked like a charm:)




--
Jonathan Kulp
http://www.jonathankulp.com
#!/bin/bash

#*#
# Script for making image files from lilypond source  #
# suitable for use as musical examples to insert in a #
# document or web page.   #
#*#

# get filename from first argument
srcfile=`basename $1` 

# get filename without .ly extension
STEM=`basename $1 .ly`

# determine output directory
OUTDIR=`dirname $1`

# ask for output resolution 
echo -n Enter output resolution in DPI (72, 100, 300, 600, etc.): 
# gather resolution input
read RES

echo -n Would you like a transparent background? (yes or no): 
read TRANSPARENCY

if [ $TRANSPARENCY == yes ]
  then
echo -n Enter desired output format (png or gif): 
read TRANSFORMAT
cd $OUTDIR
lilypond --format=png -dresolution=$RES $srcfile
pngtopnm $STEM.png  $STEM.pnm
pnmcrop -white $STEM.pnm  $STEM-cropped.pnm
ppmto$TRANSFORMAT -transparent '#ff' $STEM-cropped.pnm  
$STEM.$TRANSFORMAT
eog $STEM.$TRANSFORMAT 

  else

# ask for desired final output format
echo -n Enter desired output format (jpeg, png, tiff, gif, pcx, bmp): 
# gather format input
read FORMAT

cd $OUTDIR
lilypond --format=png -dresolution=$RES $srcfile
pngtopnm $STEM.png  $STEM.pnm
pnmcrop -white $STEM.pnm  $STEM-cropped.pnm
ppmto$FORMAT $STEM-cropped.pnm  $STEM.$FORMAT
# open final image as background process in Eye of Gnome Image Viewer
eog $STEM.$FORMAT 
fi


# removes pnm and ps files
rm *.pnm $STEM.ps


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


Re: png cropping

2008-09-17 Thread Jonathan Kulp
Sorry, one more adjustment to the script.  I found out that there's no 
ppmtotiff command, so I had to add another conditional to accommodate 
that.  Seems to work with all combinations now:


#!/bin/bash

#*#
# Script for making image files from lilypond source  #
# suitable for use as musical examples to insert in a #
# document or web page.   #
#*#

# get filename from first argument
srcfile=`basename $1`   

# get filename without .ly extension
STEM=`basename $1 .ly`

# determine output directory
OUTDIR=`dirname $1`

# ask for output resolution
echo -n Enter output resolution in DPI (72, 100, 300, 600, etc.): 
# gather resolution input
read RES

echo -n Would you like a transparent background? (yes or no): 
read TRANSPARENCY

if [ $TRANSPARENCY == yes ]
  then
echo -n Enter desired output format (png or gif): 
read TRANSFORMAT
cd $OUTDIR
lilypond --format=png -dresolution=$RES $srcfile
pngtopnm $STEM.png  $STEM.pnm
pnmcrop -white $STEM.pnm  $STEM-cropped.pnm
ppmto$TRANSFORMAT -transparent '#ff' $STEM-cropped.pnm  
$STEM.$TRANSFORMAT

eog $STEM.$TRANSFORMAT 

  else

# ask for desired final output format
echo -n Enter desired output format (jpeg, png, tiff, gif, pcx, 
bmp): 

# gather format input
read FORMAT

cd $OUTDIR
lilypond --format=png -dresolution=$RES $srcfile
pngtopnm $STEM.png  $STEM.pnm
pnmcrop -white $STEM.pnm  $STEM-cropped.pnm
  if [ $FORMAT == tiff ]
then
  pnmto$FORMAT $STEM-cropped.pnm  $STEM.$FORMAT
else
  ppmto$FORMAT $STEM-cropped.pnm  $STEM.$FORMAT
  fi
# open final image as background process in Eye of Gnome Image Viewer
eog $STEM.$FORMAT 
fi


# removes pnm and ps files
rm *.pnm $STEM.ps



Patrick Horgan wrote:

Jonathan Kulp wrote:
look into it.  It would be simple enough to add a prompt asking if 
you'd like a transparent background, I guess.
Now that you mention it that rings a bell with me too!   I'll have to 
search---


giftoppm foobar.gif | ppmtogif -transparent '#rgb'  fooquux.gif


works if you want gif.  First translate to ppm, then translate back to 
gif  with the -transparent flag specifying which color, (in this case 
#fff) will be transparent.


pnmtopng has the transparent argument, but pnmtotiff and jpeg don't 
since they don't support transparency...so, using your script, if you 
want transparency, you have to choose png for the output, then on the 
translation step from ppm just add the appropriate flags.  I just tried 
it adding a quick -transparent '#ff' to the command line and then 
selecting png so it would work.  It worked like a charm:)


Patrick



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: png cropping

2008-09-17 Thread Jonathan Kulp
This looks really great but it failed when I tried to run it.  I must 
have messed it up when copying it over to my editor.  Would you mind 
attaching a working copy as a file instead of copying into the email?


Also, I think we crossed paths in our most recent posts about this.  I 
sent a revised version that allowed for a choice between gif and png on 
transparent images and also fixed a problem I had introduced related to 
tiff format.  I'll attach most recent script.


I really like the flexibility your modifications introduce, being able 
to bypass all the prompts.  I like the prompts for myself because I have 
a hard time remembering flag arguments sometimes, but even I can 
probably remember these.  Besides that I can use your modifications to 
learn some tricks about scripting--clearly you actually *know* how to 
script!  I'm a total newb but am having fun learning. :)


Jon

Patrick Horgan wrote:
Here's a modified version of Jonathan's unix/linux script that supports 
arguments which are:


-t or --transparency :  output format forced to png and you get 
transparency


-r=N or --resolution==N  : (example -r=72) set resolution

-f=FORMAT or --format=FORMAT : (example -f=jpeg) set output format


So, if the script is named lilytoimage, you could do:

lilytoimage -r=72 -t lilydir/myfile.ly

or

lilytoimage -r=111 -f=tiff lilydir/myfile.ly


If you don't specify any of those  arguments then it works just like it 
did before, except it will also ask about transparency.  I don't have a 
Mac to test on, so I didn't mess with the Mac version.  Let me know if 
there's any bugs;)


Patrick


--
Jonathan Kulp
http://www.jonathankulp.com
#!/bin/bash

#*#
# Script for making image files from lilypond source  #
# suitable for use as musical examples to insert in a #
# document or web page.   #
#*#

# get filename from first argument
srcfile=`basename $1` 

# get filename without .ly extension
STEM=`basename $1 .ly`

# determine output directory
OUTDIR=`dirname $1`

# ask for output resolution 
echo -n Enter output resolution in DPI (72, 100, 300, 600, etc.): 
# gather resolution input
read RES

echo -n Would you like a transparent background? (yes or no): 
read TRANSPARENCY

if [ $TRANSPARENCY == yes ]
  then
echo -n Enter desired output format (png or gif): 
read TRANSFORMAT
cd $OUTDIR
lilypond --format=png -dresolution=$RES $srcfile
pngtopnm $STEM.png  $STEM.pnm
pnmcrop -white $STEM.pnm  $STEM-cropped.pnm
ppmto$TRANSFORMAT -transparent '#ff' $STEM-cropped.pnm  
$STEM.$TRANSFORMAT
eog $STEM.$TRANSFORMAT 

  else

# ask for desired final output format
echo -n Enter desired output format (jpeg, png, tiff, gif, pcx, bmp): 
# gather format input
read FORMAT

cd $OUTDIR
lilypond --format=png -dresolution=$RES $srcfile
pngtopnm $STEM.png  $STEM.pnm
pnmcrop -white $STEM.pnm  $STEM-cropped.pnm
ppmto$FORMAT $STEM-cropped.pnm  $STEM.$FORMAT
# open final image as background process in Eye of Gnome Image Viewer
eog $STEM.$FORMAT 
fi


# removes pnm and ps files
rm *.pnm $STEM.ps


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


Re: png cropping

2008-09-17 Thread Jonathan Kulp

Patrick,

Sorry to keep posting new versions but I found another problem with my 
previous one, which is that there's no ppmtopng command, so I had to add 
another if-then statement to fix it.  I also learned a couple of things 
from your script that are very useful (e.g. accepting equally yes, Y 
or y) and changed the prompt to a more usual style: from (yes/no) to 
(y/N).


I've now tried all variations and they all work.  Now if you can 
integrate your mods to accept arguments at the command line that'd be 
sweet.  Thanks for being interested in this :)


Jon

script:

#!/bin/bash

# get filename from first argument
srcfile=`basename $1`   

# get filename without .ly extension
STEM=`basename $1 .ly`

# determine output directory
OUTDIR=`dirname $1`

# ask for output resolution
echo -n Enter output resolution in DPI (72, 100, 300, 600, etc.): 
# gather resolution input
read RES
echo Resolution is set to $RES

echo -n Would you like a transparent background? (y/N): 
read TRANSPARENCY

if [[ ( $TRANSPARENCY == yes ) || ( $TRANSPARENCY == y ) || ( 
$TRANSPARENCY == Y )]]

  then
echo Background is set to transparent
echo -n Enter desired output format (png or gif): 
read TRANSFORMAT
echo Output format is set to $TRANSFORMAT
cd $OUTDIR
lilypond --format=png -dresolution=$RES $srcfile
pngtopnm $STEM.png  $STEM.pnm
pnmcrop -white $STEM.pnm  $STEM-cropped.pnm
  if [ $TRANSFORMAT == png ]
then
  pnmto$TRANSFORMAT -transparent '#ff' $STEM-cropped.pnm  
$STEM.$TRANSFORMAT

else
  ppmto$TRANSFORMAT -transparent '#ff' $STEM-cropped.pnm  
$STEM.$TRANSFORMAT

  fi

eog $STEM.$TRANSFORMAT 

  else

# ask for desired final output format
echo -n Enter desired output format (jpeg, png, tiff, gif, pcx, 
bmp, pgm): 

# gather format input
read FORMAT
echo Output format is set to $FORMAT
cd $OUTDIR
lilypond --format=png -dresolution=$RES $srcfile
pngtopnm $STEM.png  $STEM.pnm
pnmcrop -white $STEM.pnm  $STEM-cropped.pnm
  if [[ ( $FORMAT == tiff ) || ( $FORMAT == png ) ]]
then
  pnmto$FORMAT $STEM-cropped.pnm  $STEM.$FORMAT
else
  ppmto$FORMAT $STEM-cropped.pnm  $STEM.$FORMAT
  fi
# open final image as background process in Eye of Gnome Image Viewer
eog $STEM.$FORMAT 
fi

# removes pnm and ps files
rm *.pnm $STEM.ps


#!/bin/bash

#*#
# Script for making image files from lilypond source  #
# suitable for use as musical examples to insert in a #
# document or web page.   #
#*#

# get filename from first argument
srcfile=`basename $1` 

# get filename without .ly extension
STEM=`basename $1 .ly`

# determine output directory
OUTDIR=`dirname $1`

# ask for output resolution 
echo -n Enter output resolution in DPI (72, 100, 300, 600, etc.): 
# gather resolution input
read RES
echo Resolution is set to $RES

echo -n Would you like a transparent background? (y/N): 
read TRANSPARENCY

if [[ ( $TRANSPARENCY == yes ) || ( $TRANSPARENCY == y ) || ( 
$TRANSPARENCY == Y )]]
  then
echo Background is set to transparent
echo -n Enter desired output format (png or gif): 
read TRANSFORMAT
echo Output format is set to $TRANSFORMAT
cd $OUTDIR
lilypond --format=png -dresolution=$RES $srcfile
pngtopnm $STEM.png  $STEM.pnm
pnmcrop -white $STEM.pnm  $STEM-cropped.pnm
  if [ $TRANSFORMAT == png ]
then
  pnmto$TRANSFORMAT -transparent '#ff' $STEM-cropped.pnm  
$STEM.$TRANSFORMAT
else
  ppmto$TRANSFORMAT -transparent '#ff' $STEM-cropped.pnm  
$STEM.$TRANSFORMAT
  fi

eog $STEM.$TRANSFORMAT 

  else

# ask for desired final output format
echo -n Enter desired output format (jpeg, png, tiff, gif, pcx, bmp, pgm): 

# gather format input
read FORMAT
echo Output format is set to $FORMAT
cd $OUTDIR
lilypond --format=png -dresolution=$RES $srcfile
pngtopnm $STEM.png  $STEM.pnm
pnmcrop -white $STEM.pnm  $STEM-cropped.pnm
  if [[ ( $FORMAT == tiff ) || ( $FORMAT == png ) ]]
then
  pnmto$FORMAT $STEM-cropped.pnm  $STEM.$FORMAT
else
  ppmto$FORMAT $STEM-cropped.pnm  $STEM.$FORMAT
  fi
# open final image as background process in Eye of Gnome Image Viewer
eog $STEM.$FORMAT 
fi

# removes pnm and ps files
rm *.pnm $STEM.ps


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


Re: Two questions about fingering indications

2008-09-16 Thread Jonathan Kulp

Hi Nick,

I don't have time to investigate the fingerings at the moment, but I can 
tell you quickly that the natural on the second b is there because you 
specified it with the !.  Any time you put the ! it forces lilypond to 
show an accidental.  Just take it out and you'll solve that problem. 
Lilypond knows that a b is a b-natural so you only need the ! if you 
want to use it as a courtesy to the performers or to show that you 
really want the natural even though, for example, there might be a 
b-flat in the other voice.


I'll check the fingering problem when I have some time later today.  Best,

Jon

Nick Payne wrote:

I have the following code (it's the first couple of measures of Barrios'
prelude in C minor). Firstly, with the RH fingering, some of the indications
appear above the beam and some below, depending on where on the stave each
note is located. How can I get them to all be above the beam? Secondly, with
the LH fingering, I can only get the orientation to the left of the notehead
to stick by enclosing every note with a fingering indication inside chord
symbols, otherwise the fingering appears above the stems. How do I get the
fingering orientation to default to being to the left of the notehead for
notes that are not chorded?

Also, Lilypond puts a natural symbol against both b naturals in bar 2, when
only the first symbol is required.

\version 2.11.58
% Treble voice
#(define RH rightHandFinger)
up = \relative c' {
\set fingeringOrientations = #'(left)
\set strokeFingerOrientations = #'(up)
\set tupletSpannerDuration = #(ly:make-moment 1 4)
\times 4/6 {
\override Fingering #'staff-padding = #'()
c-1-\RH #1 16 g'-0-\RH #2  aes'-4-\RH #4 - ees-3-\RH
#3  g-2-\RH #4 - g,-0-\RH #2 c, g' aes'- ees g- g, |
b,!-1 g'-0 aes'-4- d,-3 g-2- g,-0b,! g'
aes'- d, g- g, |
}
}

% Bass voice
down = \relative c' {
c4 c |  % 1
b! b! | % 2
}

\score {
{
\clef treble
\key c \minor
\time 2/4
\tempo Moderato
\override Staff.NoteCollision #'merge-differently-headed =
##t
\context Staff  \new Voice { \voiceOne \up }
\new Voice { \voiceTwo \down } 
}
\layout { }
\midi { }
}

Nick



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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Two questions about fingering indications

2008-09-16 Thread Jonathan Kulp

Hi Nick,

I saw that someone else answered the second question about the 
b-naturals (just be sure to remove the ! from both voices).


Here's a quick fix for the right-hand fingering that will work for this 
example, but it's kind of crude and not overly flexible.  To position 
individual fingerings in a score you'll need to use something like 
\tweak or \once \override with extra-offset instead of an \override 
StrokeFinger staff padding like I did here.  I always use \tweak and 
extra-offset adjustments for very precise placement of fingerings.


I don't know of a way to use the set fingeringorientations without a  
chord construct.  It's a pain but it works very well.


Here's the relevant snippet of code that puts the r.h.fingerings above 
the beam.  You can adjust the value to suit your preference:


% Treble voice
#(define RH rightHandFinger)
up = \relative c' {
\set fingeringOrientations = #'(left)
\set strokeFingerOrientations = #'(up)
\override StrokeFinger #'staff-padding = #'4.4  % HERE IT IS
\set tupletSpannerDuration = #(ly:make-moment 1 4)
\times 4/6 {
\override Fingering #'staff-padding = #'()
c-1-\RH #1 16 g'-0-\RH #2 
aes'-4-\RH #4 - ees-3-\RH #3 
g-2-\RH #4 - g,-0-\RH #2 c, g' aes'- ees g- g, | 
   % 1
		b,!-1 g'-0 aes'-4- d,-3 g-2- g,-0b, g' aes'- d, 
g- g, |		% 2
		d-0 g-0 g'-3- b,!-0 f'-1- g,-0d g g'- b, f'- 
g, |			% 3

}
}


Jon

Nick Payne wrote:

I have the following code (it's the first couple of measures of Barrios'
prelude in C minor). Firstly, with the RH fingering, some of the indications
appear above the beam and some below, depending on where on the stave each
note is located. How can I get them to all be above the beam? Secondly, with
the LH fingering, I can only get the orientation to the left of the notehead
to stick by enclosing every note with a fingering indication inside chord
symbols, otherwise the fingering appears above the stems. How do I get the
fingering orientation to default to being to the left of the notehead for
notes that are not chorded?

Also, Lilypond puts a natural symbol against both b naturals in bar 2, when
only the first symbol is required.

\version 2.11.58
% Treble voice
#(define RH rightHandFinger)
up = \relative c' {
\set fingeringOrientations = #'(left)
\set strokeFingerOrientations = #'(up)
\set tupletSpannerDuration = #(ly:make-moment 1 4)
\times 4/6 {
\override Fingering #'staff-padding = #'()
c-1-\RH #1 16 g'-0-\RH #2  aes'-4-\RH #4 - ees-3-\RH
#3  g-2-\RH #4 - g,-0-\RH #2 c, g' aes'- ees g- g, |
b,!-1 g'-0 aes'-4- d,-3 g-2- g,-0b,! g'
aes'- d, g- g, |
}
}

% Bass voice
down = \relative c' {
c4 c |  % 1
b! b! | % 2
}

\score {
{
\clef treble
\key c \minor
\time 2/4
\tempo Moderato
\override Staff.NoteCollision #'merge-differently-headed =
##t
\context Staff  \new Voice { \voiceOne \up }
\new Voice { \voiceTwo \down } 
}
\layout { }
\midi { }
}

Nick



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



--
Jonathan Kulp
http://www.jonathankulp.com


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


\showLastLength error message

2008-09-11 Thread Jonathan Kulp

When I use the \showLastLength command I get an error message:

unknown escaped string: `\showLastLength'

However, it seems that the command really is known because it performs 
the command perfectly, only showing me the last several bars of the 
piece.  Any idea why this error message appears?


Jon
--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: \showLastLength error message

2008-09-11 Thread Jonathan Kulp
Sweet!  Thanks Neil.  I can't even remember now why I did it with a 
backslash.  It's surprising that it works anyway, given how things like 
this often cause files to fail.  Glad to be rid of the error message :)


Thanks,

Jon

Neil Puttock wrote:

Hi Jon,

2008/9/11 Jonathan Kulp [EMAIL PROTECTED]:

When I use the \showLastLength command I get an error message:

unknown escaped string: `\showLastLength'

However, it seems that the command really is known because it performs the
command perfectly, only showing me the last several bars of the piece.  Any
idea why this error message appears?


You don't need the backslash: it's a variable rather than a command.

Regards,
Neil



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Second effort guidance

2008-09-10 Thread Jonathan Kulp

Hi Alaric,

Sorry to hear about the continued troubles in B.R.  I live in Lafayette
and while I evacuated to Tennessee during the storm, we were able to
return quickly because our power came back on the day after the storm
hit.  Just a little hole in my roof and the ugly awning on my back porch
blew away.  I hope y'all's power comes back on soon.

So anyway it's great to know of another Lilyponder so close to me, and
especially a guitarist :)  I took your code and did a few things that I
think will probably make your life easier.

1. I put the contents of each voice in a variable that is assembled onto
the staff in a \score block at the bottom of the code.  This score block
is the one I use for all of my guitar pieces.  It has three voices and a
\midi block, as well as the guitar instrument name and midi sound.
2. I changed it to \relative mode--most users find this easier once they
get used to it.
3. I set the tupletSpannerDuration so that you don't have to put each
tuplet inside {} individually.  You could keep adding triplets inside
the one I set up as long as you still want triplets.  I'd suggest
putting a single measure inside each \times 2/3{} instance to keep
things organized.
4. I set \voiceOne \voiceTwo etc. to get the stems going in the right
direction automatically.  It's very easy to override this if necessary
using \stemUp \stemDown or \stemNeutral
5. minor thing: I changed the clef to treble_8 since this is the most
correct clef for guitar music (it sounds an octave lower than written).

Hope this helps.  I have a number of guitar scores to share if you're
interested.  Best,

Jon

here's one measure of your piece using variables and \score block:
%%%

melody = \relative c' {
  \key e \minor
  \tempo Allegro Moderato
  \clef treble_8
  \voiceOne
  \override TupletNumber #'transparent = ##t
  \override TupletBracket #'transparent = ##t
\set tupletSpannerDuration = #(ly:make-moment 1 4)
  \times 2/3 {r8 e, g b e, g e' e, g e' e, g}   % m. 1
}

middle = \relative c' {
  \voiceFour
  s4 b4 e e
}

bass = \relative c {
  \voiceTwo
  e,2 s2
}


\score {
\context Staff = guitar 
%\global
\set Staff.instrumentName = Guitar
\context Voice = melody \melody
\context Voice = middle \middle
\context Voice = bass \bass

\layout { }

  \midi {
\context {
  \Score
  tempoWholesPerMinute = #(ly:make-moment 160 4)
  }
}
}



Alaric Haag wrote:

Hello 'ponders,

While spending over a week in the dark here in Baton Rouge (from 
hurricane Gustav) I started passing my time working on a Steve Hackett 
guitar piece in Lilypond. It was quite a satisfying way to burn up the 
dark evenings (and my laptop battery power before charging at the office 
the next day!)


So, now I'm hooked, and I'm trying to reproduce Sor's Etude, Op. 6, No 
11. The first three measures are rendered with the code below, but I 
KNOW I missing many basics that would make this a LOT easier going. Is 
anyone willing to offer some guidance? The piece follows the basic 
pattern of these measures throughout with the lead half note, quarter 
notes emphasizing the melody line, and the triplets carrying the melody 
along, without triplet numbers.


I know I have a lot of reading to do, but I'd appreciate some pointers, 
topics, etc that might help me.


Many thanks!

Alaric

-snip-

\header{
  title = Etude
  subtitle = Op. 6, No. 11
  composer = Fernando Sor
}

\new Staff \with {   \consists Span_arpeggio_engraver }

{
\time 4/4
\tempo Allegro moderato

\key g \major
\set Staff.connectArpeggios = ##t

#(define RH rightHandFinger) 


\break % Measure 1
\override TupletNumber #'transparent = ##t 
  \override TupletBracket #'transparent = ##t 
   {  \times 2/3 {r8 e' g'} 
  \times 2/3 {b' e' g'} 
  \times 2/3 {e'' e' g'} 
  \times 2/3 {e'' e' g'} } \\
  \once \override Rest #'transparent = ##t 
  { r4 b' e'' e'' } \\

  { e2*2/4 } 
\override TupletNumber #'transparent = ##t 
  \override TupletBracket #'transparent = ##t 
   {  \times 2/3 {e''8 g' b'} 
  \times 2/3 {b' e' g'} 
  \times 2/3 {e'' e' g'} 
  \times 2/3 {e'' e' g'} } \\

  { e2*2/4 b'4 e'' e'' } 
\override TupletNumber #'transparent = ##t 
  \override TupletBracket #'transparent = ##t 
   {  \times 2/3 {r8 e' g'} 
  \times 2/3 {b' e' g'} 
  \times 2/3 {e'' e' g'} 
  \times 2/3 {fis'' e' g'} } \\

  { e2*2/4 b'4 e'' fis'' } 

\break % Measure 4
{  } \\
  {  } 
{  } \\
  {  } 
{  } \\
  {  } 

}


\version 2.11.57  % necessary for upgrading to future LilyPond 
versions.




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



--
Jonathan Kulp
http://www.jonathankulp.com



___
lilypond-user mailing list
lilypond-user

Re: Fingering: tweak has different behavior in 2.11.58

2008-09-07 Thread Jonathan Kulp
Sorry, Neil, it was negligent of me not also to say thanks for fixing 
this bug!  Thanks! :)


Jon

Neil Puttock wrote:

Hi Jon,



This is a result of my fix (#666) for the broken 'avoid-slur behaviour
when set to 'around (which is the case for Fingering).
--

Jonathan Kulp
http://www.jonathankulp.com


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


Fingering: tweak has different behavior in 2.11.58

2008-09-06 Thread Jonathan Kulp
I compiled version 2.11.58 and when I ran a file I was working on I 
noticed that many of the tweaks I had done to position fingerings had 
different results in 2.11.58 than they did in 2.11.56.  Below is a 
minimal example.  The same code was used to produce each png image.  The 
one with the 4 fingering way up above was done in 2.11.58, and the one 
with it tucked in nicely under the beam was done in 2.11.56.  Any idea 
why the different behavior?  For the moment I've reverted to 2.11.56.


Jon

%  fingering orientations
sfor = \set fingeringOrientations = #'(right)

\relative c {
  \time 6/8
  \clef treble_8
  a8\( g'-\tweak #'extra-offset #'(-0.3 . -3.5)-3
  c!-\tweak #'extra-offset #'(-0.2 . 8.8)-4 
  d-\tweak #'extra-offset #'(-0.0 . 0.0)-1
  \sfor aes,-2 c' d e\) |
}


--
Jonathan Kulp
http://www.jonathankulp.com
attachment: fingering-problem2-11-56.pngattachment: fingering-problem2-11-58.png___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Fingering: tweak has different behavior in 2.11.58

2008-09-06 Thread Jonathan Kulp
Ok Neil, thanks for the explanation.  I can see that this is a long-term 
improvement so I'll go ahead and change my offset values to work with 
the new behavior.  Thanks,


Jonathan

Neil Puttock wrote:

Hi Jon,

2008/9/6 Jonathan Kulp [EMAIL PROTECTED]:

I compiled version 2.11.58 and when I ran a file I was working on I noticed
that many of the tweaks I had done to position fingerings had different
results in 2.11.58 than they did in 2.11.56.  Below is a minimal example.
 The same code was used to produce each png image.  The one with the 4
fingering way up above was done in 2.11.58, and the one with it tucked in
nicely under the beam was done in 2.11.56.  Any idea why the different
behavior?  For the moment I've reverted to 2.11.56.


This is a result of my fix (#666) for the broken 'avoid-slur behaviour
when set to 'around (which is the case for Fingering).

If you have a look at the images below without tweaks, you can see
what's changed: originally, the `4' was avoiding the slur incorrectly
(outside), even though there's plenty of space for it to be placed
inside the slur. Since the correct behaviour places it inside, your
y-offset in \tweak is now too large.

Regards,
Neil









--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: LH fingering not working

2008-08-31 Thread Jonathan Kulp

Tom,

I'll try to fiddle with this tonight.  Hurricane Gustav is headed 
straight toward my home in Lafayette, Louisiana, so we've evacuated to 
my parents' house in Tennessee until the storm goes through.  I'll 
probably have some Lilypond time later today though.  Glad the docs and 
the examples have been helpful.  Best,


Jonathan

Tom Cloyd wrote:

Jonathan Kulp wrote:

I did the documentation on guitar stuff so I'm familiar with this issue.


Jonathan - thanks for the extended examples. Very helpful.

However,

Here's a sticky wicket I cannot get past:

  \relative c'{ 
 { s2 r4
 \override Fingering #'staff-padding = #'()
 \set fingeringOrientations = #'(down down up)
  e'-0 fis-1\3 g-4\2 4~ }
 \\
 { \stemUp \times 2/3 { fis,8-3 ^II [ (g-4) e-1 ]}  
\times 2/3 {a8\rest \stemDown

   \set fingeringOrientations = #'(left)
   e-1\5 [c'-3\4] }
   b-2~2 }
 \\
 { \stemDown s4 e,,2.~ \ff }
}

The fingering is now readable, but not displayed as I've requested, in 
the first voice.
It's displaying e-down f-up g-up. I've tried a number of combinations, 
and I cannot seem to crack the code. There must be something I'm not 
understanding. Can you tell me?


I also cannot find documentation about placement of string number. I'm 
guessing that in the code example the reason for the engraving of the 
(3) string indication BELOW the f is to keep it from crashing into 
what's above. However, if so, why are string numbers being so looked 
after, when Lilypond will quite happily pile *fingering* numbers on top 
of each other in an illegible mess? I don't see consistency here, but 
again I may well be missing something.


In the code example I'd just like to bring the (3) indication into the 
staff, and right below the f. In my code example, however, the  
\override Fingering #'staff-padding = #'() (an initial attempt just to 
get it to move) has no effect. I don't see what I'm doing wrong. Can you 
help?


Finally, the triplet indicator which is engraved by the code example 
crashes into several things. I cannot find out how to move it. Don't 
even know where to start looking. None of the triple (tuple?) 
documentation I've found addresses this. I cannot attempt to reposition 
what I cannot even name!


I want to thank you (and whoever else may have helped) for the richness 
of the fretted string documentation. It's really been extremely helpful.


t.





--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: LH fingering not working

2008-08-31 Thread Jonathan Kulp

Hi Tom,

Ok I've been fiddling with this for a while and I don't suppose I'm any
farther along than you were.  One of the problems is something that I
noticed when I was engraving one of my own pieces a few days ago.  While
it's possible to position fingerings very precisely using extra-offset,
you can only do so to notes inside chord constructs.  Fine.  The problem
is that if you're trying to position the fingerings for an actual chord
(i.e. more than 1 note at the same time inside a chord construct), you
can't position each fingering individually.  If you change the
extra-offset for one of them, you've changed it for all notes in the
chord.  I can't figure a way to make the extra-offset affect only one
note inside a chord construct.

So, while I'm able to bring the 3 string indication into the staff, it
also causes the 2 string indicator to go way up high above the staff!
  My own solution was to remove extraneous fingerings so that I could
place the really important ones where I wanted them.  I'd rather be able
to place all of them in the right spot, but I couldn't figure out how.

Here's your code with a few lines of macros that I use for placing the
fingerings, and an example of how I made the string number 3 move into
the staff.

Not sure about the triplet.  I think the topic is tuplets though.

Jon



 shortcuts
%  fingering orientations
sfol = \set fingeringOrientations = #'(left)
sfor = \set fingeringOrientations = #'(right)
sfod = \set fingeringOrientations = #'(down)
sfou = \set fingeringOrientations = #'(up)
sfodu = \set fingeringOrientations = #'(down up)

%  string number orientations
ssnol =  \set stringNumberOrientations = #'(left)  %(down right up)
ssnou =  \set stringNumberOrientations = #'(up)
ssnod =  \set stringNumberOrientations = #'(down)
ssnor =  \set stringNumberOrientations = #'(right)

% define fingering offset
FO = #(define-music-function (parser location offsetX offsetY) (number?
number?)
  #{
\once \override Voice.Fingering #'extra-offset = #(cons $offsetX
$offsetY )
  #})

% define string-number offset
SO = #(define-music-function (parser location offsetX offsetY) (number?
number?)
  #{
\once \override Voice.StringNumber #'extra-offset = #(cons $offsetX
$offsetY )
  #})


  \relative c'{ 
 { s2 r4
 \voiceOne
 \override Fingering #'staff-padding = #'()
 \set fingeringOrientations = #'(down down up)
\SO #'-0.0 #'2.5
  e'-0 fis-1\3 g-4\2 4~ }
 \\
 { \voiceThree \times 2/3 { fis,8-3 ^II [ (g-4) e-1 ]}
\times 2/3 {a8\rest \stemDown
 \override Fingering #'staff-padding = #'()
   \set fingeringOrientations = #'(left)
   e-1\5 [c'-3\4] }
   b-2~2 }
 \\
 { \voiceTwo s4 e,,2.~ \ff }
}


Tom Cloyd wrote:

Jonathan Kulp wrote:

I did the documentation on guitar stuff so I'm familiar with this issue.


Jonathan - thanks for the extended examples. Very helpful.

However,

Here's a sticky wicket I cannot get past:

  \relative c'{ 
 { s2 r4
 \override Fingering #'staff-padding = #'()
 \set fingeringOrientations = #'(down down up)
  e'-0 fis-1\3 g-4\2 4~ }
 \\
 { \stemUp \times 2/3 { fis,8-3 ^II [ (g-4) e-1 ]}  
\times 2/3 {a8\rest \stemDown

   \set fingeringOrientations = #'(left)
   e-1\5 [c'-3\4] }
   b-2~2 }
 \\
 { \stemDown s4 e,,2.~ \ff }
}

The fingering is now readable, but not displayed as I've requested, in 
the first voice.
It's displaying e-down f-up g-up. I've tried a number of combinations, 
and I cannot seem to crack the code. There must be something I'm not 
understanding. Can you tell me?


I also cannot find documentation about placement of string number. I'm 
guessing that in the code example the reason for the engraving of the 
(3) string indication BELOW the f is to keep it from crashing into 
what's above. However, if so, why are string numbers being so looked 
after, when Lilypond will quite happily pile *fingering* numbers on top 
of each other in an illegible mess? I don't see consistency here, but 
again I may well be missing something.


In the code example I'd just like to bring the (3) indication into the 
staff, and right below the f. In my code example, however, the  
\override Fingering #'staff-padding = #'() (an initial attempt just to 
get it to move) has no effect. I don't see what I'm doing wrong. Can you 
help?


Finally, the triplet indicator which is engraved by the code example 
crashes into several things. I cannot find out how to move it. Don't 
even know where to start looking. None of the triple (tuple?) 
documentation I've found addresses this. I cannot attempt to reposition 
what I cannot even name!


I want to thank you (and whoever else may have helped) for the richness 
of the fretted string documentation. It's really been

Re: LH fingering not working

2008-08-31 Thread Jonathan Kulp
Ha!  I totally forgot about tweak!  Now I remember seeing that example 
where one note of a chord is smaller than the other three. I'm going to 
try it.  Many thanks, James.  I bet this will fix it.


Jonathan

James E. Bailey wrote:

First, I know nothing about this, but,
Am 31.08.2008 um 19:23 schrieb Jonathan Kulp:


Hi Tom,

 While it's possible to position fingerings very precisely using 
extra-offset,

you can only do so to notes inside chord constructs.  Fine.  The problem
is that if you're trying to position the fingerings for an actual chord
(i.e. more than 1 note at the same time inside a chord construct),
isn't that what \tweak is for? I mean, the only time I see it is when a 
specific change needs to be made inside a chord construct. Again, I know 
nothing about what's going on here.





--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: LH fingering not working

2008-08-31 Thread Jonathan Kulp
Ok, now I'm getting somewhere.  I couldn't make the \tweak command work 
with extra-offset from looking at the manual, but I found an example in 
a guitar piece at Mutopia:


http://www.mutopiaproject.org/ftp/TarregaF/adelita/adelita.ly

From this I learned exactly where to put stuff and now I can get 
perfect positioning of each element of fingering even inside a chord. 
Here's the result of my experiment on the chord in Tom's sample code:


\version 2.11.56

\relative c' { r4
 \voiceOne
 \override Fingering #'staff-padding = #'()
 \set fingeringOrientations = #'(down down up)
% \SO #'-0.0 #'2.5
  e'-\tweak #'extra-offset #'(0 . 5.2)-0 fis-1-\tweak 
#'extra-offset #'(0.7 . 3.5 ) \3
 g-\tweak #'extra-offset #'(-0.5 . -1.5)-4-\tweak #'extra-offset 
#'(-0.2 . -1.5)\2 4~ s2 }


It looks kind of ugly in the code but it does allow excellent placement 
of both the fingerings and the string indications.  This is definitely 
something I'll be using in my own scores.  I just wish it worked in 
variables (the docs on \tweak say it's a known issue that \tweak doesn't 
work in a variable).


BTW this still didn't fix the problem Tom cited about the fingering 
Orientation (down down up) being partially ignored. That's work for 
another day...


Thanks for the tips, James and Trevor!

Jon

Trevor Daniels wrote:

Jonathan

Have a look at NR 5.3.4 The \tweak command.  I rewrote this recently, so 
I'd like to know whether or not this is clear and helpful.  Thanks.


Trevor

- Original Message - From: Jonathan Kulp [EMAIL PROTECTED]
To: James E. Bailey [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; lilypond-user@gnu.org; Steven Padalino 
[EMAIL PROTECTED]

Sent: Sunday, August 31, 2008 9:14 PM
Subject: Re: LH fingering not working


Ha!  I totally forgot about tweak!  Now I remember seeing that 
example where one note of a chord is smaller than the other three. I'm 
going to try it.  Many thanks, James.  I bet this will fix it.


Jonathan

James E. Bailey wrote:

First, I know nothing about this, but,
Am 31.08.2008 um 19:23 schrieb Jonathan Kulp:


Hi Tom,

 While it's possible to position fingerings very precisely using 
extra-offset,
you can only do so to notes inside chord constructs.  Fine.  The 
problem

is that if you're trying to position the fingerings for an actual chord
(i.e. more than 1 note at the same time inside a chord construct),
isn't that what \tweak is for? I mean, the only time I see it is when 
a specific change needs to be made inside a chord construct. Again, I 
know nothing about what's going on here.





--
Jonathan Kulp
http://www.jonathankulp.com


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






--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: LH fingering not working

2008-08-31 Thread Jonathan Kulp
It was with the extra offset part.  I was putting the #' in the wrong 
place (inside the parentheses instead of out).  If I had dug deeper I 
probably could have figured it out but I just googled a solution 
instead.  I don't think it's a problem with \tweak part of the docs. 
You can't possibly envision every scenario someone might want to use it 
for.  :)


Jon

Trevor Daniels wrote:


Jonathan, you wrote Sunday, August 31, 2008 11:30 PM


Ok, now I'm getting somewhere.  I couldn't make the \tweak command 
work with extra-offset from looking at the manual


Can you give me a clue what the difficulty was?  Did
you use a recent manual?  Was the difficulty with the \tweak command 
itself or 'extra-offset?


Trevor




--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: LH fingering not working

2008-08-28 Thread Jonathan Kulp
/Documentation/user/out-www/lilypond/Changing-context-default-settings.html#Changing-context-default-settings in the archives, but I'm not sure I'm interpreting it properly.  I've tried positioning the command in the Score and Layout sections, but it still doesn't take effect.





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


--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: LH fingering not working

2008-08-28 Thread Jonathan Kulp

Carl,

Perhaps we should add an example in Notation Reference where it talks 
about controlling the placement of chord fingerings showing that even 
for single notes you have to use a chord construct for the 
fingeringOrientation to work.  I didn't get to do this in fretted 
strings because fingering was handled elsewhere in the documentation.


Jonathan

p.s. Steven, if you look at the documentation for 2.11 under Specialist 
Notation then Fretted Strings, you'll see an excerpt I engraved where 
I make use of \set fingeringOrientations and the extra-offset technique 
I mentioned in the last email.  Just click on the musical example on 
this page and it'll reveal the code:


http://kainhofer.com/~lilypond/Documentation/user/lilypond/Fretted-string-instruments.html#Fretted-string-instruments


Steven Padalino wrote:

Hi,
 
Using Lilipond 2.10.33 with jEdit 4.3pre15 on Windows XP SP2.
 
The \set fingeringOrientations = #'(left) is not working.  Finger numbers continue to appear at the top or bottom of note stems.
 
I have the command positioned after the staffClassicalGuitar = \new Staff command and before any notes are entered.  Does it matter where it is located?  I want it to apply to the whole score.
 
I saw a link to http://lilypond.org/doc/v2.4/Documentation/user/out-www/lilypond/Changing-context-default-settings.html#Changing-context-default-settings in the archives, but I'm not sure I'm interpreting it properly.  I've tried positioning the command in the Score and Layout sections, but it still doesn't take effect.





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


--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: leopard in the pond

2008-08-26 Thread Jonathan Kulp
I couldn't find the instructions there.  Nicolas, did you remove them or 
am I just missing them?  I was very impressed with the opera projects, 
though.  Wow! :)


Jonathan

Carl Sorensen wrote:

2.  Build your own binary.  Ordinarily this is considered to be so difficult 
that it's not recommended.  But I am willing to recommend it, thanks to 
Nicolas Sceaux's excellent instructions.  It takes a bit of time, but it makes 
it easy to always  have the most up-to-date LilyPond working at blazing 
speed.  I currently run LilyPond in native Intel mode on Leopard.


You can find Nicolas's instructions at http://nicolas.sceaux.free.fr


--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: leopard in the pond

2008-08-26 Thread Jonathan Kulp
Found it.  Thanks.  I'm going to try to follow these instructions 
tomorrow.  I've had trouble getting all the dependencies installed via 
MacPorts but maybe following his instructions will help.  In the end it 
doesn't matter so much b/c I'm not running Leopard anyway.  I just want 
to try to build it on the Mac for the sake of nerdiness :)  I have no 
problem building on Linux and it irritates me that I can't make it work 
on the Mac.  Best,


Jon

Carl D. Sorensen wrote:

Scroll down the page about 1/3.  Or search for Git on that page.

Carl


On 8/26/08 6:08 PM, Jonathan Kulp [EMAIL PROTECTED] wrote:


I couldn't find the instructions there.  Nicolas, did you remove them or
am I just missing them?  I was very impressed with the opera projects,
though.  Wow! :)

Jonathan




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


Re: Converting lilypond to music xml

2008-08-25 Thread Jonathan Kulp
Yes, you can import MIDI into Finale but as Dominic notes, it doesn't 
have enough information embedded to get good results.  Even very simple 
pieces are so badly messed up that it would be easier simply to enter 
all the notes again than try to fix the MIDI import.  At least this has 
been my experience trying to import MIDI into Finale.


Jonathan

Dominic Neumann wrote:

I´m not a MIDI expert, but why use the MIDI way if you could import MIDI
also directly into Finale? [This is probably possible.]
As MIDI does not contain any layout information it is not well suited for
producing MusicXML output. Additionally, I don´t know the current features
of MIDI files, but is it at all possible to add lyrics?

Dominic





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


Re: transparent background in lilypond generated png's

2008-08-25 Thread Jonathan Kulp

That's awesome!!  Thanks!

Jonathan

Gilles Sadowski wrote:

Hello.

I've been using Lilypond regularly for several years now with great 
satisfaction.  Recently, I've begun using lilypond generated png files in 
powerpoint presentations and I'd like to know if there is a way to 
generate these files with a transparent (rather than white) background so 
I can add something like a textured background image.  Any help is 
greatly appreciated.


You can use the convert tool (part of imagemagick package) like this:

 $ convert test.png -transparent white test_tr.png

which will create test_tr.png with a transparent background.


Best,
Gilles


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



--
Jonathan Kulp
http://www.jonathankulp.com


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


script for running convert-ly on multiple files

2008-08-24 Thread Jonathan Kulp

Dear Lilyponders,

I thought I'd share a script I wrote for running the convert-ly process 
on batches of files.  I realize a script like this is trivial for 
experienced users, but I'd been doing conversions one file at a time 
myself until I learned how to do this kind of script, and I figured 
there were probably others like me who could benefit.  It's an enormous 
relief being able to convert dozens of files in one command.  I've tried 
it out on a few orchestral pieces with lots of \include files from 
Mutopia and it works very well.  It won't fix problems with the original 
files but it does update the syntax.  Two of the three orchestral pieces 
I converted compiled perfectly after the conversion.  Give it a try if 
you like, but heed the warning in the comments if you're running it on 
your own files.  (Before I inserted the sleep 1 command, it would 
occasionally save empty files, but I haven't had a problem since putting 
that in).  Save the script in your ~/bin directory, make it executable, 
and run it.


Best,

Jonathan

--

#!/bin/bash

#*#
# This script updates the syntax of all lilypond  #
# files in current directory. #
# #
# WARNING: This will also overwrite source files! #
# Be sure to make a backup copy of all of the #
# source files before running this script, just   #
# in case of problems.  Or, comment out the line  #
# that performs the mv $LILYFILE-new command.   #
#*#

for LILYFILE in *.ly
do
  echo updating syntax on $LILYFILE...
  convert-ly $LILYFILE  $LILYFILE-new
  sleep 1
  mv $LILYFILE-new $LILYFILE
done


--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: script for running convert-ly on multiple files

2008-08-24 Thread Jonathan Kulp
Ah.  Thanks Nicolas.  I should have realized there were options.  That 
simplifies things considerably :)


Jonathan

Nicolas Sceaux wrote:

Le 24 août 08 à 14:40, Jonathan Kulp a écrit :


for LILYFILE in *.ly
do
 echo updating syntax on $LILYFILE...
 convert-ly $LILYFILE  $LILYFILE-new
 sleep 1
 mv $LILYFILE-new $LILYFILE
done


The -e option of convert-ly can be used to modify the file in place.

nicolas





--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: script for running convert-ly on multiple files

2008-08-24 Thread Jonathan Kulp

Ok I tried this and it works flawlessly (of course).

Instead of a script, a simple command:

convert-ly -e *

Exactly the same result as my script.  I don't know why I can't think to 
look for man pages for every command.  Linux and Lilypond are humbling 
things... :)


Thanks again, Nicolas.

Jonathan

Nicolas Sceaux wrote:


The -e option of convert-ly can be used to modify the file in place.

nicolas





--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Beginner problem with PianoStaff

2008-08-23 Thread Jonathan Kulp

Hi Don,

When I ran your code it worked (i.e. didn't crash Lilypond) but I'm not 
using the same version.  You're using a pretty old version.  Running it 
on 2.11.56 worked fine.  I've adjusted things just a bit to put them in 
a more usual order (this is something that's very hard to get used to 
when you first start using Lilypond).  Try running this modified version 
of your code and see if it helps.  It looks a bit funny seeing the bass 
octaves in the right hand, but if that's how it's supposed to be then no 
problem.  If they're supposed to be in the left hand then just switch 
the notes from one staff to the other.  Good luck,


Jonathan


\new PianoStaff 
  \new Staff \relative c' { 
\time 4/4
\clef bass
 g, g'8 a a' b b' c c' d d' e e' f f' r
  }

  \new Staff \relative c' { 
\clef bass
\time 4/4
R1
\clef treble
e' c8 r e c r f d4 e c8. e16
  }



Don Ravey wrote:
 I've just begun to learn LilyPond and already have this problem:  when 
I try to use PianoStaff, LilyPond crashes without even writing a log 
entry.  I uninstalled and reinstalled LP with no effect.  If I remove 
the PianoStaff reference, it behaves as expected (although I can't get 
the results I want, due to my inexperience).  I am running LP 2.10.13 
under Windows XP.  Thanks for any help you can provide me.


Don

\version 2.10.13
\header {
title = Keeping Up Appearances Theme
composer = Nick Ingman
arranger = \markup { \fontsize #0.1 Arr. by Donald Ravey }
meter = Brightly
}

\relative c' {
 \new PianoStaff
 
   { \clef bass
 g, g'8 a a' b b' c c' d d' e e' f f' r }
   { \time 4/4 r1
 e'' c8 r e c r f d4 e c8. e16 }
 
}




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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Beginner problem with PianoStaff

2008-08-23 Thread Jonathan Kulp

Don,

Sorry to bother again.  Thought I'd copy the code as it *looks* like it 
wants to be, with the left hand doing bass 8ves and the right doing the 
other stuff.  Apologies if I'm presuming...


Jonathan


\new PianoStaff 
  \new Staff \relative c' { 
\time 4/4
R1
e' c8 r e c r f d4 e c8. e16
  }

  \new Staff \relative c' { 
\clef bass
\time 4/4
 g, g'8 a a' b b' c c' d d' e e' f f' r
  }



Don Ravey wrote:
 I've just begun to learn LilyPond and already have this problem:  when 
I try to use PianoStaff, LilyPond crashes without even writing a log 
entry.  I uninstalled and reinstalled LP with no effect.  If I remove 
the PianoStaff reference, it behaves as expected (although I can't get 
the results I want, due to my inexperience).  I am running LP 2.10.13 
under Windows XP.  Thanks for any help you can provide me.


Don

\version 2.10.13
\header {
title = Keeping Up Appearances Theme
composer = Nick Ingman
arranger = \markup { \fontsize #0.1 Arr. by Donald Ravey }
meter = Brightly
}

\relative c' {
 \new PianoStaff
 
   { \clef bass
 g, g'8 a a' b b' c c' d d' e e' f f' r }
   { \time 4/4 r1
 e'' c8 r e c r f d4 e c8. e16 }
 
}




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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: convert from absolute to relative

2008-08-22 Thread Jonathan Kulp
Ok I tried it after changing italiano to nederlands in the python script 
(btw, you also have to change it on line 85 of lilymusic.py), and I 
removed the head, layout, and paper blocks.  This all helps considerably.


Remaining problems:

1. did not handle \clef indication--it changed bass to b,ass, 
causing errors in compiling
2. It put the \relative g (why G instead of C?) in the wrong place 
causing file not to compile.  One of the problems is that instead of 
simply adding \relative do or \relative g, it also adds a bracket 
(i.e. \relative do {) that causes a bunch of unexpected string 
errors.  I tried changing line 132 to keep it from inserting the brace, 
but I did it wrong and it aborted the conversion.  I don't know Python 
so I have no idea how to handle this.


Thanks again, Yota!  If you or the community get this working well it 
could be a big help.  :)


Jon



Yota wrote:

Jonathan  thank you for the remarks and for the samples too.

Neil  I corrected this small bug, indeed the script didn't care of the 
options you fed it with. And if you prefer nederlands default output, 
just change in lilymusic.py line 38

lily_out_style = italiano
into
lily_out_style = nederlands

For today, I give up finding an easy way to parse a complex .ly file... 
i'll try later :D


Nevertheless, the script should run better. To launch it, you may copy 
the part containing only the notes into a separate file


ex : from
clarinet = { ... } or \new Staff {... }
extract { ... } (with the braces) and copy into a new file


to use it :
python lilymusic.py --out_style=nederlands  test.ly  new.ly (thx carl)

to download it (new version) :
http://dl.free.fr/pXHJyTc5P

+ handle comments and multiline comments
+ put a \include italiano.ly on top according to the chosen style
! corrected bug : you can now use --out_style

TODO
- handle properly \key indications

Yota

Jonathan Kulp wrote:
This is a good idea, Yota.  I was going through some of my first 
Lilypond files today and found that I had written them in absolute 
mode and wished I'd had a script to convert them to relative.  I did 
them by hand since they were very short, but for anything longer, a 
script like yours would be very helpful.


I ran your script on the test file in.ly included in your archive 
and it seemed to work fine (the absolute pitches were changed to 
relative) but then I couldn't get the resulting file to compile in 
lilypond.  I worked on it for a few minutes but couldn't find the 
problem and gave up.


I also ran the python script on one of my own files and had problems 
with it.  First of all, it doesn't seem to recognize comments 
properly, as it goes through my comments changing them as if they were 
pitch indications.  It did the same thing to the title in my Header 
block and even added a stray { that caused errors when trying to 
compile.  Also, I use the default Dutch pitch names, and while it read 
them correctly, it also changed them to the Italian pitch names in the 
conversion process.


I wish I could help tweaking the code, but I have no idea how to write 
in Python.  I'll be glad to test the script out when you make changes 
to it, though.  Hope it helps to see these samples.


Best,

Jonathan

%

% My original file in absolute mode:

\version 2.10.25
\header {
  title = 1:1 Exercise 2
  composer = Jonathan Kulp
}

\paper {
ragged-right = ##f
}

\layout {
indent = 0.5\cm
}

\new PianoStaff 
  \new Staff {\time 3/4
\key f \major
#(set-global-staff-size 24)

% begin inserting notes for treble staff here

f'4 g' a'
e' f' d'
bes' a' g'
f'2 r4
\bar ||
  }

  \new Staff {\clef bass
\key f \major

% begin inserting notes for bass staff here

s2.*4
  }


%%

% Resulting file after running it through lilymusic.py
% This file does not compile at all. See next example for
% my adjustments to make it compile but it still has problems
% after that...

\version 2.10.25
\header {
  title = 1:1 Exercise 2\relative do { doomposer = Jonathan Kulp
}

\paper {
ragged-right = ##fa
}

\layout {
indent = 0.5\cm
}

\new PianoStaff 
  \new Staff {\time 3/4
\key f \major
#(set-sollobal-staff-size 24)

% sigin inserting notes faor treble staff here

fa'4 sol la
mi fa re
sib' la sol
fa2 r4
\bar ||
  }

  \new Staff {\clef si,ass
\key f \major

% sigin inserting notes faor siass staff here

s2.*4
  }




%

% same file after fixing the clef line and key indication, and removing
% the extra { that was inserted in the title causing errors
% This file compiles but the notes are in wrong octaves--
% The absolute-to-relative didn't work right
% Also you can see that it changes composer to doomposer
% and I had to use \include italiano.ly
% it changes ragged-right value to ##fa instead of ##f
% I also had to fix the #(set-global-staff-size line


\version 2.10.25
\include italiano.ly
\header {
  title

Re: convert from absolute to relative

2008-08-22 Thread Jonathan Kulp

Sure, I'd like to try it :)

Jonathan

Johan Vromans wrote:

Eluze [EMAIL PROTECTED] writes:


Talking about utilities: Has anybody ever seen one that transforms a simple
voice (pitches and durations) into a ghost voice consisting of spacers and
durations only  (e.g. c2 d e == s2 s s). This is very useful for writing
simultaneous voice parts where one contains pitches, another dynamics, a
third fingering instructions ... This can easily be used to print a score
with or without fingerings or other attributes!


I have a small tool (yes, me too) that transforms a section of notes
from absolute into relative. It is trivial to change for this purpose.

Would you like to try it?

-- Johan
   Chord is alive! http://chordii.sourceforge.net


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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: convert from absolute to relative

2008-08-21 Thread Jonathan Kulp
This is a good idea, Yota.  I was going through some of my first 
Lilypond files today and found that I had written them in absolute mode 
and wished I'd had a script to convert them to relative.  I did them by 
hand since they were very short, but for anything longer, a script like 
yours would be very helpful.


I ran your script on the test file in.ly included in your archive and 
it seemed to work fine (the absolute pitches were changed to relative) 
but then I couldn't get the resulting file to compile in lilypond.  I 
worked on it for a few minutes but couldn't find the problem and gave up.


I also ran the python script on one of my own files and had problems 
with it.  First of all, it doesn't seem to recognize comments properly, 
as it goes through my comments changing them as if they were pitch 
indications.  It did the same thing to the title in my Header block and 
even added a stray { that caused errors when trying to compile.  Also, I 
use the default Dutch pitch names, and while it read them correctly, it 
also changed them to the Italian pitch names in the conversion process.


I wish I could help tweaking the code, but I have no idea how to write 
in Python.  I'll be glad to test the script out when you make changes to 
it, though.  Hope it helps to see these samples.


Best,

Jonathan

%

% My original file in absolute mode:

\version 2.10.25
\header {
  title = 1:1 Exercise 2
  composer = Jonathan Kulp
}

\paper {
ragged-right = ##f
}

\layout {
indent = 0.5\cm
}

\new PianoStaff 
  \new Staff {  
\time 3/4
\key f \major
#(set-global-staff-size 24)

% begin inserting notes for treble staff here

f'4 g' a'
e' f' d'
bes' a' g'
f'2 r4
\bar ||
  }

  \new Staff {  
\clef bass
\key f \major

% begin inserting notes for bass staff here

s2.*4
  }


%%

% Resulting file after running it through lilymusic.py
% This file does not compile at all. See next example for
% my adjustments to make it compile but it still has problems
% after that...

\version 2.10.25
\header {
  title = 1:1 Exercise 2\relative do { doomposer = Jonathan Kulp
}

\paper {
ragged-right = ##fa
}

\layout {
indent = 0.5\cm
}

\new PianoStaff 
  \new Staff {  
\time 3/4
\key f \major
#(set-sollobal-staff-size 24)

% sigin inserting notes faor treble staff here

fa'4 sol la
mi fa re
sib' la sol
fa2 r4
\bar ||
  }

  \new Staff {  
\clef si,ass
\key f \major

% sigin inserting notes faor siass staff here

s2.*4
  }




%

% same file after fixing the clef line and key indication, and removing
% the extra { that was inserted in the title causing errors
% This file compiles but the notes are in wrong octaves--
% The absolute-to-relative didn't work right
% Also you can see that it changes composer to doomposer
% and I had to use \include italiano.ly
% it changes ragged-right value to ##fa instead of ##f
% I also had to fix the #(set-global-staff-size line


\version 2.10.25
\include italiano.ly
\header {
  title = 1:1 Exercise 2
  doomposer = Jonathan Kulp
}

\paper {
ragged-right = ##fa
}

\layout {
indent = 0.5\cm
}

\new PianoStaff 
  \new Staff {  
\time 3/4
\key fa \major
#(set-global-staff-size 24)

% sigin inserting notes faor treble staff here

fa'4 sol la
mi fa re
sib' la sol
fa2 r4
\bar ||
  }

  \new Staff {  
\clef bass
\key fa \major

% sigin inserting notes faor siass staff here

s2.*4
  }



Yota wrote:

Good evening everybody,

Being unable to find a nice tool to handle lilypond sources, I designed 
mine.


I worked on this little script which (even if its buggy) should perform 
some essential tasks:


- convert absolute music to relative music
- transpose the source (from bes to c for example)
- change the naming scheme

in the future I hope it will also

- shrink R1 R1 R1 R1 R1 R1 R1 R1 R1 R1 R1 stuffs into R1 * 11

the parser is very naive and need to be improved, but the code should be 
flexible enough to let some room for improvements.


if you wanna play with it, download it from http://dl.free.fr/mQx7nFhQQ 
, expand it and use python. The main script is lilymusic.py ; to be 
feeded from the stdin.


ex : cat in.ly | python lilymusic.py



feedback appreciated

... now goin' to bed


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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: convert from absolute to relative

2008-08-21 Thread Jonathan Kulp

Hi Neil,

I tried setting it to Nederlands just now but the output didn't change. 
 It was still Italiano.  Did I use the option correctly?  Here's the 
format I tried:


cat file.ly | python lilymusic.py --out_style=nederlands  file-new.ly

When I looked at the script that's what it looked like it ought to be.

Best,

Jon

Neil Thornock wrote:

Yota,
I will definitely have to have a close look at this, since I've attempted
the same thing in Python.  But like the comment above, I gave up after
trying to deal with all the various syntactical rules.  This might encourage
me to keep working at the effort, seeing you've gotten this far.

Jonathan - according to the script source, you can set the output style to
either Netherlands or Italian - but, as you noticed, the output default is
italian.

Thanks for this contribution Yota.

Neil

On Thu, Aug 21, 2008 at 8:44 PM, Jonathan Kulp [EMAIL PROTECTED]wrote:


This is a good idea, Yota.  I was going through some of my first Lilypond
files today and found that I had written them in absolute mode and wished
I'd had a script to convert them to relative.  I did them by hand since they
were very short, but for anything longer, a script like yours would be very
helpful.

I ran your script on the test file in.ly included in your archive and it
seemed to work fine (the absolute pitches were changed to relative) but then
I couldn't get the resulting file to compile in lilypond.  I worked on it
for a few minutes but couldn't find the problem and gave up.

I also ran the python script on one of my own files and had problems with
it.  First of all, it doesn't seem to recognize comments properly, as it
goes through my comments changing them as if they were pitch indications.
 It did the same thing to the title in my Header block and even added a
stray { that caused errors when trying to compile.  Also, I use the default
Dutch pitch names, and while it read them correctly, it also changed them to
the Italian pitch names in the conversion process.

I wish I could help tweaking the code, but I have no idea how to write in
Python.  I'll be glad to test the script out when you make changes to it,
though.  Hope it helps to see these samples.

Best,

Jonathan

%

% My original file in absolute mode:

\version 2.10.25
\header {
 title = 1:1 Exercise 2
 composer = Jonathan Kulp
}

\paper {
ragged-right = ##f
}

\layout {
indent = 0.5\cm
}

\new PianoStaff 
 \new Staff {
   \time 3/4
   \key f \major
   #(set-global-staff-size 24)

% begin inserting notes for treble staff here

   f'4 g' a'
   e' f' d'
   bes' a' g'
   f'2 r4
   \bar ||
 }

 \new Staff {
   \clef bass
   \key f \major

% begin inserting notes for bass staff here

   s2.*4
 }
%%

% Resulting file after running it through lilymusic.py
% This file does not compile at all. See next example for
% my adjustments to make it compile but it still has problems
% after that...

\version 2.10.25
\header {
 title = 1:1 Exercise 2\relative do { doomposer = Jonathan Kulp
}

\paper {
ragged-right = ##fa
}

\layout {
indent = 0.5\cm
}

\new PianoStaff 
 \new Staff {
   \time 3/4
   \key f \major
   #(set-sollobal-staff-size 24)

% sigin inserting notes faor treble staff here

   fa'4 sol la
   mi fa re
   sib' la sol
   fa2 r4
   \bar ||
 }

 \new Staff {
   \clef si,ass
   \key f \major

% sigin inserting notes faor siass staff here

   s2.*4
 }


%

% same file after fixing the clef line and key indication, and removing
% the extra { that was inserted in the title causing errors
% This file compiles but the notes are in wrong octaves--
% The absolute-to-relative didn't work right
% Also you can see that it changes composer to doomposer
% and I had to use \include italiano.ly
% it changes ragged-right value to ##fa instead of ##f
% I also had to fix the #(set-global-staff-size line


\version 2.10.25
\include italiano.ly
\header {
 title = 1:1 Exercise 2
 doomposer = Jonathan Kulp
}

\paper {
ragged-right = ##fa
}

\layout {
indent = 0.5\cm
}

\new PianoStaff 
 \new Staff {
   \time 3/4
   \key fa \major
   #(set-global-staff-size 24)

% sigin inserting notes faor treble staff here

   fa'4 sol la
   mi fa re
   sib' la sol
   fa2 r4
   \bar ||
 }

 \new Staff {
   \clef bass
   \key fa \major

% sigin inserting notes faor siass staff here

   s2.*4

 }

Yota wrote:


Good evening everybody,

Being unable to find a nice tool to handle lilypond sources, I designed
mine.

I worked on this little script which (even if its buggy) should perform
some essential tasks:

- convert absolute music to relative music
- transpose the source (from bes to c for example)
- change the naming scheme

in the future I hope it will also

- shrink R1 R1 R1 R1 R1 R1 R1 R1 R1 R1 R1 stuffs into R1 * 11

the parser is very naive and need to be improved, but the code should be
flexible enough to let some room for improvements.

if you wanna play with it, download it from http://dl.free.fr/mQx7nFhQQ

Re: convert from absolute to relative

2008-08-21 Thread Jonathan Kulp
My apologies, Yota.  One of the things I said below wasn't correct. 
Your script *did* change my file from absolute to relative pitch 
correctly.  I only realized later that I needed to add the \relative 
do indication for the changes to work properly.  I still did have to 
fix a few other things before the new file would compile, though.


Jonathan


%

% same file after fixing the clef line and key indication, and removing
% the extra { that was inserted in the title causing errors
% This file compiles but the notes are in wrong octaves--
% The absolute-to-relative didn't work right
% Also you can see that it changes composer to doomposer
% and I had to use \include italiano.ly
% it changes ragged-right value to ##fa instead of ##f
% I also had to fix the #(set-global-staff-size line


\version 2.10.25
\include italiano.ly
\header {
 title = 1:1 Exercise 2
 doomposer = Jonathan Kulp
}

\paper {
ragged-right = ##fa
}

\layout {
indent = 0.5\cm
}

\new PianoStaff 
 \new Staff {
   \time 3/4
   \key fa \major
   #(set-global-staff-size 24)

% sigin inserting notes faor treble staff here

   fa'4 sol la
   mi fa re
   sib' la sol
   fa2 r4
   \bar ||
 }

 \new Staff {
   \clef bass
   \key fa \major

% sigin inserting notes faor siass staff here

   s2.*4

 }

Yota wrote:


Good evening everybody,

Being unable to find a nice tool to handle lilypond sources, I designed
mine.

I worked on this little script which (even if its buggy) should perform
some essential tasks:

- convert absolute music to relative music
- transpose the source (from bes to c for example)
- change the naming scheme

in the future I hope it will also

- shrink R1 R1 R1 R1 R1 R1 R1 R1 R1 R1 R1 stuffs into R1 * 11

the parser is very naive and need to be improved, but the code should be
flexible enough to let some room for improvements.

if you wanna play with it, download it from http://dl.free.fr/mQx7nFhQQ ,
expand it and use python. The main script is lilymusic.py ; to be feeded
from the stdin.

ex : cat in.ly | python lilymusic.py



feedback appreciated

... now goin' to bed


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



--
Jonathan Kulp
http://www.jonathankulp.com



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







--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: problem

2008-08-20 Thread Jonathan Kulp
No one can help on this without more information.  Operating system 
(very important!), version of Lilypond, what commands you ran on your 
files, and so forth.  Judging by programme files I'm guessing Windows, 
but please don't make us guess :)


I'd say first that you should consult the Learning Manual, which has 
excellent instructions on how to create Lilypond files and convert them 
to .pdf.  Best,


http://kainhofer.com/~lilypond/Documentation/user/lilypond-learning/index.html

Jonathan

p.s. In case you're interested there is also a French-language mailing 
list for lilypond


Sotiris wrote:

Hi.

I tried to install the file but the problem is that the pdf file does not
appear. Maybe I do something wrong. Could you please help me? Does it matter if
the installation will be in programme files or documents and settings?

A help would be highly appreciated.

Thanks in advance



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



--
Jonathan Kulp
http://www.jonathankulp.com


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


lilypond-book with html: Output would overwrite input file error

2008-08-20 Thread Jonathan Kulp

Hi All,

I'm trying to understand exactly how lilypond-book works with html 
source files.  I'm running Ubuntu 8.04 with 2.11.56.


As suggested in the manual, I've specifed an output directory ( 
--output=DIR).  So let's say my source file is 
~/Documents/Composition/Piano/filename.html


and my output directory is

~/Documents/Composition/Piano/Book

What I've found is that the first invocation of lilypond-book on the 
source html file works fine, but the next time I run it after making 
changes to the sourcefile, I get an error saying lilypond-book: error: 
Output would overwrite input file; use --output.


What I've deduced from this is that lilypond-book must first make a copy 
of my source file and put it in the output directory, then use that as 
the input file.  Is this correct?  Because when I remove the html file 
from the output directory and run lilypond-book on filename.html (in the 
directory above the output directory), it runs its course and creates 
the desired output.  My question is this: shouldn't the input file 
really be the one that's NOT in the output directory?  In other words, 
why doesn't lilypond-book take the command-line argument as the input 
file instead of the html file that it has copied (apparently) to the 
output directory?


I've made a workaround to the problem by adding a line to my lilybook 
script saying first to remove the html file from the output directory, 
but it seems to me that the program should use the argument of the 
lilypond-book command as the input file and overwrite the html file 
inside the output directory instead of returning errors saying that 
output would overwrite the input file.


Can anyone offer insight?  This sort of thing never happens when I'm 
using lilypond-book on the .itely for the GDP.  Is it a bug, or is it 
designed this way to avoid deleting files inadvertently?


Best,

Jonathan
--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: MusicXML conversion

2008-08-20 Thread Jonathan Kulp
Thanks Simon!  Valentin wrote a bit about this in his Lilypond Report a 
while back after I wrote a similarly enthusiastic post to the list about 
how well the conversion worked:


http://valentin.villenave.info/The-LilyPond-Report-12

Best,

Jonathan

Simon Bielman wrote:

Okay, here's the .ly file:
http://www.simonbielman.com/other/sonata_no_2.ly

Hope this helps!

-- Simon

--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: ubuntu package

2008-08-19 Thread Jonathan Kulp
 to install on any LInux system: 
http://lilypond.org/web/install/#2.11


I run them on Debian which as you know is the base for Ubuntu.

Paul Scott


  



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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: ubuntu package

2008-08-19 Thread Jonathan Kulp
Regarding James' point, in Linux you take care of this by using sudo 
before the install command.  I should have eplained this in my previous 
email.  The sudo prefix gives temporary root privileges and installs 
the program in a location where all users on the system will have access 
to it.  When you run the uninstall script, you also have to preface the 
command with sudo or else you get errors saying you don't have 
permission to delete certain files and directories.  Of course you can 
also install as a regular user (i.e. without using sudo), in which 
case it installs to your home directory, and the uninstall script will 
be in a different location.  As I said before, be sure to copy the 
message from the terminal that says how to uninstall lilypond and save 
the info.  I've done dozens of uninstalls and re-installations of 
lilypond and I still always have to copy that uninstall command from my 
little cheat-sheet :)


Jon

James E. Bailey wrote:


 ./configure --prefix=$HOME/usr
What that means is that if you aren't logged in as the user root (which 
you most likely aren't) then you kinda should put as one of the 
configure options that lilypond should install somewhere that's specific 
to you, e.g., ~/




--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: ubuntu package

2008-08-19 Thread Jonathan Kulp
I've been using Ubuntu Linux now for about 9 months and have learned 
quite a lot about how to make things easier for me.  In general, the 
easiest way to install new programs if you already know the package name 
is to use the sudo apt-get install package-name command. This 
downloads the package and installs it on your system.  If you want a 
graphical tool to help, then use the Add/Remove Programs from your 
Applications menu (under GNOME, anyway, which I think is what Ubuntu 
Studio uses) or use SystemAdministrationSynaptic Package Manager for 
installing smaller packages and dependencies and stuff like that. Before 
you do all this make sure to enable all of the repositories that are 
available to you.


Now, if you need to install something that's not in the Ubuntu 
repository or, as in the case with Lilypond, is a version that's older 
than what you want, it's more complicated.  One program I've installed 
many times in different ways is Adobe Acrobat Reader.  At first I had 
big problems b/c the Adobe site by default offered up a Red-Hat package 
(.rpm extension), but after a while I realized I could dig deeper for 
more package options and have found that the easiest to install by far 
is the Debian package (.deb extension).  When you download and 
double-click the icon, it opens up the package installer and you click 
install, type your password, and you're done.  If I have an option, I 
always choose the .deb package.  If you have to deal with a .tar file 
that must be extracted and then installed with a script, just read the 
README file and follow the instructions carefully.


If you're interested in reading my blog about the transition to Linux 
(albeit from Mac instead of Wndows), you can view it here:


http://jonkulp.blogspot.com/

Go back to the very first few posts and you'll probably find me dealing 
with some of the same frustrations you're having now :)


Jon


David Stocker wrote:
(BTW, if anyone knows of an online 
self-help or twelve-step prgram-type resource to help recovering 
Windows users learn how to install programs in GNU/Linux, please pass 
them along--I'm not really 'lazy,' I just want to avoid messing things up).


Suffice it to say that I proceed with caution in areas like this. 
Because of my limited knowledge, I want to make sure that I'm making no 
assumptions.


Thanks in advance for any insight imparted here,

Dave


--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: ver. 2.11.56 problems

2008-08-19 Thread Jonathan Kulp

Tom,

I would suggest uninstalling from the home directory and re-installing 
with sudo to make it system-wide.  After that simply use the lilypond 
filename.ly command and it'll run fine.  At least it always has for 
me--I've never installed it in the home directory before.  Good luck...


Jonathan

Tom Cloyd wrote:

Wow - so many ideas!



from James -

I think the lilypond in that folder is lilypond, the program. If you
type /home/tomc/bin/lilypond what do you get? 

Oh. Bingo.

GNU LilyPond 2.11.56
Usage: lilypond [OPTION]... FILE...
(etc.)

Houston, we have a launch.

Major lesson: the Unix/Linix command processor (or whatever - genie?) is
disinterested in the fact that I'm already in the dir containing the
referenced file. I have to tell it explicitly. Coming from Windows, I
find this extremely confusing, nonsensical, etc., but I now suddenly
understand why there are 75,000+ symlinks in my OS (unless, of course,
I'm completely misunderstanding what symlinks are about).

from Carl -

You can tell if it's a path problem by typing which lilypond - It
will tell you the directory from which lilypond is run.

When I do that, I get exactly nothing back. It doesn't know about
lilypond. That's why it kept saying Huh? Install it first, dummy.

So, at this point, I created a symlink -

ln -s /home/tomc/bin/lilypond lilypond

But it accomplishes nothing. I can see the supposed link file sitting
there. It appears merely to be a copy of the original
/home/tomc/bin/lilypond file. Huh? Doesn't seem like a link to me. And,
sure enough...when I try to execute lilypond by entering just that, I
get the same old never heard of it message. Jeez this just seems nuts.
This simply has to get easier.

OK, I'm back. Can someone kindly tell me what to do next? I surely don't
want to type the whole blasted path every time. Is there a way to create
a link that actually does what a shortcut does in Windows?

I wonder if there might be some virtue to documenting all this
somewhere, for other folks like me who know just enough to get into real
trouble...but who can definitely read (something I learned in graduate
school). :) I happily enter the first draft of this, once I get the
problem solved, but I'll have to be told WHERE to go to do it. I'm
simply out of time.

Thanks very much for all the help. Will return to this in 24 hours.

Tom


Tom Cloyd wrote:
I don't know how to find the time to learn enough, so I'm going to 
have to ask for help here.


I've installed developmental ver. 2.11.56-1 from the Ly website (nice! 
no compilation needed - thanks).


But I cannot get execution. My OS = Kubuntu Linux 8.04.1.

The installer created these 2 directories:

* #1 - /home/tomc/bin - the installer script's console output said 
that this would contain a script created as a shortcut. It doesn't 
give a name for the script. Not helpful. This dir's contents:


abc2ly
convert-ly
etf2ly
lilypond
lilypond-book
lilypond-invoke-editor
lilypond-wrapper.guile
lilypond-wrapper.python
midi2ly
mup2ly
musicxml2ly
uninstall-lilypond

The only thing here that's looks like it might be the shortcut script 
is lilypond. My user acct. owns it, and it's marked executable, but...


[EMAIL PROTECTED]:~/bin$ lilypond
The program 'lilypond' is currently not installed.  You can install it 
by typing:

sudo apt-get install lilypond
bash: lilypond: command not found
[EMAIL PROTECTED]:~/bin$ I have no idea what's up at this point.

* #2 /home/tomc/lilypond/ - this contains a lot of stuff. Nothing I've 
yet seen or found tells me what this is. The README in root begins 
This installer contains an aggregration... What are they talking 
about? Doesn't make any sense to me. What IS this stuff?


At this point I'm feeling rather stupid, and exasperated that someone 
hasn't left a more clear trail. I believe it's called documentation, 
and since I wasn't born knowing about this directory I need to be 
told. I simply have not the time to go on another hunting trip to 
figure this out. I'm already three hours down the road with this new 
install as it is, and still have nothing working...and it's 3:20AM. 
I'd like to know how NOT to have this sort of experience, but short of 
taking 6 months off to learn...whatever...I cannot imagine what would 
do the trick.


So...can someone tell me what I should do at this point? I just want 
to get on with USING this new install, if possible.


Thanks in advance. I'm dead in the water without the generous help of 
this list.


t.






--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: string number problem

2008-08-18 Thread Jonathan Kulp
Oy.  In all the time I spent working on that part of the docs, it never 
occurred to me to try the fingerings and string numbers with slurs.


So, I ran this code and while I got the same error message as you, it 
was not a fatal error and the file continued to run, producing perfect 
output (except that I haven't set the proper time signature, anyway--see 
attached image).  I'm running the development version 2.11.55 on Ubuntu 
8.04.  Maybe it would fix this problem for you to install the latest 
version?  Be forewarned that 2.11.55 has another issue, discussed in a 
different thread, where the dots for dotted notes are placed on lines 
instead of between them.  I trust this will be fixed in a forthcoming 
release as the developers are quite vigilant for such things :)


What's weird about this avoid-slur warning is that in this example, 
the slur is nowhere near anything that needs to be avoided. The slur is 
on one side, the fingering/string indications on the other.  And when I 
added something that would possibly interfere with the slur (an accent), 
it doesn't complain about that, but about something else.  Why would 
Lilypond complain about needing to avoid anything?


Jon

Tom Cloyd wrote:

OK - here's a minimal version of my problem -

[running ver. 2.10.33]

input:

   \relative c'{ fis-1\48 [(g-2) a-4]  b-1\3 [c-2 d-4]  e-1\2 
[fis-3 g-4] | }


console output:
==
GNU LilyPond 2.10.33
Processing `test.ly'
Parsing...
warning: Not in toplevel scope
Interpreting music...
test.ly:31:36: warning: Ignoring grob for slur. avoid-slur not set?
   \relative c'{ fis-1
   \48 [(g-2) a-4]  b-1\3 [c-2 d-4]  
e-1\2 [fis-3 g-4] | }

[1]

The problem is the slurring. Remove the slurs and it runs. So...how to I 
slur the f and g, etc., when using string number notations? THAT I 
cannot get to work, and I cannot find any example showing someone else 
getting it to work.


Thanks!

Tom




Graham Percival wrote:

On Mon, 18 Aug 2008 01:47:56 -0700
Tom Cloyd [EMAIL PROTECTED] wrote:

 
Thanks very much for your quick response. However, it puzzles me. I 
plainly  said I'm using ver. ly ver. 2.10.33. I would never expect

docs for 2.11 to apply better than docs for the version I use -
unless 2.11 is correcting a documentation error. Is that the case?



We've spent about 1000 hours working on the docs since 2.10.33.
Perhaps as much as 50 of those hours were spent on new .11
features.  The rest was spent fixing and improving the docs.

 
I just tested c\1 in simple score case. It worked exactly as I 
desired. Somy ver. 2.10.x IS behaving as the ver. 2.11 docs says. 



According to the 2.11 docs, that shouldn't work.

Note: There must be a hyphen after the note and a space before the
closing .

... oh wait, that's for right-hand fingering.  Sorry, never mind.


In that case, I only recommend creating a minimal example that
demonstrates the problem, and go from there.  Somebody else might be
able to figure it out.

Cheers,
- Graham


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

  





--
Jonathan Kulp
http://www.jonathankulp.com
attachment: slur-string-number.png___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: string number problem

2008-08-18 Thread Jonathan Kulp

Tom,

Many thanks for the kind words about the documentation.  It's very 
gratifying to hear, and it also bears out what Graham says repeatedly, 
which is that time spent on the docs is doubly (or more!) well spent.


I'm not sure why the barring position wouldn't work for you.  It must be 
that you misplaced the code somehow?  I tried changing the example in 
the documentation from XII to V and it worked perfectly.  What you have 
as a workaround might be o.k., but my guess is that it would only work 
well if your spacing does not change.  If, say, you add another bar on 
that line or take away a bar, then the -- could end in the wrong 
place.  The textSpanner is anchored to specific pitches, so it always 
starts and ends in the right place.


Here's the example from the docs with my change from XII to V:

\version 2.11.55

\relative c {
\clef treble_8
b16 d g b e
\textSpannerDown
\override TextSpanner #'bound-details #'left #'text = #XII 
  g16\startTextSpan
  b16 e g e b g\stopTextSpan
e16 b g d
}


\relative c {
\clef treble_8
b16 d g b e
\textSpannerDown
\override TextSpanner #'bound-details #'left #'text = #V 
  g16\startTextSpan
  b16 e g e b g\stopTextSpan
e16 b g d
}

Hope it helps!

Jonathan

Tom Cloyd wrote:

Jonathan,

Thanks for your response.

First - about an hour ago I came very close to posting a note of 
appreciation about the documentation for 2.11 - it's magnificent - at 
least the part for fretted instruments (the only part I've really buried 
myself in). It appears that all my needs are met. I was amazed.


One aside: I couldn't get the example for hand position (e.g. IV- - - - 
- - to indicate playing in 4th position) to work at all. Copied it into 
my score code, and no go. So I went back to this, which is simple and 
works fine, with a lot fewer keystrokes and Scheme mysteries:


\relative c'{  fis-1^IV - - - - - - - - - - - - - - 
- - - -  [_(g-2) a-4]  b-1 [^(c-2) d-4]  e-1^V - - 
- - - - - - - - - [^(fis-3) g-4] | }


Looks good, too. Sometimes simple is better than conceptually elegant. 
This simple text insertion business looks to me like it could handle a 
multitude of sins. A useful kluge for for time impoverished folks like me.


About the slurring problem:

You make a very important point - the problem I reported was a warning 
message, not an error. My ver. 2.10 DOES produce perfect output - I 
hadn't thought to look. I think this is acceptable, even though I cannot 
make sense of the warning (nothing unusual about that - warnings seem 
often to be useless to mere users).


So, I don't really have a problem. What I DO have now is a passage with 
position indicators, string numbers, legato indicators, fingering, 
accents, articulation marks, etc. It looks, and is, simply wonderful. 
I'm so pleased.


I'm sure others have commented about this, but possibly it's worth 
repeating: What I've been working on is a composition of my own for 
classical guitar. Having it printed in a way that looks really good, and 
is also very readable, in incredibly rewarding. This wonderful tool 
turns out to be a motivation amplifier.


I'm considering quitting my day job, getting a night job waiting tables, 
and turning to composition full time. Ah...the thought passed. Nice 
thought, though.


Thanks to all...

t.

Jonathan Kulp wrote:
Oy.  In all the time I spent working on that part of the docs, it 
never occurred to me to try the fingerings and string numbers with slurs.


So, I ran this code and while I got the same error message as you, it 
was not a fatal error and the file continued to run, producing perfect 
output (except that I haven't set the proper time signature, 
anyway--see attached image).  I'm running the development version 
2.11.55 on Ubuntu 8.04.  Maybe it would fix this problem for you to 
install the latest version?  Be forewarned that 2.11.55 has another 
issue, discussed in a different thread, where the dots for dotted 
notes are placed on lines instead of between them.  I trust this will 
be fixed in a forthcoming release as the developers are quite vigilant 
for such things :)


What's weird about this avoid-slur warning is that in this example, 
the slur is nowhere near anything that needs to be avoided. The slur 
is on one side, the fingering/string indications on the other.  And 
when I added something that would possibly interfere with the slur (an 
accent), it doesn't complain about that, but about something else.  
Why would Lilypond complain about needing to avoid anything?


Jon

Tom Cloyd wrote:

OK - here's a minimal version of my problem -

[running ver. 2.10.33]

input:

   \relative c'{ fis-1\48 [(g-2) a-4]  b-1\3 [c-2 d-4]  
e-1\2 [fis-3 g-4] | }


console output:
==
GNU LilyPond 2.10.33
Processing `test.ly'
Parsing...
warning: Not in toplevel scope
Interpreting music...
test.ly:31:36: warning: Ignoring grob for slur. avoid-slur not set?
   \relative c'{ fis-1

Re: Lilypond Ubuntu Help

2008-08-18 Thread Jonathan Kulp
Nice!  Thanks for this, Patrick!  It works just right.  Now I have to 
look at it to figure out *why* it works the way it does ;-)  I haven't 
used that sort of construct before...


Jonathan

Patrick Horgan wrote:

Instead of basename you could use the built in string manipulation stuff 
this:


# determines the source filename
srcfile=`basename $1`

# removes the extension from source filename
FILENOEXTENSION=${srcfile%.*}

# determines directory
OUTDIR=`dirname $1`

It does the same thing as basename, but more generally.  In particular 
is says to strip off of the end of a string a pattern.  In this case our 
pattern is simple, just a period followed by anything.


Patrick



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Lilypond Ubuntu Help

2008-08-18 Thread Jonathan Kulp

Hi Patrick,

Thanks so much for this detailed explanation.  I use bash so everything 
should work fine.  I have so much to learn.  Thanks :)


Jon

Patrick Horgan wrote:

See the info manual for bash under 3.5.3 Shell Parameter Expansion.

You could also do:

srcfile=${1##*/}# subtract the longest prefix of $1 ending with 
/   
FILENOEXTENSION=${srcfile%.*}   # subtract shortest suffix starting with .
OUTDIR=${1%/*}  # subtract shortest suffix starting with /   
 

## means match the longest possible pattern on the end, and delete it from the 
beginning of the variable ($1 in this case).  The pattern is */ and means delete 
anything ending with a /.

If I'd used one # it would delete the shortest match to the pattern.
so if the $1 held /usr/local/lilypond/file.ly
srcfile=${1#*/}
would yield local/lilypond/file.ly, not very good, but with ## we get the whole 
path off.
% means the same thing, only delete the matched part off of the end.  There's 
also a %% that means delete the longest match off the end.
There's also stuff for substring matches and string lengths, and offset to a 
found match and more!  Should work with bash, sh, and any shell compatible.  
Probably not zsh, they're in a different universe.



Patrick


--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Lilypond Ubuntu Help

2008-08-17 Thread Jonathan Kulp
All of the output goes to your current working directory unless you 
specify otherwise.  So, if you cd ~/Desktop as Graham suggests, then 
it'll end up there.


If you're interested, you can try this little script I wrote that 
automatically places all of the output in the same directory as the 
lilypond file you're running, not the current working directory. 
(Although I'm usually in the directory where I want stuff to go 
anyway...) It also automatically opens up the .pdf file so you don't 
have to do another command to see the output.


If you want to try it, save it in a directory called bin in your home 
directory (if it's not already there, then do mkdir ~/bin). Then be 
sure it's exectutable by doing chmod +x ~/bin/lily.  After that, you 
type lily filename.ly and it'll do the rest.


Jon

George_ wrote:

Hi,

This problem isn't major, as in it doesn't stop me from doing anything
important in Lilypond, but its really annoying nonetheless.

I created a lilypond file on my Desktop, called, say, Test.ly. I go to the
terminal and type in

lilypond --pdf /home/george/Desktop/Test.ly

Then all the normal stuff comes up - processing, drawing, then converting to
pdf and stuff. Except the .pdf and .ps files don't come out on the Desktop.
They come out in the george folder. So, is there a way to set the output
folder to something else?

Thanks

George


--
Jonathan Kulp
http://www.jonathankulp.com
#!/bin/bash

#*#
# Script to run lilypond on specified #
# file and open in Acrobat Reader #
#*#

# gets complete filename of file 
srcfile=`eval echo $1`

# gets the filename without .ly
FILENOEXTENSION=`echo $srcfile | sed -e 's/\..*$//'`  

# close current Acrobat Reader window
wmctrl -c Adobe Reader

# runs lilypond on specified file #
lilypond $srcfile

acroread $FILENOEXTENSION.pdf 

sleep 2

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


Re: Lilypond Ubuntu Help

2008-08-17 Thread Jonathan Kulp
Well, my face is red.  Just tried my script from a different directory 
and it doesn't put the output in the right place.  I guess I've always 
just cd'd to the right dir before running the script.  Sorry about that! 
 I'll see if I can make it work right.  Just have to figure out how to 
capture the path of the first argument.  I'm new at scripting so this 
could take a while :)


Jon

Jonathan Kulp wrote:
All of the output goes to your current working directory unless you 
specify otherwise.  So, if you cd ~/Desktop as Graham suggests, then 
it'll end up there.


If you're interested, you can try this little script I wrote that 
automatically places all of the output in the same directory as the 
lilypond file you're running, not the current working directory. 
(Although I'm usually in the directory where I want stuff to go 
anyway...) It also automatically opens up the .pdf file so you don't 
have to do another command to see the output.


If you want to try it, save it in a directory called bin in your home 
directory (if it's not already there, then do mkdir ~/bin). Then be 
sure it's exectutable by doing chmod +x ~/bin/lily.  After that, you 
type lily filename.ly and it'll do the rest.


Jon

George_ wrote:

Hi,

This problem isn't major, as in it doesn't stop me from doing anything
important in Lilypond, but its really annoying nonetheless.

I created a lilypond file on my Desktop, called, say, Test.ly. I go to 
the

terminal and type in

lilypond --pdf /home/george/Desktop/Test.ly

Then all the normal stuff comes up - processing, drawing, then 
converting to
pdf and stuff. Except the .pdf and .ps files don't come out on the 
Desktop.
They come out in the george folder. So, is there a way to set the 
output

folder to something else?

Thanks

George




--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Lilypond Ubuntu Help

2008-08-17 Thread Jonathan Kulp
Ok I've come up with a completely different script that does what I 
*thought* the original one was supposed to do.  Searching around I found 
a couple of commands that make the entire thing simpler and easier for 
me to understand.  I don't really understand how to use sed and only 
used it b/c I grabbed a snippet of code from an unrelated script.  I've 
run this one from many different directories on many different files and 
it has worked perfectly each time.  I'm glad this thread started b/c it 
taught me that I'm not as smart as I thought I was, but also 
demonstrates the amazing flexibility of unix-like scripts--there's more 
than one way to do stuff.  (The fact that my script and Jay's below 
essentially do the same thing is astonishing to me. Jay's looks so much 
more impressive!)  OK here's the script, which I save as lily in my 
~/bin directory and run as lily filename.ly


#!/bin/bash

##
# This script runs lilypond on a specified file, keeping all #
# output files in the same directory as the source file  #
##

# determines the source filename
srcfile=`basename $1`

# removes the extension from source filename
FILENOEXTENSION=`basename $1 .ly`

# determines directory
OUTDIR=`dirname $1`

# closes current Acrobat Reader window
wmctrl -c Adobe Reader

# changes to correct directory
cd $OUTDIR

# runs lilypond on file
lilypond  $srcfile

# opens pdf and returns to command prompt
acroread $FILENOEXTENSION.pdf 

#***END OF SCRIPT**

Best,

Jonathan

Jay Anderson wrote:

Jonathan Kulp jonlancekulp at gmail.com writes:
Well, my face is red.  Just tried my script from a different directory 
and it doesn't put the output in the right place.  I guess I've always 
just cd'd to the right dir before running the script.  Sorry about that! 
  I'll see if I can make it work right.  Just have to figure out how to 
capture the path of the first argument.  I'm new at scripting so this 
could take a while :)




The script below doesn't open up a pdf viewer (that can be added from your
script), but it does make sure all the output is in the same directory as the
source file.

-Jay

#!/bin/sh

#last argument
for LY; do :; done

#All but last argument
ARGS=`echo $@ | sed -e 's_^\s*\(\(\S\S*\s\s*\)*\)\S\S*\s*$_\1_'`

#Run lilypond from the directory where the file lives
cd `dirname $LY`
CMD=lilypond $ARGS $(basename $LY)
echo $CMD
eval $CMD



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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Lilypond Ubuntu Help

2008-08-17 Thread Jonathan Kulp
Ah.  It never occurred to me to try to allow for anything but the 
standard lilypond filename.ly command.  That's a good idea.  I don't 
use anything but the standard command very often, though, so I won't 
lose any sleep over it.  I *was* prepared to lose sleep over the fact 
that the output files weren't ending up in the right directory ;-) Glad 
to have figured that one out.


I didn't even know the basename command until today when I started 
researching the problem.  I have a book to thank for that.  The book and 
the manpage for basename both mention the extension-chopping function. 
Very useful.  I was using a sed command to do that before, but I like 
basename better b/c I didn't really understand what sed was doing, I 
just copied and slightly tweaked someone else's line of code in another 
script (sort of like what we do with lilypond snippets, I guess).  The 
advantage of sed over basename for this, though, is that sed doesn't 
require you to specify exactly what the extension is that you want to 
chop off.  I tried using basename ~/Documents/filename.ly .* and it 
returned errors.  You have to tell it exactly what extension you want to 
extract: basename ~/Documents/filename.ly .ly returns filename. 
This is fine for a script designed specifically for lilypond, but it 
would be more flexible if it allowed for a wildcard that would chop off 
whatever extension happened to be there.


The book is Beginning Shell Scripting, by Eric Foster-Johnson, John 
Welch, and Micah Anderson.  I also have Classic Shell Scripting, an 
O'Reilly book, but I find that Beginning Shell Scripting is better about 
explaining every detail of every example, which is important for me 
since I'm such a newb :).


Thanks for writing the script, Jay.  I'm going to study and break it 
down bit by bit to see what I can learn from it.  It works great!


Jon

Jay Anderson wrote:


The scripts do essentially the same thing. The only thing I was trying
to do was allow for normal lilypond command line arguments also. The
sed line is a hack to pull out all but the last argument. It will
break if the last argument is quoted and has a space in it.

-Jay

P.S. I didn't know basename took a second argument to chop off the
extension. Neat.



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: \shiftOn doesen't behave as expected

2008-08-17 Thread Jonathan Kulp

Dave,

I was going to answer essentially the same thing as Carl, but since he 
already responded I thought I'd go ahead and say welcome to the list. 
 Always nice to see another classical guitarist onboard.  If you're 
interested in some fingering tweaks or things like that I'll be happy to 
share some of my files.


Best,

Jonathan

Carl Sorensen wrote:

notesetter dstocker at thenotesetter.com writes:



I'm typing some guitar music with version 2.10.33 to teach myself how to use
LilyPond. I'm using the command \shiftOn to move inner voices so that they
are clear and not colliding with other voices. I'm also typing the upper
voice and lower voice separately, in hopes to avoid extra typing and overly
complex use of syntax.


Dave,

What you may not realize is that your syntax is mixing user-controlled
shifting with LilyPond controlled shifting.

Whenever you type  { ... } \\ { ...}  you are automatically creating new
temporary voices with shift characteristics determined by LilyPond.

I suspect that you would get what you want if you changed your strategy
a bit.  Instead of defining a soprano part with  \\  in it, I'd 
recommend you define 


sopOne

sopTwo

bassOne

bassTwo

Each of which has only one row of notes.

You can then put your piece together with 

 SopOne \\ SopTwo \\ bassOne \\ bassTwo  


and LilyPond will set the voices so they should work for you.


Another option is to read the new discussion on polypohony from the 
GDP docs:


http://kainhofer.com/~lilypond/Documentation/index.html

Go to the Notation Reference, and look up section 1.5.2.

Hope this helps,

Carl



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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: doc work

2008-08-15 Thread Jonathan Kulp
I would agree with Mats on this one.  When I was first starting with 
Lilypond and the template didn't have a MIDI block, I couldn't make it 
work b/c I couldn't figure out *where* to stick the MIDI block.  i was 
VERY grateful to find a template that already had a working MIDI block. 
 It's easy enough to comment this out while working on big files to 
speed things up.


Jonathan

Mats Bengtsson wrote:

Kieren MacMillan wrote:


To take your argument to its (illogical) extreme, why don't we just 
add *all Lilypond features* into one simple template and let the 
Lilypond beginners suddenly discover everything that Lilypond can do 
all at once?  ;-)
For most LilyPond features, I certainly agree with you. However, for the 
MIDI output, it's a single line in the input and it's very intuitive 
that it has to do with MIDI output. I have never seen any question on 
the mailing list on how to turn the MIDI off, but quite a number of 
questions on if it's possible to get MIDI output and how to do it. If 
you have ever touched some other music typesetting program, you will 
certainly be acquainted to the possibility of listening to the output 
for proof reading and will expect to have the same in LilyPond.
If you care about processing speed, remove the MIDI output from the 
templates that typically will end up in large scores (like string 
quartet) and keep them in the melody plus piano.


Well, you decide!

   /Mats


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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: doc work

2008-08-15 Thread Jonathan Kulp
I've had vocal compositions published by G. Schirmer and Les Productions 
D'Oz (Quebec) and in both cases they used beams on 8th and 16th notes. 
I don't know if every publishing house does it this way, but I 
personally would prefer to have autobeaming turned *on* by default.  It 
could be turned off again if someone were engraving an older score and 
wanted it to look like the original.


Jonathan



Finally:
1. Modern practice for vocal music engraving is to ALWAYS beam 
eighth notes; and,
2. Including \autoBeamOff in these simple templates might be 
confusing.


Therefore, I think we should leave \autoBeamOff out of the mix, and 
either put a note to the effect of for typesetting older vocal music, 
use \autoBeamOff or (better yet, IMO) leave it for the vocal music 
section proper.
I would have to go home and look into my music engraving handbook to 
verify your claims. However, I know that several people on the mailing 
list have claimed that beaming often is used in vocal music to denote 
melismata. This is also what LilyPond does for all manually entered beams.


I hope you compare the templates with what the LM and NR (at least the 
sections that have been updated) have to say.


   /Mats


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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: doc work

2008-08-15 Thread Jonathan Kulp

That would work fine for me.

Jon

Chris Snyder wrote:

Jonathan Kulp wrote:
I would agree with Mats on this one.  When I was first starting with 
Lilypond and the template didn't have a MIDI block, I couldn't make it 
work b/c I couldn't figure out *where* to stick the MIDI block.  i was 
VERY grateful to find a template that already had a working MIDI 
block.  It's easy enough to comment this out while working on big 
files to speed things up.


What about adding a comment in the template instead? Perhaps even 
leaving the \midi block commented out by default, with an uncomment the 
following line to enable MIDI output comment on the previous line. That 
way, it's obvious where to put it, and it receives even more attention 
than it does now.


-Chris



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: autobeams

2008-08-14 Thread Jonathan Kulp

Mats Bengtsson wrote:

Why not a \oneVoice, which gives the same result but lets LilyPond 
automatically determine
the stem direction. 


This works perfectly. Thanks!

Perhaps even better: don't use the \\ but explicitly

instantiate one of the voices
(related to a recent email discussion).


When I removed the \\, I got errors about clashing columns.  I'll check 
into the explicit voice instantiation thing.  For now I like the 
\oneVoice solution for this example.


The \oneVoice solution did not work for the example from GDP I'm working 
on, though.  The autobeaming still doesn't appear.  Here's the original 
code and then the fix I made for it.  In James' example, the \oneVoice 
fixed stem direction and autobeaming.  In this example, there was no 
problem with stem direction to begin with, just with autobeaming.  If 
you see a more elegant way please share :)


Jon

p.s. As I mentioned before, this example in the docs is not specifically 
aimed at multiple voices, so another solution would be to remove the 
second voice altogether.  It just bugs me when stuff doesn't work :)

--

% Example from Notation Reference 1.2.6.2

cadenza = \relative c' {
  c4 d8  { e f g } \\ { d4. } 
  \oneVoice g4 f2 g4 g
}

\new GrandStaff 
  \new Staff { \cadenza c'4 }
  \new Staff {
#(ly:export (mmrest-of-length cadenza))
c'4
  }



% My adjustment to make autobeaming work

\version 2.11.55

cadenza = \relative c' {
   { c4 d8 e f g g4 f2 g4 g } \\ { s4. d4. s4 } 
%   g4 f2 g4 g
}

\new GrandStaff 
  \new Staff { \cadenza c'4 }
  \new Staff {
#(ly:export (mmrest-of-length cadenza))
c'4
  }




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


Re: autobeams

2008-08-13 Thread Jonathan Kulp
I had a similar problem with an example I was working on for GDP 
Rhythms, in Notation Reference 1.2.6.2.  If you look at that example, 
you can see that there's a whole series of 8ths that ought to be 
autobeamed but are not.  I couldn't even make them beam properly 
manually.  I ended up sidestepping the issue and removing the extra 
voice, since that example is only meant to show how to make another part 
in a different staff begin at the right place after a cadenza.   I don't 
know why the author of it introduced the complexity of multiple voices 
in that context.


Regarding your example, there were two ways I could get it to beam those 
last two 8ths automatically. One was to move the C in the final chord of 
the bar to the upper voice and allow the multiple-voice passage to last 
for the entire bar, rather than for only the first three beats.  Here:


\version 2.11.55
\relative { \clef bass  {e8 d d c d8 c c4 } \\ {  c g4 g b f4 f 
a }   }


This makes the beaming work, and all the notes are the same, but it does 
not preserve the original intent of having the final chord f a c all 
in the lower voice.   I'm sure you found that you could manually beam 
the d8[ c] but it doesn't seem like you should have to.


The other way was to leave the f a c chord intact in the lower voice, 
but put it inside the multi-voice   and add a quarter-note skip to 
the upper voice:


\version 2.11.55
\relative { \clef bass  {e8 d d c d8 c s4 } \\ {  c g4 g b f4 f a 
c }   }


This does seem like a workaround, though, as it looks like something 
that ought to work exactly the way you had it the first time.  Anyone 
else see what the problem could be?


Best,

Jonathan

James E. Bailey wrote:
I don't understand this. Why aren't the last two eighth notes beamed 
together?

\version 2.11.54
\relative { \clef bass  {e8 d d c d8 c } \\ {  c g4 g b f4}  f 
a c } 



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



--
Jonathan Kulp
http://www.jonathankulp.com


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


GDP: Rhythms: add-grace-property

2008-08-11 Thread Jonathan Kulp
I'm working on the Rhythms section of Notation Reference for GDP, and 
I'm having trouble making add-grace-property work as described in this 
passage from Notation Reference 1.2.6.1:


The layout of grace expressions can be changed throughout the
music using the function @code{add-grace-property}.  The following
example undefines the @code{Stem} direction for this grace, so
that stems do not always point up.

@example
\new Staff @{
  #(add-grace-property 'Voice 'Stem 'direction '())
  @dots{}
@}
@end example

Since we're trying to get rid of @example passages and use real musical 
examples instead, I tried to make it work with music.  Here's the code I 
used and the non-fatal error message that followed.


\relative c'' {
  \new Staff {
%#(add-grace-property 'Voice 'Stem 'direction #'down)
#(add-grace-property 'Voice 'Stem 'direction '())
 \new Voice {
   \acciaccatura {
   f16
   }
 g4
}
  }
}

Parsing...
Interpreting music...
Preprocessing graphical objects...
programming error: Stem dir must be up or down.
continuing, cross fingers
Finding the ideal number of pages...

So it looks like it won't accept '() as a valid argument.  I tried using 
#'() and it said illegal empty combination


The only way I could get it to change the stem direction was to replace 
'() with #'down (commented out in the code above), but the whole 
point of that example was to make the grace-note stems have no 
predetermined direction.


Does anyone see what the problem is?  I guess this is why we're removing 
@example examples :)


Jon
--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: GDP: Rhythms: add-grace-property

2008-08-11 Thread Jonathan Kulp

Ok thanks everyone for responding to this.  What I gather is the following:

1. The add-grace-property example currently appearing in NR does not 
work anymore. --#(add-grace-property 'Voice 'Stem 'direction '())  It 
needs to be removed or changed


2. The way to accomplish the same thing is to use the new 
remove-grace-property or Neil's ly:stem::calc-direction instead of '() 
as the direction argument. I got Neil's solution to work but haven't 
grabbed the new file from git to try Carl's.  Will do that tonight.


So, the question is whether it's worth introducing add-grace-property 
and/or remove-grace-property at that point in NR, since it already shows 
how to alter stem direction using \stemDown in a different example right 
before it.  Is it sufficiently abnormal that it should belong to a 
snippet instead of appearing in the main text?  Should I create an 
example that works and then move it to the @snippets area?  This 
question is probably for Carl :)


Jon

Neil Puttock wrote:

2008/8/11 Neil Puttock [EMAIL PROTECTED]:

Hi Jonathan,

2008/8/11 Jonathan Kulp [EMAIL PROTECTED]:


The layout of grace expressions can be changed throughout the
music using the function @code{add-grace-property}.  The following
example undefines the @code{Stem} direction for this grace, so
that stems do not always point up.

@example
\new Staff @{
 #(add-grace-property 'Voice 'Stem 'direction '())
 @dots{}
@}
@end example

I suspect this is something that worked many moons ago, but as you've
found out, you can't set 'direction to an empty list, or indeed to
CENTER.

The correct method to make grace notes behave like normal notes would
be to use the same 'direction setting callback which the Stem grob
uses:

#(add-grace-property 'Voice 'Stem ly:stem::calc-direction)


Of course, I completely ballsed this up, since 'direction is missing. :)

#(add-grace-property 'Voice 'Stem 'direction ly:stem::calc-direction)

Though now you can just use Carl's remove-grace-property function
instead, which will do the same thing without having to worry about
grob callbacks.

Regards,
Neil



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: GDP: Rhythms: add-grace-property

2008-08-11 Thread Jonathan Kulp
Ok.  That was my instinct, too, so I'll do that and get on with the rest 
of the .itely file.  Thanks Graham,


Jon

Graham Percival wrote:

On Mon, 11 Aug 2008 22:52:09 + (UTC)
Carl Sorensen [EMAIL PROTECTED] wrote:


Jonathan Kulp jonlancekulp at gmail.com writes:


So, the question is whether it's worth introducing
add-grace-property and/or remove-grace-property at that point in
NR, since it already shows how to alter stem direction using
\stemDown in a different example right before it.  Is it
sufficiently abnormal that it should belong to a snippet instead of
appearing in the main text?


Yes, dump it in a snippet.  Or rather, make a note to add such a
snippet, then ignore this issue for now and get the .itely
finished.  Don't waste time struggling with this advanced stuff at
the moment.

Cheers,
- Graham



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Augmentation dot problem in 2.11.55

2008-08-10 Thread Jonathan Kulp

I confirm that dots are on the lines for me.  Ubuntu 8.04.

Jon

Jay Anderson wrote:

David Bobroff bobroff at centrum.is writes:
I just tried it on XP and Fedora 8.  Looks fine here.  Dots are *not* on 
staff lines.


Peter Johnson wrote:


%% tested input file
\relative c'' {
\clef treble
\time 3/4
	g2. a4. b c8. d e d c4. b a2. g 
}

%% ends


Strange I'm seeing the same problem with this example. I've tested on Ubuntu
8.04 which should have the same install as fedora and on osx 10.4 PPC. I'm not
sure what would be causing this if the same install produces normal output for
some people and not for others. Are others seeing this also? I don't see a bug
filed yet.

-Jay




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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Augmentation dot problem in 2.11.55

2008-08-10 Thread Jonathan Kulp
Sorry, I should have said that I was using 2.11.55-2.  Maybe I should 
remove and try 2.11.55-1.


Jon

Jay Anderson wrote:

On Sun, Aug 10, 2008 at 8:03 PM, Jonathan Kulp [EMAIL PROTECTED] wrote:

I confirm that dots are on the lines for me.  Ubuntu 8.04.

Jon


Good. I just tried 2.11.55-1 and the problem does not exist there.

-Jay



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: GDP: NR 2.4 Fretted string instruments, first draft

2008-08-04 Thread Jonathan Kulp

Good call, Andrew.  This makes the beams really horizontal.  Thanks!

Jonathan

Andrew Hawryluk wrote:

My only suggestion is in one of the snippets, but I can't edit it (I
guess only contributor or an LSR admin can modify).

Valentin, in the snippet Stem and beam behavior in tablature (#494)
can you replace
\override Beam #'damping = #10
with
\override Beam #'damping = #+inf.0

(Rune gets credit for this idea:
http://lists.gnu.org/archive/html/lilypond-user/2007-12/msg00147.html)

Andrew

On Mon, Jul 28, 2008 at 12:20 PM, Jonathan Kulp [EMAIL PROTECTED] wrote:

This typo is not in the Fretted String section, but rather in 1.5.2 Multiple
Voices.

Jon

Stan Sanderson wrote:

Collision resolution section- Known issues and warnings there is an
(obvious) misspelling.

It is not clear in which circumpstances you can...

Excellent so far!

Stan




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


--
Jonathan Kulp
http://www.jonathankulp.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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: GDP: NR 2.4 Fretted string instruments, first draft

2008-07-28 Thread Jonathan Kulp
This typo is not in the Fretted String section, but rather in 1.5.2 
Multiple Voices.


Jon

Stan Sanderson wrote:
Collision resolution section- Known issues and warnings there is an 
(obvious) misspelling.


It is not clear in which circumpstances you can...

Excellent so far!

Stan




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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: First public release of GDP NR 2.7 Chord notation

2008-07-28 Thread Jonathan Kulp
Apart from what Francisco notes below I don't see anything wrong with 
it.  It's really good and I can't believe I didn't know about chord mode 
before.  I'm constantly amazed at the things Lilypond can do!  Thanks guys,


Jon

Francisco Vila wrote:

2008/7/28 Carl D. Sorensen [EMAIL PROTECTED]:

Dear LilyPond Users,

Notation Reference Section 2.7 Chord notation of the GDP has now been
released for public comment.  The HTML version of the document is available
at

http://kainhofer.com/~lilypond/Documentation/user/lilypond/Chord-notation.h
tml#Chord-notation.


I surely do not understand well:

Only the first inversion can be created by adding a bass note. The
second inversion requires changing the root of the chord. 

The example shows the Second inversion of
c'1:
coded as
c':/g
and then the first inversion coded as
e:6-3-^5
and
e:m6-^5

Therefore, it is the first inversion what requires changing the root,
whilst the second inversion CAN be created by adding a bass note. See
http://kainhofer.com/~lilypond/Documentation/user/music-glossary/inversion.html


--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: syntax hilighting for nano

2008-07-27 Thread Jonathan Kulp
I figured it out, James.  I had to put escape (\) characters before each 
of the {} and now it opens nano without error messages and the 
highlighting all looks correct.  Thanks for this!


Jon



Jon Kulp wrote:

Ok I put the .nanorc file there but it gives me the following error message:

Error in /home/jon/.nanorc on line 21: Bad regex {|}: Invalid
preceding regular expression

Error in /home/jon/.nanorc on line 22: Bad regex %{: Unmatched \{

Press Enter to continue starting nano.

Nonetheless when I press enter to continue, I do have the syntax
highlighting.  It's nice!  I didn't realize this was possible in nano
and as such have always uses an editor with a GUI.

Thanks James,

Jon

James E. Bailey wrote:
In your home directory. And it probably needs to be renamed to just 
.nanorc.

Am 27.07.2008 um 04:45 schrieb Jonathan Kulp:


James,

Sorry if this is a dumb question, but in which directory should I put 
the lilypond.nanorc file? (On Linux and/or Mac)  I'd like to try it 
out.  Thanks for sending.


Jon

James E. Bailey wrote:

clicked the send button instead of attach.

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


--
Jonathan Kulp
http://www.jonathankulp.com





--
Jonathan Kulp
http://www.jonathankulp.com



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


Re: syntax hilighting for nano

2008-07-27 Thread Jonathan Kulp

Ok I put the .nanorc file there but it gives me the following error message:

Error in /home/jon/.nanorc on line 21: Bad regex {|}: Invalid 
preceding regular expression


Error in /home/jon/.nanorc on line 22: Bad regex %{: Unmatched \{

Press Enter to continue starting nano.

Nonetheless when I press enter to continue, I do have the syntax 
highlighting.  It's nice!  I didn't realize this was possible in nano 
and as such have always uses an editor with a GUI.


Thanks James,

Jon

James E. Bailey wrote:
In your home directory. And it probably needs to be renamed to just 
.nanorc.

Am 27.07.2008 um 04:45 schrieb Jonathan Kulp:


James,

Sorry if this is a dumb question, but in which directory should I put 
the lilypond.nanorc file? (On Linux and/or Mac)  I'd like to try it 
out.  Thanks for sending.


Jon

James E. Bailey wrote:

clicked the send button instead of attach.

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


--
Jonathan Kulp
http://www.jonathankulp.com





--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: syntax hilighting for nano

2008-07-27 Thread Jonathan Kulp
I should have said, I only get that error message on my Linux machines. 
 On the Mac it works fine without tweaking.  If I escape the braces 
then it works without errors on the Linux boxes as well.  Don't know if 
I could work full-time in the terminal.  I much prefer Smultron as a Mac 
text editor.  :)


Jon

James E. Bailey wrote:
No worries, like I said, it's my first attempt at regex, funny, though. 
I don't get that error. Regardless, it's a neat aspect, and since I have 
to go to the terminal anyway to run lilypond, it just made sense to me 
to use an editor that's already in my terminal.


Am 27.07.2008 um 21:20 schrieb Jonathan Kulp:





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


Re: I know you've heard this before

2008-07-26 Thread Jonathan Kulp
When I'm on a Mac I use the Smultron editor, which has pretty nice 
syntax highlighting and has a very nice interface.  It's free also.  I 
got JEdit to work but I think it looks terrible both on Linux and Mac. 
The fonts look all messed up probably because of the Java environment.


Anyway I wrote a script for use on my Linux boxes and have a modified 
version for Macs.  It runs lilypond on a given file and opens the pdf in 
Preview (easy enough to change it to Acrobat Reader if you like).  I'll 
attach the script in case anyone would like to have it.  Create a /bin 
directory in your home directory and make sure it's included in your 
shell path.  Once it's there and the file is executable, you simply type 
lily foobar.ly and it runs lilypond on foobar.ly then opens foobar.pdf 
in Preview. If you comment out the Preview line and uncomment the 
Acrobat Reader line then you can use Acrobat Reader for the previewing.


Jon

James E. Bailey wrote:
True, but textedit doesn't have syntax hilighting or bracket matching. 
Speaking of which, I've been meaning to send my syntax hilighting for 
lilypond to this list for ages, but haven't done so. It isn't great, nor 
is perfect, but it hilights and helps me spotting errors. And, the only 
time I've ever attempted anything with regex was to do this, so I'm sure 
there are probably better ways of expressing what's here (if anyone sees 
a better way, let me know). For a pretty basic text editor, it has tons 
of features that I learn more about as I use it.




You can use textedit to edit your lilypond files on OSX.

Carl



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



--
Jonathan Kulp
http://www.jonathankulp.com
#!/bin/bash

#*#
# MAC SCRIPT MAC SCRIPT MAC SCRIPT# 
# #
# Script to run lilypond on specified #
# file and open in Acrobat Reader #
#*#

# gets complete filename of file 
srcfile=`eval echo $1`

# gets the filename without .ly
FILENOEXTENSION=`echo $srcfile | sed -e 's/\..*$//'`  

# runs lilypond on specified file #
/Applications/LilyPond.app/Contents/Resources/bin/lilypond $srcfile

#open -a /Applications/Adobe\ Reader\ 8/Adobe\ Reader.app $FILENOEXTENSION.pdf
open -a preview $FILENOEXTENSION.pdf

sleep 2

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


Re: syntax hilighting for nano

2008-07-26 Thread Jonathan Kulp

James,

Sorry if this is a dumb question, but in which directory should I put 
the lilypond.nanorc file? (On Linux and/or Mac)  I'd like to try it out. 
 Thanks for sending.


Jon

James E. Bailey wrote:

clicked the send button instead of attach.




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


--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: broken octaves

2008-07-25 Thread Jonathan Kulp
I'd really like a scheme to do this, too, but don't know how to write 
scheme code.  Someone else (I think it was Jay?) wrote a nice scheme to 
do octaves a while back (sounding at the same time, not broken), and 
maybe that'd be a good starting place?  I don't know.  I'll copy the 
scheme code at the bottom in case you think it would help.


Jon

Dominic Neumann wrote:

Hi Stefan,

are you sure you want c c' d d' ... instead of c c' d, d' e, e'?
You could write a scheme function for that. I´ll try it, but I´m not
too experienced in such things.

Dominic


2008/7/25 Stefan Thomas [EMAIL PROTECTED]:

Dear Lilypond-users,
 I have in mind an input like:
\relative { \brokenoctaves {c d e f g }}
and the desired output is:
\relative { c c' d d' e e' f f' g g' }
Can this be done automatically?


--
Jonathan Kulp
http://www.jonathankulp.com

%%% This is a macro that allows you to create octaves with a command

#(define (octave-up m t)
  (let* ((octave (1- t))
(new-note (ly:music-deep-copy m))
(new-pitch (ly:make-pitch
  octave
  (ly:pitch-notename (ly:music-property m 'pitch))
  (ly:pitch-alteration (ly:music-property m 'pitch)
(set! (ly:music-property new-note 'pitch) new-pitch)
new-note))

#(define (octavize-chord elements t)
 (cond ((null? elements) elements)
   ((eq? (ly:music-property (car elements) 'name) 'NoteEvent)
 (cons (car elements)
   (cons (octave-up (car elements) t)
 (octavize-chord (cdr elements) t
   (else (cons (car elements) (octavize-chord (cdr elements ) t)

#(define (octavize music t)
 (let* ((es (ly:music-property music 'elements))
(e (ly:music-property music 'element))
(name (ly:music-property music 'name)))
   (cond ((eq? name 'EventChord)
  (ly:music-set-property! music 'elements (octavize-chord es t)))
 ((pair? es)
  (for-each (lambda(x) (octavize x t)) es))
 ((ly:music? e)
  (octavize e
 music)

octaves = #(define-music-function (parser location arg mus) (integer? 
ly:music?)

 (octavize mus arg))

\relative { c d e \octaves #-1 { f g c }} % this is an example of the 
macro in practice



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


Re: Beaming sixteenths sandwiched in a triplet

2008-07-14 Thread Jonathan Kulp

It works fine in 2.11.51

Jon

Matthew Rowles wrote:

That sort of beaming is broken in 2.10.33.

I think that it is fixed in the current dev version... (but I'm yet to
try it out)


2008/7/15 Chris Canipe [EMAIL PROTECTED]:

I'm struggling in my attempts at beaming two sixteenths in the middle of a
triplet. Is this possible with automatic beaming, or must one result to beam
counts?

I've attached an example showing my current output and my desired output;
code follows:

\paper{ ragged-right=##t }
\relative c'' {
\time 4/4
\times 2/3 { c8 c16 c c8 }
r4 r r
}

Thanks!

P.S. I'm using version 2.10.33.

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








--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Creating Chorded Notes

2008-07-12 Thread Jonathan Kulp
Maybe you could adjust something in this macro to do it for you.  This 
one makes octaves (it's awesome!!).


Jon


\version 2.11.47

%LSR This function was contributed by Jay Anderson.

#(define (octave-up m t)
 (let* ((octave (1- t))
  (new-note (ly:music-deep-copy m))
  (new-pitch (ly:make-pitch
octave
(ly:pitch-notename (ly:music-property m 'pitch))
(ly:pitch-alteration (ly:music-property m 'pitch)
  (set! (ly:music-property new-note 'pitch) new-pitch)
  new-note))

#(define (octavize-chord elements t)
 (cond ((null? elements) elements)
 ((eq? (ly:music-property (car elements) 'name) 'NoteEvent)
   (cons (car elements)
 (cons (octave-up (car elements) t)
   (octavize-chord (cdr elements) t
 (else (cons (car elements) (octavize-chord (cdr elements ) t)

#(define (octavize music t)
 (if (eq? (ly:music-property music 'name) 'EventChord)
   (ly:music-set-property! music 'elements (octavize-chord
(ly:music-property music 'elements) t)))
 music)

octaves = #(define-music-function (parser location arg mus) (integer? 
ly:music?)

 (music-map (lambda (x) (octavize x arg)) mus))


\relative c' { d e \octaves #-1 { \times 2/3 {f g c }}} % this is an 
example of the macro in practice



Eric Knapp wrote:

Hi, all.

I'm trying to write a music function that creates chorded notes. I'm
starting simply and I'm stumped. How would I create this simple music
expression in a function?

  a c2

Is there a grob for these? What I'm working on is being able to
customize the individual NoteHead and Stem grobs for each note.

Thanks,

-Eric


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



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: bracketed silence

2008-07-12 Thread Jonathan Kulp
Great!  Glad to be able to help.  I just adjusted the tweaks I was using 
to make fingerings go inside the staff.  Best,


Jon

p.s. Incidentally I really liked the snippet by Mats also.  I can 
probably use that in the future :)


luis jure wrote:


that's truly great, jon, thank you!! i'd never have found that myself,
i'm afraid... :-(

i increased the fontsize a bit and adjusted the offsets accordingly and
i got exactly what i was looking for. here's my slightly modified code:


\version 2.11.51

\relative c'' {
\override TextScript #'staff-padding = #'()
\once \override TextScript #'extra-offset = #'(-1.0 . -3.8)
r4^\markup { \fontsize #3 { [ ] } }
}

best,

lj





--
Jonathan Kulp
http://www.jonathankulp.com


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


[SOLVED] Re: Y-coordinates don't work in offset function

2008-07-11 Thread Jonathan Kulp
Many thanks, Trevor and Gilles!!  Both of those solutions work 
perfectly.  Now the question is which one uses the syntax that would be 
most appropriate to appear in the GDP docs.  My instinct is to use the 
one with #'(0.0 . 0.0) for the coordinates, since this is how I've seen 
X-Y coordinates specified most often.  Graham, do you have a preference?


Thanks again!

Jon

Trevor Daniels wrote:

Jonathan

Try

\version 2.11.51

fingerOffset =
#(define-music-function (parser location offsets) (pair?)
   #{
 \once \override Fingering #'extra-offset = #$offsets
   #})

% \fingerOffset #'-0.2 #'-0.3 % moves fingering .2 spaces left and .3 down

\relative c''' {
   \override Fingering #'staff-padding = #'()
   \set fingeringOrientations = #'(down)
\fingerOffset #'(0.7 . -3.5)
%\once \override Fingering
%  #'extra-offset = #'(0.7 . -0.6)
  c-44
\fingerOffset #'(0.7 . 0.0)
  g-3
\fingerOffset #'(0.7 . 3.0)
  d-22
}
- Original Message - From: Jonathan Kulp [EMAIL PROTECTED]
To: lilypond-user@gnu.org
Sent: Friday, July 11, 2008 5:33 AM
Subject: Y-coordinates don't work in offset function



Dear Lilyponders,

I'm working on a snippet of guitar music for use as Inspirational 
Headword of the fretted strings section of GDP.  The default 
placement of fingerings is not very good, so I'm placing them manually 
but have tried to create a function to help me.  The function is 
supposed to allow me to specify X and Y offset for each fingering.  
The problem is that the Y offset doesn't work.  The X offset works 
just fine, and it's very close to what I want, but it would really 
help to get vertical fine-tuning as well.


I've been searching the documentation and experimenting for two hours 
with no luck.  A minimal example appears below, including my function 
(probably where the problem lies).  I've commented out a tweak that 
does what I want using extra-offset adjustment, but I couldn't figure 
out how to use extra-offset in the function (I'm very new at this, 
clearly...).


If anyone can point out my error and a solution I'd be most grateful. 
Best,


Jonathan
--
Jonathan Kulp
http://www.jonathankulp.com



\version 2.11.51

fingerOffset =
#(define-music-function (parser location offsetX offsetY) (number? 
number?)

  #{
\once \override Fingering #'X-offset = $offsetX
\once \override Fingering #'Y-offset = $offsetY
  #})

% \fingerOffset #'-0.2 #'-0.3 % moves fingering .2 spaces left and .3 
down


\relative c''' {
   \override Fingering #'staff-padding = #'()
   \set fingeringOrientations = #'(down)
\fingerOffset #0.7 #-3.5
%\once \override Fingering
%  #'extra-offset = #'(0.7 . -0.6)
  c-44
\fingerOffset #'0.7 #'0.0
  g-3
\fingerOffset #'0.7 #'3.0
  d-22
}



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






--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: bracketed silence

2008-07-11 Thread Jonathan Kulp

Hi Luis,

I got the brackets to go inside the staff with this code.  If you fiddle 
with the markup (change font size, spacing, whatever)  and the values 
inside the parentheses you can probably get it to look like you want.


Jon


\version 2.11.51

\relative c'' {
   \override TextScript #'staff-padding = #'()
   \once \override TextScript #'extra-offset = #'(-0.6 . -3.0)
   b4\rest^\markup { [  ] }
}



luis jure wrote:


hello list,

i'd need to place brackets around a rest in the score. something like
\parenthesize but square brackets [ ].

i tried using a \markup, but no matter what i try, i found no way to
place the brackets in the staff around the rest. i tried every tweak i
could find in the manual, but it seems to me that lilypond is always
smarter and refuses to place the markup _in_ the staff.

could anyone help me with this? is it at all possible?

best,

lj




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


Y-coordinates don't work in offset function

2008-07-10 Thread Jonathan Kulp

Dear Lilyponders,

I'm working on a snippet of guitar music for use as Inspirational 
Headword of the fretted strings section of GDP.  The default placement 
of fingerings is not very good, so I'm placing them manually but have 
tried to create a function to help me.  The function is supposed to 
allow me to specify X and Y offset for each fingering.  The problem is 
that the Y offset doesn't work.  The X offset works just fine, and it's 
very close to what I want, but it would really help to get vertical 
fine-tuning as well.


I've been searching the documentation and experimenting for two hours 
with no luck.  A minimal example appears below, including my function 
(probably where the problem lies).  I've commented out a tweak that does 
what I want using extra-offset adjustment, but I couldn't figure out how 
to use extra-offset in the function (I'm very new at this, clearly...).


If anyone can point out my error and a solution I'd be most grateful.  Best,

Jonathan
--
Jonathan Kulp
http://www.jonathankulp.com



\version 2.11.51

fingerOffset =
#(define-music-function (parser location offsetX offsetY) (number? number?)
  #{
\once \override Fingering #'X-offset = $offsetX
\once \override Fingering #'Y-offset = $offsetY
  #})

% \fingerOffset #'-0.2 #'-0.3 % moves fingering .2 spaces left and .3 down

\relative c''' {
   \override Fingering #'staff-padding = #'()
   \set fingeringOrientations = #'(down)
\fingerOffset #0.7 #-3.5
%\once \override Fingering
%  #'extra-offset = #'(0.7 . -0.6)
  c-44
\fingerOffset #'0.7 #'0.0
  g-3
\fingerOffset #'0.7 #'3.0
  d-22
}



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


Re: Bus error in 2.11.50 on OS X

2008-07-06 Thread Jonathan Kulp
After reading this post I downloaded 2.11.50 and installed on my eMac G4 
running OSX 10.4 and ran a lilypond file without errors.  Is it only an 
issue on Intel macs or on Leopard, perhaps?


Jon

Mark Pim wrote:

Thanks, that seems to have solved it :)

Mark

2008/7/6 Mark Pim [EMAIL PROTECTED]:


To solve a spacing problem I wanted to update to 2.11.50 (which I realise is 
the development release but I understand you're quite close to a 2.12 
release?), anyways every file now fails with a bus error, even the standard 
test file included with the Mac lilypond release.


This is a known issue. Please go to
http://download.linuxaudio.org/lilypond/binaries/ and download the
previous version 2.11.49, either for darwin-ppc or darwin-x86
depending on your machine.

Hope this helps!

Cheers,
Valentin





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


Re: Error message using 2.11.50-1

2008-07-03 Thread Jonathan Kulp
Thanks Valentin.  I changed it to \tempo and it worked fine.  All is 
good!  Best,


Jonathan

Valentin Villenave wrote:

2008/7/3 Jonathan Kulp [EMAIL PROTECTED]:


I just installed the latest build and when I ran the file I'm working on, it
came back with this error, which I think has to do with a macro included
near the top of the document.


Yeah, I get the same error with the same macro. The good news is, you
can now use \tempo everywhere instead of \movement.


Cheers,
Valentin



--
Jonathan Kulp
http://www.jonathankulp.com


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


Error message using 2.11.50-1

2008-07-02 Thread Jonathan Kulp

Hi everyone,

I just installed the latest build and when I ran the file I'm working 
on, it came back with this error, which I think has to do with a macro 
included near the top of the document.



[EMAIL PROTECTED]:~/Desktop$ tarantella
running tarantella file now...
GNU LilyPond 2.11.50
Processing `tarantella.ly'
Parsing...
Interpreting music... 
/usr/local/lilypond/usr/share/lilypond/current/scm/lily-library.scm:135:5: 
In procedure format-movement-markup in expression (process-procedure 
book paper ...):
/usr/local/lilypond/usr/share/lilypond/current/scm/lily-library.scm:135:5: 
Wrong number of arguments to #procedure format-movement-markup (dur 
count context)


[end of error message]

And below is the macro, which was posted to this list a few months ago 
and was working fine in 2.11.49.  Can anyone see the problem? Thanks,


Jon


%%% the following function allows you to specify how the
%%% movement indication will be formatted

#(define-markup-command (mvt layout props arg) (markup?)
(interpret-markup layout props
(markup #:huge #:bold arg)))

#(define (string-duration strElt)
  ( let*((ptindex (string-index strElt #\. )) (ptnumber 0)
 (val (string-number (if ptindex (substring strElt 0 ptindex) 
strElt)))

 (dur (ly:intlog2 val)))
(while ptindex (begin
 (set! ptnumber (1+ ptnumber))
 (set! ptindex (string-index strElt #\.  (1+ ptindex)
 (ly:make-duration dur ptnumber 1 1)))

movement = #(define-music-function (parser location text duration count 
music)

(string? string? integer? ly:music?)
(define (format-movement-markup dur count context)
(make-line-markup
 (list
  (markup #:mvt text #:hspace 1)
  (make-simple-markup  ()
  (make-general-align-markup Y DOWN (make-smaller-markup
 (make-note-by-number-markup (ly:duration-log dur)
 (ly:duration-dot-count dur) 
1)))
  (make-simple-markup  =)
  (make-simple-markup (number-string count))
  (make-simple-markup  )
(make-music 'SequentialMusic 'elements
  (list (make-music 'ContextSpeccedMusic
  'context-type 'Score 'element
  (make-music 'PropertySet
'value format-movement-markup
'symbol 'metronomeMarkFormatter))
(make-music 'ContextSpeccedMusic
  'context-type 'Score 'element
  (make-music 'SequentialMusic 'elements
  (list (make-music 'PropertySet
 'value (ly:duration-length (string-duration 
duration))

 'symbol 'tempoWholesPerMinute)
(make-music 'PropertySet
 'value (string-duration duration)
 'symbol 'tempoUnitDuration)
(make-music 'PropertySet
 'value count
 'symbol 'tempoUnitCount
 music
 (make-music 'ContextSpeccedMusic
  'context-type 'Score 'element
  (make-music 'PropertySet
'value format-metronome-markup
'symbol 'metronomeMarkFormatter)



--
Jonathan Kulp
http://www.jonathankulp.com


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


Re: Inspirational Headwords for Chords section of manual

2008-06-25 Thread Jonathan Kulp
I'll send you the files in a private email, Andrew.  I agree with Carl, 
though, that if you already have something you really like then you 
should go with it.  I imagine the Schumann example will show off more of 
Lilypond's features than mine will.  Best,


Jon

Andrew Hawryluk wrote:

Sorry, I meant that to go to Jon!  -AH

2008/6/24 Carl D. Sorensen [EMAIL PROTECTED]:

I think that you intended this to go to Trevor.

If you have a gorgeous piece, then go ahead and use it, in my opinion.

Carl

From: Andrew Hawryluk [EMAIL PROTECTED]
Sent: Tuesday, June 24, 2008 10:35 PM
To: Jonathan Kulp
Cc: Graham Percival; Trevor Bača; lilypond-user@gnu.org; Carl D. Sorensen
Subject: Re: Inspirational Headwords for Chords section of manual

Hi Carl, I'm working on the Keyboards section. I was considering
submitting part of the Schumann Romance in F Sharp (Op. 28, No 2.)
because it looks gorgeous (three staves and extensive cross-staff
beaming), but I'd like to see anything you have. Thanks for your help!

Andrew





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


<    1   2   3   4   5   6   7   >