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.1.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.1-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xtouch2vjoy-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 9c4472bc83882cee71c995f2290e738f3abc782b8c8cdac75b77f7f0c3484c25
MD5 ff369f8559f5ab968a3032d83a844ed2
BLAKE2b-256 78137ec28b4d2c41ad31b48f26336b4144a580ab6e585bb0618ffa6cda301582

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Xtouch2Vjoy-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e99c2913fef2730ec5d241c39c8ff59038c7a1648bc362df171d7ca021d107c1
MD5 19252004207586c23eac5ebf9466b4d8
BLAKE2b-256 f1fef9953ecef95f4c9a964aa08b5c01e48df64d82c871cb0abb2405e56c4068

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