Coder Social home page Coder Social logo

xtouch-mini-processing's Introduction

xtouch-mini-processing

A Processing interface for the Behringer X-Touch Mini USB Controller.

This project makes it easy to interface with the X-Touch Mini in Processing. It's a thin wrapper around The MidiBus MIDI library that simplifies addressing and controlling the knobs and buttons on the X-Touch Mini.

Getting Started

Prerequisites

You will need three things to make this project work:

  1. Processing 3 (of course)
  2. Behringer X-Touch Mini USB Controller
  3. The MidiBus MIDI library for Processing

Installing

Install The MidiBus Library
Install The MidiBus library in Processing via the Contribution Manager:
In the Processing IDE, choose Sketch > Import Library... > Add Library... Find The MidiBus and click Install.

Copy the XTouch Classes to Your Project
Copy the XTouch.pde from the dist folder into the folder for your Processing sketch.

Usage

First create an instance of the XTouchMini class:

XTouchMini xTouch = new XTouchMini();

Implement these functions in your sketch to intercept the various hardware events:

void knobDidChange(XTKnob knob, float oldValue, float newValue) {
	println("knobDidChange (" + knob.id + "): " + oldValue, newValue);
}

void knobDidPress(XTKnob knob) {
	println("knobDidPress: " + knob.id);
}

void knobDidRelease(XTKnob knob) {
	println("knobDidRelease: " + knob.id);
}

void faderDidChange(float oldValue, float newValue) {
	println("faderDidChange: " + oldValue, newValue);
}

void buttonDidChange(XTButton button, boolean value) {
	println("buttonDidChange: (" + button.id + "): " + value);
}

Knob ids are 1–8 for Layer A, and 9–16 for Layer B.
Button ids are 1–16 for Layer A, and 17–32 for Layer B.
There is only a single Fader shared across both layers.

Set values on the controller like so:

// set value 100 for knob #2
xTouch.setValueForKnob(100, 2);

// set value true (on) for button #3
xTouch.setValueForButton(true, 3);

Find more info in the examples folder, or in the docs.

Build from Source

The build script for this project (build.sh) simply copies all the classes into a single file in the dist folder.

cd [xtouch-mini-processing]
./build.sh

License

This project is licensed under the Unlicense - see the LICENSE file for details.

xtouch-mini-processing's People

Contributors

cadin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

xtouch-mini-processing's Issues

Error

I am a sound engineer work on the XR18 with PC running Windows Vista for XAIR Edit.
I have a X-Touch mini and would like to use it to control the XR18.

I am able to install the requirements.txt

C:\xAir>xair-remote.py -l
Connected MIDI Ports:
X-TOUCH MINI 0

However, when i run the air-remote.py. I got the following error.

C:\xAir>xair-remote.py "X-TOUCH MINI 0"
Found XR18 with firmware 1.17 on IP 192.168.1.1
Error: MIDI port X-TOUCH MINI 0 does not exist!

When I try to have launch the X-Touch Editor, I got another error message.
May I know if I miss anything? Any idea how I can fix it?

C:\xAir>xair-remote.py "X-TOUCH MINI 0"
Found XR18 with firmware 1.17 on IP 192.168.1.1
Traceback (most recent call last):
File "C:\xAir\xair-remote.py", line 30, in
midi = MidiController(args.midi_port, state)
File "C:\xAir\lib\midicontroller.py", line 71, in init
self.inport = open_input(devicename)
File "C:\Python27\lib\site-packages\mido\backends\backend.py", line 91, in ope
n_input
return self.module.Input(name, **self._add_api(kwargs))
File "C:\Python27\lib\site-packages\mido\ports.py", line 161, in init
BasePort.init(self, name, **kwargs)
File "C:\Python27\lib\site-packages\mido\ports.py", line 86, in init
self._open(**kwargs)
File "C:\Python27\lib\site-packages\mido\backends\rtmidi.py", line 125, in _op
en
virtual=virtual, api=self.api)
File "C:\Python27\lib\site-packages\mido\backends\rtmidi.py", line 96, in _ope
n_port
rt.open_port(port_id)
File "src/_rtmidi.pyx", line 588, in rtmidi._rtmidi.MidiBase.open_port
File "src/_rtmidi.pyx", line 223, in rtmidi._rtmidi._cb_error_func
File "src/_rtmidi.pyx", line 411, in rtmidi._rtmidi._default_error_handler
rtmidi._rtmidi.SystemError: MidiInWinMM::openPort: error creating Windows MM MID
I input port.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.