scripts.classes2mlclasslist module

This is a script that converts a simple line-based list of MLClass names into the MLClassList XML definition file for OMR toolbox. A time-saving utility.

Accepts either one class name per line:

notehead stem flag slur tie barline

or one class name and tab-separated class group per line:

notehead note stem note flag note slur notation tie notation barline layout

If no group is specified, the <Folder> tag will be identical to the class name. If group is specified, the folder will be group/classname.

Colors

Symbols in the same group get the same color.

If no group is given, the color changes along the matplotlib color cycle.

class scripts.classes2mlclasslist.MLClassGenerator[source]

Bases: object

next_color(group=None)[source]
next_mlclass(cname, group=None)[source]
scripts.classes2mlclasslist.build_argument_parser()[source]
scripts.classes2mlclasslist.main(args)[source]
scripts.classes2mlclasslist.parse_classnames(filename)[source]

Generator for class name (plus possibly group).

scripts.classes2mlclasslist.rgb2hex(rgb)[source]

Converts a triplet of (R, G, B) floats in 0-1 range into a hex rgb string.