Source code for audioinstruments.soundfont

# SPDX-FileCopyrightText: 2026 Brad Barnett
#
# SPDX-License-Identifier: MIT
# Generated by tools/make_faces.py from audioinstruments._rack.soundfont: edit that, then run it again.
"""A SoundFont 2 bank as an instrument: every melodic preset under one program change, played through `audiosampler`."""

NAME = "soundfont"
DISPLAY_NAME = "SoundFont"
CATEGORIES = ("Sampler",)
VERSION = "0.5.2"
VENDOR = "PyDevices"

MACRO_LABELS = (
    "Volume",
    "Attack",
    "Release",
    "Tune",
    "Pan",
)

MACRO_MODES = {
    0: "UNIPOLAR",
    1: "UNIPOLAR",
    2: "UNIPOLAR",
    3: "BIPOLAR",
    4: "BIPOLAR",
}

PATCHES = {
    0: ("Program 0", (100, 64, 64, 64, 64)),
}


[docs] def create(sample_rate, channel_count=2, transport=None, **options): """A live SoundFont. See ``audioinstruments.create`` for the options.""" from . import _build return _build(NAME, sample_rate, channel_count, transport, options)