# `mix mx.scan`
[🔗](https://github.com/mx-music/mx/blob/main/lib/mix/tasks/mx.scan.ex#L1)

Prepares the pages of a scanned score, reads the music on them with Audiveris or with a transcription model, and writes it as MusicXML beside the scan, ready for `mix mx.import`.

    mix mx.scan score.pdf --pages 3-4

It reads a PDF, or a single page as a PNG, JPEG or TIFF image.
`--pages` picks pages of a PDF, numbered as the PDF numbers them, such as `--pages 3-4` or `--pages 5`.
`--raw` gives Audiveris the pages as they are, without preparing them.
`--model` reads the music with the transcription model of `Mx.Transcriber` instead of Audiveris: it cuts each prepared page into its systems and transcribes them one by one, which suits printed piano music and degraded copies better than Audiveris.
`--out` names another path for the MusicXML, and `--force` writes over one that exists.

The prepared pages, and Audiveris's books of them or the systems and the ABC the model wrote for each, go in a folder beside the MusicXML.
See documentation/audiveris.md for installing Audiveris.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
