Skip to main content

This script maps MIDI Control Change (CC) and Note On/Off messages from a Behringer X-Touch Mini to vJoy virtual joystick inputs. It allows you to control vJoy axes and buttons using MIDI devices.

Project description

MIDI to vJoy Mapper

This script maps MIDI Control Change (CC) and Note On/Off messages from a Behringer X-Touch Mini to vJoy virtual joystick inputs. It allows you to control vJoy axes and buttons using MIDI devices.

Features

  • Maps up to 8 MIDI CC messages to vJoy axes (X, Y, Z, RX, RY, RZ, SL0, SL1).
  • Maps MIDI Note On/Off messages to vJoy buttons.
  • Supports scaling MIDI CC values (0--127) to vJoy axis range (0--32,767).
  • Designed for compatibility with the Behringer X-Touch Mini.

Requirements

Hardware

  • A MIDI device (e.g., Behringer X-Touch Mini).

Software

  • Python 3.7 or newer.
  • The following Python packages:
  • mido (for MIDI input handling)
  • pyvjoy (for interacting with vJoy)

To install the required Python packages, use:

pip install mido pyvjoy `

Additional Tools

  • vJoy Virtual Joystick Driver. Ensure vJoy is installed and configured with a virtual joystick.

Installation

  1. Clone or download this repository to your local machine.
  2. Ensure Python and required libraries are installed.
  3. Verify your vJoy configuration supports the required axes and buttons.

Usage

  1. Connect your MIDI device (e.g., Behringer X-Touch Mini) to your computer.

  2. Run the script:

    bash

    Copy code

    python script.py

  3. Select the MIDI port:

    • The script lists all available MIDI input ports.
    • Enter the number corresponding to your device.
  4. Interact with your MIDI device:

    • Turn knobs or sliders to send CC messages, mapped to vJoy axes.
    • Press buttons to trigger Note On/Off messages, mapped to vJoy buttons.

MIDI-to-vJoy Mapping

Axis Mapping

MIDI CC Number vJoy Axis Description
CC1 X X-axis
CC2 Y Y-axis
CC3 Z Z-axis
CC4 RX Rotational X
CC5 RY Rotational Y
CC6 RZ Rotational Z
CC7 SL0 Slider 0
CC9 SL1 Slider 1

Button Mapping

  • MIDI Notes are mapped to vJoy buttons sequentially.
    • For example, MIDI Note 0 triggers vJoy Button 1, Note 1 triggers Button 2, etc.

Known Limitations

  • vJoy supports a maximum of 8 axes, which restricts the number of mappable CC controls.
  • CC8 is disabled in this implementation due to this limitation.
  • Ensure your MIDI device is sending the expected CC messages for proper mapping.

Debugging and Logs

  • The script prints incoming MIDI messages to the console.
  • It also logs the mapping of CC messages and button presses for troubleshooting.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xtouch2vjoy-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Xtouch2Vjoy-0.1.0-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file xtouch2vjoy-0.1.0.tar.gz.

File metadata

  • Download URL: xtouch2vjoy-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for xtouch2vjoy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 52b44b47bb74de32faf8ad5298bb2be594e442b64b462c27b258ed6ae2a9a90e
MD5 ab392986ff3e2ad4720c84220a9663a9
BLAKE2b-256 bf41ae6dd22c8df09810f8fd91c958141a1d54c57d0a608009d23f8ebf08820e

See more details on using hashes here.

File details

Details for the file Xtouch2Vjoy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: Xtouch2Vjoy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for Xtouch2Vjoy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b81568ffa2c495e4f8cf8e0fb3793791eb5f44f8df07acc8a2ae22602b168b9
MD5 7945bdd72a550b460f09a7597fdc770d
BLAKE2b-256 c5fce654dc1e18def7aa495da0003e639a2d7f9139366860dd2f40f4f5e6f5aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page