summaryrefslogtreecommitdiff
path: root/macros/musixtnt
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/musixtnt
Initial commit
Diffstat (limited to 'macros/musixtnt')
-rw-r--r--macros/musixtnt/README49
-rw-r--r--macros/musixtnt/doc/TransformNotes.398
-rw-r--r--macros/musixtnt/doc/TransformNotes.pdfbin0 -> 6616 bytes
-rw-r--r--macros/musixtnt/doc/msxlint.136
-rw-r--r--macros/musixtnt/doc/msxlint.pdfbin0 -> 4148 bytes
-rwxr-xr-xmacros/musixtnt/macosx/msxlintbin0 -> 19544 bytes
-rw-r--r--macros/musixtnt/tex/musixtnt.tex30
7 files changed, 213 insertions, 0 deletions
diff --git a/macros/musixtnt/README b/macros/musixtnt/README
new file mode 100644
index 0000000000..78adcc1c8a
--- /dev/null
+++ b/macros/musixtnt/README
@@ -0,0 +1,49 @@
+This archive contains a MusiXTeX extension library
+musixtnt.tex and C source code, binaries for Windows (32
+bit and 64 bit) and MacOSX, and documentation for a program
+msxlint.
+
+musixtnt.tex provides a macro \TransformNotes that
+enables transformations of the effect of notes
+commands such as \notes. In general, the effect of
+\TransformNotes{input}{output} is that notes commands in
+the source will expect their arguments to match the input
+pattern, but the notes will be typeset according to the
+output pattern. An example is extracting single-instrument
+parts from a multi-instrument score.
+
+msxlint detects incorrectly formatted notes lines in a
+MusiXTeX source file. This should be used before using
+\TransformNotes.
+
+To install:
+
+Create texmf/tex/generic/musixtnt in a local or personal
+texmf tree and move musixtnt.tex into it.
+
+Create texmf/doc/generic/musixtnt and move there the files
+in the doc directory.
+
+Update the file-name database as required by your TeX
+installation.
+
+If your platform is UNIX-like, process the
+musixtnt-<version>.tar.gz file as usual (tar zxvf ...,
+./configure, make, make install).
+
+If your platform is Windows, move the executable msxlint.exe
+from either the 32bit or the 64bit folder to a folder on the
+executable PATH.
+
+If your platform is Mac OS-X, install the executable from
+the macosx directory.
+
+musixtnt.tex, utils.c and msxlint.c are licensed under the
+GPL version 2 or (at your option) any later version.
+
+Please report bugs and experience (good or bad) using these
+programs to me.
+
+Bob Tennent
+rdt(at)cs(dot)queensu(dot)ca
+2016-01-30
diff --git a/macros/musixtnt/doc/TransformNotes.3 b/macros/musixtnt/doc/TransformNotes.3
new file mode 100644
index 0000000000..752aa02985
--- /dev/null
+++ b/macros/musixtnt/doc/TransformNotes.3
@@ -0,0 +1,98 @@
+.TH TransformNotes 3 2016-01-30 "" ""
+
+.SH NAME
+TransformNotes \- macro to transform notes command arguments in MusiXTeX
+
+.SH SYNOPSIS
+.nf
+
+ \\input musixtnt
+
+ \\TransformNotes{input}{output}%
+
+.fi
+
+.SH USAGE
+
+musixtnt.tex is an extension library for MusiXTeX. It is available
+at CTAN and at WIMA in the software archive.
+
+\\TransformNotes makes possible transformations of the effect of notes commands such as
+\\notes. In general, the effect of \\TransformNotes{input}{output}
+is that notes commands in the source will expect their arguments to match the input pattern,
+but the notes will be typeset according to the output pattern.
+
+For example, \\TransformNotes{#2&#3&#4&#5}{#2&#3&#5}%
+would be appropriate for a four-instrument score (arguments #2, #3, #4, and #5, separated by three
+&s), but the notes for the usual third argument (#4) will be discarded in the typeset output.
+
+The instrument/staff numbers in the first argument must start at 2 and increase
+consecutively, using & (or | for multi-staff instruments) as a separator.
+The reason that the segment identifiers start at 2 is that argument #1 for the
+basic \\vnotes macro
+is a spacing parameter.
+It is
+essential that every \\znotes, \\notes, \\Notes, \\NOtes, etc. command in
+the score match the pattern of the first argument to \\TransformNotes exactly; too few (or too many)
+note segments will result in unintentionally discarded material and possibly compilation failure.
+An auxiliary program
+.BR msxlint (1)
+can be used to detect such inconsistencies.
+Notes commands are assumed to be terminated by \\en, not \\enotes.
+
+\\TransformNotes may be used anywhere between \\startpiece
+and the command that ends the piece.
+
+To extract
+a single-instrument part from a (copy of a) multi-instrument musixtex score:
+set \\nbinstrument to 1 (for example, with command \\instrumentnumber1),
+and use \\TransformNotes to discard all but one of the note segments in notes
+commands.
+For example, the following line placed after
+\\startpiece (but before any note commands) would be appropriate for a
+four-instrument score and will result in a single-instrument part for the second of
+these: \\TransformNotes{#2&#3&#4&#5}{#3}% .
+
+Some additional revisions to the source for the part might be necessary:
+
+ + adjusting \\setname1, \\setclef1, \\setsign1,
+\\setmeter1 and \\setstaffs1 commands, as necessary;
+
+ + ensuring that tempo and roadmap markings (D.C., Fine, etc.) are in
+the appropriate instrument segment;
+
+When the extracted part score is compiled and viewed, it may be seen
+that horizontal-spacing commands designed for multiple instruments can produce bad
+spacing when used for a single instrument. Bad spacing can be corrected manually but
+this is very tedious; an auxiliary program called
+.BR autosp (1)
+automates this process; it is available at WIMA
+in the software archive.
+
+The \\TransformNotes macro may be used for other purposes. Here are some examples:
+
+\\TransformNotes{#2&#3}{#2&\\transpose+7#3}%
+will transpose just the second instrument (argument #3).
+
+\\TransformNotes{#2|#3&#4}{#2|#3&\\tinynotesize#4}%
+will begin typesetting the notes of the second instrument (#4) in tiny size.
+
+\\TransformNotes{#2&#3}{#3&#2}%
+will switch the order of the two instruments.
+
+\\TransformNotes{#2&#3}{#2&#3}%
+will restore normal two-instrument processing.
+
+.SH LIMITATIONS
+The \\TransformNotes macro is currently incompatible with the musixlyr extension
+package for lyrics.
+
+.SH SEE ALSO
+.BR msxlint (1),
+.BR autosp (1)
+.PP
+musixdoc.pdf
+
+.SH AUTHOR
+This manual page was written by Bob Tennent <rdt@cs.queensu.ca>.
+
diff --git a/macros/musixtnt/doc/TransformNotes.pdf b/macros/musixtnt/doc/TransformNotes.pdf
new file mode 100644
index 0000000000..2cd529e031
--- /dev/null
+++ b/macros/musixtnt/doc/TransformNotes.pdf
Binary files differ
diff --git a/macros/musixtnt/doc/msxlint.1 b/macros/musixtnt/doc/msxlint.1
new file mode 100644
index 0000000000..d0a3f695ae
--- /dev/null
+++ b/macros/musixtnt/doc/msxlint.1
@@ -0,0 +1,36 @@
+.\" This manpage is licensed under the GNU Public License
+.TH MSXLINT 1 2015-02-05 "" ""
+
+.SH NAME
+msxlint \- detects incorrectly formatted notes lines in a MusiXTeX source file.
+
+.SH SYNOPSIS
+.B msxlint
+.RB [ \-v\ |\ \-\-version\ |\ \-h\ |\ \-\-help ]
+
+.B msxlint
+.RB [ \-d\ | \ \-\-debug ]...
+.RI [ infile [ \fB.tex\fP ]...]
+
+If no
+.IR infiles
+are specifed, standard input is used.
+
+.SH USAGE
+
+The format that notes commands are expected to match is
+determined by \\instrumentnumber and \\setstaffs commands, or
+uses of the \\TransformNotes macro defined in musixtnt.tex (see musixdoc.pdf), or re-definitions of the \\vnotes macro.
+Output consists of messages about format errors,
+with listings of the ill-formatted lines.
+
+.SH LIMITATIONS
+User-defined macros are not processed or expanded. Notes commands (\\notes, \\Notes, etc.)
+can have line breaks, but other commands must fit on one line.
+.SH SEE ALSO
+.BR fixmsxpart (1)
+.PP
+musixdoc.pdf
+
+.SH AUTHOR
+This program and manual page were written by Bob Tennent <rdt@cs.queensu.ca>.
diff --git a/macros/musixtnt/doc/msxlint.pdf b/macros/musixtnt/doc/msxlint.pdf
new file mode 100644
index 0000000000..a0a3ecd26a
--- /dev/null
+++ b/macros/musixtnt/doc/msxlint.pdf
Binary files differ
diff --git a/macros/musixtnt/macosx/msxlint b/macros/musixtnt/macosx/msxlint
new file mode 100755
index 0000000000..3adb0ec571
--- /dev/null
+++ b/macros/musixtnt/macosx/msxlint
Binary files differ
diff --git a/macros/musixtnt/tex/musixtnt.tex b/macros/musixtnt/tex/musixtnt.tex
new file mode 100644
index 0000000000..421168907a
--- /dev/null
+++ b/macros/musixtnt/tex/musixtnt.tex
@@ -0,0 +1,30 @@
+%
+% MusiXtnt.tex is free software; you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation; either version 2, or (at your option)
+% any later version.
+%
+% MusiXtnt.tex is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with MusiXtnt; see the file COPYING. If not, write to
+% the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+% Boston, MA 02111-1307, USA.
+%
+% Copyright 2015 Bob Tennent rdt@cs.queensu.ca
+%
+\immediate\write16{MusiXtnt\space<18 February 2015>}%
+
+\edef\catcodeat{\the\catcode`\@}\catcode`\@=11
+
+\ifx\setlyrics\undefined%
+\gdef\TransformNotes#1#2{\def\vnotes##1\elemskip#1\en{\noteskip##1\@l@mskip\@vnotes#2\en}}%
+\else\errmessage{Musixtnt is incompatible with musixlyr}%
+\fi
+
+\catcode`\@=\catcodeat
+%
+\endinput