-
Notifications
You must be signed in to change notification settings - Fork 10
Neon‐Verovio File Conversion
Neon uses Verovio for rendering and editing. For Verovio to work with Neon, we need to convert the MEI files input to Neon to a structure that Verovio uses. This requires 2 conversions:
-
Neon MEItoVerovio score-based structure(in NeonConvertMei.ts) -
Verovio score-based structuretoVerovio page-based structure(inside Verovio)
In Neon MEI, the mdiv element structure is:
/mdiv
/score
/section
/staff
/layer
/pb
/sb
(staff content)
/sb
(staff content)
...
For verovio to render for Neon, we first need to set facsimile with @type="transcription". And then convert the file structure to:
/mdiv
/score
/section*
/pb
/sb
/section@type="neon-neume-line" (i.e, measure)
/staff
/layer
(staff content)
/sb
/section@type="neon-neume-line" (i.e, measure)
/staff
/layer
(staff content)
...
In Neon, we need to manually set each section with @type="neon-neume-line". When Verovio loads the file, section@type="neon-neume-line" will be a Measure object in Verovio.
Where turning the MEI file into a page-based structure, some elements that are containers of other elements in the tree become milestones because the hierarchy is changing.
Verovio paged-based structure:
/pages
/page
/mdiv (page milestone start)
/score (page milestone start)
/system
/section (system milestone start)
/pb
/sb
/measure (i.e. section@type="neon-neume-line")
/staff
/layer
(staff content)
/system
/sb
/measure (i.e. section@type="neon-neume-line")
/staff
/layer
(staff content)
...
/system
/sb
/measure (i.e. section@type="neon-neume-line")
/staff
/layer
(staff content)
/system milestone end (pointing to /section)
/page milestone end (pointing to /score)
/page milestone end (pointing to /mdiv)
Therefore, in Verovio EditorToolkitNeume::SortStaves(), we need to make sure that:
-
sectionis the first child of the firstsystem -
pbis the second child of the firstsystem -
system milestone endis the last child of the lastsystem
© 2018-2020 Distributed Digital Archives and Libraries Lab