From: Hans Hagen <pragma@wxs.nl>
Subject: Re: Re: Typesetting music in ConTeXt
Date: Fri, 12 Dec 2003 00:51:52 +0100 [thread overview]
Message-ID: <6.0.1.1.2.20031212004217.0204be88@server-1> (raw)
In-Reply-To: <69D9BBB0-2BB3-11D8-9AF5-000A9595B57C@ensta.fr>
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
next prev parent reply other threads:[~2003-12-11 23:51 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-26 14:58 news / bold math Hans Hagen
2003-11-27 2:14 ` `Standard' vs `Beta'? Bob Kerstetter
2003-11-27 9:26 ` Hans Hagen
2003-11-28 1:06 ` Bob Kerstetter
2003-12-08 17:20 ` ConTeXt Switcher? Bob Kerstetter
2003-12-08 18:55 ` Peter Münster
2003-12-08 20:57 ` Bob Kerstetter
2003-12-08 20:33 ` Henning Hraban Ramm
2003-12-08 21:51 ` Bob Kerstetter
2003-12-08 22:06 ` Re[2]: " Giuseppe Bilotta
2003-12-09 7:52 ` Hans Hagen
2003-12-09 12:52 ` context2html converter (was: ConTeXt Switcher? ) Maurice Diamantini
2003-12-09 23:16 ` Bob Kerstetter
2003-12-10 10:39 ` context2html converter Patrick Gundlach
2003-12-10 12:55 ` ConTeXt-live distribution Maurice Diamantini
2003-12-10 13:29 ` Zunbeltz Izaola
2003-12-10 15:10 ` ConTeXt-live distribution (Typesetting music in ConTeXt) Pavel Stupin
2003-12-10 16:44 ` Hans Hagen
2003-12-10 18:55 ` Willi Egger
2003-12-10 22:05 ` Typesetting music in ConTeXt Henning Hraban Ramm
2003-12-11 8:24 ` Maurice Diamantini
2003-12-11 23:51 ` Hans Hagen [this message]
2003-12-11 23:57 ` Hans Hagen
2003-12-10 16:32 ` ConTeXt-live distribution Hans Hagen
2003-12-10 16:43 ` Adam Lindsay
2003-12-10 16:54 ` Hans Hagen
2004-04-01 17:22 ` context2html converter (was: ConTeXt Switcher? ) Peter Münster
2003-12-11 5:40 ` ConTeXt Switcher? Berend de Boer
2003-11-27 6:10 ` news / bold math Lutz Haseloff
2003-11-27 6:34 ` Lutz Haseloff
2003-11-27 19:47 ` Mikael Persson
[not found] ` <32868.129.16.195.171.1069962458.squirrel@mail.medic.chalme rs.se>
2003-11-27 21:22 ` Hans Hagen
2003-11-27 21:38 ` Mikael Persson
2003-11-28 10:36 ` Tobias Burnus
2003-11-28 20:28 ` m-bib and crossref William D. Neumann
2003-11-29 14:50 ` ConTeXt and emacs Thomas A.Schmitz
2003-11-30 0:49 ` Patrick Gundlach
2003-11-30 9:34 ` Thomas A.Schmitz
2003-11-30 20:12 ` Patrick Gundlach
2003-11-30 4:24 ` Matthew Huggett
2003-12-01 10:45 ` m-bib and crossref Taco Hoekwater
2003-12-01 19:00 ` William D. Neumann
2003-12-04 8:48 ` Taco Hoekwater
2003-12-05 19:20 ` Peter Münster
2003-11-29 0:08 ` news / bold math Adam Lindsay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6.0.1.1.2.20031212004217.0204be88@server-1 \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).