music21.abc.translate
Functions for translating music21 objects and ABCHandler instances. Mostly, these functions are for advanced, low level usage. For basic importing of ABC files from a file or URL to a Stream, use the music21 converter module’s parse() function.
-
music21.abc.translate.abcToStreamOpus(abcHandler, inputM21=None, number=None)
- Convert a multi-work stream into one or more complete works packed into a an Opus Stream. If a number argument is given, and a work is defined by that number, that work is returned.
-
music21.abc.translate.abcToStreamPart(abcHandler, inputM21=None, spannerBundle=None)
- Handler conversion of a single Part of a multi-part score. Results, as a Part, are built into the provided inputM21 object (a Score or similar Stream) or a newly created Stream.
-
music21.abc.translate.abcToStreamScore(abcHandler, inputM21=None)
- Given an abcHandler object, build into a multi-part Score with metadata. This assumes that this ABCHandler defines a single work (with 1 or fewer reference numbers). if the optional parameter inputM21 is given a music21 Stream subclass, it will use that object as the outermost object. However, inner parts will always be made Part objects.