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)

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.3

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.3
File Size Uploaded
audiate-0.0.3.tar.gz 16.0 kB Details

Built distribution (wheel)

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

Total release size: 34.6 kB

Release files / audiate-0.0.3.tar.gz

Download URL audiate-0.0.3.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b8463afd7221d282cf684e5828fe535ccf1fcf7612e4afe1f454146cbcf5efe0
BLAKE2b-256 checksum
How to use checksums
da2b1da776cdede7b33b2368745442a4f9e19be21a4bf3f72ba6bcd89935701d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","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.3-py3-none-any.whl

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

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

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