Skip to content

Files and saving

Action How
New blank score + in the tab strip — one treble staff, 4/4, four empty measures
Open a file ctrl + o, or open file… in the battuta menu
Open by double-click Double-click a .mei (or any supported text format) in your file manager

The open dialog is the system’s own, and it starts in the folder you last opened or saved from. It offers every format battuta can read — MEI plus the import formats below, which convert to MEI as they open.

Each score opens in its own tab, named after the file. The clipboard is shared between tabs, which is what makes cross-file arranging work.

Action How
Save ctrl + s, or save in the battuta menu — writes to the score’s own path, silently
Save as ctrl + shift + s — asks where, and renames the tab

A score with no path yet (a new one) turns ctrl + s into save-as. A toast confirms every write.

In a browser instead of the desktop app, saving downloads the file and opening uses the browser’s file picker; nothing else differs.

On an iPhone, an iPad or an Android tablet or phone, battuta keeps your scores in its own folder — in the Files app it is On My iPad › battuta (On My iPhone on a phone); on Android it is battuta’s documents folder (Android/data/com.vibetuned.battuta/files/Documents). The folder view shows it: there is no folder to choose.

Action On a tablet or a phone
Save A score from battuta’s folder saves in place, as on the desktop. A new or imported score’s first save puts it in battuta’s folder under its tab’s name — untitled-1.mei, or untitled-1 2.mei if that name is taken; nothing is overwritten. Rename it in the folder view (✎) and the tab follows.
Open a file The system’s document picker: anything on the tablet or in your cloud drives. The score opens as a new tab; its first save puts it in battuta’s folder.
Save a copy save a copy… in the battuta menu (or ctrl + shift + s on a keyboard) sends a copy out through the system’s save sheet — to Downloads, a cloud drive, another app’s folder. The tab keeps its own file.
Share share… in the battuta menu hands the score, as MEI, to the system’s share sheet: AirDrop, Mail, Quick Share, another app.
Export Every export format goes out through the save sheet too.

Scores need not live in battuta’s folder: the folder view opens any folder you pick — on an iPad in Files or iCloud Drive, on Android anywhere on the tablet or in a cloud drive — and a score opened from there saves back where it is.

The picker shows every file: Android’s picker cannot tell an .mei score from any other file, so battuta checks what you chose and says so when it is not a score it opens.

A tab shows * while the document has unsaved changes. It is computed from the undo stack rather than from “something happened”, so undoing back to the state you last saved clears the star — as it should.

The open tabs — documents, names, paths, dirty stars, which tab was active — persist continuously (a moment after every edit, and once more as the window closes). Closing the app or crashing loses at most the last second of work: the next start brings the whole session back, restored-dirty tabs keeping their star until you actually save.

Closing a starred tab asks before discarding its edits; clean tabs close silently. Closing the window never asks — the session is saved and will be restored instead.

In the desktop app, battuta records each file’s modification time when it opens or saves it. If another program has rewritten the file since, ctrl + s alerts you before overwriting the external changes — save-as keeps both versions.

Plain MEI, pretty-printed with two-space indentation, and everything your file came in with:

  • meiHead and all metadata
  • elements and attributes battuta has no UI for
  • comments and processing instructions
  • your xml:ids — a saved file reloads without needing a single new one

Serialisation is a fixpoint: saving a file battuta saved produces the same bytes. Reopening a save produces the same tree. That is what makes the editor safe to put in the middle of a pipeline — or in git, where a diff shows exactly the edit you made and nothing else.

One compatibility adjustment: comments sitting before the root element are moved just inside <mei>, because Verovio rejects a document with them outside. Processing instructions such as <?xml-model?> are left where they are.

MEI keeps two accidentals on a note: @accid, the one printed, and @accid.ges, the one it sounds with. A B under one flat is printed plain but sounds B♭, and many readers — Verovio’s MIDI, and the tools built on it — take a note without @accid.ges at its bare letter, B♮. So battuta writes @accid.ges wherever a note without a printed accidental sounds altered: by the key signature, by an accidental earlier in the measure (same staff, same line or space), or through a tie from the measure before. A note that sounds natural carries none — the convention MEI converters follow.

It does this on every edit, as part of the edit — so it undoes with it — and when a file is opened, so a file saved without them (by hand, by another tool, by an older battuta) gets them on its next save. A note that keeps its accidentals in an <accid> child element keeps them there: battuta writes both accidentals into the child rather than adding a second one beside it.

Some tools emit MEI with duplicate xml:ids. Because battuta addresses everything by id, that causes strange behaviour — an edit that lands on the wrong note, a control event that follows the wrong anchor. The battuta menu’s regenerate ids re-mints every id in the document and rewrites every reference (startid, endid, plist, …) to match. One undo step, and the file is sound afterwards.

MEI is the working format — what you edit, what save writes. Around it, everything Verovio can convert is available on the way in and out.

Opening any of these converts it to MEI as it opens:

Format Extensions
MusicXML .musicxml, .xml (told apart from MEI by content)
Compressed MusicXML .mxl
ABC .abc
Plaine & Easie .pae
Humdrum kern .krn, .kern

An imported score opens as a new, unsaved document — deliberately, so a plain ctrl + s can never overwrite your .musicxml or .krn source with MEI. Save gives it its own .mei path. The first import loads the converter in the background (a few extra seconds, once per session).

The battuta menu exports the open score:

Export What you get
playback MIDI (.mid) battuta’s performed form: repeats, voltas and one D.S./D.C. jump expanded, tie chains as single held notes, staccato/legato gates — exactly what the player plays
MIDI (written score) (.mid) Verovio’s MIDI of the notation as written
SVG (pages) (.svg) The page-view engraving, one file per page
Humdrum kern (.krn) For the Humdrum toolchain
Plaine & Easie (.pae) Incipit code

There is no MusicXML export — Verovio converts from MusicXML but not to it — and no PDF yet (the SVG pages print well from a browser).