Skip to main content

audiate

Render a symbolic music score to audio.

Give audiate a score in any of several standard formats — MIDI, MusicXML, ABC, Humdrum-kern, MEI — and get back an audio waveform. One call:

import audiate

audio = audiate.render("song.mid")  # -> AudioData
audio.write("song.wav")

The name is audiation — hearing music in your mind. audiate makes a written score actually audible.

Install

pip install audiate                 # core: MIDI in, pure-Python "sine" synth out
pip install "audiate[symbolic]"     # + MusicXML / ABC / kern / MEI (music21)
pip install "audiate[fluidsynth]"   # + SoundFont synthesis (pyFluidSynth)
pip install "audiate[all]"          # everything

Quick start

import audiate

# Start from any standard format — it's auto-detected
audio = audiate.render("lead_sheet.musicxml")
audio = audiate.render("tune.abc")
audio = audiate.render("bach.krn")

# ...or from objects you already have
import pretty_midi

audio = audiate.render(pretty_midi.PrettyMIDI("song.mid"))

from music21 import corpus

audio = audiate.render(corpus.parse("bach/bwv66.6"))

# The result is an AudioData
audio.array  # float32 numpy waveform
audio.sample_rate  # e.g. 44100
audio.duration_seconds
audio.to_wav_bytes()  # WAV bytes
audio.write("out.wav")  # write to disk

How it works

The universal pivot is MIDI. Every input format is normalized to a pretty_midi.PrettyMIDI (the ingest layer), then a pluggable engine synthesizes it to audio. Adding one ingester or one engine multiplies coverage across all the others.

score (MIDI / MusicXML / ABC / kern / MEI / …)
        │  ingest  (pretty_midi + music21)
        ▼
   pretty_midi.PrettyMIDI          ← the MIDI-in-the-middle pivot
        │  engine
        ▼
   AudioData (waveform + sample_rate)

Engines (progressive disclosure)

Engine Quality Needs Use for
sine basic nothing (pure NumPy) tests, CI, quick previews — always works
fluidsynth good FluidSynth + a SoundFont the default once a SoundFont is present
musescore best the MuseScore CLI notation-aware audio (dynamics, articulations, repeats)

engine="auto" (the default) uses fluidsynth when a SoundFont is available, otherwise falls back to sine.

audio = audiate.render("song.mid", engine="fluidsynth", soundfont="MyPiano.sf2")
audio = audiate.render("score.musicxml", engine="musescore")  # highest fidelity

Register your own engine — it's an open registry:

from audiate import register_engine


@register_engine("my_synth")
def my_synth(pm, *, sample_rate=44100, **opts):
    ...
    return waveform, sample_rate  # (np.ndarray, int)

The sung line: vocal notes with lyrics

A singing voice needs one line of a score, not its audio: the vocal notes, each with its onset and duration in seconds, its MIDI pitch, the syllable sung on it and the word that syllable belongs to.

import audiate

line = audiate.sung_line(
    "song.musicxml"
)  # or "song.mid", "song.kar", MIDI bytes, a music21 stream
[(n.start, n.dur, n.pitch, n.syllable, n.word, n.starts_word) for n in line][:2]
# [(0.0, 0.5, 64, 'can', 'candle', True), (0.5, 0.5, 67, 'dle', 'candle', False)]

The times are on the same clock as audiate.render, so the line lines up with the rendered accompaniment, repeats included. One line is read: a MIDI track and channel, or one part and voice of a MusicXML score; polyphony, ambiguous lyrics and unclear choices raise with the candidates named, and part=, voice=, verse=, track=, channel= and chords= choose. The full reading rules (which line, repeats and verses, syllables and words, melismas, karaoke) are in the docstring of audiate.sung.

audiate.attach_lyrics(line, "Light a can-dle") puts hand-written lyrics on the notes instead (read them with with_lyrics=False).

System dependencies

  • FluidSynth (for the fluidsynth engine): brew install fluid-synth / apt install fluidsynth, plus a SoundFont (.sf2/.sf3). Point audiate at one with soundfont=... or $AUDIATE_SOUNDFONT; good free options include MuseScore_General.sf3 (MIT) and FluidR3_GM (MIT).
  • MuseScore (for the musescore engine): the desktop app's mscore binary. Set $AUDIATE_MUSESCORE if it isn't on your PATH.

Where it fits

audiate is the score → audio stage of a larger pipeline:

  • search a score by metadata → (a search facade)
  • audiate — render that score to "MIDI audio"
  • arioso — turn that into AI-enhanced audio (arioso.enhance)

Chord-chart arrangement (chords → a backing band) is accompy's job; audiate focuses on rendering fully-specified symbolic scores.

License

MIT

Metadata

Release files for audiate 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for audiate 0.0.4
File Size Uploaded Provenance Actions
audiate-0.0.4.tar.gz 34.4 kB Without provenance Details for audiate-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for audiate 0.0.4
File Interpreter ABI Platform Actions
audiate-0.0.4-py3-none-any.whl Python 3 none any Details for audiate-0.0.4-py3-none-any.whl

Total release size: 71.9 kB

Release files / audiate-0.0.4.tar.gz

Download URL audiate-0.0.4.tar.gz
Size 34.4 kB
Tags Source
SHA-256 checksum
How to use checksums
87d8eeece317e0177175f695522861a4570ffdfd3fa5aff36bb7a3b54cb5cb9d
BLAKE2b-256 checksum
How to use checksums
1b109345b0c4958f3ca56c0e7989efff7434c33ce7c01b19a5b3d17df78654c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / audiate-0.0.4-py3-none-any.whl

Download URL audiate-0.0.4-py3-none-any.whl
Size 37.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19d66ea406e3b55a634adabb3893c4975995e164da6483c527904ba7cb3f6e3a
BLAKE2b-256 checksum
How to use checksums
8335ccd1722bed05119599ad54ba81a7fc271437bfd32645e901b37e08aa3d16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for audiate 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page