กลับไปหน้ารวมไฟล์
midi-to-trigger-for-drums-and-decay-envelopes-1644a1-en.md

This demultiplexer is used to work which a lot of drum modules (I have). The pulse length is 2 ms.

The demultiplexer itself contains of a 2D-matrix (octaves and notes) for each key realized by some logic ICs; each note has a pulse enlarger - the Arduino has only a short time (I choosed 100 us) to put a puls out while one MIDI byte is transfered (280 us per byte at 31.25 kbps). Details are visible in the schematic. Only Note-ON is used. In the code are the flat wire numbers and binary values for each key shown; I call it 'keybyte': lower nibble for 12 notes but no X000 and X111, upper nibble for octave, maybe bit 7 as flag.

the additional clock interface i need for clocked devices like beat boxes and 6 outs for decay envelopes.

EXPANDED TECHNICAL DETAILS

MIDI Signal Processing

The Arduino Nano acts as the high-speed gateway for the MIDI interface. Standard MIDI operates at 31,250 baud, where each message consists of 3 bytes (Status, Data1, Data2). The firmware listens for Note-ON events and ignores Note-OFF or CC messages to maximize performance.

  • Timing Constraints: A single MIDI byte takes 320µs to transmit. To avoid missing incoming data, the trigger pulse output is limited to a very short duration (100µs), which is then expanded by external monostable multivibrators or pulse enlarger circuits to a usable 2ms trigger for drum modules.

2D-Matrix Demultiplexing

To handle up to 96 notes (8 octaves) from a single Arduino, the project utilizes a 2D-Matrix logic system.

  1. Octave Selection: Binary values sent to logic ICs select one of 8 octave planes.
  2. Note Selection: Logic gates decode the note within the selected octave.
  3. Decay Envelopes: 6 specialized outputs are dedicated to triggering analog envelope generators, allowing for the classic "decay" sound found in drum synthesizers.

Synchronization

The implementation includes a MIDI Clock interface. It listens for the 0xF8 (Timing Clock) byte to provide a stable trigger for external sequencers or hardware beat boxes, ensuring the entire analog modular rack stays in sync with the digital host.

ข้อมูล Frontmatter ดั้งเดิม

title: "MIDI to Trigger for Drums and decay envelopes"
description: "A Demultiplexer for 8 octaves at one MIDI port. additional a clock and decay trigger converter."
author: "trouby"
category: "Audio & Sound"
tags:
  - "Audio"
  - "Music"
views: 145
likes: 0
price: 2450
difficulty: "Intermediate"
components:
  - "1x Arduino Nano"
  - "1x Solder Iron"
tools: []
apps:
  - "1x Arduino IDE 2.0 (beta)"
downloadableFiles:
  - "https://projects.arduinocontent.cc/dca01f8c-3bd9-41c3-a65d-35cf31f322f8.ino"
  - "https://projects.arduinocontent.cc/ab9fbc37-6f7a-4163-8b92-15488095d2db.ino"
documentationLinks: []
passwordHash: "30697eea9967ec5cbe34efedda25c35f4c595301eddb33ae04d326875e1c548e"
encryptedPayload: "U2FsdGVkX19r8kpj9QMtzsQ40tznw8Jo9BWPycQZNMm7fIoOxLLPNmRzQU7ArepQz+/oREvn2Ow5hGQ8qrD0VgCucZoC74cO3sqnCaXUgc8="
seoDescription: "MIDI to Trigger for Drums and decay envelopes. Features a Demultiplexer for 8 octaves, clock, and decay trigger converter for Arduino projects."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/midi-to-trigger-for-drums-and-decay-envelopes-1644a1_cover.jpg"
lang: "en"