# man > autosp(1)

---
type: CommandReference
command: autosp
mode: man
section: 1
source: man-pages
---

## Quick Reference
- `autosp infile.aspc` — process `infile.aspc`, write `infile.tex`  
- `autosp infile.aspc outfile` — specify output filename (`.tex` appended if missing)  
- `autosp -l infile.aspc` — generate detailed log `infile.alog`  
- `autosp -d infile.aspc` — skip extra space for dotted beamed notes  
- `autosp infile` — if `infile.aspc` exists, process it  
- `autosp -h` — show help message  
- `autosp -v` — show version  

## Name
autosp – preprocessor to generate note-spacing commands for MusiXTeX scores  

## Synopsis
text
autosp [-v | --version | -h | --help]
autosp [-d | --dotted] [-l | --log] infile[.aspc] [outfile[.tex]]
## Description

### Operation
`autosp` converts non‑standard `\anotes … \en` blocks into conventional note‑spacing commands (`\notes`, `\Notes`, `\NOtes`, etc.) based on the actual note values, inserting `\sk` where needed.  
- Measures can be coded part by part; line breaks and spaces inside `\anotes` are removed from the output.  
- If no `.aspc` extension is given, `infile.aspc` is tried; output defaults to `infile.tex` (or `infile.ltx` if `\documentclass` is found).  
- With `-l` a detailed log `infile.alog` is written.  
- With `-d`, dotted beamed notes of the form `\qb{*n*}{*.*p*}` do **not** receive extra space; it is assumed the following note will be shifted by a `\roff`‑style command or a spacing command such as `\qsk` or `\hqsk`.  
- Single‑staff scores merge consecutive whole‑bar rests into multi‑bar rests. Bar‑centered rests can be coded with the non‑standard `\Cpause` (or `\Cp`).  
- Source `\sk` and `\bsk` are discarded; “small” skips (`\hsk`, `\qsk`, `\tqsk`, `\hqsk`, `\qqsk`) and small backward skips are preserved.  
- Non‑standard global skip commands `\QQsk`, `\HQsk`, `\TQsk`, `\Qsk` insert the effect of `\qqsk`, `\hqsk`, `\tqsk`, `\qsk` respectively in **every** staff. In collective coding, up to four commas produce these skips.  
- In collective coding, `\tqsk` (or `\qsk` for double‑flats) is automatically inserted before accidentals on notes, unless the preceding note is a “virtual” (skip) note. Use explicit accidental commands (`\sh`, `\fl`, `\na`, …) to suppress this spacing.  
- Empty note segments are allowed; if a segment needs a “space”, its value must be explicit: `\ha{*}`, `\qa{*}`, `\ca{*}`, etc.  
- From version 2017‑06‑14, `\TransformNotes` is handled by `autosp`, enabling `musixlyr`.  
- Beamed‑note spacing follows beam multiplicity: `\ib…` → `\Notes`, `\ibb…` → `\notes`, etc. Collective coding sequences are expanded into individual notes. Instrument‑size scaling is applied.

### Limitations
- Assumes `&` and `|` are used to separate instruments and staffs (not `\nextinstrument` / `\nextstaff`).  
- Appoggiaturas and grace notes (recognized by `\tinynotesize`) get 1.45`\elemskip`; if inappropriate, use a `\vnotes` command.  
- Supports *x*‑tuplets via `\xtuplet{*x*}` / `\xxtuplet{*x:y*}` and triplets via `\triolet`, `\uptrio`, `\downtrio`, `\uptuplet`, `\downtuplet`. Assumed duration is (*x*‑1)/*x* of the apparent tuplet length. For non‑standard tuplets use explicit `\vnotes`. Displaced `\txt` numerals can be handled with `\Triolet` (no arguments) or `\Xtuplet{*k*}\` and manual placement with `\zcn`.  
- Simultaneous *x*‑tuplets in multiple staffs work only if the *x* values and total note durations are identical.  
- To align a beamed sixteenth with the third note of a triplet eighth in another staff, use `\hbsk`: `\ibl0L0\qb0{.L}\hbsk\tqql0L`.  
- User‑defined macros are not expanded, except `\def\atnextbar{\znotes … \en}` (which respects `\TransformNotes`).  
- All staffs are assumed to have the same meter; see `kinder2.aspc` for a workaround.  
- Not effective for multi‑voice single‑staff music; consider separate staffs per voice or omit voices.

## Options
- `-v`, `--version` — print version and exit  
- `-h`, `--help` — print help and exit  
- `-d`, `--dotted` — do **not** give extra space to dotted beamed notes (assumes subsequent note shift)  
- `-l`, `--log` — write detailed processing log to *infile*.alog  

## Examples
Input (excerpt):
tex
\anotes\qa J\qa K&\ca l\qa m\ca n\en
Output generated by `autosp`:
tex
\Notes\qa J\sk\qa K\sk&\ca l\qa m\sk\ca n\en
## See Also
- [`msxlint(1)`](http://localhost/phpMan.php/man/msxlint/1/markdown)  
- [`tex2aspc(1)`](http://localhost/phpMan.php/man/tex2aspc/1/markdown)  
- `musixdoc.pdf`