Source code for audioinstruments.soundfont_drums

# SPDX-FileCopyrightText: 2026 Brad Barnett
#
# SPDX-License-Identifier: MIT
# Generated by tools/make_faces.py from audioinstruments._rack.soundfont_drums: edit that, then run it again.
"""A SoundFont 2 bank's kits as a drum instrument: bank 128, one patch per kit, the General MIDI percussion keys 35-81 as the pads."""

NAME = "soundfont_drums"
DISPLAY_NAME = "SoundFont Drums"
CATEGORIES = ("Drum", "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: ("Standard", (100, 64, 64, 64, 64)),
}

NOTE_MAP = (
    (35, "Acoustic Bass Drum"),
    (36, "Bass Drum 1"),
    (37, "Side Stick"),
    (38, "Acoustic Snare"),
    (39, "Hand Clap"),
    (40, "Electric Snare"),
    (41, "Low Floor Tom"),
    (42, "Closed Hi-Hat"),
    (43, "High Floor Tom"),
    (44, "Pedal Hi-Hat"),
    (45, "Low Tom"),
    (46, "Open Hi-Hat"),
    (47, "Low-Mid Tom"),
    (48, "Hi-Mid Tom"),
    (49, "Crash Cymbal 1"),
    (50, "High Tom"),
    (51, "Ride Cymbal 1"),
    (52, "Chinese Cymbal"),
    (53, "Ride Bell"),
    (54, "Tambourine"),
    (55, "Splash Cymbal"),
    (56, "Cowbell"),
    (57, "Crash Cymbal 2"),
    (58, "Vibraslap"),
    (59, "Ride Cymbal 2"),
    (60, "Hi Bongo"),
    (61, "Low Bongo"),
    (62, "Mute Hi Conga"),
    (63, "Open Hi Conga"),
    (64, "Low Conga"),
    (65, "High Timbale"),
    (66, "Low Timbale"),
    (67, "High Agogo"),
    (68, "Low Agogo"),
    (69, "Cabasa"),
    (70, "Maracas"),
    (71, "Short Whistle"),
    (72, "Long Whistle"),
    (73, "Short Guiro"),
    (74, "Long Guiro"),
    (75, "Claves"),
    (76, "Hi Wood Block"),
    (77, "Low Wood Block"),
    (78, "Mute Cuica"),
    (79, "Open Cuica"),
    (80, "Mute Triangle"),
    (81, "Open Triangle"),
)


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