From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/70794 Path: news.gmane.org!not-for-mail From: David Wooten Newsgroups: gmane.comp.tex.context Subject: Re: Lilypond Date: Sat, 20 Aug 2011 18:22:05 -0700 Message-ID: References: <53762C1C-F3B2-4627-8A45-0EAB68CBDC73@fiee.net> <61F3C339-8949-48E3-97DD-8C6071958B29@fiee.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: multipart/mixed; boundary="===============0590797601==" X-Trace: dough.gmane.org 1313889744 8426 80.91.229.12 (21 Aug 2011 01:22:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 21 Aug 2011 01:22:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Aug 21 03:22:20 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Quwk0-0007fT-48 for gctc-ntg-context-518@m.gmane.org; Sun, 21 Aug 2011 03:22:20 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BA423CAEE5; Sun, 21 Aug 2011 03:22:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vVdTd3a3wR0o; Sun, 21 Aug 2011 03:22:13 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9986CCAED3; Sun, 21 Aug 2011 03:22:13 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A1E65CAED3 for ; Sun, 21 Aug 2011 03:22:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id c9ZIPLpy6NNd for ; Sun, 21 Aug 2011 03:22:09 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 7AE7ACAE9B for ; Sun, 21 Aug 2011 03:22:09 +0200 (CEST) Original-Received: from wuduwasa.macminicolo.net (wuduwasa.org [66.116.103.196]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p7L1M67H028226 for ; Sun, 21 Aug 2011 03:22:07 +0200 Original-Received: from [10.0.1.10] (unknown [50.0.88.54]) by wuduwasa.macminicolo.net (Postfix) with ESMTPSA id E4820644CA7 for ; Sat, 20 Aug 2011 18:22:05 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1244.3) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=66.116.103.196; country=US; region=NV; city=Las Vegas; postalcode=89104; latitude=36.1511; longitude=-115.1105; metrocode=839; areacode=702; http://maps.google.com/maps?q=36.1511,-115.1105&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 05FmNm6De - b2b9bae851e3 - 20110821 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.216 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:70794 Archived-At: --===============0590797601== Content-Type: multipart/alternative; boundary="Apple-Mail=_FC1F1426-1EA5-4B34-86F7-AF112DCFD75B" --Apple-Mail=_FC1F1426-1EA5-4B34-86F7-AF112DCFD75B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Hi Aditya & Hraban, I'm very glad to see improved Lilypond integration being discussed. I = can't offer too much besides moral support, but would just point out one = solution I've found for proper width/alignment of a snippet with = extra-staff material (e.g. a piano staff marker { ): If the ConTeXt = textwidth is equal to the Lilypond line-width, aligning the float to the = right gives you a snippet nicely aligned with flush text (extra-staff = material being pushed towards the left margin).=20 Something like this (as in the example in the garden): = \def\readlilypondoutput#1{\setupfloats[location=3Dright,frame=3Doff]\place= figure[]{}}{\externalfigure[#1]}} Regards, David On Aug 20, 2011, at 1:19 AM, Aditya Mahajan wrote: > On Fri, 19 Aug 2011, Henning Hraban Ramm wrote: >=20 >> Am 2011-08-19 um 17:08 schrieb Aditya Mahajan: >>=20 >> But - can you even support different setups, say >>=20 >> \startlilypondpreamble >> global settings for everything >> \stoplilypondpreamble >>=20 >> \startlilypondpreamble[snippet] >> global settings for snippets >> \stoplilypondpreamble >>=20 >> \startlilypondpreamble[fullscore] >> global settings for full scores >> \stoplilypondpreamble >>=20 >> \startlilypond[setup=3Dfullscore] >> the score >> \stoplilypond >>=20 >> etc. >=20 > Yes. I can support the following syntax: >=20 > \startbuffer[snippets] ... \stopbuffer >=20 > \startbuffer[fullscore] ... \stopbuffer >=20 > \startbuffer[common] ... \stopbuffer >=20 > \startlilypond[bufferbefore=3D{snippets,common}, bufferafter=3D{....}] > .... \stoplilypond >=20 > (In fact, provide similar support for anything defined using the = filter module). >=20 >>> The other thing is to be able to change linespace, papersize, = offset, etc using parameters, so that one can say: >>> \startlilypond[linespace=3D...] >>> ... >>> \stoplilypond >>> This will require some lua side processing. >>=20 >> You mean, translate ConTeXt-style settings to LilyPond settings, like = we did with the old module? >=20 > Yes. >=20 >> That wouldn=92t make much sense. LilyPond just has too much settings. = And most of them you can set in different ways. To fully support this, = you=92d need a complete LilyPond parser including Scheme. And a small = set of settings is never the right set for everyone. >=20 > OK. >=20 >> Ok, there are a few settings that we could translate, e.g. set = ConTeXt=92s main fonts also for LilyPond. >=20 > Agreed. Does anyone know how to get the name of the current font in = MkIV? >=20 >> We don=92t need LilyPond's layout settings, as long as we go the = \externalfigure path. >=20 > But I think that at least automatic paper size settings (set paper = size to be equal to text area) are needed. >=20 >> I don=92t know a solution for line breaking of scores - if you=92d = set LilyPond=92s page size to ConTeXt=92s remaining space, it would stay = the same for the second page. Perhaps we can get single lines (systems) = and let ConTeXt to the page breaking. I=92ll look into that. >=20 > OK. >=20 >> But I don=92t know how we can make it "right" WRT LilyPond snippets - = I=92d want to align a note systems=92s base line with ConTeXt=92s text = baseline, but the height and clipping of a snippet depends on the = visible elements. Without some picture analysis (or runtime data from = LilyPond, that doesn=92t exist AFAIK) you need to adjust your snippets = manually. >=20 > Does lilypond-book handle this at all? It does not appear to. Manually = adjusting each inline snippet will be too much work, IMO. >=20 >>> Do you know how lilypond numbers its output files. In some cases I = get filename-1.pdf sometimes not. Can I force it to always give = filename-1.pdf or always give filename.pdf >>=20 >> LilyPond adds a number to EPS, if there=92s more that one page. >> But in my songbook setup, I always get a = filename-temp-lilypond-##.eps plus an identical = filename-temp-lilypond-##-1.eps >>=20 >> When you order more than one \midi{} in several \score blocks, the = first MIDI file is unnumbered, the second gets number 1 etc.; didn=92t = try with different \layout blocks yet. >>=20 >> Seems like I must do some tests with multipage scores. >=20 > Look at the current version on github. It should be able to handle = multi-page snippets. >=20 > = Aditya____________________________________________________________________= _______________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > maillist : ntg-context@ntg.nl / = http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > = __________________________________________________________________________= _________ --Apple-Mail=_FC1F1426-1EA5-4B34-86F7-AF112DCFD75B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 Hi = Aditya & Hraban,

I'm very glad to see improved = Lilypond integration being discussed. I can't offer too much besides = moral support, but would just point out one solution I've found for = proper width/alignment of a snippet with extra-staff material (e.g. a = piano staff marker { ): If the ConTeXt textwidth is equal to the = Lilypond line-width, aligning the float to the right gives you a snippet = nicely aligned with flush text (extra-staff material being pushed = towards the left margin). 

Something like = this (as in the example in the garden):

\def]]{}{]}}
On Fri, 19 Aug 2011, Henning Hraban Ramm = wrote:

Am 2011-08-19 um 17:08 schrieb = Aditya Mahajan:

But - can you = even support different setups, say

\startlilypondpreamble
global settings for everything
\stoplilypondpreamble

\startlilypondpreamble[snippet]
global settings for snippets
\stoplilypondpreamble

\startlilypondpreamble[fullscore]
global settings for full = scores
\stoplilypondpreamble

\startlilypond[setup=3Dfullscore]
the score
\stoplilypond

etc.

Yes. I can support the following = syntax:

\startbuffer[snippets] ... = \stopbuffer

\startbuffer[fullscore] ... = \stopbuffer

\startbuffer[common] ... = \stopbuffer

\startlilypond[bufferbefore=3D{snippets,common}, = bufferafter=3D{....}]
.... \stoplilypond

(In fact, provide = similar support for anything defined using the filter = module).

The = other thing is to be able to change linespace, papersize, offset, etc = using parameters, so that one can = say:
\startlilypond[linespace=3D...]
...
\stoplilypond
This will require some lua side = processing.

You mean, = translate ConTeXt-style settings to LilyPond settings, like we did with = the old module?

Yes.

That wouldn=92t make much sense. LilyPond just has too = much settings. And most of them you can set in different ways. To fully = support this, you=92d need a complete LilyPond parser including Scheme. = And a small set of settings is never the right set for = everyone.

OK.

Ok, = there are a few settings that we could translate, e.g. set ConTeXt=92s = main fonts also for LilyPond.

Agreed. Does anyone = know how to get the name of the current font in MkIV?

We don=92t need LilyPond's layout settings, as long as we = go the \externalfigure path.

But I think that at = least automatic paper size settings (set paper size to be equal to text = area) are needed.

I don=92t know a = solution for line breaking of scores - if you=92d set LilyPond=92s page = size to ConTeXt=92s remaining space, it would stay the same for the = second page. Perhaps we can get single lines (systems) and let ConTeXt = to the page breaking. I=92ll look into = that.

OK.

But I = don=92t know how we can make it "right" WRT LilyPond snippets - I=92d = want to align a note systems=92s base line with ConTeXt=92s text = baseline, but the height and clipping of a snippet depends on the = visible elements. Without some picture analysis (or runtime data from = LilyPond, that doesn=92t exist AFAIK) you need to adjust your snippets = manually.

Does lilypond-book handle this at all? It = does not appear to. Manually adjusting each inline snippet will be too = much work, IMO.

Do you know how lilypond numbers its output files. In some = cases I get filename-1.pdf sometimes not. Can I force it to always give = filename-1.pdf or always give = filename.pdf

LilyPond adds a = number to EPS, if there=92s more that one = page.
But in my songbook = setup, I always get a filename-temp-lilypond-##.eps plus an identical = filename-temp-lilypond-##-1.eps

When you order = more than one \midi{} in several \score blocks, the first MIDI file is = unnumbered, the second gets number 1 etc.; didn=92t try with different = \layout blocks yet.

Seems like I = must do some tests with multipage scores.

Look at = the current version on github. It should be able to handle multi-page = snippets.

Aditya___________________________________________________= ________________________________
If your question is of interest to = others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/= mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive =  : http://foundry.sup= elec.fr/projects/contextrev/
wiki     : http://contextgarden.net
________= __________________________________________________________________________= _

= --Apple-Mail=_FC1F1426-1EA5-4B34-86F7-AF112DCFD75B-- --===============0590797601== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0590797601==--