symusic.factory.ScoreFactory¶
- class ScoreFactory[source]¶
Bases:
objectHigh-level wrapper around the templated symusic.core.Score* classes.
It accepts MIDI/ABC paths, byte payloads, or other score instances and forwards everything to the nanobind implementation while preserving the per time-unit specializations.
Methods
__init__()from_abc(abc[, ttype])from_file(path[, ttype, fmt, sanitize_data, ...])from_midi(data[, ttype, sanitize_data])Parse MIDI bytes into a score and optionally sanitize payload values.
from_other(other[, ttype, min_dur])from_tpq([tpq, ttype])- from_file(path: str | Path, ttype: TimeUnit | str = 'tick', fmt: str | None = None, sanitize_data: bool = False, format: str | None = None) Score[source]¶