Vous êtes sur la page 1sur 3

X-Y

MIDI Joystick Controller for DAW



Arduino
Install driver file for Arduino clone
Install Arduino software
Get initial serial communication going: Tools Menu - select the Board (Uno), and
Port device
Open your X-Y sketch (eg Quora2)
Plug in the Arduino board to USB
Upload the sketch to the board1
Wire the joystick to the board2:
o +5v
o 0v
o A0
o A1

Audio MIDI Setup
Enable the IAC driver
Create a bus and name it

Hairless MIDI
Install and open
Select the serial port for the Arduino
Select your IAC bus as MIDI Out
In Preferences select the Baud rate (9600)

Logic Pro
Open this window: Logic Pro X>Control Surfaces>Controller Assignments
Click the Learn Mode button
Wiggle the parameter to control. It should now appear in the Parameter column
Wiggle the Joystick (on only one axis). Learned should appear in the Control
column
In the Value section there are some parameters that may need adjusted,
depending on your Joystick potentiometer behaviour:
o Min/max: 0/127
o Format: unsigned
o Multiply: 1.00 (this one can adjust the centre value of your joystick)
o Mode: scaled




1
Hairless MIDI must be inactive. Disable Serial<->MIDI Bridge On to upload
2
If you USB port is shutting down it is due to excess current demand. In that case your
joystick will need a current limiting resistor on the +5v line.
Example code:

int joyPin1 = 0; // slider variable connected to analog pin 0
int joyPin2 = 1; // slider variable connected to analog pin 1
int value = 0; // variable to read the value from analog pin
char note1, note2, noteprev;

void setup() {
Serial.begin(9600); // set the Baud rate
}

void loop() {
value = analogRead(joyPin1);
noteprev=note1;
note1= (value)/8; //10 bit to 7 bit
if (noteprev!=note1) // transmit data only if value has changed
{
Serial.write(176); //controller on channel 1: 1011-0000
Serial.write(10); //'Effect Control 1': 0-0000111
Serial.write(note1);
}
delay(20); //20ms delay to prevent false pot. readings

value = analogRead(joyPin2);
noteprev=note2;
note2= (value)/8; //10 bit to 7 bit
if (noteprev!=note2)
{
Serial.write(176); //controller on channel 1: 1011-0000
Serial.write(7); //'Effect Control 2': 0-0001011
Serial.write(note2);
}
delay(20); //20ms delay
}



Binary to Decimal conversion

MIDI Channel
no. bin. dec.
1 10110000 176
2 10110001 177
3 10110010 178
4 10110011 179
5 10110100 180
6 10110101 181
7 10110110 182
8 10110111 183
9 10111000 184
10 10111001 185
11 10111010 186
12 10111011 187
13 10111100 188
14 10111101 189
15 10111110 190
16 10111111 191

CC Number
bin. no. / dec. name.
00000001 1 modulation
00000101 5 portamento time
00000111 7 volume
00001111 10 pan
00010100 20 undefined (up to CC31)3

01000000 64 sustain
01000001 65 portamento on/off
01010100 84 portamento amount
01011011 91 reverb amount
01011100 92 tremelo amount
01011101 93 chorus amount


3
Undefined CC numbers:

3
9
14-15
20-31
85-90
102-119

Vous aimerez peut-être aussi