AUTOSP(1)

🌟 AUTOSP(1) β€” the autosp glow-up ✨

okay bestie, sit DOWN, because we're talking about autosp, the preprocessor that generates note-spacing commands for MusiXTeX scores. it's giving main character energy for your sheet music pipeline and honestly? obsessed. πŸ’–


πŸ’… NAME πŸ’…

autosp β€” a preprocessor that generates note-spacing commands for MusiXTeX scores. no cap, that's literally the whole job and she does it flawlessly.


πŸŽ€ SYNOPSIS πŸŽ€

autosp [-v | --version | -h | --help]

autosp [-d | --dotted] [-l | --log] infile[.aspc] [outfile[.tex]]

✨ DESCRIPTION ✨

so here's the tea: this program makes creating MusiXTeX scores so much easier by converting (non-standard) commands of the form \anotes ... \en (or \an ... \en) into one or more conventional note-spacing commands (\notes \Notes \NOtes ...), determined by the actual note values, with \sk spacing commands inserted as necessary. you can enter the coding for an entire measure one part at a time, without ever worrying about note-spacing changes inside the part or the spacing needs of other parts. it's giving ✨liberation✨.

for example, if applied to

\anotes\qa J\qa K&\ca l\qa m\ca n\en

autosp generates

\Notes\qa J\sk\qa K\sk&\ca l\qa m\sk\ca n\en

typically, an \anotes command generates several conventional note-spacing commands. she's productive like that. πŸ’…

if the infile argument doesn't have an .aspc extension, input is taken from infile.aspc if that file exists.

if the outfile argument doesn't have a .tex extension, output is sent to outfile.tex. and if you don't give an outfile argument at all, output goes to infile.tex (or to infile.ltx if a \documentclass declaration is encountered). she adapts. she's flexible. πŸ¦‹

for \anotes commands, line breaks and spaces may precede note segments, allowing more flexible source formatting β€” the line breaks and spaces get elided from the output. yes, your chaotic formatting is safe with her.

for example,

\an
  \ibl0K0\qb0K\nbbl0\qb0{.K}\tbbbl0\tbbl0\tql0L&
  \ibbl1m{-2}\qb1{.m}\tbbbl1\tbbl1\qb1l\tql1k\en

is acceptable and generates

\notesp\ibl0K0\qb0K&\ibbl1m{-2}\qb1{.m}\en
\nnotes\sk&\tbbbl1\tbbl1\qb1l\en
\notesp\nbbl0\qb0{.K}&\tql1k\en
\nnotes\tbbbl0\tbbl0\tql0L&\sk\en

if the -l ( --log ) option is used, a very detailed log infile.alog is generated. she keeps receipts. πŸ“

if the -d ( --dotted ) option is used, dotted beam notes of the form \qb{n}{.p} are not given extra space; it's assumed that the subsequent note will be shifted by a \roff-like command or a spacing command such as \qsk or \hqsk. commands of the form \qlp{p}, \qlpp{p}, ..., \qpb{n}{p} and \qppb{n}{p} are always spaced as indicated.

if there's a single staff, consecutive whole-bar rest bars are merged into a multi-bar rest. bar-centered rests can be coded using the standard \def\atnextbar notation but the non-standard command \Cpause (or \Cp) in a note segment also generates a bar-centered rest. cute AND functional. πŸŽ€

spacing commands \sk and \bsk in the source are discarded, but not "small" skips \hsk, \qsk, \tqsk, \hqsk or \qqsk, or the small "backward" skips \hbsk, \bqsk, \btsk, or \bhsk. moreover, non-standard commands \QQsk, \HQsk \TQsk and \Qsk in the source generate "global" skips; i.e., the effect of \qqsk, \hqsk, \tqsk or \qsk, respectively, in every staff. these ensure that staffs remain synchronized if additional spacing is needed in any staff(s). team players only. 🫢

global skips may also be obtained within collective-coding sequences by using up to four successive commas to get the effects of \QQsk, \HQsk, \TQsk or \Qsk, respectively. global skips \tqsk (or, for double-flats, \qsk) are automatically inserted before accidentals ('^', '_', '=', '<', '>') on collective-coding notes (except when the preceding note is "virtual"; i.e., a skip). if this automatic additional spacing is not wanted in some context, it may be avoided by replacing the accidental in the collective-coding sequence by any of the explicit accidental commands: \sh, \fl, \na, \smallsh, \bigsh, etc. and if the automatic spacing is insufficient, the spacing may be increased by adding sufficient commas or using a conventional notes command instead of \an.

a note segment can be completely empty, but if a note segment should start with or contain a "space," the note-value of that space must be made explicit with a command of the form \ha{*}, \qa{.*}, \qa{*}, \ca{*}, etc.

from version 2017-06-14, the effects of \TransformNotes calls are implemented by the autosp pre-processor. this enables use of musixlyr in autosp scores; musixlyr.tex is incompatible with the musixtnt.tex implementation of \TransformNotes. glow-up era. πŸ”₯

all other conventional MusiXTeX commands are output exactly as given in the input. she does not touch what she does not need to touch. πŸ’…


πŸ”₯ OPERATION πŸ”₯

autosp determines the spacing for ordinary notes from the note commands themselves; for example,

  • \qa, \qu, \ql, \qp result in \NOtes;
  • \ca, \cu, \cl, \ds result in \Notes;

and so on. she just knows. πŸ‘‘

the spacing for beamed notes is determined by the beam multiplicity, so that \ib... results in \Notes, \ibb... results in \notes, etc.

collective coding of note sequences (including accidentals and dots) is handled by expanding the sequence into a sequence of individual note commands.

autosp scales notes by the relevant instrument-size value.


πŸ’€ LIMITATIONS πŸ’€

okay bestie, here's the honest part. no gatekeeping. πŸ™ˆ

autosp assumes that & and | (rather than \nextinstrument and \nextstaff) are used to separate instruments and staffs.

appoggiaturas and grace notes are recognized by the use of \tinynotesize; note-spacing of 1.45\elemskip is used. if this isn't suitable and can't be corrected with a small skip, a \vnotes command with any desired spacing can be used.

autosp supports x-tuplets introduced using \xtuplet{x} or \xxtuplet{x:y} and triplets introduced using any of the following commands (regardless of any re-definition of \txt or \tuplettxt):

\triolet
\uptrio
\downtrio
\uptuplet
\downtuplet

autosp assumes that an x-tuplet is to be played in (x-1)/x of the apparent x-tuplet duration. so, for example, a triplet in eighths is assumed to be played in the time of one quarter note. if this assumption isn't valid, the x-tuplet must be coded explicitly using a suitable \vnotes command; see the first measure of barsant2.aspc for an example of a non-standard x-tuplet: a 5-tuple of 64th notes with an intended duration of six 64ths.

in some polyrhythmic scores, the \txt numeral may be displaced, even if the notes themselves are correctly spaced. in these cases, it's possible to suppress the normal output of \txt by using the non-standard commands \Triolet (no arguments) or \Xtuplet{k}\ and placing a numeral at the correct location using \zcn (i.e., \zcharnote).

autosp can deal with simultaneous x-tuplets in multiple staffs provided the x values and total note durations are identical.

in some baroque scores, particularly by J.S. Bach, a beamed sixteenth note is vertically aligned with the third note of a triplet of eighth notes in another staff (implying that they should be sounded simultaneously); e.g.,

\ibl0L0\qb0{.L}\tqql0L

would be played as if notated

\uptrio{b}10\ql L\hroff{\cl L}

the following coding will align the beamed sixteenth note with the third note of a triplet in another staff:

\ibl0L0\qb0{.L}\hbsk\tqql0L

and, similarly, for triplets of sixteenth notes:

\ibbu0J0\qb0{.J}\hbsk\nqqqu0J\qb0{.J}\hbsk\tqqqu0J

generally, user-defined macros are not processed or expanded; however, definitions of the form

\def\atnextbar{\znotes ... \en}

generate definitions that do take account of \TransformNotes.

all staffs are assumed to have the same meter; see kinder2.aspc for an example of how to work around this.

autosp may not be effective for music with more than one voice in a single staff. it might be advisable to use a separate staff for each voice, to avoid \anotes when necessary, or to omit certain voices initially and add them into the resulting TeX file. not her fault, she's just built different. 😭


🌈 EXAMPLES 🌈

see files quod2.aspc, kinder2.aspc, geminiani.aspc and barsant2.aspc for scores suitable for input to autosp. the program tex2aspc can be used to convert "legacy" MusiXTeX scores to .aspc format. legacy to slay-gacy. ⭐


πŸ¦‹ SEE ALSO πŸ¦‹

msxlint(1) tex2aspc(1)

musixdoc.pdf


πŸ‘‘ AUTHOR πŸ‘‘

this program and manual page were written by Bob Tennent <rdt@cs.queensu.ca>. iconic behavior fr fr. πŸ’œ


and that's the whole vibe check bestie β€” page autosp from AUTOSP(1), dated 2023-09-01. go make some beautiful scores, you've got this. πŸŽ€βœ¨πŸŒΈ

πŸ“¦ where this page comes from