From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- support/m-tx/OSX/prepmx | Bin 0 -> 159688 bytes support/m-tx/README | 53 + support/m-tx/doc/Makefile | 43 + support/m-tx/doc/README.documentation | 115 ++ support/m-tx/doc/borup.mtx | 20 + support/m-tx/doc/buildmtxdoc.lua | 59 + support/m-tx/doc/buildzip.lua | 3 + support/m-tx/doc/chord.mtx | 10 + support/m-tx/doc/dertod.mtx | 9 + support/m-tx/doc/dona.mtx | 19 + support/m-tx/doc/dwoman.mta | 4 + support/m-tx/doc/dwoman.mtb | 3 + support/m-tx/doc/dwoman.mtx | 7 + support/m-tx/doc/halleluja.ltx | 74 ++ support/m-tx/doc/hallelujashort.ltx | 21 + support/m-tx/doc/kanons.ltx | 11 + support/m-tx/doc/kroonhom.mtx | 144 +++ support/m-tx/doc/loofnou.mtx | 105 ++ support/m-tx/doc/lyrics.tex | 14 + support/m-tx/doc/macro.mtx | 15 + support/m-tx/doc/make-dvi | 16 + support/m-tx/doc/make-pdf | 6 + support/m-tx/doc/make-target | 6 + support/m-tx/doc/melisma.mta | 5 + support/m-tx/doc/melisma1.mtb | 2 + support/m-tx/doc/melisma1.mtx | 7 + support/m-tx/doc/melisma2.mtb | 2 + support/m-tx/doc/melisma2.mtx | 7 + support/m-tx/doc/melisma3.mtb | 2 + support/m-tx/doc/melisma3.mtx | 7 + support/m-tx/doc/melisma4.mtb | 3 + support/m-tx/doc/melisma4.mtx | 8 + support/m-tx/doc/melisma5.mtb | 2 + support/m-tx/doc/melisma5.mtx | 7 + support/m-tx/doc/melisma6.mtb | 3 + support/m-tx/doc/melisma6.mtx | 8 + support/m-tx/doc/meter.mtx | 10 + support/m-tx/doc/mozart.mtx | 7 + support/m-tx/doc/mozart0.mtx | 2 + support/m-tx/doc/mtx-install.pdf | Bin 0 -> 89964 bytes support/m-tx/doc/mtx-install.tex | 151 +++ support/m-tx/doc/mtxdoc.ltx | 2159 +++++++++++++++++++++++++++++++++ support/m-tx/doc/mtxdoc.pdf | Bin 0 -> 378927 bytes support/m-tx/doc/mtxdoc.sty | 110 ++ support/m-tx/doc/mtxindex.tex | 18 + support/m-tx/doc/netfirst.mtx | 14 + support/m-tx/doc/netsoos.mta | 5 + support/m-tx/doc/netsoos1.mtb | 7 + support/m-tx/doc/netsoos1.mtx | 12 + support/m-tx/doc/netsoos2.mtb | 8 + support/m-tx/doc/netsoos2.mtx | 13 + support/m-tx/doc/notes.tex | 6 + support/m-tx/doc/pdfcat | 32 + support/m-tx/doc/prepmx.1 | 100 ++ support/m-tx/doc/prepmx.pdf | Bin 0 -> 5332 bytes support/m-tx/doc/psalm42.mtx | 15 + support/m-tx/doc/sanctus.mtx | 13 + support/m-tx/doc/title.mtx | 9 + support/m-tx/doc/title1.mtx | 9 + support/m-tx/doc/viva.mtx | 11 + support/m-tx/doc/volta.mtx | 21 + support/m-tx/latex/mtxlatex.sty | 98 ++ support/m-tx/scripts/m-tx.lua | 5 + support/m-tx/tex/mtx.tex | 253 ++++ 64 files changed, 3908 insertions(+) create mode 100644 support/m-tx/OSX/prepmx create mode 100644 support/m-tx/README create mode 100644 support/m-tx/doc/Makefile create mode 100644 support/m-tx/doc/README.documentation create mode 100644 support/m-tx/doc/borup.mtx create mode 100755 support/m-tx/doc/buildmtxdoc.lua create mode 100755 support/m-tx/doc/buildzip.lua create mode 100644 support/m-tx/doc/chord.mtx create mode 100644 support/m-tx/doc/dertod.mtx create mode 100644 support/m-tx/doc/dona.mtx create mode 100644 support/m-tx/doc/dwoman.mta create mode 100644 support/m-tx/doc/dwoman.mtb create mode 100644 support/m-tx/doc/dwoman.mtx create mode 100644 support/m-tx/doc/halleluja.ltx create mode 100644 support/m-tx/doc/hallelujashort.ltx create mode 100644 support/m-tx/doc/kanons.ltx create mode 100644 support/m-tx/doc/kroonhom.mtx create mode 100644 support/m-tx/doc/loofnou.mtx create mode 100644 support/m-tx/doc/lyrics.tex create mode 100644 support/m-tx/doc/macro.mtx create mode 100644 support/m-tx/doc/make-dvi create mode 100644 support/m-tx/doc/make-pdf create mode 100644 support/m-tx/doc/make-target create mode 100644 support/m-tx/doc/melisma.mta create mode 100644 support/m-tx/doc/melisma1.mtb create mode 100644 support/m-tx/doc/melisma1.mtx create mode 100644 support/m-tx/doc/melisma2.mtb create mode 100644 support/m-tx/doc/melisma2.mtx create mode 100644 support/m-tx/doc/melisma3.mtb create mode 100644 support/m-tx/doc/melisma3.mtx create mode 100644 support/m-tx/doc/melisma4.mtb create mode 100644 support/m-tx/doc/melisma4.mtx create mode 100644 support/m-tx/doc/melisma5.mtb create mode 100644 support/m-tx/doc/melisma5.mtx create mode 100644 support/m-tx/doc/melisma6.mtb create mode 100644 support/m-tx/doc/melisma6.mtx create mode 100644 support/m-tx/doc/meter.mtx create mode 100644 support/m-tx/doc/mozart.mtx create mode 100644 support/m-tx/doc/mozart0.mtx create mode 100644 support/m-tx/doc/mtx-install.pdf create mode 100644 support/m-tx/doc/mtx-install.tex create mode 100644 support/m-tx/doc/mtxdoc.ltx create mode 100644 support/m-tx/doc/mtxdoc.pdf create mode 100644 support/m-tx/doc/mtxdoc.sty create mode 100644 support/m-tx/doc/mtxindex.tex create mode 100644 support/m-tx/doc/netfirst.mtx create mode 100644 support/m-tx/doc/netsoos.mta create mode 100644 support/m-tx/doc/netsoos1.mtb create mode 100644 support/m-tx/doc/netsoos1.mtx create mode 100644 support/m-tx/doc/netsoos2.mtb create mode 100644 support/m-tx/doc/netsoos2.mtx create mode 100644 support/m-tx/doc/notes.tex create mode 100755 support/m-tx/doc/pdfcat create mode 100644 support/m-tx/doc/prepmx.1 create mode 100644 support/m-tx/doc/prepmx.pdf create mode 100644 support/m-tx/doc/psalm42.mtx create mode 100644 support/m-tx/doc/sanctus.mtx create mode 100644 support/m-tx/doc/title.mtx create mode 100644 support/m-tx/doc/title1.mtx create mode 100644 support/m-tx/doc/viva.mtx create mode 100644 support/m-tx/doc/volta.mtx create mode 100644 support/m-tx/latex/mtxlatex.sty create mode 100755 support/m-tx/scripts/m-tx.lua create mode 100644 support/m-tx/tex/mtx.tex (limited to 'support/m-tx') diff --git a/support/m-tx/OSX/prepmx b/support/m-tx/OSX/prepmx new file mode 100644 index 0000000000..8d5e9cc587 Binary files /dev/null and b/support/m-tx/OSX/prepmx differ diff --git a/support/m-tx/README b/support/m-tx/README new file mode 100644 index 0000000000..c537b9eed9 --- /dev/null +++ b/support/m-tx/README @@ -0,0 +1,53 @@ +This is M-Tx (Music-from-TeXt), version 0.63c (2019-01-15). + +M-Tx is a preprocessor for PMX that facilitates inputting +lyrics. It builds the PMX input file based on a language +very similar to PMX. M-Tx includes most of PMX's +functionality, but it also permits in-line PMX commands to +give access to virtually all of PMX. + +The author of M-Tx is Dirk Laurie (dirk.laurie@gmail.com). + +To install (on TDS-compliant TeX systems): + + + unzip tex-archive/install/m-tx.tds.zip at the root of + a texmf tree and, if necessary, update the filename + database; e.g., texhash texmf. Documentation for M-Tx + is installed under doc/generic/tmx. You must use an + unzipping program that converts text files to the + text-file format of your platform, such as "unzip -a ..." + on Linux. + + + *either* copy the executables appropriate for your + platform (Windows32, Windows64, OSX) to a + folder on the executable PATH and ensure it has execute + permission + + + *or* on any Unix-like system with gcc and standard + development tools installed: unpack mtx-0.63a.tar.gz + (anywhere), move to the resulting mtx-0.63a directory, + and do + + ./configure [--prefix=$HOME] + make (or make -f Makefile.orig if you have fpc installed) + make install (as root, if necessary) + +Documentation for M-Tx is installed under + +doc/generic/m-tx + +Many examples of M-Tx and MusiXTeX typesetting may be found +at the Werner Icking Music Archive at + +http://icking-music-archive.org/ + +Support for users of MusiXTeX and related software may be +obtained via the MusiXTeX mail list at + +http://tug.org/mailman/listinfo/tex-music + +M-Tx may be freely copied, duplicated and used in +conformance to the MIT License; see included file LICENSE. + +This CTAN distribution is maintained by Bob Tennent +(rdt(at)cs.queensu.ca). diff --git a/support/m-tx/doc/Makefile b/support/m-tx/doc/Makefile new file mode 100644 index 0000000000..8eaf4d74f7 --- /dev/null +++ b/support/m-tx/doc/Makefile @@ -0,0 +1,43 @@ +# Makefile for the M-Tx documentation + +default: + texlua buildmtxdoc.lua +halleluja: + texlua buildmtxdoc.lua halleluja +kanons: + texlua buildmtxdoc.lua kanons +PHONY: default halleluja kanons + +support = Makefile make-dvi make-pdf make-target pdfcat \ + buildmtxdoc.lua buildzip.lua + +sources = mtxdoc.ltx mtxdoc.sty mtxlatex.sty mozart0.mtx mozart.mtx\ + netfirst.mtx meter.mtx dertod.mtx volta.mtx title.mtx title1.mtx\ + psalm42.mtx netsoos1.mtb notes.tex lyrics.tex\ + netsoos2.mtb borup.mtx melisma1.mtb dwoman.mtb \ + melisma2.mtb melisma3.mtb melisma4.mtb melisma5.mtb melisma6.mtb \ + dwoman.mta melisma.mta netsoos.mta kroonhom.mtx loofnou.mtx \ + viva.mtx dona.mtx sanctus.mtx halleluja.ltx kanons.ltx chord.mtx \ + macro.mtx + +nonsources = borup.tex chord.tex dertod.tex dwoman.tex macro.tex\ + melisma1.tex melisma2.tex melisma3.tex melisma4.tex melisma5.tex\ + melisma6.tex meter.tex mozart.tex mozart0.tex netfirst.tex\ + netsoos1.tex netsoos2.tex psalm42.tex title1.tex title.tex volta.tex\ + mtxdoc.aux mtxdoc.ind mtxdoc.toc mtxdoc.pdf halleluja.pdf kanons.pdf\ + dona.tex halleluja.aux halleluja.toc kanons.aux kroonhom.tex\ + loofnou.tex musixtex.log sanctus.tex viva.tex + +zip: + texlua buildzip.lua $(sources) $(support) README + +clean: + - rm dwoman.mtx netsoos?.mtx melisma?.mtx *.pm? + +bare: clean + - rm $(nonsources) + +commit: clean + git add $(sources) $(support) + + diff --git a/support/m-tx/doc/README.documentation b/support/m-tx/doc/README.documentation new file mode 100644 index 0000000000..d889d93a75 --- /dev/null +++ b/support/m-tx/doc/README.documentation @@ -0,0 +1,115 @@ +M-Tx Documentation Package +========================== + +This is the development version of the M-Tx documentation. It contains +all the sources for generating the Users's Manual (`mtxdoc.pdf`), its +index (`mtxindex.pdf`), both together (`mtx.pdf`) and two sample music +documents (`halleluja.pdf`, `kanons.pdf`). + +I'm assuming a fairly recent TeX installation that has Bob Tennent's driver +programs `musixtex` and `m-tx`. TeXLive 2013 will do. If you install via +`apt-get`, the `m-tx` package will install all the prerequisites too. +'pdftk' will be used if available but you can get by without it. + +Everything after the "Quick Start" section is outdated. + +Dirk Laurie `` + +Quick Start +----------- + +You probably got this code in one of two ways (`061` may be different): + + unzip -a mtxD061.zip + + git clone https://github.com/dlaurie/M-Tx + +In either case, your working directory must be the one containing this +file. If you have GNU make, issue the command + + make + +Messages will flit by, hopefully ending in + + Output written on mtxindex.pdf (3 pages, 54045 bytes). + Transcript written on mtxindex.log. + +and a new copy of the file mtx.pdf will be available. + +To make the examples, respectively do + + make halleluja + make kanons + +If you do not have GNU Make, execute the commands found at the top +of the Makefile by entering them in a command shell. + +Using the Makefile instead +-------------------------- + +There is legacy code in the Makefile for making `dvi`, `ps`, or `lj` +options of the documentation files. This code does not require the +aforementioned driver programs. + +Via DVI files +------------- + +You can make any of the four file formats. Type + + make dvitarget && make config + +to configure the option. Make sure that everything looked for was found. +You can then choose between: + + make Makes mtx.dvi (and mtxdoc.dvi, mtxindex.dvi on the way there) + make all Make .dvi files. + make ps Make .dvi and .ps files + make pdf Make .dvi, .ps and .pdf files + make ?.lj Make the specified .lj file + +Via PDF files +------------- + +Type + + make pdftarget && make config + +to configure the option. Make sure that everything looked for was found. +You can then choose between: + +--------- -------------------------------------------------------------- +make Makes mtx.pdf (and mtxdoc.pdf, mtxindex.pdf on the way there) +make all Make .pdf files. +make ps Make .pdf and .ps files +--------- -------------------------------------------------------------- + +You don't have the option of making .dvi or .lj files. + +FAQ - Frequently Asked Questions +-------------------------------- + +1. I get "make: ./prepmx: Command not found". + + A: You have omitted the `make config` step. + +2. I have configured, but the make still fails. + + A: Look at the screen output from `make config`. Make sure that + there is a file name after each `...`. + +3. Is there any difference between the `.pdf` and `.ps` files made by the + two options? + + A: Yes. If you go by the second route, slurs tend to look smoother + and certain additional slur shapes are possible; see the PMX manual. + Also, the two versions look a little different on a low-resolution + monitor, but apart from slurs, should be virtually indistinguishable + when printed. + +4. What are the prerequisites? + + A: You need to have MusiXTEX, PMX, musixlyr and M-Tx already installed. + If all that does not give you Ghostscript, you can still build + everything except `mtx.pdf`. + + diff --git a/support/m-tx/doc/borup.mtx b/support/m-tx/doc/borup.mtx new file mode 100644 index 0000000000..d67cbf24fb --- /dev/null +++ b/support/m-tx/doc/borup.mtx @@ -0,0 +1,20 @@ +Meter: 3/4 +Title: Song of May +Flats: 1 +Style: Singer +Systems: 2 +Space: 10 +TeX: \let\endpiecesav\endpiece +TeX: \def\endpiece{\endpiecesav\input lyrics \input notes} + +( d4 e ) g | ( d e ) g | ( f e ) f | d2 r4 | +L: In ver-na-lis tem-po-ris +L: Dum re-ces-sum fri-go-ris + +( f g ) a | ( a g ) f | g2d | g2 r4 :|: g2 d4+ | d2 d4 | ( d c ) b | a2 r4 | +L: or-tu lae-ta-bun-do, ter-rae, ma-ris, ne-mo-ris +L: nun-ti-at hi-run-do, vi-gor re-dit cor-po-ris, + +g2 a4 | ( b a ) g | ( f e ) f | d2 r4 | ( f g ) a | ( a g ) f | g2d | g2 r4 :| +L: de-cus ad-est de-fo-ris re-no-va-to mun-do, +L: ce-dit do-lor pec-to-ris tem-po-re iu-cun-do. diff --git a/support/m-tx/doc/buildmtxdoc.lua b/support/m-tx/doc/buildmtxdoc.lua new file mode 100755 index 0000000000..c69dad23f9 --- /dev/null +++ b/support/m-tx/doc/buildmtxdoc.lua @@ -0,0 +1,59 @@ +#! /usr/bin/texlua +-- buildmtxdoc.lua © Dirk Laurie 2015 MIT license +-- Build M-Tx documentation from scratch. + +local project = {halleluja = "-t kroonhom loofnou -f -q -p halleluja"; +kanons = "-t viva dona sanctus -f -q -p kanons"; +mtxdoc = "-t borup chord dertod dwoman macro".. +" melisma1 melisma2 melisma3 melisma4 melisma5 melisma6".. +" meter mozart mozart0 netfirst netsoos1 netsoos2 psalm42 title title1 volta".. +" -f -x -q -p mtxdoc"} + +local sys = function(...) + print(...) + return(os.execute(...)) +end + +local cat = function(target,...) + local result = io.open(target,'w') + for k=1,select('#',...) do + for line in io.open((select(k,...))):lines() do + result:write(line,"\n") + end + end + result:close() +end + +local make_examples = function() + cat("dwoman.mtx","dwoman.mta","dwoman.mtb") + for k=1,2 do + mtxname = ("netsoos%d.mtx"):format(k) + cat(mtxname,"netsoos.mta",("netsoos%d.mtb"):format(k)) + end + for k=1,6 do + mtxname = ("melisma%d.mtx"):format(k) + cat(mtxname,"melisma.mta",("melisma%d.mtb"):format(k)) + end +end + +local build_project = function(target) + if target == "mtxdoc" then + make_examples() + end + sys("musixtex -q "..project[target]) +end + +-- Main program + +if type(arg)~='table' or not arg[1] then build_project"mtxdoc" +elseif project[arg[1]] then build_project(arg[1]) +else print[[ +This is buildmtxdoc version 0.1. +Usage: [texlua] buildmtx.lua [project] +Projects: + mtxdoc + halleluja + kanons + +If no project is specified, "mtxdoc" is built.]] +end diff --git a/support/m-tx/doc/buildzip.lua b/support/m-tx/doc/buildzip.lua new file mode 100755 index 0000000000..8d9c036c84 --- /dev/null +++ b/support/m-tx/doc/buildzip.lua @@ -0,0 +1,3 @@ +os.execute ("zip mtxD" .. + io.open"mtxdoc.ltx":read"*a":match"versionname{(.-)}":gsub("%.","") + .. " " .. table.concat(arg," ")) diff --git a/support/m-tx/doc/chord.mtx b/support/m-tx/doc/chord.mtx new file mode 100644 index 0000000000..a5b0ca6a79 --- /dev/null +++ b/support/m-tx/doc/chord.mtx @@ -0,0 +1,10 @@ +Style: Organ +Meter: C +Flats: 1 + +{ cs0 c }{ c }{ c } +C: {e{g{b {e{g{b {e{g{b egb +{ cs0 c }{ c }{ c } +C: {e{g{b {e{g{b {e{g{b egb +{ cs0- c }{ c }{ c } +C: {b+ {b+ {b+ b+ diff --git a/support/m-tx/doc/dertod.mtx b/support/m-tx/doc/dertod.mtx new file mode 100644 index 0000000000..26cbd7b43e --- /dev/null +++ b/support/m-tx/doc/dertod.mtx @@ -0,0 +1,9 @@ +Style: PianoBass +PianoBass: Voices RH LH; Clefs F F; Continuo +Meter: C/ +Flats: 1 + + f2 g4 e | f2 a4 a | a2 f4 e | f2 f4 e | f2 g4 e | f2 a4 a | a2 f4 e | +C: ad bd gd+ ad gle+ f+ gle+ ad acs ad d+ gd+ ad bd gd+ ad gle+ f+ gle+ ad acs + d2 d4 d | d2 d4 a | a2 a4 a | a2 d4 d | d2 d4 d | d2 d4 a | a2 a4 a | +C: d- d- d- d- d- d a- a- a- d- d- d- d- d- d- d- d- d a- a- a- diff --git a/support/m-tx/doc/dona.mtx b/support/m-tx/doc/dona.mtx new file mode 100644 index 0000000000..2921ad5a38 --- /dev/null +++ b/support/m-tx/doc/dona.mtx @@ -0,0 +1,19 @@ +Title: Dona Nobis Pacem +Flats: 1 +Meter: 3/4 +Style: Singer +Bars/line: 8 +Size: 20 + +U: !bf 1 +@+3 [ f8 c ] a2+ [ g8 c- ] b2+ ( a4 g ) f f e2 ( d4+ c8 b ) [ a g ] ( c4.b ) a ( a8 g f4 e ) f2d +L: Do-na no-bis pa-cem, pa-cem, do-na no-bis pa-cem, + +U: 2 +c2d+ cd ( c4 b ) a a g2 d4+ d2 c4 c2 ( c8 b a4 g )+5 f2d +L: do-na no-bis pa-cem, do-na no-bis pa-cem, + +U: 3 +@=+1 f2d ed ( f4d g8 ) [ a b ] c4 c2- b4+ b2 a4 a2 ( e8 g c4 c- ) f2d +L: do-na no-bis pa-cem, do-na no-bis pa-cem. + diff --git a/support/m-tx/doc/dwoman.mta b/support/m-tx/doc/dwoman.mta new file mode 100644 index 0000000000..77f00c576b --- /dev/null +++ b/support/m-tx/doc/dwoman.mta @@ -0,0 +1,4 @@ +Style: Singer +Meter: 3/4 + +%% w80m diff --git a/support/m-tx/doc/dwoman.mtb b/support/m-tx/doc/dwoman.mtb new file mode 100644 index 0000000000..c9003cbf5b --- /dev/null +++ b/support/m-tx/doc/dwoman.mtb @@ -0,0 +1,3 @@ +e f g ( a2d a ) (" g8 f ) (" e4 e ) +L: She is a dan-ge-rous wo-man +L: You'll get a bro--ken heart_ diff --git a/support/m-tx/doc/dwoman.mtx b/support/m-tx/doc/dwoman.mtx new file mode 100644 index 0000000000..3479921624 --- /dev/null +++ b/support/m-tx/doc/dwoman.mtx @@ -0,0 +1,7 @@ +Style: Singer +Meter: 3/4 + +%% w80m +e f g ( a2d a ) (" g8 f ) (" e4 e ) +L: She is a dan-ge-rous wo-man +L: You'll get a bro--ken heart_ diff --git a/support/m-tx/doc/halleluja.ltx b/support/m-tx/doc/halleluja.ltx new file mode 100644 index 0000000000..86a8538e3e --- /dev/null +++ b/support/m-tx/doc/halleluja.ltx @@ -0,0 +1,74 @@ +\documentclass[a4paper]{article} +\usepackage{mtxlatex,times} +\mtxlatex +\pagestyle{headings} +\title{ {\Huge Halleluja!\\ [2ex]} + {\Large\textit{Anthems for unaccompanied church choir (SATB)}\\ [5ex]}} +\author{\Large Edited by Dirk Laurie} +\date{} +\let\Writebarno\writebarno +\begin{document} + \maketitle + \thispagestyle{empty} + \tableofcontents + \section*{} % Foreword +The scores in this booklet were edited from nearly illegible photocopies +of crudely duplicated manuscripts, themselves made by inexpert copyists +from unknown originals in the days before photo-copying machines existed. +Any remaining errors are the responsibility of the editor. + +Unfortunately the available sources did not specify who the composers +and lyrics writers of these anthems are. +\pagebreak + +\def\writebarno{\vbox to 24pt{}{\Writebarno}} +\begin{Score} {Kroon Hom!} {kroonhom} \end{Score} +\def\writebarno{\vbox to 16pt{}{\Writebarno}} +\begin{Score} {Loof nou die Heer} {loofnou} \end{Score} + + \section*{Technical notes} +The score was typeset by the editor using his own \MTx\ typesetting program, +which in turn relies on the programs \PMX\ by Don Simons, \texttt{musixlyr.tex} +by Rainer Dunker, MusiX\TeX\ by Daniel +Taupin \textit{et al.}, \LaTeX\ by Leslie Lamport and \TeX\ by Donald Knuth. + + \section*{The lyrics} +Here is a literal translation of the words of the first anthem. +\begin{verse} + \begin{center} Crown Him! \end{center} +Crown Him! Crown Him! Crown Him! \\ +Around the throne of God on high rejoices a crowd of people, +a crowd redeemed of sin and guilt. \\ +And crown Him as your Lord. \\ +Bring praise and thanks and glorify his Name and crown Him as your Lord. \\ +The promise of the Second Coming and the Advocacy of the Spirit causes men and +the Creation to wait hopefully for eternal freedom. \\ +One day corn and chaff will be separated. \\ +He will lead us in freedom. \\ +Throw all your sorrows before Him and crown Him as your Lord. \\ +Let every person, every nation on this earth praise Thee. \\ +Unto Him eternal praise and glory and crown Him as your Lord. \\ +O ye that are chosen, come and assemble before his feet. \\ +Join everyone in eternal song and crown Him as your Lord. \\ +Amen. +\end{verse} + +The second anthem is a translation of Psalm 150. Rather than +an attempt at rendering that version into English, here are the +relevant verses from the Authorised Version (King James Bible). +\begin{verse} + Praise ye the \textsc{Lord}. Praise God in his sanctuary: praise +him in the firmament of his power. \\ + Praise him for his mighty acts: praise him according to his excellent +greatness. \\ + Praise him with the sound of the trumpet: praise him with the psaltery +and harp. \\ + Praise him with the timbrel and dance: praise hom with stringed instruments +and organs. \\ + Praise him upon the loud cymbals: praise him upon the high sounding +cymbals. \\ + Let every thing that hath breath praise the \textsc{Lord}. + Praise ye the \textsc{Lord}. +\end{verse} +\end{document} + diff --git a/support/m-tx/doc/hallelujashort.ltx b/support/m-tx/doc/hallelujashort.ltx new file mode 100644 index 0000000000..031bb61a18 --- /dev/null +++ b/support/m-tx/doc/hallelujashort.ltx @@ -0,0 +1,21 @@ +\documentclass[a4paper]{article} +\usepackage{mtxlatex,times} +\pagestyle{headings} +\title{ {\Huge Halleluja!\\ [2ex]} + {\Large\textit{Anthems for unaccompanied church choir (SATB)}\\ [5ex]}} +\author{\Large Edited by Dirk Laurie} +\date{} +\let\Writebarno\writebarno +\begin{document} + \maketitle + \thispagestyle{empty} + \tableofcontents +\pagebreak + +\def\writebarno{\vbox to 24pt{}{\Writebarno}} +\begin{Score} {Kroon Hom!} {kroonhom} \end{Score} +\def\writebarno{\vbox to 16pt{}{\Writebarno}} +\begin{Score} {Loof nou die Heer} {loofnou} \end{Score} + +\end{document} + diff --git a/support/m-tx/doc/kanons.ltx b/support/m-tx/doc/kanons.ltx new file mode 100644 index 0000000000..f85c5b9299 --- /dev/null +++ b/support/m-tx/doc/kanons.ltx @@ -0,0 +1,11 @@ +\documentclass{article} +\usepackage{mtxlatex,charter} +\pagestyle{empty} +\renewcommand{\writebarno}{\rule{0pt}{12pt}} +\begin{document} + \begin{excerpts} +\input{dona.tex} \vskip 8mm +\input{sanctus.tex} \vskip 8mm +\input{viva.tex} \newpage + \end{excerpts} +\end{document} diff --git a/support/m-tx/doc/kroonhom.mtx b/support/m-tx/doc/kroonhom.mtx new file mode 100644 index 0000000000..cca8c4e84e --- /dev/null +++ b/support/m-tx/doc/kroonhom.mtx @@ -0,0 +1,144 @@ +Title: Kroon Hom! +Flats: 2 +Style: SATB +Pages: 3 +Systems: 14 +Space: 0 4 +Height: 280mm +Width: 193mm + +% 0 +f | b2 r4 b | d2 r4 d | { f0 | f2 } r4 || f- | fd f8 [ g a ] [ b c ] | +L: Kroon Hom, kroon Hom, kroon Hom! Rond-om die troon van +f | d2 r4 f | g2 r4 g | (-4 b2 a4 g | a2 )-4 r4 || c- | dd d8 e4 e | +f | b2 r4 d | d2 r4 d | (+2 d2 c4 b | c2 )+2 r4 || f- | bd b8 b4 b | +f | b2- r4 b+ | b2 r4 b | { f0 | f2 } r4 || a- | b2 e4 g | + +% 5 +d4 d d e | d [ c8 b ] c4d b8 | b2d b4 | +L: God om-hoog juig steeds 'n men-se-skaar, 'n +f fs g g | f f fd f8 | f2d b4 | +b c b c | b b a a | b0 | +b a g c- | f f f e | (-6 d f8 e d c )-6 d4 | + +% 10 +[ a8 g ] [ a b ] c4 c | [ b8 a ] [ b c ] d4 [ c8 b ] | [ a b ] c4 a g | +L: skaar ver-los van sond' en skuld. En kroon Hom as u +f f f fs | g g g g | f f f e | +c2 a4 d | c2 b4 c | c a c b | +@-6 e2 e4 d | g2d e4n | f2 c | +L: skaar los van sond', en kroon Hom + +% 13 +f2d |: f4 | [ b8 c ] [ d c ] b4 f | g2d g4 | [ c8 d ] [ e d ] c4 g | a2d f4 | +L: Heer, en kroon hom as u Heer, en kroon Hom as u Heer. Bring +c2d |: [ f8 e ] | [ d e ] [ f e ] d4 d | e2d f4r | [ e8 f ] [ g f ] e4 e | f2d f4 | +a2d |: f4 | f b f b | b2d b4n | c c g c | c2d a4 | +fd |: f4 | b2d- b4 | [ e8 f ] [ g f ] e4 d | c2d c4 | [ f8 g ] [ a g ] [ f g ] [ f e ] | +L: Heer, en kroon, en kroon Hom as u Heer, kroon Hom as Heer. Bring + +% 18-19 +b c d e | fd b8- a4 g | fd f8 [ a g ] [ f e ] | +L: lof en dank en prys sy Naam en kroon Hom as u +g a b b | bd f8 f4 cs | dd d8 e4 c | +b f+ f e | bd b8 b4 b | bd b8 [ c b ] a4 | +d4 f b g | dd d8 e4 en | fd f8 f4 [ f8 fs ] | + +% 20-23 +d2d f4 | (+6 g c8 b a4 d8 c | b4 e d )+5 c | +L: Heer. En kroon Hom +b2d f4+ | (-2 e g f a | b c b )-2 g | +b2d b4 | (+6 b e8 d c4 f8 e | d4 f2 )+4 e4 | +g4 g- (-8 g8+ f e d | e d c4 f8 e d4 | g a b )-6 e- | +L: ~ En kroon Hom + +% 24- +%%L5 +b2 a | bd :| d4 | dd d8 c4 b a g fsd d8 g4 a b c d2d r4 +L: as u Heer. Be-lof-te van die We-der-koms en Voor-spraak van die Gees +f2 f | fd :| f4s | g4d g8 g4 g en e dd d8 | d4 d d g | f2sd r4 +d2 ( c4 e ) | d2d :| d4 | b b c c cs c d [ a8 fs ] | g4 fs g g | a2d r4 +f2 f2 zf- | b2d :| d4 | g g e g a a d- d | b a g e+ | d2d r4 + +d c8 b a4 g c f- en d [ c8 f ] [ g a ] g4d f8 f2d r4 +g g8 g f4 en f c c cr c c end c8 c2d r4 +L: laat mens (en) skep-ping hoop-vol wag om e-wig vry te wees. +b c c c c f- g g f en c+ b a2d r4 +g en f [ c8 b ] a4 a c b a b c c f2d r4 + +fs8 f4 f8 g4 g a a8 a b4 b c8 c4 c8 b4 c d2d d4 dd d8 d c b af +d8 d4 d8 d4 d d d8 d d4 f f8 f4 f8 f4 f f2d f4s g4d g8 f e d f +L: Een-maal word kaf en ko-ring ge-skei. Hy sal ons in vre-de lei. Werp al jou sor-ge voor Hom +a4 a g2 fs g4 b a a b a b2d a4 b b ad b8 | +d c b2 a g4 d+ f e d c b2d d4 g g b- b | +L: Een-maal kom Hy weer, hy sal in vre-de lei. Werp al jou sor-ge + +g2d g4 ad g8 fs4 g a2d of f4 +e2d e4 en e d d d2d f4 +L: neer, (en) kroon Hom as u Heer. En +b0 | a4 a a g fs2d fn4 +e0 | cs4 c [ d8 cn ] b4 a2d ofd f4+ + +[ b8 c ] [ d c ] b4 f g2d g4 [ c8 d ] [ e d ] c4 g a2d f4 +[ d8 e ] [ f e ] d4 d e2d f4r [ e8 f ] [ g f ] e4 en f2d f4 +L: kroon Hom as u Heer, en kroon Hom as u Heer. Bring +f b f b b2d bn4 c c g c c2d a4 +b2d- b4 [ e8 f ] [ g f ] e4 d c2d c4 [ f8 g ] [ a g ] [ f g ] [ f e ] | +L: kroon, en kroon Hom as u Heer, kroon Hom as Heer. Bring + +b c d e fd b8- a4 g fd f8 [ a g ] [ f e ] +f a b b bd f8 f4 cs dd d8 e4 c +L: lof en dank en prys sy Naam en kroon Hom as u +b f+ f e bd b8 b4 b bd b8 [ c b ] a4 +d4 f b g | dd d8 e4 en | fd f8 f4 [ f8 fs ] + +d2d f4 (+8 g c8 b a4 d8 c b4 e d )+6 c b2 c +L: Heer. En kroon Hom as u +b2d f+4 g [ c8 b ] a4 [ d8 c ] b4 e d f- f2 en +b2d f4 g [ c8 b ] a4 [ d8 c ] b4 e d c d2 ( c4 b ) +g2d f4 (-2 g c8 b a4 d8 c b4 e d )-6 a g2 c- + +fd- f4 fd f8 [ g a ] [ b c ] d4 d d e d [ c8 b ] c4d b8 +fd c4 dd d8 e4 e f fs g g f f f f +L: Heer. Laat al-le men-se, el-ke volk op hier-die aard U +a2d f4 b b b b b c b c b b a a +f2d a4- b b e g b a g c- f f f e + +b2d b4 [ a8 g ] [ a b ] c4 c +f2d f4 f f f fs +L: loof. Aan Hom die eew'-ge +b2d b4 c c a d +( d f8 e d c )-6 d4 e e e d + +[ b8 a ] [ b c ] d4 b [ a8 b ] c4 a g +g g g g f f f en +L: lof en eer, en kroon Hom as u +d d b c c a c b +g2d en4 f2 c +L: lof, en kroon Hom + +f2d g4 [ a8 b ] [ c d ] e4 en f2d of f4- +c2d f4r [ f8 g ] [ a b ] a4 b a2d d4- +L: Heer. En kroon Hom as u Heer. O +a2d b4 f+ f f c c2d b4 +f2d g4 [ c8 d ] [ c b ] c4 c f2d- ofd b4- + +b b b c d [ c8 b ] c4 f- g f8 e d4 f +f g f f f en f f e b8 b b4 c +L: die wat uit-ver-ko-re is, kom skaar jul-le voor sy +b b b a b b a b b b8 g f4 a +d e d f b g f d e d8 e f4 f + +b2d f4 b b b c d [ c8 b ] c4 f- b2 b d d +d2d d4 f f f f f en f [ f8 ef ] [ d e f g ] f2 ( g4d a8 ) b2 +L: voet. Voeg al-mal saam in eew'-ge sang, en kroon Hom, kroon Hom, +b2d b4 b b b a b g a a b2d [ d8 c ] [ b c d c ] [ b c d e ] +b2d- b4 d e d f b- c f f [ b8- c d e ] [ d f b a ] [ g a b a ] [ g a b c ] + +f f d e d c b0 b b of +@+2 b2 b b g b f f0 g f +L: kroon Hom, kroon Hom, as u Heer! A-men. +f2 d f e [ f8 d c b ] a2 d0 e d +%[ d b a g ] [ f e d c ] [ b c d b ] [ e b d e ] f2 f zf- b0 e b ofd +[ d b a g ] [ f e d c ] [ b c d b ] [ e b d e ] f2 f zf- b0 e b ofd + diff --git a/support/m-tx/doc/loofnou.mtx b/support/m-tx/doc/loofnou.mtx new file mode 100644 index 0000000000..18fb5ca410 --- /dev/null +++ b/support/m-tx/doc/loofnou.mtx @@ -0,0 +1,105 @@ +Title: Loof nou die Heer +Composer: Psalm 150 +Style: SATB +Pages: 2 +Systems: 10 +Space: 2 +Height: 280mm +Width: 193mm + +g e8.g c2 | c4 b8.a g2 | +e c8.e e2 | a4 g8.f e2 | +L: Loof nou die Heer, loof nou die Heer, +c+ g8.c c2 | c4 c8.c c2 | +c c8.c c2 | f4 f8.f c2 | + +g8 g c d e.e e4 | e8 e d c d.d d4 | +e8 e g g g.g g4 | g8 g g fs g.g g4 | +L: loof Hom in Sy hei-lig-dom, loof Hom in Sy hei-lig-dom, +c8 c c b c.c c4 | c8 c d c b.b b4 | +c8 c e g c.c c4 | c8 c b a g.g g4 | + +d8 d c b c4 g8 g | b4 a g g of | +g8 g g f e4 g8 g | g4 fs g fne | +L: loof Hom in die uit-span-sel van Sy sterk-te. +b8 b c g g4 e+8 e | d4 c b b | +g8 f e d c4 c8 c | d4 d g g ofd | + +g8 g e g c.c c4 | c8 c b a g.g g4 | +e8 e c e e.e e4 | a8 a g f e.e e4 | +L: Loof Hom om Sy mo-\"end-heid, loof Hom om Sy mo-\"end-heid, +c8 c g c g.g [ g8 c ] | c8 c c c c.c c4 | +c-8 c c c c.c c4 | f8 g a br c.c- c4 | + +U: | ~ ~ ~ ~ !bf ~~~~~~Fine +c8 c d d e c a d | c8 c b b c2 of |] +g8 g g g g g f a | g8 g f f e2 |] +L: loof Hom na die groot-heid, na die groot-heid van Sy krag. +c8 c b b c c c f | e8 e d d c2 |] +e8 e g g c e- f d | g8 g g g c-2 ofd |] + + r0 | r0 | e8.e e e d4 b8 g | a0e | +d8.d d d d4 d8 d | b+2 g | g8.g g g g4 g8 g | (-6 g4 f8s e f2 )-6 | +L: Loof Hom met die klank van ba-sui-ne, loof Hom met die luit en die harp; + r0+4 | r0+4 | c8.c c c d4 d8 cs | d0 | +d8.d d d d4 d8 d | b+2 g | c8.c c c b4 g8 e | d0 | + +b8.b b b c4 d8 d | e2 g | d8 cs d g- b4 a8.g | g0e +g8.g g g g4 g8 g | g2 g | g8 g g g g4 fs8.g | ( g2 fn ) +L: Loof Hom met die klank van ba-sui-ne, loof Hom met die luit en die harp; +d8.d d d c4 b8 b | c2 as | b8 as b cs d4 c8.b | b0 +g8.g g fn e4 d8 d | c2 cs | d8 e d e d4 d8.g | g0 + +%% L6P2 +Space: 3 +|: g8.g g g g4 g8 g | g8 e+ c a g2 | +|: e8.e e e f4r f8r fr | e8 g e ds e2 | +L: loof hom met die trom-mel, die trom-mel en die fluit. +|: c8.c c c b4 b8 b | c8 c g fs g2 | +|: c-8.c c c d4 d8 d | c8 c c c c2 | + +@+8 (+8 g8 a b d f4- )+8 f | (+9 e8 g c g e4 )+7 e | +LS: Loof Hom, loof Hom +d4 f d2 | c4 e c2 | +L: Loof die Heer, loof die Heer; +b4 b b2 | g4 g g2 | +g4+ g g2 | c-4 c c2 | + +g8.g g g g4 g8 g | g8 e+ c a g2 | +e8.e e e f4r f8r fr | e8 g e ds e2 | +L: loof hom met die trom-mel, die trom-mel en die fluit. +c8.c c c b4 b8 b | c8 c g fs g2 | +c8.c c c d4 d8 d | c8 c c c c2 | + +f8 g b d f d b g | c2 c :| +f8 fr f f f f f fr | ( e4 ds ) e2 :| +L: Loof die Heer met sna-re-spel en or-rel. +b8 b b b b b b b | ( c4 a ) g2 :| +g8+ g g g g g g g | c-2 c :| + +r0 | r0 | c4 c8 d e e d c | d2 d | +r0 | r0 | e4 g8 g g g g fs | g2 g | +@^-3 a4 a8.a c.c a4 | e2 e2 | g4 c8 b c c b c | (+6 c4 b8 a )+6 b2 | +L: Loof Hom met sim-bel-spel, loof Hom, loof Hom met klin-ken-de sim-ba-le. +a+4 a8.a c.c a4 | e2 e2 | c4 e8 g c c g a | g2 g | + +e4 d8.d c4 b8.b | a4 g8.g f2 | +g4 f8.f e4 g8.g | f4 e8.e d2 | +L: Al-les wat a-dem, kom loof, loof die Heer; +c4 b8.b c4 c8.c | c4 a8.a b2 | +c4 g8.g a4 e8.e | f4 cs8.c d2 | + +f+4 e8.e d4 c8.c | b4 a8.a g2 | +g4 g8.g a4 a8.a | g4 fs8.f g2 | +L: al-les wat a-dem, kom loof, loof die Heer; +b4 c8.c c4 d8.d | d4 c8.c b2 | +d4 e8.e f4 fs8.f | g4 d8.d ( g4 fn ) | + +U: | | | ~~D.C.~al~Fine +g+4 f8.f e4 d8.d | c4 b8.b a4 of f+8.f | e4 [ c8.e ] g4 b- | c0 :| +g4 g8.g g4 f8.f | e4 g8.g f4 a8.a | g4 g g g | e0 :| +L: al-les wat a-dem, kom loof, loof die Heer; Hal-le-lu-ja, loof die Heer. +c4 c8.c c4 c8.c | c4 c8.c c4 c8.c | c4 [ e8.c ] b4 d | c0 :| +e d8.d c4 g+8.g | a4 e8.e f4 ofd d8.d | g4 g g g | c-0 :| + + diff --git a/support/m-tx/doc/lyrics.tex b/support/m-tx/doc/lyrics.tex new file mode 100644 index 0000000000..d9ee84a1ee --- /dev/null +++ b/support/m-tx/doc/lyrics.tex @@ -0,0 +1,14 @@ +% -------- file lyrics.tex --------------------------------------- +\vskip 8 mm +\halign{\hskip 35 mm # \hfill & \hskip 25 mm \it # \hfill \cr +In vernalis temporis & In the time when \cr +ortu laetabundo, & spring rises joyfully, \cr +dum recessum frigoris & the end of frost \cr +nuntiat hirundo, & is heralded by the swallow, \cr +terrae, maris, nemoris & earth, sea and grove \cr +decus adest deforis & is full of beauty \cr +renovato mundo, & like a renewed world, \cr +vigor redit corporis, & the body regains strength, \cr +cedit dolor pectoris & the sorrow of the heart ends \cr +tempore iucundo. & in this playful time \cr +} diff --git a/support/m-tx/doc/macro.mtx b/support/m-tx/doc/macro.mtx new file mode 100644 index 0000000000..f75ac80244 --- /dev/null +++ b/support/m-tx/doc/macro.mtx @@ -0,0 +1,15 @@ +Style: Woodwind Violins +Woodwind: Voices FlObCl; Clefs G +Violins: Voices Violini; Clefs G +Flats: 1 +Meter: C +Enable: countMacro + +MS1 c8+ za zf zc M [u MP1 MP1 MP1 MP1 ] [u MP1 MP1 MP1 MP1 ] +r2 r4 r8 b1n d + +[u MP1 MP1 MP1 MP1 ] [u MP1 MP1 MP1 MP1 ] +c8 b1n d c8 b1 d c4.a + +[u MR3 c8+ zb zg ze zc M MP3 MP3 MP3 ] [u MP1 MP1 MP1 MP1 ] +a1 g g a b8 g1 a1 f4d r8 diff --git a/support/m-tx/doc/make-dvi b/support/m-tx/doc/make-dvi new file mode 100644 index 0000000000..ea88e471c2 --- /dev/null +++ b/support/m-tx/doc/make-dvi @@ -0,0 +1,16 @@ +target = dvi +latex = latex +concat = dviconcat + +%.lj: %.dvi + dvicopy $* xxx + dvilj -e$*.lj xxx + rm xxx.dvi + +%.pdf: %.ps + ps2pdf $*.ps + +%.ps: %.dvi + dvips -D 600 $* -o $*.ps + + diff --git a/support/m-tx/doc/make-pdf b/support/m-tx/doc/make-pdf new file mode 100644 index 0000000000..355b8e4868 --- /dev/null +++ b/support/m-tx/doc/make-pdf @@ -0,0 +1,6 @@ +target = pdf +latex = pdflatex +concat = gs + +%.ps: %.pdf + pdf2ps $*.pdf $*.ps diff --git a/support/m-tx/doc/make-target b/support/m-tx/doc/make-target new file mode 100644 index 0000000000..355b8e4868 --- /dev/null +++ b/support/m-tx/doc/make-target @@ -0,0 +1,6 @@ +target = pdf +latex = pdflatex +concat = gs + +%.ps: %.pdf + pdf2ps $*.pdf $*.ps diff --git a/support/m-tx/doc/melisma.mta b/support/m-tx/doc/melisma.mta new file mode 100644 index 0000000000..755806431c --- /dev/null +++ b/support/m-tx/doc/melisma.mta @@ -0,0 +1,5 @@ +Style: Singer +Meter: C +Start: @+2 +Width: 2in + diff --git a/support/m-tx/doc/melisma1.mtb b/support/m-tx/doc/melisma1.mtb new file mode 100644 index 0000000000..3f36f53124 --- /dev/null +++ b/support/m-tx/doc/melisma1.mtb @@ -0,0 +1,2 @@ +( c8 d1 e1 d8 e1 f1 ) e2 | +L: A-men diff --git a/support/m-tx/doc/melisma1.mtx b/support/m-tx/doc/melisma1.mtx new file mode 100644 index 0000000000..012901427b --- /dev/null +++ b/support/m-tx/doc/melisma1.mtx @@ -0,0 +1,7 @@ +Style: Singer +Meter: C +Start: @+2 +Width: 2in + +( c8 d1 e1 d8 e1 f1 ) e2 | +L: A-men diff --git a/support/m-tx/doc/melisma2.mtb b/support/m-tx/doc/melisma2.mtb new file mode 100644 index 0000000000..d35cbcc528 --- /dev/null +++ b/support/m-tx/doc/melisma2.mtb @@ -0,0 +1,2 @@ +[ c8 d1 e1 d8 e1 f1 ] e2 | +L: A-men diff --git a/support/m-tx/doc/melisma2.mtx b/support/m-tx/doc/melisma2.mtx new file mode 100644 index 0000000000..50f7d8720c --- /dev/null +++ b/support/m-tx/doc/melisma2.mtx @@ -0,0 +1,7 @@ +Style: Singer +Meter: C +Start: @+2 +Width: 2in + +[ c8 d1 e1 d8 e1 f1 ] e2 | +L: A-men diff --git a/support/m-tx/doc/melisma3.mtb b/support/m-tx/doc/melisma3.mtb new file mode 100644 index 0000000000..70973365b6 --- /dev/null +++ b/support/m-tx/doc/melisma3.mtb @@ -0,0 +1,2 @@ +( [ c8 d1 e1 d8 e1 f1 ] ) e2 | +L: A-men diff --git a/support/m-tx/doc/melisma3.mtx b/support/m-tx/doc/melisma3.mtx new file mode 100644 index 0000000000..616a973132 --- /dev/null +++ b/support/m-tx/doc/melisma3.mtx @@ -0,0 +1,7 @@ +Style: Singer +Meter: C +Start: @+2 +Width: 2in + +( [ c8 d1 e1 d8 e1 f1 ] ) e2 | +L: A-men diff --git a/support/m-tx/doc/melisma4.mtb b/support/m-tx/doc/melisma4.mtb new file mode 100644 index 0000000000..73a6efb78e --- /dev/null +++ b/support/m-tx/doc/melisma4.mtb @@ -0,0 +1,3 @@ +%% \\let\BM\beginmel\let\EM\endmel\ +[[ \BM\ c8 d1 e1 ] [[ d8 e1 \EM\ f1 ] e2 | +L: A-men diff --git a/support/m-tx/doc/melisma4.mtx b/support/m-tx/doc/melisma4.mtx new file mode 100644 index 0000000000..8ca9ceac94 --- /dev/null +++ b/support/m-tx/doc/melisma4.mtx @@ -0,0 +1,8 @@ +Style: Singer +Meter: C +Start: @+2 +Width: 2in + +%% \\let\BM\beginmel\let\EM\endmel\ +[[ \BM\ c8 d1 e1 ] [[ d8 e1 \EM\ f1 ] e2 | +L: A-men diff --git a/support/m-tx/doc/melisma5.mtb b/support/m-tx/doc/melisma5.mtb new file mode 100644 index 0000000000..4d6dafa134 --- /dev/null +++ b/support/m-tx/doc/melisma5.mtb @@ -0,0 +1,2 @@ +[ c8 d1 e1 ] [ \nolyr\ d8 e1 f1 ] e2 | +L: A-men diff --git a/support/m-tx/doc/melisma5.mtx b/support/m-tx/doc/melisma5.mtx new file mode 100644 index 0000000000..a181b69268 --- /dev/null +++ b/support/m-tx/doc/melisma5.mtx @@ -0,0 +1,7 @@ +Style: Singer +Meter: C +Start: @+2 +Width: 2in + +[ c8 d1 e1 ] [ \nolyr\ d8 e1 f1 ] e2 | +L: A-men diff --git a/support/m-tx/doc/melisma6.mtb b/support/m-tx/doc/melisma6.mtb new file mode 100644 index 0000000000..85a0e3a162 --- /dev/null +++ b/support/m-tx/doc/melisma6.mtb @@ -0,0 +1,3 @@ +@-3 (" [ c8 \lyr\ d1 e1 ] [ d8 e1 f1 ] ) e2 | +L: Hal-le-lu-ja +L: A---men diff --git a/support/m-tx/doc/melisma6.mtx b/support/m-tx/doc/melisma6.mtx new file mode 100644 index 0000000000..fc4b81eba9 --- /dev/null +++ b/support/m-tx/doc/melisma6.mtx @@ -0,0 +1,8 @@ +Style: Singer +Meter: C +Start: @+2 +Width: 2in + +@-3 (" [ c8 \lyr\ d1 e1 ] [ d8 e1 f1 ] ) e2 | +L: Hal-le-lu-ja +L: A---men diff --git a/support/m-tx/doc/meter.mtx b/support/m-tx/doc/meter.mtx new file mode 100644 index 0000000000..5a9c887bc1 --- /dev/null +++ b/support/m-tx/doc/meter.mtx @@ -0,0 +1,10 @@ +Style: Piano +Meter: m3406 +Width: 100m +TeX: \def\upiii#1{\raise3\internote\hbox{{#1}}} +TeX: \def\chacarera{\meterfrac34\upiii{\Big(}\meterfrac68\upiii{\Big)}} +TeX: \let\oldmeterC=\meterC \let\meterC=\chacarera + +a-2d o> a8 r r a r r a2d o> | +C: dfsa cea cea dfsa +d-2d o>-15 a4 a { [h d8 {1 d+ ] d2d }1 zd- } | diff --git a/support/m-tx/doc/mozart.mtx b/support/m-tx/doc/mozart.mtx new file mode 100644 index 0000000000..f16b5eb4b3 --- /dev/null +++ b/support/m-tx/doc/mozart.mtx @@ -0,0 +1,7 @@ +Title: Riff in C +Composer: W. A. Mozart (1756--1791) +Style: piano +Width: 120mm + +c2+ e4 g | b4d- c1 d c2 | +c8 g+ e g c- g+ e g | d g f g c- g+ e g | diff --git a/support/m-tx/doc/mozart0.mtx b/support/m-tx/doc/mozart0.mtx new file mode 100644 index 0000000000..b653819271 --- /dev/null +++ b/support/m-tx/doc/mozart0.mtx @@ -0,0 +1,2 @@ +c2+ e4 g | b4d- c1 d c2 | +c8 g+ e g c- g+ e g | d g f g c- g+ e g | diff --git a/support/m-tx/doc/mtx-install.pdf b/support/m-tx/doc/mtx-install.pdf new file mode 100644 index 0000000000..6d1a4ac7a1 Binary files /dev/null and b/support/m-tx/doc/mtx-install.pdf differ diff --git a/support/m-tx/doc/mtx-install.tex b/support/m-tx/doc/mtx-install.tex new file mode 100644 index 0000000000..0a46fc1c72 --- /dev/null +++ b/support/m-tx/doc/mtx-install.tex @@ -0,0 +1,151 @@ +\documentclass[11pt]{article} +\usepackage[textwidth=6.5in,textheight=8.5in]{geometry} +\usepackage[osf]{mathpazo} +\PassOptionsToPackage{urlcolor=black,colorlinks}{hyperref} +\RequirePackage{hyperref} +\usepackage{xcolor} +\newcommand{\myurl}[1]{\textcolor{blue}{\underline{\textcolor{black}{\url{#1}}}}} +\newcommand{\mtxVersion}{0.63} +\begin{document} +\title{Installation of the CTAN M-Tx Distribution} +\author{Bob Tennent\\ +\small\url{rdt@cs.queensu.ca}} +\date{\today} +\maketitle +\thispagestyle{empty} + +\section{Introduction} +We assume that you have already installed MusiXTeX and PMX. +Before trying to install M-Tx from CTAN, check whether your TeX distribution +provides packages for M-Tx; this will be easier than doing it yourself. +But if your TeX distribution +doesn't have M-Tx (or doesn't have the most recent version), this distribution +of M-Tx is very easy to install, though +you may need to read the material on +installation of (La)TeX files in the +TeX FAQ\footnote{% +\myurl{http://www.tex.ac.uk/cgi-bin/texfaq2html}}, +particularly +the pages on +which tree to use\footnote{% +\myurl{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=what-TDS}} +and installing files\footnote{% +\myurl{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=inst-wlcf}}. + +\section{Installing \texttt{m-tx.tds.zip}} + +In this distribution of M-Tx, many of the files to be installed +(including macros and documentation are in +\myurl{http://mirror.ctan.org/install/m-tx.tds.zip}. The file +\verb|mt-x.tds.zip| is a zipped TEXMF +hierarchy; simply download it and unzip in the root folder/directory of whichever TEXMF tree +you decide is most appropriate, likely a ``local'' or ``personal'' one. +This should work with any TDS\footnote{% +\myurl{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=tds}} +compliant TeX distribution, including MikTeX, TeXlive and teTeX, +but you must use an unzipping program that +converts text files to the text-file format of your +platform, such as \verb\unzip -a ...\ on Linux. + + +After unzipping the archive, update the filename database as necessary, +for example, by executing \verb\texhash ~/texmf\ or +clicking the button labelled ``Refresh FNDB" in the MikTeX settings program. + +Documentation for M-Tx is installed under \verb\doc/generic/m-tx\ +in the TEXMF tree. + +\section{Installing \texttt{prepmx}} + +The next step in the installation is to install +the one essential file that can't be installed in a TEXMF tree: the \texttt{prepmx} preprocessor. + + +\subsection{Pre-Compiled Executables} + +On Windows +systems, one can install \texttt{prepmx.exe} +in the \texttt{Windows32} or \texttt{Windows64} sub-directory; these are pre-compiled +executables and should be copied to any +folder on the PATH of executables. +This might entail creating a suitable folder and adding that folder +to the PATH as follows: +right click on the ``My Computer'' desktop icon, +left click on +\begin{center} +Properties$\rightarrow$Advanced$\rightarrow$Environment Variables +\end{center} +in the ``System Variables'' section, scroll +down to ``path'', select it, click edit, and append the full path name you have selected for the new +folder. Also install the batch script \verb|m-tx.bat| in a folder on the PATH. + +On the MAC OS-X platform, one can install the \texttt{prepmx} binary +that is in the +\texttt{OSX} sub-directory. Ensure that the file has the execute permission set: +\begin{list}{}{}\item +\verb\chmod +x prepmx\ +\end{list} + +\subsection{Compilation from Source} + +On any platform with basic GNU tools (\texttt{tar}, \texttt{gunzip}, \texttt{make}) +and \texttt{gcc} or \texttt{fpc}, you should be able to build the \texttt{prepmx} executable as follows: + +\begin{enumerate} +\item Unpack the \texttt{mtx-\mtxVersion.tar.gz} archive: +\begin{list}{}{} +\item \texttt{tar zxvf mtx-\mtxVersion.tar.gz} +\end{list} +and move to the resulting \texttt{mtx-\mtxVersion} directory. +\item Configure: +\begin{list}{}{} +\item \verb\./configure --prefix=$HOME\ +\end{list} +or just +\begin{list}{}{} +\item\verb\./configure \ +\end{list} +if you have super-user privileges. +\item Build: +\begin{list}{}{} +\item \verb\make\ +\end{list} +If this fails, you might want to install \texttt{fpc} (the Free Pascal Compiler\footnote{% +\myurl{http://www.freepascal.org/}}) and +try +\begin{list}{}{} +\item \verb\make -f Makefile.orig\ +\end{list} + +\item Install: +\begin{list}{}{} +\item \verb\make install\ +\end{list} +This step should be executed as root if you need super-user privileges. +\end{enumerate} +You should now have an executable \verb\prepmx\ +in your PATH. + +\section{Usage} + +To process an M-Tx source file, use the \verb|musixtex| script +which is included in the \verb|musixtex| package. +If applied to a file with \verb|.mtx| extension, it will by default execute \verb|prepmx| followed by +\verb|pmxab|, followed +by \verb|etex|, \verb|musixflx|, and \verb|etex| again, followed by +conversion to PDF using \verb|dvips| and \verb|ps2pdf|. +There are many options to vary the default behaviour. + +\section{Discussion} + +Other pre-processor packages, additional documentation, additional +add-on packages, and many examples of M-Tx and MusiXTeX typesetting may be found +at the Werner Icking Music Archive\footnote{% +\myurl{http://icking-music-archive.org}}. +Support for users of MusiXTeX and related software may be obtained via +the MusiXTeX mail list\footnote{% +\myurl{http://tug.org/mailman/listinfo/tex-music}}. +M-Tx may be freely copied, duplicated and used in conformance to the +MIT License (see included file \verb\LICENSE\). + +\end{document} diff --git a/support/m-tx/doc/mtxdoc.ltx b/support/m-tx/doc/mtxdoc.ltx new file mode 100644 index 0000000000..c2082c1f6a --- /dev/null +++ b/support/m-tx/doc/mtxdoc.ltx @@ -0,0 +1,2159 @@ +\documentclass[11pt]{article} +% mtxlatex and mtxdoc must be loaded before any font-defining packages +% like charter, bookman etc +\usepackage{color,mtxlatex,mtxdoc,multicol} +\paperAfour +% You might like to put \paperUS here +\usepackage{verbatim,charter} +% \renewcommand{\ttdefault}{cmtt} +% Some such font packages override cmtt with wider fonts like 'courier', +% and then 80-character lines don't fit +\newcommand{\delete}[1]{\relax} +\newcommand{\archiveSite}{ + \texttt{http://icking-music-archive.org} +} +\newcommand{\scoreSite}{ + \texttt{http://imslp.org} +} +\newcommand{\mailingList}{ +\texttt{tex-music@tug.org} +} +\newcommand{\repository}{ +\texttt{https://github.com/dlaurie/M-Tx} +} + +\def\versionname{0.63c} +\def\version{0.63c} +\def\newfrom{0.61} +\date{15 January 2019} +\title{\Huge \textbf{\MTx: Music from Text \\ \LARGE Version\current} \\ + User's Guide \vfill} +\author{\LARGE Dirk Laurie\\ \texttt{dirk.laurie@gmail.com} } + +\makeindex +\begin{document} + + +\vfill +\maketitle +\vfill +\begin{center} + \framebox[5in]{\parbox{3.6in}{ + \begin{mus} \input title.tex \bigskip \end{mus} + }} +\end{center} +\vfill\vfill\vfill +\thispagestyle{empty} + +\pagebreak +\pagenumbering{roman} +\tableofcontents +\pagebreak +\pagenumbering{arabic} +\section{Music from Text} + Written music has a distinctive appearance, very unlike written text. +But if we want to enlist the aid of the computer to print our scores, we +either need a sophisticated graphical interface, or we must describe +music in terms of what we are able to type. Text input is not going to +look much like printed music, but we would like it to resemble printed +music closely enough that we can see the correspondence. + +\MTx~is a language for typed music aimed at people who are not experts. +Later in this document a full description of \MTx~is given, but to start +with, here is a sample of what \MTx~input looks like. +\verbatiminput{mozart0.mtx} +Before showing you how it comes out, let's observe and discuss it. +There are two lines of input, which means that there are two voices +of music, one for each line. (Line boundaries are important in \MTx.) +The lines read from top to bottom as printed music reads from top to +bottom. + +Each voice contains a number of `words' separated by blanks. In this +example, each \ixem{word} stands for either a note or a bar line. Bars are +also important in \MTx, although the example is simple enough that I +could have omitted them. For greater readability, I have typed extra +blanks so that notes and bars that are aligned in the printed version +also line up here, but that is not necessary. What is necessary, +though, is that each line ends at the end of a complete bar. + +The \ixem{notes} are written in the \PMX\ language designed by Don Simons. +Each note starts with one of the letters \texttt{a} to \texttt{g}, which mean +exactly what you think. Lower case is easier than capitals, because it is +quicker to type. Some notes have suffixes after them. A digit indicates the +duration (1/\mark2, 1/\mark4, 1/\mark8, 1/\mark16, 1/\mark32, 1/\mark64).\footnote{Yes, it is more +logical to think \texttt{1} should mean a whole note, but we don't want to +type two digits for something so common as a semiquaver. A whole +note is denoted by \ttxem{0}, which looks a bit like a printed semibreve.} +When a note has +no digit, it means that the \ixem{duration} is the same as that of the +previous note in the same voice. Some note names have a \ttxem{+} or +\ttxem{-} after them, which means that it is not the nearest note of that +name, but that there is a \ixem{jump} of at least a fifth up or down from the +previous note. One note is dotted, \index{notes!dotted} which is indicated +with a \ttxem{d}. It cannot be confused with a note name, because it is not +the first letter of its word. A double-dotted note\NEW{0.51} +would have \texttt{dd}. + +The first note in each voice of the piece doesn't have a previous note. +Since you haven't specified anything else, it is assumed that the top +line is in the treble clef and its notes come in the \ixem{octave} running from +middle C upwards; and the bottom line is in the bass clef and its notes +come in the octave just below the one for the treble clef. The first +note of the top voice is the C above middle C, so we need a \texttt{+} +for it. \NEW{0.30} If ever again you prefer the initial octave of a voice to wherever +the previous note puts you, use a \ttxem{=} after the note name. This +can be combined with \ttxem{+} or \ttxem{-}. + +Here is the printed version of the above excerpt. + +\vskip-5mm\hskip -18mm +\begin{mus} +\input mozart0.tex +\end{mus} + +Do you think this looks good? Much better than handwritten? You are +right, but look at the following version: + +\begin{center} +\begin{mus} +\input mozart.tex +\end{mus} +\end{center} + +There is a \ixem{heading}, the notes are not stretched out so much, and the two +staves of the piano are grouped together. To achieve this, the input looks +as follows: +\verbatiminput{mozart.mtx} +The notes are exactly the same as before, but there is an introductory +paragraph, or \ixem{preamble}, that specifies what to do with them. A +\ixem{paragraph} in \MTx~is a group of consecutive lines set apart by +one or more blank lines. Most of the paragraphs contain notes, but the +printed music will not necessarily be broken at the same places as +the paragraphs. + +Only in the simplest cases (every music line in the paragraph starts with +what might be a note) are you allowed to omit the preamble. The preamble +lines in this example are self-explanatory, I hope. + +A few words on technical terms, to make sure that we know what we are +talking about: +\begin{itemize} + \item A \ibxem{line} is a text line of typed music. + \item A \ibxem{word} is a string of consecutive non-blank characters, +separated by blanks from other words on the same line. + \item A \ibxem{stave} is the familiar group of five closely spaced +parallel lines on which music is written. + \item A \ibxem{voice} is a melodic strand of music, of which there +may be either one or two per stave. + \item An \ibxem{instrument} corresponds either to a single stave or to a +group of two or more adjacent staves linked together with a brace +\verb'{', usually representing a single instrument like a piano. + \item A \ibxem{system} is a group of staves for the various +voices that are heard at the same time. +\end{itemize} + + + +\subsection{Lyrics} + +I wrote the \MTx\ converter because \ixem{lyrics} are not part of the \PMX\ +design. It used to be\footnote{I.e.. before Rainer Dunker's \texttt{musixlyr} package, on which \MTx\ depends, became \PMX-aware.} +a major effort to obtain pretty output like the +following: +\vskip 12pt \hskip -20mm +\begin{mus} +\small +\input netfirst.tex +\end{mus} + +The lyrics are in \ixem{Afrikaans}, which maybe looks incomprehensible, but +knowing as much as you do already, it +should be quite easy to understand the following input: +\verbatiminput{netfirst.mtx} +There are a few new things: \ttxem{Style}\texttt{: }\ttxem{SATB} to +indicate four-voice choral music on two staves, \ttxem{Sharps} for the key +signature (of course there is \ttxem{Flats} available too), \ttxem{Meter} +for the time signature, and \ttxem{Space}\texttt{:~9} to +indicate that there should be nine interlines of extra space between the +staves.\footnote{One \ixem{interline} is the distance between two lines in +a stave. The normal distance between staves is five interlines, but +sometimes extra space on a page is distributed between the staves: you may +need to experiment.} If there are more than two staves, you can prescribe +a different extra distance for each on the \texttt{Space} line. This is +the one preamble command that may also appear later in a music paragraph. + +Among the notes, you notice suffixes \ttxem{s} and \ttxem{n} for +`\mark sharp' and `\mark natural', and \ttxem{r} for `displace +notehead to the \mark right'. + +But the main novelty is the lines of lyrics. The rule is: each lyrics +line is identified by the \ixem{label} \ttxem{L:}, followed by lyrics of the +verse in question. Syllables are indicated by hyphens, and you don't +use bar lines on lyrics lines. If more than one note belongs to a +\ixem{syllable}, you need not worry, as long as the notes in question have been +slurred or beamed together --- each lyrics line is synchronized to the +immediately preceding voice. There may be a set of lyrics lines for +each stave in the score: if a stave has two voices, only one of +them can have lyrics specified by \texttt{L:} --- see Section +\ref{More lyrics} for a feature that allows both voices to have lyrics. + +Note the \ixem{verse numbers}. The rule is: +if you code a number followed by a point and a blank at the +start of a lyrics line, this number will not be treated as a syllable but +will be printed to the left of the first lyrics syllable: the position of that +syllable will be the same as if the number was not there. This may not be +just what you want: see the \musixlyr\ reference manual (Section +\ref{help}) for commands that can modify this behaviour. + +\subsection{Bars and meter changes} + +The notation for bars is taken from Chris Walshaw's \ABC\ music +language, with one small modification. +\vskip 1ex +\begin{tabular}{ll} +\ttxem{\|} & Normal bar line \\ +\ttxem{\|]} & Thin-thick double bar line (as at the end of a piece) \\ +\ttxem{\|\|} & Thin-thin double bar line (to separate sections) \\ +\ttxem{:\|} & Left repeat \\ +\ttxem{\|:} & Right repeat \\ +\ttxem{:\|:} & Left-right repeat +\end{tabular} +\vskip 1ex + +Bar lines make life easier, but are normally optional. Only the +normal bar line actually implies a bar separation: the double line and +\ixem{repeat} signs may appear in mid-bar. The fancy bars must appear +in the bottom voice and are optional elsewhere. + \begin{itemize} + \item If you do put them in, \MTx\ will check that there are no shorter +bars than the currently defined one. If a too-short bar occurs at the end of +the final paragraph, \MTx\ assumes you know what you are doing, and +automatically redefines the meter without printing a new time signature. If +it appears elsewhere, it is an error. + \item If your piece starts with a \ixem{pickup}, it is defined by a bar +line at the end of ``bar 0'', i.e.~the incomplete bar containing the pickup. +Even when there is a repeat sign after the pickup, so that you don't actually +see a bar line in the printed music, you still need a bar line before the +repeat sign, otherwise \MTx\ cannot know where the pickup stops. The bar line +defining the pickup is compulsory in the first voice found, and optional but +recommended in the others. When there is a pickup, the meter is not +redefined. + \item If you do not explicitly end the piece with +one of the other types of bar line, a thin-thick bar line is +automatically provided: you don't need to code it. + \item \PMX\ allows you to put two voices on a single stave by +giving the notes of the lower voice first, followed by \ttxem{//} and the +notes of the upper voice. This construct works in \MTx\ too when only +one voice for the stave was specified in the style, but for just +one bar at a time; such a bar \emph{must} be terminated by a bar line. +Use it only for very short stretches. You will probably need to +set the octave in the first note using \verb"=". + \item If you are using \PMX\ features that are not recognized by \MTx\ but +simply passed through, you may need a bar line to tell \MTx\ to which bar +they belong. + \end{itemize} + +Apart from the final `blind' meter change that is automatically made if +required, you can also define other meter changes. \index{blind!meter~change} +The rules are: + \begin{itemize} + \item The \ixem{meter change} may only occur at the \emph{very} beginning +of a bar after +a full bar of the meter previously in effect, and must be made in all +voices. In particular, any key change, volta indication etc.\ must come +\emph{after} the meter change; also, the bar following the pickup may +not contain a meter change but must have the length specified in the +preamble. + \item The normal meter change word looks like a fraction, +e.g.~\ttxem{3/4}. This always gives a visible meter change. + \item If the printed meter symbol looks different from the logical one (you +want a big `C' instead of `4 over 4', for instance), you may use a \PMX\ +formatted meter change word. \NEW{0.30} +E.g.~\ttxem{m3/4/0/0} gives a blind meter change +--- one that takes effect but is not printed. See the \PMX\ manual. +This is also legal in the preamble \ttxem{Meter:} command. + + \end{itemize} + +\subsection{Beams and \ixem{slurs}} \label{beamslur} + +Thanks to \PMX, \ixem{beams} in instrumental voices are automatic. \MTx~does, +however recognize that it is customary in vocal music to use beams only +when the notes in question are sung to the same single syllable. So if you +select a style like \ttxem{SATB} or \ttxem{Singer} that involves +voices, notes will normally appear unbeamed, except those that appear +under slurs. To override this, you need to use the \PMX\ ``forced beam'' +feature, e.g. \verb"[ c d ]", or disable the +\ttxem{unbeamVocal} feature (Section \ref{customize}). \index{beam!forced} +See Section \ref{beam&slur} on how to +fine-tune beams, and Appendix \ref{melisma} for some examples involving +lyrics. + +The slur notation is similar to forced beams, but uses parentheses. +Look at the second system of the same song: + +\hskip -20mm +\begin{mus} +\small +\input netsoos1.tex +\end{mus} +Omitting the preamble, this is coded +as:\footnote{The coding is for this +morsel only, not an extract out of the coding for the whole piece. The +octave of the first note here is the default, not deduced from a +previous note.} +\verbatiminput{netsoos1.mtb} +Apart from \ttxem{f} for `\mark flat' you should notice the left +parenthesis \ttxem{(} to start a slur and the right parenthesis +\ttxem{)} to close it. So +\MTx\ knows that e.g.~the \texttt{c} in the top voice falls under the +slur, and does not use up a syllable of lyrics. The default direction +\index{slur!direction} +of a slur is up for the upper and down for the lower voice in a stave, +but you can override that: see Section \ref{beam&slur}. + +You are allowed to have a slur under another slur, \index{slur!nested} +e.g.~\verb"( c8 d e ( f g ) f d b ) c2". + +Occasionally a slur ends at a note and the next one starts +immediately. \NEW{0.30} For such a slur continuation \index{slur!continuation} +you code \ttxem{)(} as a single word after the note. + +If you want a tie rather than a slur, \NEW{0.55} +use braces \ixem{\LBR} \ixem{\RBR} instead of parentheses. +A continuation tie is of course \ixem{\RBR\LBR}. + +In obscure situations you may want absolute control over slur stops and +starts. To do this, put an identifier, which must be a non-zero digit +or a capital letter, immediately after the slur parenthesis or brace, +before any adjustments. Of course, any labelled slur of either kind +that you open must be closed again by its exact partner. If you really +must have interlocking slurs, \verb"(1 c8 d e (2 g g )1 f d b )2 c2" +is the way to get them. \delete{Labelling slurs in this way is also the only way +of getting more than two levels of slurs.} + +It may happen that you do not wish \MTx\ to put more than one note to a +syllable even though the notes are under a beam or slur. +For example, you +may wish to use \ixem{phrase marks} that only look like slurs, or you may be +writing music that has so many consecutive short notes that the beat +becomes difficult to follow without beams. \NEW{0.30}The way to do +this is to double the first symbol of the word starting the forced beam +or slur. E.g. \verb"{{+10" \index{\LBR\LBR} or \ttxem{((} may be used +to start a phrasing slur, and \ttxem{[[} may be used to start a forced +beam \index{beam!forced} that will still keep one note to a syllable. +The terminator for the beam or slur should not be doubled. A variation +of this feature occurs mainly when you have multi-verse lyrics and +\NEW{0.43} there should be a slur in one verse but not in another. +Start the slur with \ttxem{(\dquote} or \ttxem{\LBR\dquote} to get +the same effect as +\verb'((' or \verb'{{', except that the slur symbol itself is no longer +solid, but broken like a dotted line. \index{slur!broken} +\NEW{0.54} Synchronize lyrics by using void syllables and extension rules, e.g. + +\bigskip +\example{dwoman}{mtb}{80mm}{\fill}{72mm}{-10mm}{c}{5mm} +\bigskip + +The trailing underscore on ``heart'' takes the place of a +syllable of lyrics, and on a longer note would +produces a lyrics rule that extends to the end of the melisma. +You can use as many underscores as required; for very long melismas, +you can code e.g.\ \verb"Ah_6" instead of \verb"Ah______". + +The converse of this situation is that you want \MTx\ to +make a melisma, but you don't want a visible slur. \NEW{0.42} +Code +the slur beginning as \ttxem{(\snake} or \ttxem{\LBR\snake} and +the slur end as \ttxem{)\snake} +or \ttxem{\RBR\snake}. This gives a ``blind'' slur: invisible, but having the +same effect on lyrics as a normal slur. \index{blind!slur} Blind slurs +should not have any other tuning marks. + +\subsection{More complicated lyrics} \label{More lyrics} + +Lines of lyrics that start with \ttxem{L:} are set in the middle +between two staves (or below the bottom stave) and are aligned with the +notes of the voice under which they appear in the input file (in this +case, the alto). Such lines are referred to as \emph{normal} lyrics +lines. \index{lyrics!normal} + +Sometimes different words apply to different voices, as in the last line +of the song: + +\hskip -20mm +\begin{mus} +\small +\input netsoos2.tex +\end{mus} +\vskip 12pt +This is coded as: +\verbatiminput{netsoos2.mtb} +Some interesting \PMX\ features in this piece are \ttxem{of} for +`\mark ornament: \mark fermata' and \NEW{0.43} +\ttxem{rp+6} (\mark rest: +\mark pause) for a full-bar rest moved up six interlines. +For the meaning of the \verb'@...' words, see the next section. + +The label \ttxem{LT:} (\mark Lyrics: \mark Tenor) marks the line as +belonging to a particular voice. Such a line is referred to as an +\emph{auxiliary} \index{lyrics!auxiliary} +lyrics line, and may only appear on a stave that +already has a normal lyrics line. Labels for voices are defined in the +\ttxem{Style}, or may simply be numbers: the voices are numbered +1,2,\ldots\ from the top line downwards. Auxiliary lyrics for the top voice +on a stave (soprano and tenor) will be set above the stave, and those +for the bottom voice (alto and bass) below. Their input lines may appear +anywhere in the paragraph, since the labels show where they go. + +You can also use voice \ixem{labels} without a leading \texttt{L} to identify +the voice lines. This is necessary if some voice is omitted from the +paragraph (\MTx\ will fill its stave with rests) or if you prefer to +have the voices in a different order (e.g.~bottom-up) than top-down. +You need only label a voice line if it does not belong to the voice +immediately following the previous one. + +\subsection{Preamble commands} + +Here is a complete list of built-in \ixem{preamble} commands, with examples and +explanations. Case in preamble commands is immaterial: all command and +style names are translated to uppercase internally. +\vskip 1ex +\begin{tabular}{ll} +\verb"Part: Recorder" & Part name (set flush left above title) \\ +\verb"Title: Clarinet Quintet" & Title of piece. \\ +\verb"Composer: Mozart" & Name of composer (set flush right below title) \\ +\verb"Poet: Rellstab" & Name of poet (set flush left below title) \\ +\verb"Meter: C/" & \textit{Alla breve} meter: another notation for \verb"2/2". \\ +\verb"Flats: 3" & Key signature has three flats. \\ +\verb"Sharps: 2" & Key signature has two sharps. \\ +\verb"Space: 10; 6 0 3" & Extra interlines of space after title block (optional) and below staves. \\ +\verb"PMX: Ar" & \PMX\ command in preamble.\\ +\verb"Options: x" & Forces the \texttt x option to be in effect, despite the command line. \\ +\verb"Enable: pedanticWarnings" & Enables the \texttt{pedanticWarnings} feature. \\ +\verb"Disable: unbeamVocal" & Disables the \texttt{unbeamVocal} feature. \\ +\verb"Pages: 2" & Set the piece over two pages. \\ +\verb"Systems: 11" & Use a total of eleven systems. \\ +\verb"Bars/line: 4" & Try to use on the average four bars to a line. \\ +\verb"Size: 16" & Size of music in points: default is 20. \\ +\verb"Width: 190mm" & Width of line in \texttt{mm} (or \texttt{in} or +\texttt{pt}). Default is \texttt{190mm}.\\ +\verb"Style: Singer Piano" & + The piece is for a singer with piano accompaniment. \\ +\verb"Name: Dietrich Gerald" & Names of instruments, performers etc. \\ +\verb"Indent: 0.10" & Indent first system by 10\% of the music width. \\ +\verb"Start: @+1;@-3" & Put specified items at the start of voice lines\\ +\verb"Octave: 4 4 3 3" & Specify \indexed{initial octaves} for each stave \\ +\verb"TeX: \elevensf" & Type 2 TeX code (see Appendix \ref{expert})\\ +\end{tabular} \NEW{0.54} +\vskip 1ex +The \ttxem{Bars/line} command should only be used when you do not yet +know what \ttxem{Pages} and \ttxem{Systems} should be. + +The style line may contain several style elements (instruments etc.). +\index{style!elements} +At present, \MTx\ knows the following style elements: +\begin{verbatim} +SATB: Voices S,A T,B; Choral; Clefs G F +SATB4: Voices S A T B; Choral; Clefs G G G8 F +SINGER: Voices S; Vocal; Clefs G +PIANO: Voices RH LH; Continuo; Clefs G F +ORGAN: Voices RH LH Ped; Continuo; Clefs G F F +SOLO: Voices V; Clefs G +DUET: Voices V1 Vc; Clefs G F +TRIO: Voices V1 Va Vc; Clefs G C F +QUARTET: Voices V1 V2 Va Vc; Clefs G G C F +QUINTET: Voices V1 V2 Va Vc1 Vc2; Clefs G G C F F +SEXTET: Voices V1 V2 Va1 Va2 Vc1 Vc2; Clefs G G C C F F +SEPTET: Voices V1 V2 Va1 Va2 Vc1 Vc2 Cb; Clefs G G C C F F F +\end{verbatim} +\ttxem{Voices} gives the labels of the voices, later used to identify +lyrics lines and out-of-sequence music lines. You should not use labels +like \texttt{L}, \texttt{U}, \texttt{C}, \texttt{1} or \texttt{L1} +that conflict with \MTx's use of labelled lines for chords, lyrics etc. +Labels separated by +blanks belong to voices on different staves; labels separated by a comma, +to voices on the same stave. \ttxem{Clefs} define the clefs, one for each +stave. You can use any PMX-supported clef symbol in addition to G and F +--- see Appendix \ref{ornaments}. +The symbol \verb'8' or \verb'G8' indicates music written in the treble clef +\NEW{0.49} but sounding an octave lower, as is usual for the tenor voice in +choral music. + +\ttxem{Vocal} means that the voices will be treated as vocal for the +purpose of beams and lyrics, and \ttxem{Continuo} means that the staves +belong to +a single instrument, and will be grouped together by a \ixem{brace}. +You may not have too many voices or staves --- see Appendix \ref{limits}. + +\ttxem{Choral} means that the voices form a choir. This implies that each +voice is vocal, and their staves will be grouped together by a bracket. +You can get the \ixem{bracket} for instrumental voices too, by using +\ttxem{Group} instead of \texttt{Choral}. + +You may define your own style elements, \index{style!elements} +e.g.: \\ + +\texttt{Honky-Tonk: Voices R L; Clefs G F; Continuo} \\ + +The whole preamble is read, and new style elements saved, before any of the +commands is interpreted. So it does not matter in which order the commands +come. The preamble may be spread over more than one paragraph. \NEW{0.49} +But if you issue a command more than once, only the last instance counts. + +The \ttxem{Start} command is mildly convenient when you are experimenting with +fine-tuning, since it allows small additions affecting the beginning of +each voice to be collected in one place. It comes into its own when +combined with the multi-score option (see Section \ref{multiscore}). +\NEW{0.42} Items for each voice are separated by semicolons and may contain +blanks. These are prepended to the corresponding line of the first +paragraph, so the \emph{combined} length of the starting item and the +line in question should not be too long (see Section \ref{limits}). + +You don't normally need to specify \NEW{0.54} \ttxem{Octave}, +\index{octave@octave!defining initial} +since most of the time the octave implied by the clef is correct. + +\ttxem{TeX} \NEW{0.61} should be used for last-minute overrides +of commands that come from system \TeX\ files like \verb`mtx.tex` +and \verb`pmx.tex`. + +\subsection{Customizing \MTx} \NEW{0.55} \label{customize} + +You have a lot of control over how \MTx\ does its translation. The old way +of customizing \MTx\ was by compiler options and the \ttxem{Options:} +preamble command. That method uses one-character switches, which is +only slightly mnemonic and anyway the letters get used up. +The new way is to use the \ttxem{Enable:} and \ttxem{Disable:} +preamble commands to select the features you want. + + Here is a list of switchable \MTx\ features that are +enabled by default: + +\begin{description} + \ttxi{splitShortcut} Separate 2:1 and 3:1 shortcuts into two words, and + explicitly code their durations. + \ttxi{newWordShortcut} Allow 2:1 and 3:1 shortcuts to be entered as + separate words. + \ttxi{multiFile} Take \texttt{Include:} lines into account, otherwise + ignore them. + \ttxi{doChords} Take \texttt{C:} lines into account, otherwise ignore them. + \ttxi{doUptext} Take \texttt{U:} lines into account, otherwise ignore them. + \ttxi{doLyrics} Take \texttt{L:} lines and inline lyrics changes into + account, otherwise ignore them. + \ttxi{unbeamVocal} Unbeam non-melismatic notes in vocal lines. + \ttxi{hideBlindSlurs} Hide \verb"{~" and \verb"(~" slurs. + \ttxi{interpretSlurs} Translate slur signs to PMX \texttt{s} and \texttt{t} + slurs. + \ttxi{uptextOnRests} Synchronize uptext with notes and rests, not only with + notes. + \ttxi{checkAssertions} Interpret certain comments as assertions (see Section + \ref{debugging-aids}. +\end{description} + +Here is a list of switchable \MTx\ features that are +disabled by default: + +\begin{description} + \ttxi{solfaNoteNames} Use \ixem{tonic sol-fa} + note names \texttt{d r m f s l t} (for \emph{do, re, mi, fa, sol, la, ti}). + This will be translated to the usual note names \texttt{c d e f g a b} + in C major. Use the \PMX\ transposition feature to obtain the desired + key. Only the basic note names are supported: you should not use the + sol-fa chromatic note names (e.g.\ \emph{re, ma,}) but the basic sol-fa + note names with \PMX\ accidentals (e.g.\ \texttt{ds}, \texttt{rf}). + + This feature conflicts in some cases with other uses of these letters. + To retain the standard meaning in sol-fa mode, precede the word with a + \verb'"', e.g.\ use \verb'"r' for a rest since \verb'r' translates to + a \verb'd'. + + \ttxi{pedanticWarnings} Suppress pedantic warnings, i.e.\ cases where +you omitted something but the default action is probably what you want. + \ttxi{ignoreErrors} Do not stop on the first error. +(Errors are messages clearly marked with \ttxem{ERROR} --- +any other message printed is informative or a warning only.) + + \ttxi{instrumentNames} Indent first system and print default + instrument names. + \ttxi{beVerbose} Verbose progress report. Default behaviour is +to print out errors, warnings, and very little more. + \ttxi{debugMode} Give messages that may be helpful in finding bugs +in the \texttt{prepmx} program. +\end{description} + +You can put as many features as you like on the \texttt{Enable:} +and \texttt{Disable:} lines, just separate them by spaces. You can +also have as many \texttt{Enable:} and \texttt{Disable:} lines as you want. +For example, to imitate the way \MTx\ 0.54c did things, put +\begin{verbatim} +Enable: interpretSlurs +Disable: newWordShortcut multiFile checkAssertions +\end{verbatim} + +\section{Fine-tuning the printed output} + +The decisions made by \PMX\ represent a good compromise in the majority +of cases, but sometimes the first printout is disappointing. You can +influence the details of the layout in various ways. You will probably +need to look at the first draft, make fine-tuning changes, look at the +second draft, \dots several times, if you are a real perfectionist. + +\subsection{General vertical and horizontal spacing} + +It is best to use \ttxem{Bars/line} in the preamble for the first draft. +You can then decide how many systems in total are required for proper +horizontal spacing, and over how many pages they need to be spread for +proper vertical spacing. On the later drafts you will therefore use +\ttxem{Pages} and \ttxem{Systems} in the preamble. + +There are \PMX\ commands to put line and page breaks where you like --- +see Appendix \ref{pmx}. + +You can use \ttxem{Space} to control the vertical space between the +staves. There may be a number for every stave: the last number is +interpreted as extra space below the bottom stave. You will probably +need to specify it if you have lyrics or very low notes down there. +This command can be issued in any music paragraph, not only in +the preamble. It will take effect at the start of the next system. +If issued in the preamble, however, you may optionally also give extra +space to be inserted below the title block, separated from the other +numbers by a semicolon. \NEW{0.63} +See Appendix \ref{voltas} for an example of how this command interacts +with lyrics adjustments. + +You can specify different sizes for the instruments, +e.g.\verb" "\ttxem{Size:}\verb" 13 16 " \NEW{0.30} +might be appropriate for the main score +of a violin sonata, with the notes of the violin smaller than those +of the piano. Valid sizes are 13, 16, 20, 24 and 29. +Size is a delicate issue: see Appendix \ref{sizes}. + +You should be aware of what the \PMX\ manual calls a ``benign bug''. +Pages more than approximately half full get filled out by distributing +the vertical space among the staves. This means that the appearance of +the score may drastically change when you add one more stave. For this +reason it is best to leave space adjustments till last, when you already +know what values to give for \ttxem{Systems} and \ttxem{Pages}. + +Occasionally \PMX\ underestimates +the total height of a page and you end up with one system less than +you wanted, which then appears by itself on a page of its own. This +is particularly likely if you asked for extra space between the +staves, or are using different-sized staves. A dirty +trick that fixes this problem is to specify a little more height +directly to MusiX\TeX\ than you told \PMX: see Appendix \ref{pmx}. + +\subsection{Lyrics placement} \label{fine-tune-lyrics} + +Sometimes the default position for placing lyrics causes ugly clashes +with note stems, beams, slurs etc. +You can move lyrics up or down by +inserting a word starting with \ixem{\atsign} in the music line to which that +lyrics line is attached. For example, \verb"@-2" (`at minus two') +indicates that the lyrics should be moved down two internotes. One +\ixem{internote} is the vertical distance between e.g. a B and a C, i.e.~half +of one interline. The change takes effect at the start of the bar +in which it appears, and remains in effect until further modified +by another shift. Each voice has its own associated shifts: one for +normal lyrics and a different one for auxiliary lyrics. +\index{lyrics!auxiliary} + +You can also say \verb'@^-2' (``put the lyrics above the stave at +two internotes below the default position'') or \verb'@v' (``put the +lyrics below the stave at the default position''). These commands +discard any shift that may have been in effect for that set of lyrics before. + +Be warned that the default position itself is not fixed relative to the +stave but depends on the general vertical layout. So if you change a +layout parameter after having placed the lyrics `perfectly', they may +need a further adjustment. + +\NEW{0.30}Occasionally you need a syllable spanning two words. +You can code a \ixem{hard blank} to string the words together, +e.g. \verb'Egit-to~ad I-si-de', but it also looks good to use an +underscore which will be translated to a link, \index{lyrics!link} +e.g. \verb'Egit-to_ad I-si-de' will become: Egit-to\lyrlink ad I-si-de. +If the link gets in the way of letters with descenders, you can lower +it, e.g. \verb'pretty\_and smart' becomes: pretty\lowlyrlink and smart. + +\subsection{Beam and slur placement} \label{beam&slur} + +The decisions made by \PMX\ in choosing the height and direction of +beams and slurs may differ from what you would like. The slur start +character may have the suffixes \mark up, \mark down or \mark lower (the +last two mean the same) to control the direction of the slur, and a +suffix \verb"+#" or \verb"-#" to raise or lower the start of the slur by +\verb"#" internotes. The slur end character may also have an adjustment +suffix. Remember to fine-tune both end points when you wish to move the +whole slur up or down! + +It is also possible to fine-tune the horizontal position. The most common case +occurs when two notes on the same pitch are linked by a\NEW{0.51} tie. In +that case \verb"{"\ldots\verb"}" give a neater result than \verb"("\ldots\verb")". +See the \PMX\ user's manual for details on other horizontal adjustments. + +In the case of a slur continuation you should code the height adjustment +\emph{between} the two parentheses, e.g.~\ttxem{)-3(}. You must not have two +adjustments. + +Fine-tuning beams is all done on the beam start character. It may have +the suffixes \mark upper or \mark lower for direction, and up to +three \verb"+#" or \verb"-#" suffixes. The first raises or lowers the +beam by so many internotes, the second makes the beam more or less +steep, and the third also raises or lowers the beam, but this time in +units of beam thickness. + +\subsection{Instrument names} \NEW{0.40} \label{stavename} + +Some scores have indications like \textbf{Violin} to the left of the +first system. The easiest way to do this is to enable the \ttxem{instrumentNames} feature, +which uses the line labels as names, but you may not like the result. + +To do it yourself, use the \ttxem{Name:} command in the preamble, +e.g. +\verb"Name: Violin Piano". +The names can be any valid \TeX\ expressions that have no spaces, such as +\verb"{\it{French~Horn}}". +Remember, it's one name per instrument, not one name per stave. If you +have too few names, the remaining instruments will not be named. +You can +also use a single hard space (\verb"~") when some instrument in the middle +should not have a name. + +You will probably also need the \ttxem{Indent:} command to specify the +indentation required to provide space for the names. +E.g.\ \verb"Indent: 0.12" says the indentation should be 12\% of the music +width. + + +\section{Shortcuts} + +This section introduces \ixem{shortcuts} for things that are perfectly +possible in other ways, but a little clumsy. + + +\subsection{Chords} \label{chords} + +An isolated \ixem{chord} in the middle of a melodic line is best treated +by the \PMX\ construction of chordal notes with the \ttxem{z} prefix, e.g. +\verb"c ze zg zc" +for a C major chord. Sometimes a whole string of successive chords appears, +as in the introduction to Schubert's song \textit{Der Tod und das M\"adchen.} +You can see that the coding for this can become quite cumbersome. +Therefore \MTx\ allows you to put the chordal notes on a second line, +as shown below. + +\hskip -18mm +\begin{mus} +\input dertod.tex +\end{mus} +\vskip 12pt +\verbatiminput{dertod.mtx} +\begin{itemize} + \item There is a basic melodic line, with a separate line for the chordal +notes, labelled like a lyrics line, but with \ttxem{C} instead of \verb'L'. +\index{line!melodic} + \item For each chord there is one word on the \indexed{chord line}. +\index{line!chord} \index{chord} If the +chord contains more than one \indexed{chordal note}, \index{note!chordal} +the notes follow with no spaces +in between. The notation is the usual \PMX\ notation, with two changes: +fla\mark t and notehead \mark left. These changes are used only on chord +lines, and are unavoidable because \ttxem{e} and \ttxem{f} are needed for +note names. + \item The note chosen as melodic note \index{note!melodic} +on the main music line must not +be a shifted note (i.e. one with displaced notehead): +all shifted notes must be on the chord line. + \item The stem direction of the chord is what that of the melodic +note would have been in the absence of chordal notes. + \item Pitch on the melodic line (i.e.~the choice of the closest note +with the given name) is not affected by the chordal notes. Each chord has +its own local frame of reference, starting anew from its melodic note. This +differs from the \PMX\ \texttt{z\dots} notation, where the pitch of each +note is determined by the previous note, whether chordal or not. +\index{pitch!of chordal note} + \item Sometimes in the middle of a chordal passage there might be an +isolated melodic note that does not have any chordal notes. To indicate this, +the chord line must contain a \ixem{spacer}, which is a one-character word +containing just a tilde (\ttxem{\snake}). + \item Sometimes you only need a few isolated chords. A one-character +word consisting of a bar symbol +\ttxem{\|} on a chord line indicates that no more chords appear in the +current bar even though one or more melodic notes are still left. +In that case you do not need a \ttxem{\snake} for the `missing' chords. +Don't use bar symbols on a chord line just to separate bars when there +are no missing chords. + +Two or more consecutive such words indicate one or more bars with no chords. +If the very first word on a chord line is a bar symbol, the first bar has no +chords. + \item You can get an \ixem{arpeggio} sign (wavy line) in front of the whole chord +including the melodic note by starting the chord word with a question mark, +e.g. \verb'?ad' instead of \verb'ad' in the first chord above would have put +an arpeggio sign in front of all three notes. For more complicated +arpeggio constructions, you need to put \ttxem{?} signs on the music lines +themselves: consult the \PMX~manual. + +\item You can tie notes in chords. \NEW{0.60} The notation is more compact +than ties in the music line itself: put a \verb'{' before each note that should +be tied, no blanks, but don't put anything to close the tie. It is an error +if you open a tie and there is no note at that pitch in the next chord. +All the notes in that chord that close ties should appear before +all the notes that open ties, e.g.\ \verb"{c c{e" is OK but +\verb"{c {ec" is not. + + +\hskip -18mm +\begin{mus} +\input chord.tex +\end{mus} +\vskip 12pt +\verbatiminput{chord.mtx} + + +\end{itemize} + +\subsection{Expression marks and other annotations} + +Annotations and interpretation marks ({\ppff p}, {\ppff f}, \textit{rit.}, +\textit{cresc.} and so on) are inserted using lines like lyrics lines, but +with \ttxem{U} (for \mark Uptext) instead of \verb'L'. +Note, though, that uptext lines are synchronized with rests as well as +notes, whereas lyrics are synchronized with notes only. + +The normal position +for an \ixem{uptext} line is \emph{above} the music line to which it applies: +if it appears anywhere else, the \ixem{label} must include the voice name or +number. I'll speak of an \emph{uptext voice} \index{uptext!voice} to refer to +the totality of uptext lines (no more than one per paragraph) +associated with a particular voice. + \begin{itemize} + \item Spacers \ttxem{\snake} and bar symbols \ttxem{\|} work for uptext in +exactly the same way as for chords --- see Section \ref{chords}. +\index{spacer} + \item Vertical adjustment signs starting with \ixem{\atsign} +like {\verb"@^"} \verb"@v" \verb"@=4" +\verb"@+4" \verb"@-4" may appear +in uptext lines, and have the same effect on the position of the uptext as in +the fine-tuning of lyrics --- see Section \ref{fine-tune-lyrics}. The only +difference is that these signs appear in the uptext line itself, whereas the +lyrics adjustments appear in the corresponding music line. A line starting +\verb"U: @v " is actually a downtext line! Each uptext voice retains its own +adjustments which remain in effect even after the paragraph in which they +appear. + + \item Uptext lines may also have horizontal adjustment signs, namely +\ixem{\atsign\less} and \ixem{\atsign\more}. There are three possible +positions for aligning uptext to a note: left, right and centre. The +default position is to align to the right, but the horizontal adjustment +shifts the position in the indicated direction, e.g. one \verb"@<" causes +centred uptext and another \verb"@<" causes uptext extending to the left of the +note. Yet a third \verb"@<" will be ignored. Here, too, each uptext +voice retains its own adjustments which remain in effect even after the +paragraph in which they appear. + + \item Uptext lines are useful for indicating \ixem{guitar chords}. +To make this +easier, the sharp character \ttxem{\#} may be used on an uptext line as a +normal text character (usually in \TeX\ you need \verb'\#' to get it) +and the \ttxem{\%} character is used to indicate a +\indexed{\mtxFlat}. \index{\Flat@\mtxFlat} + \item The preprocessor tries to guess whether the word is a dynamic +indication like {\ppff mp}, {\ppff sf}, {\ppff rfz} etc.\ and will use the +MusiX\TeX\ \keyindex{ppff} font for it. The current algorithm is highly +unsophisticated: if all the letters in a word come from the list +\verb'fmprsz' it is diagnosed as a dynamic indication. + \item A more permanent \indexed{font} \index{uptext!font} +change is indicated by a word like \verb"!bf" or \verb"!it" (no +backslash --- the \texttt{prepmx} program will put it in). +Every word of that uptext voice (except \verb"\ppff" words) will be set in the +indicated font. Each uptext voice retains its own font which remains in +effect even after the paragraph in which it appears. + \item You can indicate \ixem{crescendo} and +\ixem{decrescendo} signs in uptext by two methods: + \begin{enumerate} + \item Put \verb'<' or \verb'>' +where the sign starts, and \verb'<.' or \verb'>.' where it ends. +This feature gives unpredictable results when you try to use it +in more than one voice at the same time. + \item +Put e.g.~\verb"<18" or \verb">7" where the sign starts. +\NEW{0.42} The number gives the length of the crescendo in elementary +skip units or +``elemskips''.\footnote{It is quite technical to define precisely how +long an \ixem{elemskip} is. The important thing about them is that they +stretch or shrink with spacing of the notes, so that if say a half-note +is followed by two elemskips in one place, it will be followed by two +elemskips everywhere.} + \end{enumerate} + +\end{itemize} + +\subsection{Lyrics paragraphs} + +You may prefer to have all the lyrics for a particular voice together +in one paragraph. To do this, the first line of the paragraph consists +of a name for the group of lyrics in braces, e.g.~\verb'{verse1}'. + +When you later wish to use these lyrics, you put a list of names on a lyrics +line where you would normally have put the lyrics, e.g. +\verb'L: {verse1,verse2}' replaces: +\begin{verbatim} +L: Lyr-ics for the first verse +L: Lyr-ics for the second verse +\end{verbatim} +You do not repeat this instruction in the next paragraph, but if the voice +concerned no longer has lyrics attached to it, you should indicate that by a +blank lyrics line, i.e.~\verb'L:' by itself. + +A particular lyrics paragraph name should not be used in more than one +place. If two voices have exactly the same lyrics, you need only one lyrics +paragraph, but more than one name. E.g.~\verb'{soprano}={bass}' makes two +identical sets of lyrics, one to be used by \verb'L: {soprano}' and the +other by \verb'L: {bass}'. + +One useful property of lyrics paragraphs is to allow you to +switch lyrics in the middle of a line instead of between music paragraphs. +\NEW{0.40} +This is only allowed if the voice in question already possesses lyrics: +it cannot be used to replace the \texttt{L:} line. E.g. + \verb"a b {chorus} c d" +means that starting at the note \texttt{c} lyrics will be taken +from the lyrics paragraph labelled \verb"{chorus}", and + \verb"a b {} c d" +means that lyrics are switched off at that point. + +\subsection{Long/short note combinations} \label{longshort} + +Passages containing dotted notes \index{notes!dotted} +require duration changes for every note: + +\verb"c8d g1 c8d g1 c8d g1 c8d g1 c4" \\ +There is a shorthand notation for this, namely: + +\verb"c8.g c.d c.g c.d c" \\ +The first note in a dotted group may have an explicit duration, which then +becomes the default duration, but the second must not. There is a similar +shortcut\NEW{0.51} \verb"c..d" for double-dotted notes. + +When the dotted note appears not in a group but on its own, as in triple and +compound time (3/4, 12/8 etc.), you must use a \ttxem{d} to indicate the +dot, not a period. + +Similarly, in compound meter passages containing long and short notes +require frequent duration changes: +\verb"6/8 c8 g1 c8 d1 c8 g1 c8 d1 c8d" +The shorthand notation for this reads: +\verb"6/8 c8,g c,d c,g c,d cd" + +\subsection{Barless music} \NEW{0.40} + +Many old hymn tunes do not fit into the modern pattern of regular bars. +You could get this effect by carefully counting the length of each music +line and issuing your own blind meter \index{blind!meter~change} +change instructions. + +Instead, specify in the preamble that you have zero beats per bar. +E.g.~\verb"Meter: 0/4" means that each paragraph of music +should be treated as a single bar, and that the basic counting unit is +a quarter-note. You need not issue any other meter change instructions. +\MTx\ will check that each of the lines in the paragraph have the same total +duration, which must a multiple of the specified counting unit. + +\subsection{Sticky ornaments and suffixes} + +You may need to mark a whole run of notes as staccato. To do so, +put \verb'o.:' instead of \verb'o.' after the first staccato note and +\verb'o:' after the last one. This method also works with tenuto +and all the other \ixem{ornaments} in \ref{ornaments}. +The stickyness of ornaments lasts only till the end of the bar. + +On notes and rests there are many possible suffixes, some of which you have +already encountered and some of which are given in Appendix \ref{pmx}. There +are situations where you might wish to have several consecutive notes or rests +with the same attribute. The method is similar: put a colon (\texttt{:}) +after the letter involved on the first note of such a sequence, leave out the +letter on all the notes except the last,\NEW{0.50} on which you again put the +letter. For example, in \verb'12/8' meter you might have a passage moving at +four beats to the bar, normally coded \verb"c4d cd ed ed gd gd c2d", which +becomes \verb"c4d: c e e g g c2d" when you use this shortcut. The stickyness +of note and rest suffixes lasts until cancelled. + +Each voice is treated on its own, and notes and rests are considered +independently, so if you make the \verb'd' sticky on a note it will not affect +rests. My favourite application of this feature occurs in homophonic music +with two voices per stave: I prefer to have only one rest per stave rather two +rests, one on top of the other, and so I make all the rests in one of the +voices blank by marking the first rest of that voice. + +\subsection{Multi-bar rests} \label{rests} + +\NEW{0.40}It may happen that all the instruments in your score +simultaneously have a rest of two or more bars. In that case a succession +of empty bars may be difficult to count, and the conventional notation +is to put all the rests in a single bar, with the total number of +bars printed above them. The word for a \mark multi-bar rest is e.g.\ +\texttt{rm8} for a rest of eight bars. You code this for one voice only, +and there may be no other notes or rests on that line, with one +exception:\NEW{0.63} at the start of the piece, there may be a pickup +consisting of rests. The same rest will be printed on all staves. + +Thanks to recent improvements to MusiXTeX and PMX \NEW{0.62} it is no +longer necessary to tune the appearance of the rest e.g.\ \texttt{rm19+18}. +Such adjustments are now ignored. + +\subsection{Skipping and including portions of a score} \label{multiscore} + +To read in another file at the start of a paragraph, \NEW{0.55} +use the \ttxem"Include:" directive, e.g.\ + + \verb"Include: mylayout.mti" + +The effect is exactly the same as if those lines had been part of the original +input file. The file thus included may also contain "Include:" +directives; there is no restriction on the number of levels. You may +re-include a file that was included before, but you may not include any +file that has already been included but has not yet been fully read. + +You may have various reasons for wanting \MTx\ to omit one or more lines of +your score. There are several ways to do so, of which the simplest is the +comment symbol \verb'%' that you have met before, which skips that one line. + +A line starting with \ttxem{SUSPEND} all in capitals, at the start of a +paragraph, tells \MTx\ to discard all following paragraphs until a line +starting with \ttxem{RESUME} all in capitals is found at the start of a +paragraph. The material in between must still be organized into paragraphs +that are not too large (see Appendix \ref{limits}) but need not in any other +way conform to \MTx\ input rules. + +A line starting with \ttxem{Only:} defines a subset of line numbers, +e.g.~\verb"Only: 1,3-7,9" defines the set \{1,3,4,5,6,7,9\}. \NEW{0.43} Only +the corresponding lines from all non-lyrics paragraphs after the paragraph +containing the \texttt{Only} are processed until another \texttt{Only} is +found. Any paragraph containing an \texttt{Only} is always fully taken into +account: it is not subjected to the masking action of any \texttt{Only}. +\emph{WARNING: this feature is deprecated and may behave differently in +or even be omitted from future versions.} + +You can also conditionally ignore portions of the score depending on a +compiler variable. \NEW{0.42} The compiler options \texttt{0} to \texttt{9} +identify ten special cases of a score. Together with the basic unnumbered +version of the score, you can therefore have up to eleven versions. A line +starting with \ttxem{Case:} at the start of a paragraph gives a list of those +cases that include the paragraph in question, e.g. \verb"Case: 137" +identifies a paragraph that is only included when one of the options +\texttt{1}, \texttt{3} or \texttt{7} was selected, either as a command option +or on and \texttt{Options:} line. + +All paragraphs headed by \texttt{Case:} occurring \emph{before} the first +music paragraph are treated as extensions of the preamble. The very first +music paragraph may therefore not start with \texttt{Case:}. + +For example, the score \texttt{cervus.mtx} of Palestrina's four-part +setting of Psalm 42 (see the \texttt{source} directory in the \MTx\ +distribution) is set up to give by default a score for the conductor with all +voices in 16-point type. When one of the \texttt{1}, \texttt{2}, \texttt{3} +or \texttt{4} options is specified, you get a score with one voice in 20-point +type and the others in 13-point. When the \texttt{0} option is given, +20-point is used throughout and the score is spread over three pages. + +%A combination of \texttt{Case} and \texttt{Only} allows you to make parts from +%a score in a flexible way, e.g.~only the chorus parts, or both flutes +%together, etc. The \texttt{Case} command can never be masked out by a +%previous \texttt{Only.} + +\subsection{Macros} \NEW{0.60} + +\MTx\ offers limited support for the \PMX\ macro feature, which is +a shorthand notation for pieces of text that appear often in your input. +In \PMX, you define macro number $i$ by \texttt{MS}$i$ and end it by \texttt{M}, +each a separate word, where $i$ is a number from 1 to 20. +Everything in between (which may not contain +any word starting with \texttt{M}) is not acted on, but only stored, +but when you later ``play'' the macro by the single word \texttt{MP}$i,$ +the effect is the same as if you had typed the text you defined earlier. +In other words, a \PMX\ macro works as a purely literal text insertion. +You can also start a macro definition by \texttt{MR}$i:$ this has the effect +of immediately playing the macro, not just storing it. + +The default behaviour in \MTx\ is to pass along such \texttt{M}-words +without looking at them, which in expert hands can be quite effective, +but for the rest of us is simply a disaster. +The problem is that in that case \MTx\ does not know that notes +are being inserted, let alone what their duration is. It is in the +position of a musician who has lost count. + +\MTx\ offers two solutions to this problem, either of +which you can \texttt{Enable} in the preamble. In both cases, macros +may only appear on music lines. +\begin{description} + \ttxi{expandMacro} All macros are fully expanded at the \MTx\ level. +The \PMX\ file will not contain any macros. If you use this feature, +you can have macros numbered from 1 to 99, and macro definitions +may contain plays of other macros. Error messages apply to the expanded +text and may be difficult to understand. + \ttxi{countMacro} \texttt{M}-words are still passed along, +but when a macro is defined, \MTx\ determines its duration +and counts correctly when it is played. +\end{description} + +If you have enabled \texttt{countMacro}, there is one unavoidable +restriction: a macro definition or play may not spill over into +the next bar. Hence the total duration of a macro may not be more +than what remains of the current bar. + +A word of caution: because you cannot see the macro +definition when you play it, it is easy to lose track of duration and octave. +It is therefore just sound common sense +to set duration and octave at the first note in the macro definition, +and at the first note after the macro play, to avoid mistakes. + +\hskip -18mm +\begin{mus} +\input macro.tex +\end{mus} +\vskip 12pt +\verbatiminput{macro.mtx} + +If you used \texttt{expandMacro} instead, the first music line +could have read \\ +\verb" MS1 c8=+ za zf zc M MR2 [u MP1 MP1 MP1 MP1 ] M MP2" \\ +in which case the first line of the second bar would only be \verb"MP2 MP2". +This is shorter for you to code, and in this case it works. +It is not always feasible to use macros within macros: +\texttt{expandMacro} works +by actually inserting the strings into \MTx\ input lines, which +may not be longer than 255 characters. Too many macro expansions, +and you hit your head against the ceiling. + +\section{Debugging aids} \NEW{0.61} \label{debugging-aids} + +The very compactness of \PMX\ music notation works against you +when debugging. One music paragraph looks very much like another. +Notes inherit pitch and duration from context, and when there is +a mistake, it is not easy to see where in a long music line that +context comes from. + +Octave mistakes have a way of accumulating, but only show up when +you see a typeset score full of leger lines way above or below the +stave. + +Left to itself, \MTx\ can and does check that all music lines end +at a bar ending, and that lines from the same paragraph have the +same length. But it cannot tell that which of two lines is wrong, +only that they are different. + +Many programmers use comment lines \verb`% -- Bar 40 --` to help +them keep track of where they are in a score. This practice has +now been formalized as a debugging aid. + +Certain comments can be recognized by \MTx\ as assertions, allowing +additional correctness checks to be made. Apart from the comment +sign, they look like preamble commands, but are normally placed in +the music paragraph to which they apply. + +\begin{tabular}{ll} + +\verb"% Range: S=4d-5d, A=3b-4g" & Requests range checking for the specified voices. \\ +\verb"% Bar: 30-31" & If only one bar, give just one number. + +\end{tabular} + +The format used here for \ttxem{Range} checking puts the octave + before the note, e.g. \verb`4f`, to avoid confusion with \verb`f4` +in which the digit indicates duration. The error messages +use the same notation. + +Either of these comments may also appear in a preamble paragraph, +in which case they apply to the entire score. +% {-- Maybe later --} The first number in such a global \verb`Bar` +% is used to initialize the printed bar count. + +\subsection{Error messages} + +Most error messages will give a line number and say approximately +where the error was found. In that case, the original line is printed +with a marker at that point. Also printed is what has happened to that +line in the meantime, mostly explicit duration indications on every +note. + +If there is no line number (this mostly happens in the preamble) +the message in most cases deals with something that you should have +supplied. + +Sometimes the actual error may be on another line, e.g.\ when it is +found that music lines have a different duration, the first line +processed may be the one that is wrong, but the discrepancy is only +found later. + +Error messages generated by assertions can be a lot more informative +than others, and you are urged to exploit these. To find out what life +would have been like without them, you can always issue +`Disable: checkAssertions` in the preamble. + +\section{Acknowledgments} + +% In DPL-DOS/huis.tgz + +I still have the +\texttt{.tex} and \texttt{.dvi} files of my first attempt (in October 1992) +at setting music (Bach, no less) with the \mutex\ package of Andrea Steinbach +and Angelika Schofer. The first phrase goes: +\begin{verbatim} +\4\,\F\~\B\.\c\|\2\A\.\|\4\B\,\E\E\| \2\group{\\\E\\\d}{\\0\\{-1}}\lslur12\go\| +\end{verbatim} +In \MTx\ that would be + +\verb"f bd c8 | a2d | b4 e- e | ( e2 d4 )" \\ +A tantalizing glimpse of a preprocessor appeared in the \mutex\ +documentation, but the software for it was never released. + +None of this would have been possible without the late Daniel Taupin, +who was the first to emphasize that printed music has a fundamentally +two-dimensional layout, and whose MusiX\TeX\ package is the engine that +actually performs the typesetting. + +I made a previous attempt to implement something like \MTx\ as a direct +preprocessor to Music\TeX\ (Daniel's first package). My lack of +expertise caused that project to die. The appearance in January 1997 of +\PMX\ 1.1 inspired me to resurrect the idea --- thanks to Don Simons. +Don has also made some comments which helped me to improve the \MTx\ +input language. Some \MTx\ features that are implemented by using \TeX\ directly, make use of MusiXTeX code written by Don. + +Since version 0.21, \MTx\ uses Rainer Dunker's \ttxem{musixlyr} package. +This gives much neater horizontal spacing of lyrics than the manual system +used in previous versions, and virtually eliminates the need for +horizontal tuning. + +Chris Walshaw's \ABC\ provided the repeat notation. + +The layout of \MTx\ bears some resemblance to a language developed by +Miguel Filgueiras, published in 1998 in \textit{Software Practice and +Experience}, although I did not consciously borrow his ideas. I have +been unable to find an implementation on the Internet. + +I had some enlightening e-mail correspondence with the developers of +MPP, Jan Nieuwenhuizen and Han-Wen Nienhuys. +This package (no longer maintained, unfortunately) was the first +music package which made me believe that one could write good-looking +scores in a reasonable amount of time. + +Eric Petersen, Reenen Laurie, Kestell Laurie and Joel Hunsberger found +several bugs in earlier versions of \MTx. Christian Mondrup did this for +\MTx\ 0.50 and later. + +The subscribers to the discussion list \mailingList\ --- +too many to name --- found many more and contributed to the development by +requesting new features. Details of these contribution are given in the +\ttxem{Corrections} file distributed with the \texttt{prepmx} code. + +The success of public domain music publishing owes an incalculable debt +to the late Werner Icking. He maintained an online archive for music +software and sheet music, set +standards for music typesetting, tested software packages, gave +genuinely expert advice to would-be experts, and encouraged newbies +with patience and understanding. When he died unexpectedly at a +comparatively young age, each of the small but globewide community of users +of MusiX\TeX\ lost a personal friend and mentor. +% His music archive as it was at the time of his death can still +% be accessed at \texttt{ftp://ftp.gmd.de/music} or +% \texttt{http://www.gmd.de/Music}. + +Werner's work is still being carried on: the software archive +and mailing list URLs are listed in Appendix A, while +the scores have been merged into the Petrucci Music Library (\scoreSite). + +My wife, Trienke, had to suffer many effectively husbandless evenings +and weekends while I hammered the program and documentation into good +enough shape to be able to offer it around. + +\appendix +\setcounter{page}{1} +\renewcommand{\thepage}{A-\arabic{page}} + +\section{Where to find help} \label{help} + + \MTx\ is the tip of an iceberg. Things can go wrong at many levels. +Fortunately, here are many ways to get information and help. +\begin{itemize} + \item Consult the Table of Contents and \emph{index} in search of + a likely-looking topic. + \item The annotated examples might be useful. + \item There is a file \texttt{FAQ} in the distribution that contains + the sort of questions that new users often ask. + \item The packages on which \MTx\ relies all have their own reference + manuals. Look for the following files: + \begin{description} + \item{\PMX:~} \texttt{pmx270.pdf}, \texttt{ref270.pdf} + (these names will obviously be different + if your \PMX\ is not Version 2.70); + \item{\musixlyr:~} \texttt{musixlyr.pdf}; + \item{MusiX\TeX:~} \texttt{musixdoc.dvi}. + \end{description} + \item The archive site at \begin{quote}\archiveSite \end{quote} + hosts not only the mailing list archive but also several tutorials + in various languages on MusiX\TeX\ and \PMX. + \item Join the \ixem{mailing list} by filling in the form +at \\ +\texttt{http://tug.org/mailman/listinfo/tex-music}. +\end{itemize} + +\section{A short \PMX\ tutorial} \label{pmx} + + This section describes the parts of \ibxem{PMX} that you are likely to need +when coding scores in \MTx. I have left out or simplified features +that are not +necessary or too advanced. In most cases, you can still use them, as +\MTx\ simply passes through anything that it does not recognize. + + \PMX\ resembles English in that it is made up of \ixem{word}s, which are +strings of non-blank characters separated by blanks. Each word, though, +has the character of an acronym, in that its letters each stand for +something longer, and in fact Don Simons designed the notation so that +you can actually say out loud what the acronym stands for. + + \textsl{In the following, the symbol \ttxem{\#} stands for some number.} + + \subsection{Words that contribute to the count} + + Each bar of music has a certain \ixem{duration}, which is is the total of the +notes and rests in it. The word for a note that contributes to the +count starts with \texttt{a} to \texttt{g}, which indicates \ixem{pitch}; and +the word for a \ixem{rest} starts with \ttxem{r}. + + A note may have a number of \ixem{suffix}es, which may come in any order. +The duration is indicated by a digit: from short to long, these are +6 (1/\mark64-th note), 3, 1, 8, 4, 2, 0, (whole note), 9 (double note, +also known as `breve'). +Moving a +note an \ixem{octave}\footnote{The \ttxem{=} suffix is not part of \PMX. +Instead, \PMX\ offers the ability to specify octaves by numbers. \emph{This +feature is not supported by \MTx.}} + up or down is indicated by \ttxem{+} and \ttxem{-}, +repeated if necessary. +The other suffixes are the following marked letters: \mark dotted, +\mark flat, \mark sharp, \mark natural, stem \mark upper, +stem \mark lower, offset to the \mark right, offset to the +l\mark eft, \mark apart (not attached to a beam). + +You can fine-tune \index{dot!fine-tuning} dot position,\NEW{0.52} e.g.\ +\verb"gd-2" puts the dot two internotes lower than it would normally go, +and \verb"gd-0+1" puts it one notehead to the right. + +You can also fine-tune\NEW{0.52} accidental position in a similar way. For +accidentals (but not for dots) you are allowed to write \verb"gs>1" +instead of \verb"gs-0+1". + + A rest may also have suffixes: duration and \mark dot as for notes, +\mark pause (duration is the whole bar), \mark blank (rest is +counted but not printed). +It can be moved up and down by \ttxem{+} and +\ttxem{-} followed by a number, e.g. \texttt{r0-4} is a whole-note rest +moved down four internotes. The other rest suffixes mentioned +in Section \ref{rests} are not yet (version 1.3.8) part of \PMX, +except \texttt{m}, which is allowed in a score for a single one-stave +instrument. \NEW{0.43} Also the `blind' and adjustment suffixes on the pause +\texttt{rp} are legal in \MTx, but not yet in \PMX. + + The duration of a note may be influenced in various ways by a previous +note: if unspecified, it is the same as the previous note; or the note +may be part of a chord, a multiplet, or a grace note group. + + \subsection{Words excluded from the count} + +Except for the first note of a chord or multiplet, the following words +for notes are excluded from the count, and should not have a duration +suffix. + +\paragraph*{Chords:} Each note in a chord except the first has the +prefix \ttxem{z}. It is excluded from the count, and suffixes +\ttxem{a} \ttxem{d} \ttxem{l} \ttxem{u} may only appear on the first, +non-\texttt{z} note. +The ``melodic note'' of Section \ref{chords} becomes the first note +of the chord when the \MTx\ code is translated to \PMX. + +\paragraph*{Multiplets:} A normal note may have an extra suffix, after +all the others, of the form \verb"x#" \index{\texttt{x}} +or \verb"x#n", where \ttxem{\#} +stands for a number. This means that the note is the first of a +multiplet (or $x$-tuplet) with \verb"#" equal notes in the time of one. +Only the duration coded on this first note is included in the count. The +appearance of the first note will not be the normal one for its +specified duration: it will look like all the others. +E.g.~\verb"g4x3 a b" defines a \ixem{triplet} of total duration a quarter-note +looking like three eighth-notes. The \ttxem{n} means that the number +\verb"#" is not to be printed. + +The other \verb"#"$-1$ notes in the multiplet are excluded from the count. +They need not all be of the same length: double-length notes are allowed. +You can double the length using either \verb"D" or \verb"F". Either of +these in a multiplet note makes that note count as two notes and +changes the way it is printed. Consult the PMX documentation for +the difference between \verb"D" and \verb"F" (or experiment and see +for yourself). + +\paragraph*{Grace notes:} A normal note may have a prefix group starting +with \verb"G#" or \ttxem{G}. This indicates that the note is the first +of a grace note \index{note!grace} +group with \verb"#" notes, to be set in a tiny font. +All the notes in the group, even the first, are excluded from the +count. + +\subsection{Words for other things than notes} \label{ornaments} + +Other things than notes go into a music score: ornaments, +clefs, +expression markings, changes in key and time signature, etc. +\PMX\ contains support for many of these. Here I mention only a small +selection: see the \PMX\ manual for items you need but which are not +described here. A word for each such feature has its characteristic +first letter followed by a selection of \ixem{suffix}es that qualify it. + +\begin{description} + \item{Ornament:} An \ixem{ornament} is set off-stave in line with its note, +and its word, starting with \ttxem{o}, comes directly after that of its +note. The more commonly needed suffixes are +\texttt{u} (dot for +pizzicato), \texttt{p} (\mark prime for sharp pizzicato), +\mark fermata above, \textbf{fd} (\mark fermata \mark down). +The suffixes \texttt{.} (staccato) and +\texttt{-} (tenuto) differ from the others by being set close to the +note, not off-stave. +There are several more in \PMX\ and many others in MusiX\TeX. + \item{Clef change:} You get a small \ixem{clef} at the point where +the clef change occurs and a big one at the start of the next line. +The clef change word begins with \ttxem{C}. The suffix \verb"#" places +middle C on line \verb"#" of the stave, where \ttxem{1} is the bottom +line and \ttxem{5} the top. An appropriate clef is selected +automatically, e.g. \ttxem{C0} is the G-clef (treble) and \ttxem{C6} is +the F-clef (bass). + \item{Voltas:} \index{volta} These are the labels to mark sections of the score +that are not played at every repeat. You put \ttxem{V}\textbf{1} to indicate +that a bracket containing the number 1 should appear above the bar +in question. Since \PMX\ wants all such indications in the bottom +voice only, they are deleted by the \MTx\ preprocessor if found +elsewhere. See Appendix \ref{voltas}. + \item{Key change:} Put \verb'K+0-2' in a music line where a \ixem{key} change +to two flats should occur. As with voltas, this indication is deleted +if not in the bottom voice. +\end{description} + +\subsection{Useful things to put on \ttxem{\%\%} lines} +\label{usefulPMX} + +You have three ways of passing information directly to PMX. + +\begin{enumerate} + \item The \ttxem{PMX} preamble command. + \item A line starting with \ttxem{\%\%}. The rest of the line is +treated as \PMX. + \item Inside music lines. Anything not recognized is passed through. +\end{enumerate} + +Most of the following commands should appear in the first music paragraph +or on a \ttxem{PMX} preamble command line. +Some of them are actually raw \ixem{MusiX\TeX} --- +consult the MusiX\TeX\ manual for other interesting commands. +\verb"%%" lines in the preamble are treated a little differently -- see +Appendix \ref{expert}. +\begin{description} + \item{Line, page and movement breaks:} +Put \ttxem{\%\%L}\texttt{6} above a paragraph +to make the 6th system start there, and \verb'%%L6P2' to put that +paragraph at the top of page 2. You can't ask for a \ixem{page break} +without a \ixem{line break}. Use this feature only when necessary. +Put \verb'L10M+10i0.1' to make a new movement start at the 6th system, +with 10 internotes of extra space between movements and an indentation +of $0.1=10\%$ of the width. + \item{\verb"h260m"} Height is 260 millimetres. + \item{\verb"w8i"} Width is 8 inches. Note that \PMX's height and width +have one-letter units, not two-letter like \TeX\ itself and \MTx. + \item{\verb"\\vsize 270mm\"} Height given to MusiX\TeX\ is 270 millimetres. + \item{\verb"Ar"} Use relative \ixem{accidentals}. This requires a different + way of coding flats and sharps ---think of \verb's' as meaning + `sharpened' instead of `sharp'. E.g.~if the key signature has one or + more flats, then \verb'bs' means a B natural, \verb'bn' a B flat, and + \verb'bf' a B double flat. If you need to \ixem{transpose} music often, + it is a good idea to acquire the habit of using relative accidentals + always. If you don't, only pieces in C major or A minor can be + transposed without trouble. + \item{\verb"As"} Always use small \ixem{accidentals}. Normally \PMX\ +uses big accidentals and only switches to smaller ones if there is a +reason to do so. You can also force all big accidentals by \verb"Ab." + \item{\verb"Ar K+1-3"} Use relative accidentals and transpose the + piece up one internote, to a key with three flats. You can only + \ixem{transpose} correctly when using relative accidentals! + \item{\verb"\\stdbarrules\"} This will cause bar lines to be + drawn solidly \index{bar lines!solid} + from the top to the bottom of each system, maybe + cutting through lyrics in the process. + \item{Midi commands} \PMX\ can make MIDI files. For example, if you put +\begin{verbatim} +PMX: Ii55:55t96b56:72v127:100 +\end{verbatim} +in the preamble of \texttt`netsoos.mtx`, a MIDI file will be generated +in which both instruments (Soprano/Alto and Tenor/Bass) are played on +MIDI instrument number 54 (on my system this means `voices') at a tempo +of 96 quarter-notes to a minute, with MIDI balances of 56 and 72 (centre +is 64) and MIDI velocities of 127 and 100 respectively. More details +appear in the \PMX\ manual. +\end{description} + +One thing that you must only pass to PMX by the third method --- embedded +in a music line --- is a meter change, otherwise \MTx\ does not know about +it and will continue to count bars by the old meter. + +\section{How to get and use \MTx} + +There are such excellent tutorials available at \archiveSite\ that +this section is unnecessary. In every subsection, only a few random +remarks are left. You can safely skip it all. Just visit the website. + +\subsection{Installation and running} \label{Archive} + +On a Debian system (which also includes Ubuntu) you can simply +install the \verb`m-tx` package with all its dependencies (which, +if you do not yet have \TeX, is staggeringly much). + +If you need to compile from source, grab it from \repository\ and +look for a file whose name starts with \verb`README`. You will +need a Free Pascal compiler. + +Once you have all the software, make an \MTx\ file with extension +\dotxem{mtx} using your normal text editor. It must be an \ixem{editor} that +respects the line boundaries and empty lines that you type in: in other +words, something fairly primitive, not an upmarket word processor. + +Thanks to Bob Tennent, all the intermediate steps that you used to +need are now unnecessary. There will be an executable file called +\verb`musixtex` on your system, a real Swiss army knife, so that +simply invoking +\begin{verbatim} + musixtex -q jobname +\end{verbatim} +will take you all the way from \verb`jobname.mtx` to \verb`jobname.pdf`. +The \verb`-q` (for "quiet") suppresses the zillions of lines of screen +output which \verb`tex` normally provides for you edification. + +You can do the steps manually. The program \verb`musixtex` writes a file +\verb`musixtex.log` documenting everything it did. For example, there +will be a line starting with `prepmx` for the step the converts +\verb`jobname.mtx` to \verb`jobname.pmx`. If you need only that, +\begin{verbatim} + musixtex -p jobname +\end{verbatim} +will do it, but you may want to exploit some of the many commandline +options that \verb`prepmx` has. Run \verb`prepmx -h` to see them. + +The \texttt{prepmx} program exits with \ixem{return code} 0 if no error +was found, and return code $n$ if an error was found while processing +line $n$ of the input, whereas the \texttt{musixtex} program returns +the number of input files that gave errors. There is more about +\verb`musixtex` in Appendix \ref{latex}. + +\subsection{Bugs, restrictions and incompatibilities} \label{limits} + +The status of bugs changes too quickly for this document. Please +consult the files supplied with the package, in particular +\texttt{README.txt}, \texttt{Corrections} and \texttt{Bugs}. + +In \MTx\current\ a paragraph may not be more than 100 lines long, +an input line (including those in lyrics paragraphs) not more than +255 characters, a lyrics line in a music paragraph not more than +128 characters, and you may define a maximum of 12 extra style +elements of your own, whether in the preamble or in the +\ttxem{mtxstyle.txt} file. It is possible to change these if you compile +from source: they are clearly recognizable in \texttt{globals.pas}. + +\NEW{0.42} You can have up to 15 voices, using up to 15 +staves. For each two-voice stave, the number of staves you can have goes +down by 1. + +Other limitations are described in the \PMX\ documentation. + +\subsubsection{Compatibility} + +\MTx\ 0.61 accepts all scores that were valid under \MTx\ 0.60. +Older scores may need tweaking. + +\subsubsection{Unsupported features of Musix\TeX\ and \PMX} + +Support or otherwise of Musix\TeX\ and \PMX\ features comes at three +levels: +\begin{enumerate} + \item The most frequently used features are transparently +incorporated into the basic \MTx\ language. + \item The default action of \MTx\ is to pass through unchanged +anything it does not recognize. Most \PMX\ and MusiX\TeX\ features +still work in this case. For example, you can use \verb"\PED\"\NEW{0.51} +in front of a +note to obtain a \ixem{pedal} annotation below the stave, and \verb"\DEP\" +to get the big asterisk for pedal release. This is an example of a ``Type 1 +\TeX\ string'' \index{TeX string@{\TeX\ string}!Type 1} as +described in the \PMX\ manual. + \item When a new \PMX\ feature affects aspects like count +or pitch of which \MTx\ should be aware, it is likely to be +incompatible with the preceding release of \MTx, although I do try +to catch up later. +\end{enumerate} + +Some pertinent aspects: +\begin{enumerate} + \item \MTx\current\ does not recognize the macro features of \PMX. +You should therefore not use PMX macros for notes or anything else that +affects the count, the duration, the current octave and other properties +that are inherited by a note from the next. But there is no harm in +HIESA +using macros for things like extra space. + \item \MTx\current\ is not aware of movement breaks and the possibility +to change the number of voices. + \end{enumerate} + +\subsection{For \PMX- and MusiX\TeX-perts only} \label{expert} + +You can send commands directly to \ibxem{PMX}. All lines starting with +\ttxem{\%\%} in music paragraphs are collected, stripped of the leading +\verb"%%" and passed otherwise uninterpreted to \PMX\ before anything +else from that paragraph is translated. \NEW{0.41} + +PMX has four mechanisms for incorporating raw \TeX. Apart from putting +them inside music lines as in \PMX, they are supported in \MTx\ as follows. + +1. A Type 1 \TeX\ string appears on a music line, terminated +by a backslash. It takes effect at the next note. + +2. A Type 2 \TeX\ string appears in a \ttxem{TeX} command in the preamble. +The rest of the line will be taken to be \TeX\ and must not end in a +backslash. There may be several \ttxem{TeX} commands. They take effect +just before the real typesetting takes place, after all other definitions +have been processed, and can be used to override just about anything. + +3. A Type 3 \TeX\ string appears on a \verb"%%" line in a paragraph, e.g. +\begin{verbatim} +%% \\\def\foo{bar}\ +\end{verbatim} +It takes effect at the start of paragraph, irrespective of where in +the paragraph it appeared. Note the trailing backslash. + +4. A Type 4 \TeX\ string appears on a \verb"%%" line in the preamble. +\index{TeX string@{\TeX\ string}!Type 4} +It will eventually appear at the top of the \TeX\ file, +after \texttt{musixtex.tex} and \texttt{pmx.tex} have been read in. +Such lines should \emph{not} end with \verb"\". +An example appears in Appendix \ref{dirty}. +As in \TeX, a line starting with only one \ttxem{\%} is treated as a +\ixem{comment}: such lines do not appear in the \PMX\ file. + +If you ever need to pass through something involving stave or instrument +numbers, remember that \PMX\ and MusiX\TeX\ number these from bottom to +top, not from top to bottom, and that the ``first voice'' in \PMX\ is the +\emph{bottom stave} to \MTx. + +Apart from the conversion of lyrics and chord lines into \PMX\ commands +(which is the main job of \MTx) the notes are modified in various ways. +\begin{itemize} + \item Octave is inserted into the first note of each voice, depending +on the \NEW{0.54} \texttt{Octave} command, or if none is supplied, +on the clef. +Absolute \ixem{octave} numbers are not recognized by \MTx\ and +may cause unexpected side effects. You can get something like absolute +octave numbers by combining \verb"=" with \verb"-" or \verb"-". This +may cause an irritating but harmless error message about backward +incompatibiliy at the PMX stage. + \item If a line is vocal, an \ttxem{a} is inserted into quavers and +shorter notes when not under slurs, to protect them from being beamed. + \item Duration codes are inserted into all notes and rests before any +serious processing is done. + \item Long/short note groups are expanded into separate notes. +Although \PMX\ allows these shortcuts, lyrics +cannot be properly synchronized unless the groups are expanded. + \item \PMX\ syntax allows great freedom in the order in which +different parts of a node are coded. \MTx\ is not aware of +all the subtleties, but extracts only those parts of which it needs to +be aware, and reassembles the note afterwards. + \item Labels in the range + \texttt{I} to \texttt{T} are inserted into unlabelled slurs and ties. \NEW{0.55} + You should therefore avoid those labels for slurs that you label yourself. + \item Chord lines are expanded into standard \PMX\ code and inserted +into the main line for each voice. + \end{itemize} + +Other ways in which an \MTx\ score differs from a native \PMX\ score in +more than layout are: a bar line is \emph{required} for a \ixem{pickup}; +\ixem{repeat} bars +are coded by the \ABC\ symbols instead of \ttxem{Rl} etc.; you don't +need to insert a meter change for an incomplete \ixem{final bar}: +\MTx\ does it. + +All the ability of \PMX\ to pass through \TeX\ (including MusiX\TeX) +commands is still there. You might for example like to read the +\ttxem{musixlyr} documentation for a large variety of ways to +fine-tune horizontal lyrics placement, but I can promise that you hardly +ever will need to do horizontal tuning except to align multi-verse lyrics as +in Section \ref{fine-tune-lyrics}. + + +\pagebreak +\section{Annotated examples} + \subsection{Voltas} \label{voltas} + \hskip -12mm +\begin{mus} + \input volta.tex +\end{mus} +\verbatiminput{volta.mtx} +The main rule is: put every \ttxem{V} command in the \emph{bottom} voice +at the start of a measure, +after the bar line (if any) but before the first note, and don't try +to use more than one at a time: the new volta automatically closes the +old one. Volta signs in other voices are silently ignored. +When reading the \PMX\ manual, remember that \emph{your} last part will +become the first part for \PMX. + +In the above example \texttt{V1} starts a volta box, +but to get the first volta box to be closed at the end, you must later +say \texttt{Vb}. Also, to get the text \texttt{2} into the ``second ending" +box, you add the \texttt{2} +after the \texttt{Vb} to make \verb"Vb2". Finally, to make the second +box open ended, you must enter \texttt{Vx} at the point you want it to be +done. (If you forget to enter the \texttt{Vx} after your last volta box, you +will get a strange unwanted volta box at the end of your piece.) + +This example also illustrates the interplay between \ttxem{Space} +and \ixem{\atsign} required for proper spacing of lyrics when there +is stuff above the staves. +\hfill --- \textsl{Contributed by Joel Hunsberger} + +\subsection{Music size} \label{sizes} + +\verbatiminput{title1.mtx} +\begin{center} +\begin{mus} + \input title1.tex +\end{mus} +\end{center} + +The above does not look quite right, for a complicated reason. +A piece as a whole has a basic music size, and then each stave can have its +own ``local'' size. The local size affects everything on the stave itself, +but not the annotations, ornaments etc. The range of legal basic sizes +is quite small: \PMX\ allows only 16-point and 20-point. +In this example, the basic size is 20-point and the local size 29-point. + +To get the perfectly matched annotations displayed on the title page of this +manual, the +input looks like this: +\verbatiminput{title.mtx} +MusiX\TeX\ has four size commands relative the basic size (called +\verb"\normalsize"). These commands affect all music fonts. They are: + +\hskip 15mm +\begin{tabular}{lrr} +\keyindex{smallmusicsize} & 13pt & 16pt \\ +\keyindex{normalmusicsize} & 16pt & 20pt \\ +\keyindex{largemusicsize} & 20pt & 24pt \\ +\keyindex{Largemusicsize} & 24pt & 29pt +\end{tabular} + +There is no \verb"\tinymusicsize", although several of the music fonts are +individually available in 11-point size. + +\pagebreak \subsection{A psalm tune} +\hskip -20mm \begin{mus} + \input psalm42.tex +\end{mus} +\vskip 12pt +\verbatiminput{psalm42.mtx} +\begin{itemize} + \item \verb"Meter: 0/2" indicates counting in half-notes, but no bar +lines. + \item Line breaks in the \texttt{Title} are made by \verb"\\". +\end{itemize} + +\pagebreak +\subsection{Beams, slurs and melismas} \label{melisma} + +% Macros for music examples + +\example{melisma1}{mtx}{60mm}{4mm}{90mm}{-5mm}{c}{5mm} + +\example{melisma2}{mtb}{60mm}{4mm}{90mm}{-10mm}{b}{5mm} + +\example{melisma3}{mtb}{60mm}{4mm}{90mm}{-10mm}{b}{5mm} + +\example{melisma4}{mtb}{60mm}{4mm}{90mm}{-15mm}{b}{5mm} + +\example{melisma5}{mtb}{60mm}{4mm}{90mm}{-10mm}{b}{5mm} + +\example{melisma6}{mtb}{60mm}{4mm}{90mm}{-15mm}{b}{5mm} + +\bigskip\bigskip + +Some points to note: Example 1 uses a slur with default PMX beaming, +Example 2 uses forced beaming to beam all notes, +Example 3 does both. Examples 4 and 5 violate the \MTx\ convention +that notes sung to a single syllable must be slurred or beamed together, +so we override this in either of two ways using \texttt{musixlyr} +commands. Example 4 uses \verb"\beginmel" and \verb"\endmel" +to force melismas in a situation where \verb"[[" has suppressed them; +this method is good for long melismas +over several beamed components. Example 5 suppresses lyrics where +the beaming would have put them. +Example 6 uses \verb"\lyr" to force lyrics where the beaming +would have suppressed them, and shows the use of empty +syllables to synchronize lyrics and of broken slurs to indicate different +slurring in the two verses. +\hfill --- \textsl{Suggested by Stefan Haller} + +\pagebreak +\subsection{Dirty Tricks} \label{dirty} \NEW{0.41} + +\verbatiminput{meter.mtx} +\begin{center} +\begin{mus} + \input meter.tex +\end{mus} +\end{center} + +These are bars 7--9 of the \emph{Credo} from \emph{Misa Criolla} +by Ariel Ram{\'\i}rez. It is in the \emph{chacarera trunca} meter, which +mixes $\frac34$ and $\frac68$ time. There is no \PMX\ construction for +such \ixem{exotic meters}, so we need to be ingenious. + +We specify the meter as \verb"m3406" +which tells \PMX\ to use $\frac34$ meter but to print the C symbol for common +time. Of course we do not actually want the C symbol, we want something +that looks like $\frac34(\frac68).$ Now all that \PMX\ knows about the C +symbol is that it is called \verb"\meterC" in MusiX\TeX. So we define +\verb"\chacarera" and assign it to +\verb"\meterC" in preamble \verb"%%" commands. These appear in the \TeX\ +file after the command to read in \texttt{musixtex.tex} but before the +commands that actually print something. If later we need the original +\verb"\meterC" it can be restored by \verb"\let\meterC=\oldmeterC". + +The excerpt illustrates some sophisticated \PMX\ features too. +Since the \verb">" ornament on the bottom stave +goes above the stave by default, we +need to move it down explicitly. The beamed eighths look better with +a horizontal beam, which is enforced by \verb"[h." Finally, there is +a tie involving a melodic note with a note in a chord; to allow this, +the chordal note must +come on a music line, not on a \texttt{C:} line. +\pagebreak + +\subsection{Extra text after the piece} \label{extra} \NEW{0.50} + +\verbatiminput{borup.mtx} + + +When typesetting a vocal composition you may sometimes want to put only the +text of the initial stanza into your score and let the remaining part of the +lyrics be printed below the score. You might also want to add some notes or +comments. + +Apparently this is not possible according to the set of commands available +for \MTx\ and \PMX. There is, however, a workaround to do things like +that. The trick is to look for a command \keyindex{Endpiece} or --- as in +this example --- \verb'\setrightrepeat\endpiece' near the bottom of the +MusiX\TeX\ file generated by the \PMX\ preprocessing. You may extend the +actions of \verb'\Endpiece' (or \keyindex{endpiece}) by saving the command +with another name (\verb'\endpiecesav') and redefine \verb'\Endpiece' +to first execute \verb'\endpiecesav' and then request the inclusion of +one or more files containg plain \TeX\ code. The text of the included +file(s) will be typeset on unutilized space on the last page or else on +a new page. + +MusiX\TeX\ commands like these may --- as noted in Appendix \ref{usefulPMX} +--- be put directly into the mtx source file in \verb"%%"-lines at the +head of the first music paragraph. + +In the current example two files have been included. \texttt{lyrics.tex} +contains the original Latin lyrics and an English translation. A \TeX\ +table\footnote{See Michael Doob: A Gentle Introduction to \TeX, section +6.2. The book may be found as \texttt{gentle.tex} in the Documentation +subdirectory of the \TeX\ CTAN mirror archives.} consisting of a template +line followed by item lines for each lyrics line has been used to set +up the text in two columns - one for the lyrics and one in italics for +the translation. Notes on the song is included from \texttt{notes.tex} +and appended below the lyrics. +\hfill --- \textsl{Contributed by Christian Mondrup, following a hint by +Werner Icking} + +\verbatiminput{notes.tex} +\pagebreak + +\verbatiminput{lyrics.tex} + +\hskip -20mm +\begin{mus} + \input borup.tex +\end{mus} + +\pagebreak + +\section{\MTx\ and \LaTeX} \NEW{0.54} \label{latex} + +\textit{This section assumes that you have some knowledge of +\LaTeX.} + +The normal output from \PMX\ is a stand-alone plain \TeX\ file, which +cannot without further ado succesfully be input into \LaTeX. +The file \ttxem{mtxlatex.tex} allows you to prepare music scores using +\LaTeX\ rather than plain \TeX, which is particularly useful when you +need the enhanced font handling features of \LaTeX, and to produce +books combining the outputs of several \PMX\ runs into a single +document, such as a collection of songs, or a mainly text document + (like this one) with many small music excerpts. + +\begin{quote} \emph{Order of inclusion of packages is important. + \emph{\texttt{mtxlatex}} + must be the first package included, before any font packages.} +\end{quote} + +\subsection{Collections of complete pieces} + +Suppose you need to make a document containing several complete +pieces, with +perhaps a title page, a foreword and an afterword, like a typical +published book of piano pieces or songs. +\begin{enumerate} + \item Write a \LaTeX\ file, say \texttt{halleluja.ltx}, +looking something like this: +\verbatiminput{hallelujashort.ltx} +By the way, this code contains another dirty trick: vertical space +between systems is tweaked by embedding the bar number in a vertical box. + \item Use the script \texttt{musixtex.lua} that, thanks to Bob Tennent, +forms part of modern \TeX\ distributions\footnote{You need at least Version +0.15. If your distribution is not recent enough, download the latest version +from \texttt{http://icking-music-archive.org/software/musixtex/musixtex.lua}} +to build everything in one go. In this case you need to say: +\begin{verbatim} + musixtex kroonhom loofnou halleluja.ltx +\end{verbatim} +It is important to put the main file last, so that the \TeX\ files +are built before the main file is processed. + \item If you make small changes in the \LaTeX\ part only, a single +\LaTeX\ pass is sufficient, unless the page numbering has changed. +You achieve this with the \texttt{-1} option of \texttt{musixtex.lua}. +\end{enumerate} +You can see the finished product in \texttt{halleluja.pdf}. +Some points to note: +\begin{itemize} + \item The file \texttt{mtxlatex.sty} is supplied with the \MTx\ +documentation source. You may need to copy it to some other place +for \TeX\ to find it. + \item The package \texttt{mathptmx} comes with standard distributions +and loads \texttt{Times} fonts, including fonts for mathematics. +You could use any suitable \LaTeXe\ font package here. The \texttt{Times} +font is quite narrow and therefore useful when the lyrics are crowded. +If you do use a font package, load it \emph{after} \texttt{mtxlatex}. + \item \verb"\pagestyle{headings}" puts page +numbers and running headings at the top of the page. + \item To change fonts, you can use pure \LaTeXe\ +\ixem{font change} commands, as above. +Briefly, subject to what fonts you have installed, +you can independently change: + \begin{description} + \item[size] \verb"\tiny", + \verb"\scriptsize", \verb"\footnotesize", \verb"\small", + \verb"\normalsize", \verb"\large", \verb"\Large", \verb"\LARGE", + \verb"\huge", \verb"\Huge"; + \item[shape] \verb"\upshape", \verb"\itshape", \verb"\slshape", + \verb"\scshape"; + \item[family] \verb"\rmfamily", \verb"\sffamily", \verb"\ttfamily"; + \item[series] \verb"\mdseries", \verb"\bfseries", + \end{description} +or corresponding \verb|\text..{...}| macros. +For a full description, see any good \LaTeXe\ manual. + +Header +font commands (see Section~\ref{ChangingFonts}) are redefined in \verb|mtxlatex.sty| as follows: +\begin{verbatim} + \renewcommand{\BIGtype}{\Huge\bfseries} + \renewcommand{\BIgtype}{\huge\bfseries} + \renewcommand{\Bigtype}{\LARGE\bfseries} + \renewcommand{\bigtype}{\Large\bfseries} +\end{verbatim} +If \TeX-like commands such as \verb"\it", \verb"\bf" +etc.\ are used in a particular score, they can be redefined to work as in MusiX\TeX\ in +that environment as follows: +\begin{verbatim} + \renewcommand{\rm}{\upshape\mdseries} + \renewcommand{\it}{\itshape\mdseries} + \renewcommand{\bf}{\upshape\bfseries} + \renewcommand{\bi}{\itshape\bfseries} + \renewcommand{\sc}{\scshape\mdseries} +\end{verbatim} + + + \item The blank line after \verb"\pagebreak" is essential. + \item The environment \ttxem{Score} is used to include each piece. +It takes two arguments: the first will appear in the list of +contents and as a running page heading; the second is the name +of the \texttt{.tex} file. As usual, the extension \texttt{.tex} +may be omitted. There is also an environment \ttxem{score} +which is less convenient but more flexible: it has no arguments, +reads in nothing, puts nothing in the table of contents, and +does not change the running page heading. Use it when you need +a special lyrics font, e.g. +\begin{verbatim} +\begin{score} \headingandcontents{Loof nou die Heer} + \sffamily \input loofnou +\end{score} +\end{verbatim} +\end{itemize} + +\subsection{Collections of morsels} + +The situation is a little different when the pieces are so short +that several of them fit on one page. For these, use the +environment \ttxem{excerpts}, as in the following example: +\verbatiminput{kanons.ltx} +The rest of the procedure is the same as for collections of longer +pieces. +You can see the finished product in \texttt{kanons.pdf}. +Some points to note: +\begin{itemize} + \item The \texttt{excerpts} environment redefines the heading fonts +to more modest sizes. + \item A page break should be made before quitting the environment. + + \item The pieces do not have bar numbers, but space should be reserved +for the numbers that show where the voices enter. As above, this is done +by redefining the \keyindex{writebarno} command. +\end{itemize} + +\subsection{Documents with small music excerpts} + +This manual relies heavily on the \ttxem{mus} environment. +For example, the +musical emblem on the front page was set using the commands +\begin{verbatim} +\begin{center} + \framebox[5in]{\parbox{3.6in}{ + \begin{mus} \input title.tex \bigskip \end{mus} + }} +\end{center} +\end{verbatim} +Some points to note: +\begin{itemize} + \item The excerpts vary in length and some experimentation is +required to get the dimensions and positioning just right. + \item Putting the \texttt{mus} environment inside a \texttt{center} +environment only works when the music line is not longer than the text. +Otherwise, it is useful to use \verb"\hskip", as in the case of the +first example in the manual: +\begin{verbatim} +\hskip -18mm +\begin{mus} +\input mozart0.tex +\end{mus} +\end{verbatim} +For this technique to work properly, it is essential that the above four +lines form a paragraph of their own, i.e.\ they are preceded and +followed by blank lines. +\end{itemize} + +Appendix \ref{melisma} was produced using the command \keyindex{example}. +This is a rather complicated macro with eight parameters, which is +documented at the end of the file \ttxem{mtxlatex.sty}. + +\section{Overriding predefined \TeX\ commands} \NEW{0.54} + +\textit{This section assumes that you are an experienced \TeX\ +user. } + +The logical structure of \TeX\ is such that most of the time, a command used +in a definition need not exist at the time that the definition is made, +as long as it is defined by the time that the definition is used. This +behaviour is known to computer programmers as \emph{run-time binding}. + +We have already met examples of how to exploit this feature in Sections +\ref{dirty} and \ref{extra}, where respectively \verb"\meterC" and +\verb"\Endpiece" were redefined. +The macros of the previous section also work in that way, by locally +(i.e.\ inside the various environments) redefining commands that appear +in the \TeX\ file generated by \PMX. + +The technique is an extremely powerful and flexible one, and in the +hands of an expert can achieve practically any desired result. +Here we can only scratch the surface. One point to note is that +good programming practice requires that you save the current meaning +of the command and restore it later, e.g. +\begin{verbatim} + \let\commandsave\command\def\command{...} + ... + \let\command\commandsave +\end{verbatim} +In \LaTeX, if you redefine a command inside an environment, the saving and +restoring is automatic. + +\subsection{\Large \texttt{mtx.tex}} \label{mtxtex} + +The \MTx\ preprocessor, as far as possible, issues commands starting +with \verb"\mtx" instead of direct \TeX\ commands. The main purpose +for so doing is that the user can modify their effect by redefining +them in the source file. These macros, together with a few others +that make life easier, are collected in the file \ttxem{mtx.tex}. + +\subsection{Changing fonts} +\label{ChangingFonts} + +The font used for lyrics is +by default eleven-point roman. +It can be changed globally; for example, \verb"TeX: \twelverm" in the preamble will change the font to +twelve-point. +The font families used by default for titles and other items in headers are respectively +called \keyindex{BIgtype} and \keyindex{bigtype}. +If you want larger or smaller fonts, you may use \verb|\BIGtype| or \verb|\Bigtype| +to prefix +the header text, +as in +\begin{verbatim} + Title: \Bigtype Sanctus +\end{verbatim} +You may also use commands \verb|\rm|, \verb|\it|, +\verb|\bi|, and \verb|\sc| to get Roman, italic, bold-italic, or small-capital text +in header strings. +The macros \keyindex{mtxPalatino} and \keyindex{mtxTimes}, defined in +\texttt{mtx.tex}, replace +Computer Modern in all the font definitions by Palatino or Times, respectively. + +A command like \verb|\mtxelevensf| may be used in +a \verb|TeX:| header to get sans-serif lyrics. +The macro \keyindex{mtxAllsf} sets \verb|\mtxelevensf| as the default +for lyrics and also redefines the \verb|\bigtype|, +\verb|\Bigtype|, \verb|\BIgtype| and \verb|\BIGtype| families +to use sans-serif fonts. +Only \verb|\rm| and \verb|\it| styles are available in sans-serif header strings. +The macro \keyindex{mtxHelvetica} replaces the +Computer Modern Sans font definitions by Helvetica. + +\pagebreak + +\setcounter{page}{1} +\renewcommand{\thepage}{I-\arabic{page}} + +\def\Flat{{\musixfont\char'062}} +\def\Sharp{{\musixfont\char'064}} +\def\mtxSharp{\mbox{\raise1ex\hbox{\Sharp}}} +\def\mtxFlat{\mbox{\raise1ex\hbox{\Flat}}} + +If you can't find what you need here, also try the Table of Contents. +Other sources of help are listed in Appendix A. + +\printindex +\end{document} + +\endinput + +so it is a good idea to use \texttt{musixlyr} commands +for left-alignment (\keyindex{llyr}) and horizontal shift +(\keyindex{lyroffset}) on the corresponding music line, for example: +\begin{verbatim} +\llyr\lyroffset{-2}\ d | g g ( a8 b ) | g4 g ( b8 c ) | d4 d e | c2 +L: 1. A-way in a man-ger, no crib for his bed, +L: 2. The stars in the bright sky looked down where He lay. +\end{verbatim} + diff --git a/support/m-tx/doc/mtxdoc.pdf b/support/m-tx/doc/mtxdoc.pdf new file mode 100644 index 0000000000..1971b5a0cf Binary files /dev/null and b/support/m-tx/doc/mtxdoc.pdf differ diff --git a/support/m-tx/doc/mtxdoc.sty b/support/m-tx/doc/mtxdoc.sty new file mode 100644 index 0000000000..e4e0cbab27 --- /dev/null +++ b/support/m-tx/doc/mtxdoc.sty @@ -0,0 +1,110 @@ +% mtxdoc.sty: macro package for writing documents with music examples +% Some comments on usage appear at the bottom + +% Thanks to Daniel Taupin whose 'musixdoc.sty' is the source +% for some of these + +% Fonts and mark-up + +\newfont{\mflogo}{logo10 scaled 1200} +\font\tentt=\fontid tt10 +\def\ital#1{{\sl #1\/}} +\def\textbs#1{\textbf{\textsl{#1}}} + +% Characters + +\def\Bslash{\tt\char'134} +\def\lquote{{\tt\char'140}} +\def\rquote{{\tt\char'047}} +\def\squote{{\tt\char'015}} +\def\dquote{{\tt\char'042}} +\def\|{{\tt\char'174}} +\def\LBR{{\tt\char'173}} +\def\RBR{{\tt\char'175}} +\def\snake{{\tt\char'176}} +\def\atsign{{\tt\char'100}} +\def\less{{\tt\char'074}} +\def\more{{\tt\char'076}} +\def\underscoreSymbol{\leavevmode \kern.06em \vbox{\hrule width.3em}}% + +% Logos + +\def\mutex{M\raise\tw@\p@\hbox{\kern\m@ne\p@ u\kern\m@ne\p@}\TeX} +\def\MF{{\mflogo METAFONT}} +\def\unix{{\sc unix}} +\def\ABC{\textbf{\texttt{ABC2M\TeX}}} + +% Making an index + +\definecolor{Green}{rgb}{0,0.5,0.1} +\definecolor{Red}{rgb}{0.5,0,0.1} +\long\def\theindex{\renewcommand{\thesection}{}\section{Index}\parindent\z@ + \parskip\z@ plus.3\p@\relax \let\item\@idxitem \columnseprule\z@ + \columnsep35\p@ \begin{multicols}{2}} +\def\endtheindex{\end{multicols}} +\def\keyindex#1{\leavevmode + \hbox{{\color{Red}\Bslash #1}}\index{#1@{\protect\Bslash #1}}} +\def\zkeyindex#1{\index{#1@{\color{Red}\protect\Bslash #1}}} +\def\indexed#1{{\color{Green}#1}} +\def\ixem#1{\indexed{#1}\index{#1}} +\def\itxem#1{\indexed{\ital{#1}}\index{#1}} +\def\ttxem#1{\indexed{\tt #1}\index{#1@{\tt #1}}} +\newcommand{\ttxi}[1]{\item{\ttxem{#1}}} +\def\ibxem#1{\indexed{\bf#1}\index{#1}} +\def\dotxem#1{\indexed{\tt .#1}\index{#1@{\tt .#1}}} +\def\mark#1{\underline{\ttxem{#1}}} +\def\printindex{\@input{\jobname.ind}} + +% Version highlighting + +\def\current{ \version} +\def\newfrom{0.0} +\def\NEW#1{\ifdim#1 pt<\newfrom pt\else% +\index{NEW!\textsf{#1}}\marginpar{\fbox{\textsf{#1}}}\fi} + +% Paper size + +% A4 +\newcommand{\paperAfour}{ +\immediate\typeout{A4 paper size} +\global\textheight 240mm +\global\textwidth 160mm +\global\topmargin -16mm +\global\oddsidemargin 0mm} +% US Letter +\newcommand{\paperUS}{ +\immediate\typeout{US paper size} +\textheight 9.2in +\textwidth 6.5in +\topmargin -0.84in +\oddsidemargin 0mm +} + +% If there is no file 'mypaper.tex' then \paperA4 is the default paper size. +% Historically 'mypaper.tex' was used to select paper size only. +% It can of course contain any TeX macros suitable for the preamble. +\newread\mypaper +\openin\mypaper mypaper.tex\relax +\ifeof\mypaper\paperAfour\else\input mypaper.tex\fi\closein\mypaper + +\endinput + +======================================================================= + +The macros \example and \fullExample are designed to let the +music appear side by side with some verbatim code. + +\fullExample{basename} takes the input from file basename.tex and + puts the source from file basename.mtx next to it. The right-hand + minipage is centered because the source is expected to be taller than + the music. + +\example{basename} takes the input from file basename.tex and + puts the source from file basename.mtb next to it. In the + case of the M-Tx manual, basename.mtb is part of basename,mtx, + but of course one could put anything in the file. The right-hand + minipage is bottom=aligned ed because the source is expected to be + not taller than the music. + +There are some small differences in dimensions between the two macros, +which are intended to make them look just right when used together. diff --git a/support/m-tx/doc/mtxindex.tex b/support/m-tx/doc/mtxindex.tex new file mode 100644 index 0000000000..5015e7f58f --- /dev/null +++ b/support/m-tx/doc/mtxindex.tex @@ -0,0 +1,18 @@ +\documentclass[11pt]{article} +\input musixtex +\usepackage{a4wide,mtxdoc,multicol,charter} +\def\LBR{{\tt\char'173}} +\def\Bslash{\tt\char'134} +\def\Flat{{\musixfont\char'062}} +\def\Sharp{{\musixfont\char'064}} +\def\mtxSharp{\mbox{\raise1ex\hbox{\Sharp}}} +\def\mtxFlat{\mbox{\raise1ex\hbox{\Flat}}} +\begin{document} +\setcounter{page}{1} +\pagebreak +\renewcommand{\thepage}{I-\arabic{page}} +If you can't find what you need here, also try the Table of Contents. +Other sources of help are listed in Appendix A. + +\input mtxdoc.ind +\end{document} diff --git a/support/m-tx/doc/netfirst.mtx b/support/m-tx/doc/netfirst.mtx new file mode 100644 index 0000000000..101bbac4df --- /dev/null +++ b/support/m-tx/doc/netfirst.mtx @@ -0,0 +1,14 @@ +Title: Net soos ek is +Composer: Charlotte Elliott +Style: SATB +Sharps: 2 +Meter: 3/4 +Space: 9 + +f f f | e2s e4 | f2 b4 | a2d | g4 g g | f2 f4 | g2 c4n | b2d | +d d d | d2r d4r | d2 d4 | d2d | e4 e e | d2s d4 | e2 f4 | f2d | +L: 1. Net soos ek is, geen hulp na-by, al-leen U bloed ge-stort vir my, +L: 2. Net soos ek is, nooi U vir my, ver-ge-we, rei-nig en be-vry. +L: 3. Net soos ek is, U lief-de teer werp al-le hin-der-pa-le neer. +a a a | g2s g4 | a2 g4 | a2d | b4 b b | c2n c4 | b2 e4 | ds2d | +d d d | d2 d4 | d2 g4 | f2d | e4 e e | a2 a4 | g2 g4 | b2d | diff --git a/support/m-tx/doc/netsoos.mta b/support/m-tx/doc/netsoos.mta new file mode 100644 index 0000000000..ed0612e80f --- /dev/null +++ b/support/m-tx/doc/netsoos.mta @@ -0,0 +1,5 @@ +Style: SATB +Sharps: 2 +Meter: 3/4 +Space: 9 + diff --git a/support/m-tx/doc/netsoos1.mtb b/support/m-tx/doc/netsoos1.mtb new file mode 100644 index 0000000000..43b015fe49 --- /dev/null +++ b/support/m-tx/doc/netsoos1.mtb @@ -0,0 +1,7 @@ +b4 b c | d2 a4 | g2 a4 | f2 f4 | e2 a4 | ( d4 c ) b | a2d | +g4 g e | d2 d4 | d2 c4 | d2 d4 | b2 e4 | ( f4 e ) d | c2d | +L: ge-trek tot U deur-boor-de sy, O Lam van God, ek kom. +L: Op U be-lof-te steun ek bly; O Lam van God, ek kom. +L: Dan wy ek my vir e-wig, Heer; O Lam van God, ek kom. +b4 b bf | a2 a4 | b2 a4 | a2 a4 | g2s a4 | a2 g4s | a2d | +e4 e g | f2 f4 | e2 a4- | d2 d4 | d2 c4 | ( b4 e ) e | a2d | diff --git a/support/m-tx/doc/netsoos1.mtx b/support/m-tx/doc/netsoos1.mtx new file mode 100644 index 0000000000..bfd2357c67 --- /dev/null +++ b/support/m-tx/doc/netsoos1.mtx @@ -0,0 +1,12 @@ +Style: SATB +Sharps: 2 +Meter: 3/4 +Space: 9 + +b4 b c | d2 a4 | g2 a4 | f2 f4 | e2 a4 | ( d4 c ) b | a2d | +g4 g e | d2 d4 | d2 c4 | d2 d4 | b2 e4 | ( f4 e ) d | c2d | +L: ge-trek tot U deur-boor-de sy, O Lam van God, ek kom. +L: Op U be-lof-te steun ek bly; O Lam van God, ek kom. +L: Dan wy ek my vir e-wig, Heer; O Lam van God, ek kom. +b4 b bf | a2 a4 | b2 a4 | a2 a4 | g2s a4 | a2 g4s | a2d | +e4 e g | f2 f4 | e2 a4- | d2 d4 | d2 c4 | ( b4 e ) e | a2d | diff --git a/support/m-tx/doc/netsoos2.mtb b/support/m-tx/doc/netsoos2.mtb new file mode 100644 index 0000000000..1d971a9fed --- /dev/null +++ b/support/m-tx/doc/netsoos2.mtb @@ -0,0 +1,8 @@ +@+5 b4 b b | b2d | a4 a a | a2d | d4 e- f | g2 e4 | d2d of |] +L: Net soos ek is, net soos ek is, O Lam van God, ek kom. + d4s g f | e2d | e4 f e | d2d | d4 dr d | d2 c4 | d2d |] +@^+5 rp+6 | b4 e d | c2d | a4 d c | ( b2d | b2 ) g4 | f2d |] +LT: Net soos ek is, O Lam van God, ek kom. + a4 a a | g2d | g4 g g | f2d | b4- g+ f | e2 a4- | d2d ofd |] +L: Net soos ek is, net soos ek is, O Lam van God, ek kom. + diff --git a/support/m-tx/doc/netsoos2.mtx b/support/m-tx/doc/netsoos2.mtx new file mode 100644 index 0000000000..0393511d37 --- /dev/null +++ b/support/m-tx/doc/netsoos2.mtx @@ -0,0 +1,13 @@ +Style: SATB +Sharps: 2 +Meter: 3/4 +Space: 9 + +@+5 b4 b b | b2d | a4 a a | a2d | d4 e- f | g2 e4 | d2d of |] +L: Net soos ek is, net soos ek is, O Lam van God, ek kom. + d4s g f | e2d | e4 f e | d2d | d4 dr d | d2 c4 | d2d |] +@^+5 rp+6 | b4 e d | c2d | a4 d c | ( b2d | b2 ) g4 | f2d |] +LT: Net soos ek is, O Lam van God, ek kom. + a4 a a | g2d | g4 g g | f2d | b4- g+ f | e2 a4- | d2d ofd |] +L: Net soos ek is, net soos ek is, O Lam van God, ek kom. + diff --git a/support/m-tx/doc/notes.tex b/support/m-tx/doc/notes.tex new file mode 100644 index 0000000000..02d08b1b4f --- /dev/null +++ b/support/m-tx/doc/notes.tex @@ -0,0 +1,6 @@ +% ------- file notes.tex ---------------------------------------- +\vskip 10 mm +\noindent Lyrics by Morten B\o{}rup, 1446-1526, headmaster at the +grammar school of Aarhus. The song was published \par +with an anonymous melody in \it Piae Cantiones +\rm by Theodoricus Petri, Greifswald 1582. diff --git a/support/m-tx/doc/pdfcat b/support/m-tx/doc/pdfcat new file mode 100755 index 0000000000..fd773f7690 --- /dev/null +++ b/support/m-tx/doc/pdfcat @@ -0,0 +1,32 @@ +#!/bin/sh + +# pdfcat.sh +# Thanks to Christian Mondrup for this script + +FILENAME=`basename $0` + +USAGE="Usage: $FILENAME [-a (A4 paper)] -o outputfile -i \"inputfile1 inputfile12 ...\"" + +if [ $# -le 3 ] +then + echo $USAGE + exit 2 +fi + +GSARGS="-q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite" + +while getopts "i:o:a" ARG_STRING +do + case $ARG_STRING in + a) GSARGS="-sPAPERSIZE=a4 $GSARGS" + ;; + i) INPUTFILES=$OPTARG + ;; + o) OUTPUTNAME=$OPTARG + ;; + *) echo $USAGE + exit 2;; + esac +done + +gs $GSARGS -sOutputFile=$OUTPUTNAME $INPUTFILES diff --git a/support/m-tx/doc/prepmx.1 b/support/m-tx/doc/prepmx.1 new file mode 100644 index 0000000000..bcc34404f4 --- /dev/null +++ b/support/m-tx/doc/prepmx.1 @@ -0,0 +1,100 @@ +.TH prepmx 1 "08 January 2018" "M-Tx Version 0.63" "prepmx Manual Page" +.SH NAME +prepmx \- preprocessor for PMX, easy music typesetting program +.SH SYNOPSIS +.B prepmx +.RI [ options ] +.I jobname +.RI [ outdir/ ] +.RI [ stylefile ] +.SH DESCRIPTION +.B M-Tx +is an easy to use preprocessor language for the +.B PMX +music typesetting program, aimed at people who are not experts. For an +easy example, have a look at the following example: + + c2+ e4 g | b4d- c1 d c2 | + c8 g+ e g c- g+ e g | d g f g c- g+ e g | + +For syntax reference, please look at the M-Tx manual written by Dirk +Laurie, the creator of the M-Tx language and the author of +.BR prepmx (1), +its command-line utility. + +.B prepmx +processes the file +.IR jobname .mtx +to generate +.IR jobname .pmx. +You can then process this file using the +.BR pmxab (1) +command, which is a preprocessor for MusiXTeX. + +.I outdir/ +is the directory where `pmx' will put the final .tex file. Note that the +trailing slash is mandatory. You can provide a +.I stylefile +for M-Tx. If omitted, the file `mtxstyle.txt' in the current +directory is used, if there is one. +.SH OPTIONS +Options can also be specified in a `Options:' line in the preamble, +which takes precedence over the command line. +.TP +.B \-b +disable unbeamVocal +.TP +.B \-c +disable doChords +.TP +.B \-D +enable debugMode +.TP +.B \-f +enable solfaNoteNames +.TP +.B \-i +enable ignoreErrors +.TP +.B \-m +disable doLyrics +.TP +.B \-n +enable instrumentNames +.TP +.B \-t +disable doUptext +.TP +.B \-u +disable uptextOnRests +.TP +.B \-v +enable beVerbose +.TP +.B \-w +enable pedanticWarnings +.TP +.BI \- n +select Special Case +.I n +.TP +.B \-H +print enabled status of all options +.SH EXIT STATUS +If no error was found, +.B prepmx +exits with return code 0. In case of an error, the line number of the +processed line is returned. This may not always be the line containing +the actual error. A return status of 10000 means that the input file was +empty or could not be opened. +.SH SEE ALSO +.B M-Tx +User's Guide (mtxdoc.pdf) +.br +pmxab(1), musixtex(1) +.SH AUTHORS +prepmx was written by Dirk Laurie . This +manual page was written by Roland Stigge +for the Debian project. It was revised and extended by +Nis Martensen and Bob Tennent +. diff --git a/support/m-tx/doc/prepmx.pdf b/support/m-tx/doc/prepmx.pdf new file mode 100644 index 0000000000..0996eece67 Binary files /dev/null and b/support/m-tx/doc/prepmx.pdf differ diff --git a/support/m-tx/doc/psalm42.mtx b/support/m-tx/doc/psalm42.mtx new file mode 100644 index 0000000000..c5ad930720 --- /dev/null +++ b/support/m-tx/doc/psalm42.mtx @@ -0,0 +1,15 @@ +Meter: 0/2 +Style: Singer +Sharps: 1 +Title: Psalm 42\\{\textit{\normalsize Ainsi que la biche r\'ee}} + +@0 g2 a4 b2 a4 g f e2 d2 \caesura\ g2 a4 b2 c4 b2 a g :| +L: Soos 'n hert in dor-re stre-ke, skreeu-end dors na die ge-not +L: van die hel-der wa-ter-be-ke, skreeu my siel na U, o God. + +@+1 b2 b4 d2 c4 b a b2 \caesura\ d2 d4 e2 d4 c b a2 +L: Ja, my siel dors na die Heer, na die Le-wens-bron. Wan-neer + +b2 d4 c2 b4 g a b2 g2 \caesura\ b2 b4 c2 b4 a g f2 g2 +L: sal ek sien in klaar aan-skou-e? Op die Heer is my ver-trou-e. + diff --git a/support/m-tx/doc/sanctus.mtx b/support/m-tx/doc/sanctus.mtx new file mode 100644 index 0000000000..2aea4ad311 --- /dev/null +++ b/support/m-tx/doc/sanctus.mtx @@ -0,0 +1,13 @@ +Title: Sanctus +Composer: Jacobus Clemens non Papa +Flats: 1 +Meter: C +Style: Singer +Systems: 2 +Size: 20 +TeX: \hidebarrule1 + +U: !bf 1 | | 2 | | 3 | | 4 | | 5 +(~ c4+.b a of g f e d2 )~ { c2 c4 } of (~ c4 f g a g8 f g2 )~ f4 of (~ c+ d c2 b8 a b4 g cd of b8 a4 g2 { f4 f } e )~ fd of (~ g8 a b c4 )~ f2- +L: Sa-nctus, sa-nctus, sa-nctus, sa-nctus. + diff --git a/support/m-tx/doc/title.mtx b/support/m-tx/doc/title.mtx new file mode 100644 index 0000000000..da0236b8ab --- /dev/null +++ b/support/m-tx/doc/title.mtx @@ -0,0 +1,9 @@ +Bars/line: 2 +Style: Solo +Meter: m3400 +Width: 3.7in +TeX: \Largemusicsize + +U: @} + +\usepackage{etex} + +\def\MTx{\mbox{\textbf{\textsl{M-Tx}}}} +\def\PMX{\textbf{PMX}} +\def\musixlyr{\texttt{\textbf{musixlyr}}} + +\input musixtex +\input musixltx + +% Preamble TeX commands for documents that contain .ex files +% generated by M-Tx/PMX + +\def\mtxlatex{ +\input mtx +\renewcommand{\BIGtype}{\Huge\bfseries} +\renewcommand{\BIgtype}{\huge\bfseries} +\renewcommand{\Bigtype}{\LARGE\bfseries} +\renewcommand{\bigtype}{\Large\bfseries} +% Kill the PMX definition of \parskip. +\parskip=0pt plus 1pt +} +% Extra vertical space evenly spread between systems +\renewcommand\alaligne{\stoppiece\vfill\contpiece} +\def\scoreheight{\textheight 270mm} +\def\scorewidth{\textwidth 193mm} + +\newcommand{\startscore}{\let\SmuF\startmuflex\let\EmuF\endmuflex +\scorewidth\scoreheight +\oddsidemargin -15mm\evensidemargin -15mm\topmargin -20mm +\ifx\mysizes\undefined\else\mysizes\fi +\let\startmuflex\relax\let\endmuflex\relax\let\bye\relax% +\let\nopagenumbers\relax\musicparskip} +\newcommand\headingandcontents[1]{\markboth{#1}{#1}\addcontentsline{toc} + {section}{\protect\numberline{}{#1}}} + +% The environment 'Score' is suitable for scores submitted to the +% Werner Icking music archive +\newenvironment{Score}[2]{\headingandcontents{#1} +\startscore\input #2 +}{\markboth{}{}} + +% The environment 'score' requires you to do your own input +\newenvironment{score}{\startscore}{} + +\newenvironment{excerpts}{ +\newlength\keepOSM\setlength\keepOSM\oddsidemargin +\newlength\keepTM\setlength\keepTM\topmargin +\global\setlength\oddsidemargin{-13mm} \global\setlength\topmargin{-20mm} +\let\startmuflex\relax\let\endmuflex\relax +\let\nopagenumbers\relax \let\bye\relax \let\vfill\relax \let\eject\relax +\musicparskip +\renewcommand{\BIGtype}{\huge\bfseries} +\renewcommand{\BIgtype}{\LARGE\bfseries} +\renewcommand{\Bigtype}{\Large\bfseries} +\renewcommand{\bigtype}{\large\bfseries} +}{\global\setlength\oddsidemargin\keepOSM\global\setlength\topmargin\keepTM} + +\newenvironment{mus}% +{\begin{minipage}{260mm}\startscore\musicparskip}% +{\assignlyrics1{}\assignlyrics2{}% +\gdef\mtxTitle{}\end{minipage}} + +\def\example#1#2#3#4#5#6#7#8{ +\noindent\begin{minipage}[t]{#3} +\begin{mus} \vskip #6 +\input{#1.tex} +\end{mus} +\end{minipage}\hskip #4 +\begin{minipage}[#7]{#5} \vskip #8 +\verbatiminput{#1.#2} +\end{minipage}} + +\mtxlatex + +\endinput + +============================================================================ + +\example{basename}{ext} + {musicwidth}{separation}{codewidth} + {musicvskip}{alignment}{codevskip} + +Set music example together with M-Tx (or other) code. + +basename - musicfile is basename.tex +ext - codefile is basename.ext +separation - distance between music and code minipages +alignment - c, t or b (for code minipage) diff --git a/support/m-tx/scripts/m-tx.lua b/support/m-tx/scripts/m-tx.lua new file mode 100755 index 0000000000..0a62d8fc44 --- /dev/null +++ b/support/m-tx/scripts/m-tx.lua @@ -0,0 +1,5 @@ +#!/usr/bin/env texlua + +print ("The m-tx[.lua] script has been retired; please switch") +print ("to the musixtex script, which now processes .mtx files.") + diff --git a/support/m-tx/tex/mtx.tex b/support/m-tx/tex/mtx.tex new file mode 100644 index 0000000000..398ef5948f --- /dev/null +++ b/support/m-tx/tex/mtx.tex @@ -0,0 +1,253 @@ +% mtx.tex © 2001–2016 Dirk Laurie License: MIT (see file LICENSE) +% Some code © 2001 André van Ryckeghem License: GPL +% Revised font-handling copyright 2019 Bob Tennent License: GPL + +% All TeX commands put directly into PMX files by M-Tx are defined below, +% except the following: +% 1. \input mtx +% 2. User's own inline TeX +% 3. \mtxversion and \mtxdate are defined in prepmx itself +% 4. Utterly basic TeX commands like "\ " and "%" +% It is therefore possible for a TeXpert to tune the performance +% of M-Tx without touching the preprocessor. + +% Commands borrowed unchanged from André van Ryckeghem's mypmxdef.tex +% have AVR prepended to their names. +% All other commands start with the letters "\mtx" except one: +% "\:" is a short alias for "\relax" to save space on input line length + +\ifx\mtxtexversion\undefined\else\endinput\fi + +\def\mtxtexversion{0.63c} +\def\mtxtexdate{15 January 2019} +\let\:=\relax +\immediate\write10{% +mtxTeX \mtxtexversion\space<\mtxtexdate>} + +\input musixtex +\def\musixtexneeded{121} +\ifnum\mxvernumber<\musixtexneeded\immediate\write16{ } +\message{! Requires MusiXTeX Version \musixtexneeded. Please upgrade.}\fi + +\input pmx % needed here otherwise musixlyr does not load correctly +\input musixlyr +\ifx\assignlyricshere\undefined\message{! Your musixlyr.tex is too old}\fi + +% M-Tx font definitions +% \mtxeightsf etc: defines \eightsf etc by analogy to \eightrm. +% \mtxEightsf etc: same, but also immediately does \eightsf. + +% \mtxPalatino: replaces Computer Modern font definitions of +% \eightrm, \eightit, \eightbf etc by Palatino +% \mtxTimes: replaces Computer Modern font definitions of +% \eightrm, \eightit, \eightbf etc by Times +% \mtxHelvetica: replaces Computer Modern font definitions of +% \eightsf etc by Helvetica + +\font\mtxeightsf=cmss8 +\def\mtxEightsf{\mtxeightsf} + +\font\mtxtensf=cmss10 +\def\mtxTensf{\mtxtensf} + +\font\mtxelevensf=cmss10 scaled \magstephalf +\def\mtxElevensf{\mtxelevensf} + +\font\mtxtwelvesf=cmss12 +\def\mtxTwelvesf{\mtxtwelvesf} + +% define "big" Sans fonts for "italic" as well as "Roman" + +\font\mtxfrtsf=cmss12 scaled \magstep1 +\font\mtxfrtsi=cmssi12 scaled \magstep1 + +\font\mtxsvtsf=cmss12 scaled \magstep2 +\font\mtxsvtsi=cmssi12 scaled \magstep2 + +\font\mtxtwtysf=cmss12 scaled \magstep3 +\font\mtxtwtysi=cmssi12 scaled \magstep3 + +\font\mtxtwfvsf=cmss12 scaled \magstep4 +\font\mtxtwfvsi=cmssi12 scaled \magstep4 + +\def\mtxPalatino{ + \input musixplt + \def\bigtype{\bigfont\bf} + \def\Bigtype{\Bigfont\bf} + \def\BIgtype{\BIgfont\bf} + \def\BIGtype{\BIGfont\bf} + \elevenrm +} + +\def\mtxTimes{ + \input musixtmr + \def\bigtype{\bigfont\bf} + \def\Bigtype{\Bigfont\bf} + \def\BIgtype{\BIgfont\bf} + \def\BIGtype{\BIGfont\bf} + \elevenrm +} + +\def\mtxHelvetica{ + \font\mtxeightsf=phvr8t at 8pt + \font\mtxtensf=phvr8t at 10pt + \font\mtxelevensf=phvr8t at 11pt + \font\mtxtwelvesf=phvr8t at 12pt + + \font\mtxfrtsf=phvr8t scaled \magstep2 + \font\mtxfrtsi=phvro8t scaled \magstep2 + + \font\mtxsvtsf=phvr8t scaled \magstep3 + \font\mtxsvtsi=phvro8t scaled \magstep3 + + \font\mtxtwtysf=phvr8t scaled \magstep4 + \font\mtxtwtysi=phvro8t scaled \magstep4 + + \font\mtxtwfvsf=phvr8t scaled \magstep5 + \font\mtxtwfvsi=phvro8t scaled \magstep5 +} + +\def\mtxAllsf{ + \def\bigtype{ + \let\rm\mtxfrtsf + \let\it\mtxfrtsi + \rm + } + \def\Bigtype{ + \let\rm\mtxsvtsf + \let\it\mtxsvtsi + \rm + } + \def\BIgtype{ + \let\rm\mtxtwtysf + \let\it\mtxtwtysi + \rm + } + \def\BIGtype{ + \let\rm\mtxtwfvsf + \let\it\mtxtwfvsi + \rm + } + \mtxelevensf +} + + +\def\mtxInstrfont{\twelvebf} + +% \def\sit\eightit \def\srm\eightrm \def\sbf\eightbf \def\ssf\eightsf +% \def\elevenpt{\def\rm\elevenrm \def\it\elevenit \def\bf\elevenbf} + +% M-Tx music sizes + +\def\mtxTinySize{\tinyvalue} +\def\mtxSmallSize{\smallvalue} +\def\mtxNormalSize{\normalvalue} +\def\mtxLargeSize{\largevalue} +\def\mtxHugeSize{\Largevalue} + +% musixlyr interface + +% TODO: use musixlyr 'here' commands, e.g as in the following line +\def\mtxAt#1{\lyrraisehere{#1\internote}}% +% not emitted by prepmx yet + +\def\mtxSetLyrics#1#2{\setlyrics{#1}{#2}} +\def\mtxCopyLyrics#1#2{\copylyrics{#1}{#2}} +\def\mtxAssignLyrics#1#2{\assignlyrics{#1}{#2}} +\def\mtxAuxLyr#1{\auxlyr{#1}} +\def\mtxLyrlink{\lyrlink} +% +% 2003-08-05, scancm@biobase.dk: corrected definition of \mtxLowLyrlink +% +\def\mtxLowLyrlink{\lowlyrlink} +\def\mtxLyricsAdjust#1#2{\setsongraise{#1}{#2\internote}} +\def\mtxAuxLyricsAdjust#1#2{\auxsetsongraise{#1}{#2\internote}} +\def\mtxLyrModeAlter#1{\lyrmodealter{#1}} +\def\mtxLyrModeNormal#1{\lyrmodenormal{#1}} +\def\mtxBM{\beginmel} +\def\mtxEM{\endmel} +\def\mtxAuxBM{\auxlyr\mtxBM} +\def\mtxAuxEM{\auxlyr\mtxEM} + +% Other macros + +\def\mtxTenorClef#1{\settrebleclefsymbol{#1}\treblelowoct} +\def\mtxVerseNumber#1{#1 } +\def\mtxInterInstrument#1#2{\setinterinstrument{#1}{#2\Interligne}} +\def\mtxStaffBottom#1{\gdef\atnextline{\stafftopmarg #1\Interligne}} +\def\mtxGroup#1#2#3{\grouptop{#1}{#2}\groupbottom{#1}{#3}} +\def\mtxPageHeight#1{\vsize #1} +\def\mtxTwoInstruments#1#2{\vbox{\hbox{#1}\hbox{#2}}} +\def\mtxTitleLine#1{\gdef\mtxTitle{#1}} +\def\mtxComposerLine#1#2{\gdef\mtxPoetComposer{#1\hfill #2}} +\def\mtxInstrName#1{{\mtxInstrfont #1}} +\def\mtxSetSize#1#2{\setsize{#1}{#2}} +\def\mtxDotted{\dotted} +\let\mathflat\flat +\let\mathsharp\sharp +\def\flat{\musixfont\char'062} +\def\sharp{\musixfont\char'064} +%\def\mtxSharp{\raise1ex\hbox{\musicsmallfont\char'064}} +%\def\mtxFlat{\raise1ex\hbox{\musicsmallfont\char'062}} +\def\mtxSharp{\raise1ex\hbox{\sharp}} +\def\mtxFlat{\raise1ex\hbox{\flat}} +\def\mtxIcresc{\icresc} +\def\mtxTcresc{\tcresc} +\def\mtxCresc#1{\crescendo{#1\elemskip}} +\def\mtxIdecresc{\icresc} +\def\mtxTdecresc{\tdecresc} +\def\mtxDecresc#1{\decrescendo{#1\elemskip}} +\def\mtxPF{\ppff} +\def\mtxLchar#1#2{\lchar{#1}{#2}} +\def\mtxCchar#1#2{\cchar{#1}{#2}} +\def\mtxZchar#1#2{\zchar{#1}{#2}} +\def\mtxVerseNumberOffset{3} +\def\mtxVerse{\loffset{\mtxVerseNumberOffset}\lyr} +\makeatletter +\def\comma#1{\check@staff\raise1.2\internote\llap{\BIGfont'\kern#1\noteskip}\fi} +\makeatother + +%\def\mtxVerse{% +% \znotes\minlyrspace=-10cm% to inhibit right-shifting of the numbers +% \llyr\lyroffset{-2}% make the numbers stand off to the left +% \lyr% post the numbers +% \en} + +% Commands taken from André van Ryckeghem's mypmxdef.tex +% Page layout: Letter/A4, A4 only, Letter/A4 centered, A3 +% Use only with plain TeX: these do not interact seamlessly with +% LaTeX page layout commands! +\def\AVRpagforletaiv{% +\hoffset=-12.4mm\hsize=210mm\advance\hsize-23mm% A4 10mm margin +\voffset-15.4mm\vsize=11in\advance\vsize-20mm\advance\vsize-12pt}% letter 10 mm margin +\def\AVRpagforaiv{% +\hoffset=-12.4mm\hsize=210mm\advance\hsize-23mm% +\voffset=-15.4mm\vsize=297mm\advance\vsize-20mm\advance\vsize-12pt}% +\def\AVRpagforaivc{% +\hoffset=-12.4mm\hsize=210mm\advance\hsize-23mm% +\voffset=-7.4mm\vsize=11in\advance\vsize-20mm\advance\vsize-12pt}% +\def\pagforaiii{% +\hoffset=-5.4mm\hsize=297mm\advance\hsize-37mm% +\voffset=-5.4mm\vsize=420mm\advance\vsize-37mm\advance\vsize-12pt}% + +% Next command adapted from AVR's code. Use thus: +% \footline=\mtxFootLine{P1}{P2}{P3}{P4}{P5} +% The footline on pages 3 and 4 look like this: +% P1 - P2 P3 P4 - P5 3 +% 4 P5 - P4 P3 P2 - P1 +% Each parameter should contain its own font selector, or inherit +% whatever was in effect. +\def\mtxFootline#1#2#3#4#5{\ifodd\pageno% +{{{#1}{\rm~---~}{#2}} \hfill {#3} \hfill {#4}{\rm~---~}{#5}{\rm ~~~ }{\bf \folio }}% +\else +{{\bf \folio}{\rm ~~~ }{#5}{\rm~---~}{#4} \hfill {#3} \hfill {#2}{\rm~---~}{#1}}% +\fi} + +% M-Tx default settings + +\sepbarrules +\mtxPalatino +\elevenrm % this will be the lyrics font unless overridden + +\immediate\write10{=== end of mtx.tex ===} +\endinput -- cgit v1.2.3