Source code for audioinstruments.rhythm808

# SPDX-FileCopyrightText: 2026 Brad Barnett
#
# SPDX-License-Identifier: MIT
# Generated by tools/make_faces.py from audioinstruments._rack.instruments.rhythm808.Rhythm808: edit that, then run it again.
"""Rhythm808, an analog drum machine with sixteen sounds, one circuit per pad, inspired by the Roland TR-808."""

NAME = "rhythm808"
DISPLAY_NAME = "Rhythm808"
CATEGORIES = ("Drum",)
VERSION = "0.5.3.dev1"
VENDOR = "PyDevices"

MACRO_LABELS = (
    "bd_decay",
    "bd_tone",
    "sd_tone",
    "sd_snappy",
    "oh_decay",
    "cy_decay",
    "accent",
    "volume",
)

MACRO_MODES = {
    0: "UNIPOLAR",
    1: "UNIPOLAR",
    2: "UNIPOLAR",
    3: "UNIPOLAR",
    4: "UNIPOLAR",
    5: "UNIPOLAR",
    6: "UNIPOLAR",
    7: "UNIPOLAR",
}

PATCHES = {
    0: ("Classic", (64, 64, 64, 64, 64, 64, 64, 89)),
    1: ("Long Boom", (127, 25, 64, 76, 64, 64, 64, 89)),
    2: ("Tight", (25, 64, 89, 102, 25, 38, 64, 89)),
    3: ("Electro", (89, 89, 64, 64, 64, 64, 102, 89)),
    4: ("Soft", (64, 38, 38, 64, 64, 64, 25, 76)),
    5: ("Latin", (64, 64, 64, 64, 64, 64, 64, 89)),
}

NOTE_MAP = (
    (35, "Bass Drum"),
    (36, "Bass Drum 2"),
    (37, "Rim Shot"),
    (38, "Snare Drum"),
    (39, "Hand Clap"),
    (40, "Snare Drum 2"),
    (41, "Low Tom"),
    (42, "Closed Hi-Hat"),
    (43, "Low Tom 2"),
    (44, "Closed Hi-Hat 2"),
    (45, "Mid Tom"),
    (46, "Open Hi-Hat"),
    (47, "Mid Tom 2"),
    (48, "High Tom"),
    (49, "Cymbal"),
    (50, "High Tom 2"),
    (51, "Cymbal 2"),
    (56, "Cowbell"),
    (57, "Cymbal 3"),
    (62, "High Conga"),
    (63, "Mid Conga"),
    (64, "Low Conga"),
    (70, "Maracas"),
    (75, "Claves"),
)


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