nCoda Lychee Docs

LilyPond

Converts an MEI document to a LilyPond document.

Warning

This module is intended for internal Lychee use only, so the API may change without notice. If you wish to use this module outside Lychee, please contact us to discuss the best way.

Tip

We recommend that you use the converters indirectly. Refer to How to Use the Converters for more information.

lychee.converters.outbound.lilypond.chord(m_chord, context=None)[source]
lychee.converters.outbound.lilypond.clef(m_staffdef, context=None)[source]
lychee.converters.outbound.lilypond.convert(document, user_settings=None, **kwargs)[source]

Convert an MEI document into a LilyPond document.

Parameters:document (xml.etree.ElementTree.Element or xml.etree.ElementTree.ElementTree) – The MEI document. Must be provided as a kwarg.
Returns:The corresponding LilyPond document.
Return type:str
Raises:lychee.exceptions.OutboundConversionError when there is a forseeable error.
lychee.converters.outbound.lilypond.duration(m_thing, context=None)[source]

Extract the duration of an MEI object – note, chord, or rest – as a LilyPond duration string.

lychee.converters.outbound.lilypond.key(m_staffdef, context=None)[source]
lychee.converters.outbound.lilypond.layer(m_layer, context=None)[source]

Convert an MEI layer element to a LilyPond string.

lychee.converters.outbound.lilypond.layers(m_container, context=None)[source]

Convert the contents of any MEI element containing multiple layers, interpreted as parallel music, to an array of LilyPond strings to be joined together with whitespace.

lychee.converters.outbound.lilypond.measure(m_meas, context=None)[source]
lychee.converters.outbound.lilypond.measure_rest(m_measure_rest, context=None)[source]
lychee.converters.outbound.lilypond.meter(m_staffdef, context=None)[source]
lychee.converters.outbound.lilypond.note(m_note, context=None)[source]
lychee.converters.outbound.lilypond.rest(m_rest, context=None)[source]
lychee.converters.outbound.lilypond.section(m_section, context=None)[source]
lychee.converters.outbound.lilypond.sequential_music(m_container, context=None)[source]

Convert the contents of any MEI element, interpreted as a container of sequential music, to an array of LilyPond strings to be joined together with whitespace.

lychee.converters.outbound.lilypond.slur(m_thing, context=None)[source]

Find the LilyPond slur string of an MEI object.

lychee.converters.outbound.lilypond.staff(m_staff, m_staffdef, context=None)[source]
lychee.converters.outbound.lilypond.staffdef(m_staffdef, context=None)[source]

Convert an “inline” staffDef (one that appears inside a layer) to LilyPond code.

lychee.converters.outbound.lilypond.tie(m_thing, context=None)[source]

Find the LilyPond tie string of an MEI object.