send-midi

send-midi for Ampero II Stomp

Live Application License: MIT

This repository hosts a web-based MIDI controller designed specifically for the Hotone Ampero II Stomp effects processor. The application provides a simple and intuitive interface for musicians to manage their live performance setlists, sending precise MIDI commands to the Ampero II Stomp to automatically set the song’s tempo (BPM).

The application is built with standard web technologies (HTML, CSS, JavaScript) and utilizes the Web MIDI API, allowing it to run in a browser on any compatible device (PC, Mac, iPad, Android tablet) and connect to the Ampero II Stomp via USB or a Bluetooth MIDI adapter.

Live Application URL: https://afonsorodrigues.com/send-midi/App/

Core Features

How It Works: The MIDI Logic

The Ampero II Stomp uses a two-message system for setting the tempo via MIDI Control Change (CC) messages, which provides a high resolution across a wide BPM range (40-300 BPM). The application handles this conversion automatically.

The tempo is controlled by two CC messages:

The logic, based on the official Ampero II Stomp MIDI documentation (Firmware V2.0.0), is as follows:

BPM Range CC #74 Value (MSB) CC #75 Value (LSB) Calculation
40 - 127 0 40 to 127 Value = BPM
128 - 255 1 0 to 127 Value = BPM - 128
256 - 300 2 0 to 44 Value = BPM - 256

Example: For the song “Rádio Pirata” with a BPM of 153:

  1. The BPM 153 falls into the 128 - 255 range.
  2. The application sends CC #74 with a value of 1.
  3. It then calculates the LSB value: 153 - 128 = 25.
  4. It sends CC #75 with a value of 25.

The Ampero II Stomp receives these two messages and sets its master tempo to 153 BPM.

How to Use

  1. Connect Your Device: Connect your Ampero II Stomp to your computer, tablet, or phone.
    • Wired: Use a standard USB cable.
    • Wireless: Use a Bluetooth MIDI adapter (like a WIDI Master or Yamaha MD-BT01) connected to the Ampero’s MIDI IN/OUT ports.
  2. Open the Application: Navigate to https://afonsorodrigues.com/send-midi/App/ in a Web MIDI-compatible browser (Google Chrome is recommended).
  3. Connect MIDI: Click the Conectar MIDI Bluetooth button. A browser pop-up will appear, listing available MIDI devices. Select your Ampero II Stomp or your Bluetooth MIDI adapter from the list and click “Connect”.
  4. Select a Song: The interface will display your setlist, organized by groups. Click on any song.
  5. Done! The application will instantly send the corresponding MIDI messages to set the tempo on your Ampero II Stomp. The status display will confirm the messages sent.

Customizing Your Setlist

The entire setlist is defined in the App/songs.json file. You can fork this repository or download the files to create your own custom setlist.

The file contains a JSON array of song objects. Each object has the following structure:

{
    "group": "BLOCO VIOLÃO",
    "name": "Chão de Giz",
    "bpm": 144,
    "author": "Zé Ramalho",
    "obs": "",
    "tom": "G",
    "color": false
}

Simply edit this file to add, remove, or reorder your songs, then open the index.html file locally or host it on your own server.

File Structure

The core application files are located in the /App directory.

/App
├── index.html          # The main application page
├── midi-utils.js       # Core JavaScript logic for MIDI, UI rendering, and event handling
├── songs.json          # The user-configurable setlist data
└── style.css           # CSS for styling the application

License

This project is licensed under the MIT License. See the LICENSE file for details. You are free to use, modify, and distribute this software.