Re: Lilypond to MusicXML

Tina Petzel <[email protected]> Thu, 23 Jul 2026 13:46:35 +0200
Newsgroups gmane.comp.gnu.lilypond.general
Message-ID <[email protected]>
--nextPartaCtrPhyRQVG_XhR4JLnaLA
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"; protected-headers="v1"
From: Tina Petzel <[email protected]>
To: Werner LEMBERG <[email protected]>, [email protected]
Subject: Re: Lilypond to MusicXML
Date: Thu, 23 Jul 2026 13:46:35 +0200
Message-ID: <[email protected]>
In-Reply-To:  <CADpZ8yeEO8_vW9V9gbfyZdKjp8FY9BaBvO4n5485Qw6kRX4n7g@mail.gmail.com>
MIME-Version: 1.0

Hi all,

> Lilypond's MIDI output can work as a viable intermediate step, depending =
on
> the complexity of the music. Requires subsequent manual inspection for
> enharmonic misspellings.

MIDI output can be imported by many music software, but really it is limite=
d to=20
notes (without enharmonic details), individual note velocity, tempo and som=
e=20
amount of stuff like lyrics. This at most work for getting playable notes i=
nto=20
another program (which I have done a lot), but not much more.

> > > Just learned of MusicXML and I see there is a command line utility
> > > for importing MusicXML files to Lilypond.
> > >=20
> > > Is there a utility to export Lilypond to MusicXML [...]
> >=20
> > Not really.  However, have a look at
> >=20
> >   https://codeberg.org/tinapetzel/ly-mxml
> >=20
> > This project aims to create a MusicXML backend for LilyPond.  It's
> > still in its infancy, though.

Yes, this one is created by me. The aim is not to cover everything but to=20
stably cover the base features that suffice for 99.8% of all scores. Please=
 try=20
it, and see if it works out for your purposes. If not, maybe tell what is n=
ot=20
working out, so I might be able to fix/implement it.

To use it, just download the project and place it somewhere that is include=
d=20
by Lilypond, include the `base/export.ily` and add this to your document:

\layout {=20
  \musicXMLExport "path/to/output.musicxml"

  \musicXMLAll % \musicXMLAllNoBreaks if you don't want to export line brea=
ks
}

(if you have multiple scores you need to specify the output path in score=20
layout).

Then call lilypond =E2=80=99pon your file and you should hopefully get a wo=
rking=20
musicxml version of it in the specified place.

Cheers,
Tina

--nextPartaCtrPhyRQVG_XhR4JLnaLA
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQS0sdUK2Lu8of48K2+FHhaCPe7BywUCamH/GwAKCRCFHhaCPe7B
y/j8AQD9sftxsvP06xoyFMEFfQKo+YviLW95sSggFZOEUzB0CgEA3y16qQDrXI5F
cEaBRmtjWIQ4r6E13IU1+idd+aeTJQg=
=2mMq
-----END PGP SIGNATURE-----

--nextPartaCtrPhyRQVG_XhR4JLnaLA--