From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/14278 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Re: Typesetting music in ConTeXt Date: Fri, 12 Dec 2003 00:51:52 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <6.0.1.1.2.20031212004217.0204be88@server-1> References: <69D9BBB0-2BB3-11D8-9AF5-000A9595B57C@ensta.fr> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: sea.gmane.org 1071216979 32414 80.91.224.253 (12 Dec 2003 08:16:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Dec 2003 08:16:19 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Fri Dec 12 09:16:17 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AUiTA-0000up-00 for ; Fri, 12 Dec 2003 09:16:16 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 5BBF710B31; Fri, 12 Dec 2003 09:16:06 +0100 (MET) Original-Received: from mail.solcon.net (mail.solcon.net [212.45.33.5]) by ref.ntg.nl (Postfix) with ESMTP id 9E46410B13 for ; Fri, 12 Dec 2003 08:58:45 +0100 (MET) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mail.solcon.net (8.11.6/8.9.3) with ESMTP id hBC7wg629829 for ; Fri, 12 Dec 2003 08:58:43 +0100 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 3B0A92397D; Fri, 12 Dec 2003 08:58:44 +0100 (CET) Original-Received: from laptop-3.wxs.nl (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id 125A217EE2 for ; Fri, 12 Dec 2003 07:58:41 +0000 (UTC) X-Sender: hagen-mail@server-1 X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Original-To: ntg-context@ntg.nl In-Reply-To: <69D9BBB0-2BB3-11D8-9AF5-000A9595B57C@ensta.fr> Original-References: <69D9BBB0-2BB3-11D8-9AF5-000A9595B57C@ensta.fr> Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:14278 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:14278 At 09:24 11/12/2003, you wrote: >So instead of Hans restarting a new Music Notation project, Hans should >make lilypond team using Context instead of LaTeX ;-) i'm not that sure (remembering a talk) that th lilypond team is that fond on tex -) >Also I noted that : >- Lilypond is NOT a TeX macro, it only seems to be a > dedicated (powerfull) subset of TeX (but allow input of TeX macro) it uses the \ as escape (as tex and rtf do) >- Lilypond make use of TeX for page breaking and other stuff > >So How to use Lilypond with ConTeXt? >1 - use Lilypond as an independant tool for building short > (less or equal to one page) as pdf figure and > include them in context as external figure > (that is the way I'll do, because I'm not clever > enought to do much more :-) if there is a clean way to generate a cropped piece of music, this is actually simple: There is a mechanism in context for processign snippets, something along the lines: \long\def\dostartTEXapplication[#1]#2#3\stopTEXapplication {\bgroup \bgroup \let\f!temporaryextension\c!tex \setbuffer[\@@texapp]% \ifx\starttext\undefined \pdfoutput=1 \pdfcompresslevel=9 \hsize0pt \vsize0pt #2\relax% preamble \ifdim\hsize=0pt \hsize20cm\fi \ifdim\vsize=0pt \vsize20cm\fi \output{} \parindent=0pt \everypar{} \hoffset=-1in \voffset=\hoffset \setbox0\vbox{#3} \ifdim\wd0<1in \message{[warning: width<1in]}\fi \ifdim\ht0<1in \message{[warning: height<1in]}\fi \pdfpageheight=\ht0 \pdfpagewidth=\wd0 \box0 \expandafter \bye \else \starttext #2% preamble \startTEXpage[#1]% \topskip\zeropoint \setbox\scratchbox\hbox{#3}% \saveTEXapplication02% dimensions \box\scratchbox \stopTEXpage \expandafter \stoptext \fi \endbuffer \egroup % \doifelse\jobsuffix{dvi}\donetrue\donefalse % \executesystemcommand{texexec \bufferprefix\@@texapp.tex --once --batch}% \executesystemcommand{texexec --tex=pdftex --format=plain \bufferprefix\@@texapp.tex}% % \ifdone % eps % \executesystemcommand{dvips -E* -o \@@texapp.eps \@@texapp}% % \else % pdf % \executesystemcommand{dvips \bufferprefix\@@texapp}% % \executesystemcommand{ps2pdf \bufferprefix\@@texapp.ps \bufferprefix\@@texapp.pdf}% % \fi % \restoreTEXapplication % dimensions \setbox\scratchbox\hbox {\expanded{\externalfigure % [\bufferprefix\@@texapp.\ifdone eps\else pdf\fi] [\bufferprefix\@@texapp.pdf] [\c!object=\v!nee]}}% % \setbox\scratchbox\hbox % {\lower\ht\scratchbox\hbox{\raise\dimen2\box\scratchbox}}% % \wd\scratchbox\dimen0 % \ht\scratchbox\dimen2 % \dp\scratchbox\zeropoint \ruledhbox\bgroup \box\scratchbox \egroup \egroup} \def\startMUSICTEX {\dosingleempty\dostartMUSICTEX} \long\def\dostartMUSICTEX[#1]#2\stopMUSICTEX {\startTEXapplication[#1] {\input musicnft\relax \input musictex\relax \hsize5cm}#2% \stopTEXapplication} \protect \starttext \starthiding \startMUSICTEX \def\nbinstruments{1}\relax % a single instrument \generalmeter{\meterfrac{4}{4}}\relax % 4/4 meter chosen \debutextrait % starting real score \normal % normal 12 pt note spacing \temps\Notes\ibu0f0\qh0{cge}\tbu0\qh0g\enotes \finextrait % terminate excerpt \stopMUSICTEX \startMUSICTEX \def\nbinstruments{3}\relax % a single instrument \debutextrait % starting real score \temps \Notes\ibu0f0\qh0{cge}\tbu0\qh0g\enotes \Notes\ibu0f0\qh0{cge}\tbu0\qh0g\enotes \finextrait % terminate excerpt \stopMUSICTEX \stophiding \startMUSICTEX \generalsignature{1}% \def\nbinstruments{1}% \debutextrait \NOtes\zsong{Au }\qu g\enotes \NOtes\zsong{clair }\qu g\enotes \NOtes\zsong{de }\qu g\enotes \NOtes\zsong{la }\qu h\enotes \finextrait \stopMUSICTEX \stoptext Willi has played with this and maybe the two of you can figure out what this should look like for lilypond. >2 - make Lilypond team understand how ConTeXt is much > more interesting as automatic formatic tool for > creating pdf than LaTeX is! go ahead ... >3 - Allow using lilypond inside ConTeXt with > \startmusic > \stopmusic > I think this method would be much like typesetting > chimical > Hans has not to be developping a nex package, just > using one that already exist see a few lines back >Also I think Lilipond could interest much more people >that the only short xTeX poeple user. >But Lilipond in not as easy to install (to many LaTeX >dependancy). which is strange since there is not much latex needed for music >So the Lilypond tead could be interested by the new future >alternative ConTeXt-live CDROM distribution ;-) > >ConTeXt-live (alias LaTeX-3: the only "nothing to install" >TeX based type system that allow to do : >- Mathematical, >- graphical (Metapost), >- Chimical, >- Musical >hight quality pdf documentation or web based presentation!!! > > > >P.S. >I don't (yet) use Lilypond, but I looked after some text based >Music notation for my wife. >I thought first to MusixTex (too eavy, too old) then the abc format >(which could be import as ps/pdf figure), then I found that >lilypond was closely related to TeX. >So it's probably the choice I'll do. i suggest that you mail a bit with Willi Egger (also on this list) in order to sort out how to proceed; i can hack tha macros once i know what needs to be done Hans