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.

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.