Python API Reference

This section is generated from the actual source tree so it stays in sync with releases. The entries below focus on the user-facing factories that mirror the symusic namespace.

symusic.Score

High-level wrapper around the templated symusic.core.Score* classes.

symusic.Track

Creates symusic.core.Track* objects pre-populated with optional event lists.

symusic.Note

Builds typed note events and typed note vectors backed by symusic.core.

symusic.ControlChange

Produces controller events mapped to the requested time domain.

symusic.Tempo

Creates tempo-change events, handling either QPM or raw MSPQ inputs.

symusic.Pedal

Creates sustain/soft-pedal envelopes tied to the requested time resolution.

symusic.PitchBend

Constructs wheel-based pitch bend events.

symusic.KeySignature

Factory responsible for key signature events and their typed vectors.

symusic.TimeSignature

Factory wrapper for the meter-change events exposed by symusic.core.

symusic.TimeUnit

User-facing dispatcher for the nanobind symusic.core time unit singletons.

symusic.Synthesizer

Convenience layer over symusic.core.Synthesizer with sensible defaults.

symusic.dump_wav(path, data[, shape, order, ...])

Write a numpy.ndarray buffer to a WAV file using Prestosynth's writer.

symusic.Soundfont(name, url, hash_)

Descriptor for a SoundFont artifact (.sf2/.sf3).

symusic.BuiltInSF2()

Curated SoundFont 2 (SF2) presets.

symusic.BuiltInSF3()

Curated SoundFont 3 (SF3) presets.

symusic.factory.ControlChangeFactory()

Produces controller events mapped to the requested time domain.

symusic.factory.CoreClasses(tick, quarter, ...)

Holds the Tick/Quarter/Second variants for a given low-level type.

symusic.factory.KeySignatureFactory()

Factory responsible for key signature events and their typed vectors.

symusic.factory.NoteFactory()

Builds typed note events and typed note vectors backed by symusic.core.

symusic.factory.PedalFactory()

Creates sustain/soft-pedal envelopes tied to the requested time resolution.

symusic.factory.PitchBendFactory()

Constructs wheel-based pitch bend events.

symusic.factory.ScoreFactory()

High-level wrapper around the templated symusic.core.Score* classes.

symusic.factory.SynthesizerFactory()

Convenience layer over symusic.core.Synthesizer with sensible defaults.

symusic.factory.TempoFactory()

Creates tempo-change events, handling either QPM or raw MSPQ inputs.

symusic.factory.TextMetaFactory()

Factory for textual metadata events such as lyrics or markers.

symusic.factory.TimeSignatureFactory()

Factory wrapper for the meter-change events exposed by symusic.core.

symusic.factory.TimeUnitFactory()

User-facing dispatcher for the nanobind symusic.core time unit singletons.

symusic.factory.TrackFactory()

Creates symusic.core.Track* objects pre-populated with optional event lists.

Note

Most Python surfaces are thin factories built on top of nanobind classes defined in symusic.core. The docstrings you see here are injected at bind time so they accurately describe the compiled extension even though the documentation focuses on the high-level symusic namespace.

Low-Level Core API

The low-level symusic.core API is documented through dedicated pages that keep the tick, quarter, and second specializations side by side in tabs:

See Generic Core Bindings for a guided overview of how the factories relate to their templated symusic.core counterparts, and use Low-Level symusic.core API to explore the raw Tick-based classes that power the binding.