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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

audiate-0.0.2.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

audiate-0.0.2-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file audiate-0.0.2.tar.gz.

File metadata

  • Download URL: audiate-0.0.2.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","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}

File hashes

Hashes for audiate-0.0.2.tar.gz
Algorithm Hash digest
SHA256 cd48c1ae1cb5b841cab8967992a884a4c8cb98078a8859353e8eaf32ab280fdf
MD5 df941d9d49f716669a997621572b0a26
BLAKE2b-256 ee47827194a58dcf70c909396bb9af7a6d274d3c803cf922502973da1dc29813

See more details on using hashes here.

File details

Details for the file audiate-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: audiate-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","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}

File hashes

Hashes for audiate-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 61e67ff03d7dedd09ef04f5244b587521d4962ad9b28681e1e27ed7e7d7e8dd2
MD5 ba5bba09bfa25e3de6039defd9bcc36e
BLAKE2b-256 b5d7ded5a09adafaf1fa506e38a0e43671a41aedd07d5897747aa68eb71e0d1e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 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