Hey Chris / David, Adding the --png option when you run your lilypond command works fine (as David stated)... Also, you may want to set the -dresolution parameter to something high like 300 (DPI) to get a good resolution. Or even set it to 600, and then shrink it to 300DPI using some image processing software such as Photoshop or ImageMagick / GraphicMagick to achieve an even better anti-aliasing effect.
Cheers, Erik PS: I am adding some additional information below for anyone who has attempted to create large *transparent* images using Lilypond but failed. It took me a while to get the transparency to work as it seems to fail for large images. ------------ Regarding how to create large, transparent scores: When the images you output are reasonably small, 'lilypond... --png ... -dpixmap-format=pngalpha ....' successfully generates the transparent images. Once the images surpass a certain size however, transparency seems to fail, and the .png images come out with a white background. If you run the following lilypond command: 'lilypond --png -dresolution=100 -dpixmap-format=pngalpha --ps --verbose x.ly' and look at the bottom of the log, you can see the actual Ghostscript command called by Lilypond used to create the .png. It is going to look something like this: gs -dDEVICEWIDTHPOINTS=37533.99 -dDEVICEHEIGHTPOINTS=2160.00 -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -dNOPAUSE -sDEVICE=pngalpha -sOutputFile="./x.png" -r100 "x.ps" -c quit As you can see it is correctly using the device 'pngalpha' in order to generate the transparent image. The problem seems to be that - upon inspecting the logs - Ghostscript reverts to the device png16m instead, which is unable to generate a transparent image. The way to fix this is to tweak the memory usage options for Ghostscript, specifically by adding the option '-dMaxBitmap=2147483647' to the Ghostscript command, as in the following snippet: gs -dDEVICEWIDTHPOINTS=37533.99 -dDEVICEHEIGHTPOINTS=2160.00 -dMaxBitmap=2147483647 -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -dNOPAUSE -sDEVICE=pngalpha -sOutputFile="./x.png" -r100 "x.ps" -c quit This allocates more memory to Ghostscript and makes it correctly use the pngalpha device, and thus correctly output a transparent image. If you have a 64 bit machine perhaps you can extend it further. It should also be possible to rebuild lilypond from source and compile it with this option baked in, but I haven't tried that.... Perhaps this information helps someone trying to create large, transparent images in LilyPond! On Thu, Feb 13, 2014 at 8:20 AM, <[email protected]> wrote: > Send lilypond-user mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.gnu.org/mailman/listinfo/lilypond-user > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of lilypond-user digest..." > > > Today's Topics: > > 1. Re:Ottava (Brian Barker) > 2. Re:Horizontalized scores (David Kastrup) > 3. Re:Ottava (Noeck) > 4. Re:Ottava (Noeck) > 5. Lilypond for blind musicians (Claudio Garanzini) > 6. Re:frescobaldi macports broken after update (Davide Liessi) > 7. Re:Lilypond for blind musicians (Pierre Perol-Schneider) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 13 Feb 2014 06:57:25 +0000 > From: Brian Barker <[email protected]> > To: <[email protected]> > Subject: Re: Ottava > Message-ID: <[email protected]> (added > by [email protected]) > Content-Type: text/plain; charset="us-ascii"; format=flowed > > At 20:19 12/02/2014 +0100, Noeck "Joram" Marburg wrote: > >what is the recommended/default formatting for ottava marks/brackets > (8va)? > >In bold or not bold? And with dashed lines or dotted or others? > >What does E. Gould say ... > > Page 28: > >The octave sign is written in italic, the numeral '8' is 1 1/2 > >stave-paces high. The optional 'va' is placed flush with the top of > >_ottava sopra_ (_8^va_), flush with the base of _ottava bassa_ (_8va_). > > > >Indicate the extent of the transposition with a line of dashes > >(hereafter called a dotted line). The line extends from the top > >edge of the _8_ for _8 sopra_ and the base of the _8_ for _8 bassa_, > >and runs parallel to the stave. > > And those 8s look bold to me. > > Brian Barker > > > > > ------------------------------ > > Message: 2 > Date: Thu, 13 Feb 2014 07:07:18 +0100 > From: David Kastrup <[email protected]> > To: Chris Crossen <[email protected]> > Cc: "[email protected]" <[email protected]> > Subject: Re: Horizontalized scores > Message-ID: <[email protected]> > Content-Type: text/plain > > Chris Crossen <[email protected]> writes: > > > I am also generating single, continuous line scores with Lilypond and > > am wondering what you use to extract your images from PDF. > > What's wrong with lilypond --png here? > > -- > David Kastrup > > > > ------------------------------ > > Message: 3 > Date: Thu, 13 Feb 2014 10:25:46 +0100 > From: Noeck <[email protected]> > To: [email protected] > Subject: Re: Ottava > Message-ID: <[email protected]> > Content-Type: text/plain; charset=UTF-8 > > Hi, > > thanks for looking this up! This is what I am most used to, too. > > I would like to see it in LilyPond. Could that be added to the issues as > a wish or enhancement (it is even a bit ugly). > > Cheers, > Joram > > > >> What does E. Gould say ... > > > > Page 28: > >> The octave sign is written in italic, the numeral '8' is 1 1/2 > >> stave-paces high. The optional 'va' is placed flush with the top of > >> _ottava sopra_ (_8^va_), flush with the base of _ottava bassa_ (_8va_). > >> > >> Indicate the extent of the transposition with a line of dashes > >> (hereafter called a dotted line). The line extends from the top edge > >> of the _8_ for _8 sopra_ and the base of the _8_ for _8 bassa_, and > >> runs parallel to the stave. > > > > And those 8s look bold to me. > > > > Brian Barker > > Here is my incomplete suggestion with some comments: > > Text positioning: > - \super does not look good, therefore \raise > - the raise value of 0.7 depends on the font, is there a way to align > the top boundaries of the 8 and the va? > - optically the vertical position of va looks different for 8 and 15 > - for the vb, base line alignment is no problem > - should we add text for a third octave to LP? ?3 (i.e. 22va and 22vb) > or a general text calculated from the octavation: > |octavation|*7 + 1 and va if octavation > 0, vb if octavation < 0 > > Lines > - The lines are unchanged but they should go to the top line or base > line respectively. > > > \version "2.18.0" > > ottavaa = { > \ottava 1 > \set Staff.ottavation = \markup \bold \concat {"8" \tiny \raise #0.7 > "va" } > } > > ottavab = { > \ottava -1 > \set Staff.ottavation = \markup \bold \concat{ "8" \tiny "vb" } > } > > ottavac = { > \ottava 2 > \set Staff.ottavation = \markup \bold \concat{ "15" \tiny \raise #0.7 > "ma" } > } > > ottavad = { > \ottava -2 > \set Staff.ottavation = \markup \bold \concat{ "15" \tiny "mb" } > } > > > << > \new Staff \relative c''' { > \ottava #1 a a > \ottava #-1 a,, a > \ottava #2 a''' a > \ottava #-2 a,,,, a > } > \new Staff \relative c''' { > \ottavaa a a > \ottavab a,, a > \ottavac a''' a > \ottavad a,,,, a > } > >> > > another (different) feature request > - currently the user has to override this text *after* the \ottava > command. This prevents from having a general tweak in a stylesheet. > Could the user override some property and provide one of those: > * one markup for all (if he uses only \ottava #1) > * scheme list of markups from -3 to 3 (like [22,15,8,loco,8,15,22]) > * a scheme function that returns the markup corresponding to the > octavation > > > > ------------------------------ > > Message: 4 > Date: Thu, 13 Feb 2014 10:27:44 +0100 > From: Noeck <[email protected]> > To: [email protected] > Subject: Re: Ottava > Message-ID: <[email protected]> > Content-Type: text/plain; charset=UTF-8 > > Sorry, I wanted to have this code in: > > Hi, > > thanks for looking this up! This is what I am most used to, too. > > I would like to see it in LilyPond. Could that be added to the issues as > a wish or enhancement (it is even a bit ugly). > > Cheers, > Joram > > > >> What does E. Gould say ... > > > > Page 28: > >> The octave sign is written in italic, the numeral '8' is 1 1/2 > >> stave-paces high. The optional 'va' is placed flush with the top of > >> _ottava sopra_ (_8^va_), flush with the base of _ottava bassa_ (_8va_). > >> > >> Indicate the extent of the transposition with a line of dashes > >> (hereafter called a dotted line). The line extends from the top edge > >> of the _8_ for _8 sopra_ and the base of the _8_ for _8 bassa_, and > >> runs parallel to the stave. > > > > And those 8s look bold to me. > > > > Brian Barker > > Here is my incomplete suggestion with some comments: > > Text positioning: > - \super does not look good, therefore \raise > - the raise value of 0.7 depends on the font, is there a way to align > the top boundaries of the 8 and the va? > - optically the vertical position of va looks different for 8 and 15 > - for the vb, base line alignment is no problem > - should we add text for a third octave to LP? ?3 (i.e. 22va and 22vb) > or a general text calculated from the octavation: > |octavation|*7 + 1 and va if octavation > 0, vb if octavation < 0 > > Lines > - The lines are unchanged but they should go to the top line or base > line respectively. > > > \version "2.18.0" > > ottavaa = { > \ottava 1 > \set Staff.ottavation = \markup \bold \concat {"8" \tiny \raise #0.7 > "va" } > } > > ottavab = { > \ottava -1 > \set Staff.ottavation = \markup \bold \concat{ "8" \tiny "vb" } > } > > ottavac = { > \ottava 2 > \set Staff.ottavation = \markup \bold \concat{ "15" \tiny \raise #0.7 > "ma" } > } > > ottavad = { > \ottava -2 > \set Staff.ottavation = \markup \bold \concat{ "15" \tiny "mb" } > } > > ottavae = { > \ottava 3 > \set Staff.ottavation = \markup \bold \concat{ "22" \tiny \raise #0.7 > "ma" } > } > > > << > \new Staff \relative c''' { > \ottava #1 a a > \ottava #-1 a,, a > \ottava #2 a''' a > \ottava #-2 a,,,, a > \ottava #3 a''''' a > } > \new Staff \relative c''' { > \ottavaa a a > \ottavab a,, a > \ottavac a''' a > \ottavad a,,,, a > \ottavae a''''' a > } > >> > > > another (different) feature request > - currently the user has to override this text *after* the \ottava > command. This prevents from having a general tweak in a stylesheet. > Could the user override some property and provide one of those: > * one markup for all (if he uses only \ottava #1) > * scheme list of markups from -3 to 3 (like [22,15,8,loco,8,15,22]) > * a scheme function that returns the markup corresponding to the > octavation > > > > ------------------------------ > > Message: 5 > Date: Thu, 13 Feb 2014 13:46:34 +0100 > From: "Claudio Garanzini" <[email protected]> > To: <[email protected]> > Subject: Lilypond for blind musicians > Message-ID: <DA72826CF39A48839A164A5A04C8E131@claudioPC> > Content-Type: text/plain; charset="utf-8" > > Hi all! > I have some little questiosn for you guys: > Are there any blind musician or composer that?' use lilypond regularly? > Is there a software like Frescobaldi but more accessible using NVDA as my > default screen reader? > I?ve tryed Frescobaldi but simply can?t use it because of it?s complete > inaccessibility, at least for me. > Any suggestions? > Could you tell mee how to use midi2ly converter? > Have I to put it in my midi folder for its use? > Thanks a lot. > Bye for now. > > Claudio > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.gnu.org/archive/html/lilypond-user/attachments/20140213/8d86102d/attachment.html > > > > ------------------------------ > > Message: 6 > Date: Thu, 13 Feb 2014 13:54:10 +0100 > From: Davide Liessi <[email protected]> > To: "LilyPond [email protected]" <[email protected]> > Subject: Re: frescobaldi macports broken after update > Message-ID: > < > caoxn3bprj8rxhwpjtvncpu0fxn_hywijglgu6z8cf2va4ps...@mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > Dear all, > > 2014-01-24 12:20 GMT+01:00 Henning Hraban Ramm <[email protected]>: > > If Frescobaldi already runs and I doubleclick a .ly file, it opens > correctly. > > But if FB is not yet running, it just starts, but doesn?t open the file. > > > > The FB icon in Finder doesn?t accept any files, just in the dock. But if > the app isn?t running, dragging on the dock icon just brings FB to front. > > > > I use today?s MacPorts dev version on OSX 10.9. > > As I suspected, this problem probably concerns only 10.9. > I noticed today that there has been a recent update of py2app (the > program used to create the application bundle) that corrects also this > problem. > >From the change log: "Fixed argv emulator on OSX 10.9, the way the > code detected that the application was launched through the Finder > didn't work on that OSX release." > > Please try this to upgrade your installation (including py2app) and > reinstall frescobaldi(-devel): > sudo port selfupdate > sudo port upgrade outdated > sudo port uninstall active and name:frescobaldi > sudo port install frescobaldi # or frescobaldi-devel, as you prefer > > Then please test Frescobaldi's behaviour and let me know: > > if you either > > - drag and drop a ly file (or any text file, for what is worth) over the > icon of Frescobaldi in the Dock, or > > - right-click on a ly file and choose "Open with..." > "Frescobaldi > ([version])", or > > - double-click on a ly file associated with Frescobaldi (to associate a > file: right-click on the file, choose "Get Info" and choose "Frescobaldi > ([version])" in the "Open with..." dropdown list), > > then Frescobaldi should start, if it is not already running, and open > the file. > > Best wishes. > Davide > > > > ------------------------------ > > Message: 7 > Date: Thu, 13 Feb 2014 14:20:20 +0100 > From: Pierre Perol-Schneider <[email protected]> > To: Claudio Garanzini <[email protected]> > Cc: lilypond-user <[email protected]> > Subject: Re: Lilypond for blind musicians > Message-ID: > < > caphotuxeuo3iouo2-nljkmskqye6zjvxcx15qrfqrny1rxz...@mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > 2014-02-13 13:46 GMT+01:00 Claudio Garanzini <[email protected]>: > > > Hi all! > > > > Hi Claudio, > > > > [...] > > Are there any blind musician or composer that?' use lilypond regularly? > > > [...] > > Could you tell mee how to use midi2ly converter? > > Have I to put it in my midi folder for its use? > > > [...] > > It's a subjet that I'm also intrested in. > Here are some discussions users previously had : > > http://search.gmane.org/?query=braille&group=gmane.comp.gnu.lilypond.general > > See also : http://delysid.org/freedots.html > > HTH, > Pierre > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.gnu.org/archive/html/lilypond-user/attachments/20140213/013c2907/attachment.html > > > > ------------------------------ > > _______________________________________________ > lilypond-user mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/lilypond-user > > > End of lilypond-user Digest, Vol 135, Issue 60 > ********************************************** >
_______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
