Source code for audioinstruments.rhythm909

# SPDX-FileCopyrightText: 2026 Brad Barnett
#
# SPDX-License-Identifier: MIT
# Generated by tools/make_faces.py from audioinstruments._rack.instruments.rhythm909.Rhythm909: edit that, then run it again.
"""Rhythm909, a drum machine with eleven synthesized sounds, inspired by the Roland TR-909."""

NAME = "rhythm909"
DISPLAY_NAME = "Rhythm909"
CATEGORIES = ("Drum",)
VERSION = "0.5.3.dev1"
VENDOR = "PyDevices"

MACRO_LABELS = (
    "bd_tune",
    "bd_attack",
    "bd_decay",
    "sd_tone",
    "sd_snappy",
    "oh_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: ("House", (64, 89, 76, 64, 64, 51, 64, 89)),
    2: ("Techno", (38, 76, 102, 64, 64, 64, 102, 89)),
    3: ("Hard", (89, 127, 38, 102, 114, 38, 64, 89)),
    4: ("Clean Metal", (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, "Crash Cymbal"),
    (50, "High Tom 2"),
    (51, "Ride Cymbal"),
    (57, "Crash Cymbal 2"),
    (59, "Ride Cymbal 2"),
)


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