ash/XONE-K2.org
2024-09-24 12:33:29 +02:00

6.6 KiB
Raw Blame History

install & setup

requirements

python -m pip install oscpy mido python-rtmidi argparse

make it go

python k2-misc.py

usage

usage: k2-misc [-h] [--host OSC-host] [--port OSC-port] [--midi MIDI-port]
             [-v verbose] [-q quiet]

MIDI->OSC bridge for Allen & Heath XONE:K2 controller

options:
  -h, --help        show this help message and exit
  --host OSC-host   hostname or address of OSC destination
  --port OSC-port   port for OSC messages
  --midi MIDI-port  port name of MIDI device
  -v verbose
  -q quiet

defaults

python k2-misc.py --host "127.0.0.1" --port 5111 --midi 'XONE:K2'

Overview

Physical layout

XONE:K2 Publication AP8509

Rotary Encoders

Turning an encoder produces MIDI CC (continuous controller) messages with a unique controller number in twos compliment binary encoding These encoders feature a built in momentary push switch. Pressing down on the encoder knob activates the switch and sends a “Note On” MIDI message, releasing the switch sends a corresponding “Note Off” message. The window below the top row of encoders can be used to display the state of the encoder switch in the same manner as the other switches.

Rotary Potentiometers

These controls are standard potentiometers with end stops. Turning a pot from left to right will send MIDI messages with a unique CC number and a control value from 0 to 127.

Pot Switches

Each rotary potentiometer has a switch with tri-colour illumination below it.

Linear Faders

Moving a linear fader will send a MIDI message with a unique CC number and a control value from 0 (bottom) to 127 (top).

Switch Matrix

The switch matrix consists of 16 back-lit tri-colour switches.

Layer Button

The Layer button is completely user assignable but can also function as an embedded layer button.

OSC layout & mapping

Physical controls are numbered L->R and top->down

Rotary potentiometers

Rotary potentiometers are numbered 1-12 (soft sync/pickup?) and send value 0-127 when turned, and pressed / released messages are sent when knobs are pressed (and released).

/xone/k2/rp/<n> <int>
/xone/k2/rp/<n>/pressed
/xone/k2/rp/<n>/released

Rotary encoders

Rotary encoders on the top row are numbered 1-4 and the bottom row are numbered 5 and 6. Encoders send inc messages when turned right (clockwise) or dec when lurned left (widdershins). While turned & pressed, the encoder sends inc-fine and dec-fine messages.

/xone/k2/re/<n>/inc
/xone/k2/re/<n>/dec
/xone/k2/re/<n>/inc-fine
/xone/k2/re/<n>/dec-fine

Linear faders

Linear faders are numbered 1-4 and send values from 0 (fully down) up to 127 (fully up).

/xone/k2/fader/<n>/value <int>

Buttons

The upper block of buttons (above the faders) are numbered from 1-12 and the lower block (grid below the faders) are named A-P, LAYER, and SHIFT as labled)

/xone/k2/button/<name>/pressed
/xone/k2/button/<name>/released

set button colour (not yet implemented)

/xone/k2/button/<name>/set <colour>
<colour> = red, orange, green, off (string)

MIDI layout (MIDI IMPLEMENTATION SEND / RETURN)

By default the MIDI Channel number is set to 15 (14) to prevent control interaction with Xone DB series mixers which default to channel 16 (15).

MIDI NOTE IMPLEMENTATION TABLE

DEC HEX NOTE
0 00 C-1
1 01 C#-1
2 02 D-1
3 03 D#-1
4 04 E-1
5 05 F-1
6 06 F#-1
7 07 G-1
8 08 G#-1
9 09 A-1
10 0A A#-1
11 0B B-1
12 0C C0
13 0D C#0
14 0E D0
15 0F D#0
16 10 E0
17 11 F0
18 12 F#0
19 13 G0
20 14 G#0
21 15 A0
22 16 A#0
23 17 B0
24 18 C1
25 19 C#1
26 1A D1
27 1B D#1
28 1C E1
29 1D F1
30 1E F#1
31 1F G1
32 20 G#1
33 21 A1
34 22 A#1
35 23 B1
36 24 C2
37 25 C#2
38 26 D2
39 27 D#2
40 28 E2
41 29 F2
42 2A F#2
43 2B G2
44 2C G#2
45 2D A2
46 2E A#2
47 2F B2
48 30 C3
49 31 C#3
50 32 D3
51 33 D#3
52 34 E3
53 35 F3
54 36 F#3
55 37 G3
56 38 G#3
57 39 A3
58 3A A#3
59 3B B3
60 3C C4
61 3D C#4
62 3E D4
63 3F D#4
64 40 E4
65 41 F4
66 42 F#4
67 43 G4
68 44 G#4
69 45 A4
70 46 A#4
71 47 B4
72 48 C5
73 49 C#5
74 4A D5
75 4B D#5
76 4C E5
77 4D F5
78 4E F#5
79 4F G5
80 50 G#5
81 51 A5
82 52 A#5
83 53 B5
84 54 C6
85 55 C#6
86 56 D6
87 57 D#6
88 58 E6
89 59 F6
90 5A F#6
91 5B G6
92 5C G#6
93 5D A6
94 5E A#6
95 5F B6
96 60 C7
97 61 C#7
98 62 D7
99 63 D#7
100 64 E7
101 65 F7
102 66 F#7
103 67 G7
104 68 G#7
105 69 A7
106 6A A#7
107 6B B7
108 6C C8
109 6D C#8
110 6E D8
111 6F D#8
112 70 E8
113 71 F8
114 72 F#8
115 73 G8
116 74 G#8
117 75 A8
118 76 A#8
119 77 B8
120 78 C9
121 79 C#9
122 7A D9
123 7B D#9
124 7C E9
125 7D F9
126 7E F#9
127 7F G9

various